I have been thinking on this glitch after seeing a thread somewhere, and tried a few things when time allow. I know it's rare but considering the limited numbers of factions, it's still a glitch if it happen when a faction is otherwise healthy enough.
A few notes first:
1, I thought it could happen as well if a leader and heir were dying simultaneously, but tests proved me wrong. As long that one or more adult FM IN the family tree are there to take over, the glitch won't happen.
2, named character outside the family tree are the real buggers, as you will see.
3, You never know what sort of strange things can happen in ai factions family tree, especially during long campaigns with characters living a lot of turns.
My beginning of 'salvation', not so complicated and working surprisingly well, except for one annoying shortfall with possible named characters outside the family tree:
If there are no adult FM in family tree at death of a faction leader or heir to take over, these two monitors will spawn new ones, depending on which died or if both died prior to the entire faction turning rebels, preventing the glitch.Code:monitor_event CeasedFactionLeader if I_NumberOfHeirs mongols < 1 and I_NumberOfSettlements mongols > 0 spawn_army faction mongols character random_name, named character, age 41, x 95, y 88, family traits Factionleader 1 , GoodCommander 2 , Intelligent 2 , Austere 1 , BattleDread 1 , StrategyDread 2 , ReligionStarter 1 , LoyaltyStarter 1 unit Boii_Bodyguard_Cavalry exp 6 armour 1 weapon_lvl 1 end end_if if I_NumberOfHeirs ellenobaktrioi < 1 and I_NumberOfSettlements ellenobaktrioi > 0 spawn_army faction ellenobaktrioi character random_name, named character, age 41, x 292, y 54, family traits Factionleader 1 , GoodCommander 2 , Intelligent 2 , Austere 1 , BattleDread 1 , StrategyDread 2 , ReligionStarter 1 , LoyaltyStarter 1 unit Bactrian_Bodyguard exp 6 armour 1 weapon_lvl 1 end end_if ;;;ect, ect end_monitor monitor_event CeasedFactionHeir if I_NumberOfHeirs mongols < 1 and I_NumberOfSettlements mongols > 0 spawn_army faction mongols character random_name, named character, age 34, x 93, y 87, family traits Factionheir 1 , GoodCommander 2 , Intelligent 2 , Austere 1 , BattleDread 1 , StrategyDread 2 , ReligionStarter 1 , LoyaltyStarter 1 unit Boii_Bodyguard_Cavalry exp 6 armour 1 weapon_lvl 1 end end_if if I_NumberOfHeirs ellenobaktrioi < 1 and I_NumberOfSettlements ellenobaktrioi > 0 spawn_army faction ellenobaktrioi character random_name, named character, age 34, x 299, y 73, family traits Factionheir 1 , GoodCommander 2 , Intelligent 2 , Austere 1 , BattleDread 1 , StrategyDread 2 , ReligionStarter 1 , LoyaltyStarter 1 unit Bactrian_Bodyguard exp 6 armour 1 weapon_lvl 1 end end_if ;;;ect, ect end_monitor
But there is the possibility of some named character outside the family tree:
1, by recruitment, which I don't personally use for numbers of reasons.
2, by descr_strat at start, which I won't use anymore for this reason.
3, by spawn, which I use and need on occasions for some features. Even if you spawn them with the family tag, there is the chance of no open slot, and if you spawn them within a hidden faction before giving them to a real faction, they won't make it in this faction family tree.
Let's quote the thread on non working scripts terms, or not working like they should:
I_NumberOfHeirs - seems to be a count of ALL named characters (family or otherwise) including the leader. Teutonic trees too. Does NOT count off map characters.
That disapointing description is 100% true, and if one non-family named character exist within the concerned factions when the script above fire, it won't work because of this.
I can think of ways to further limit the risks with my spawns, maybe, but it's not the point of this thread.
The point would be, how could we replace I_NumberOfHeirs in this kind of failsafe script? Short on ways to force adoptions or marriage, or other simple conditions to check the health of a family tree?
All I could think so far would be a ancillary granted to Coming of age, adoption and marriage, plus starting family in descr_strat, then a script with a counter and FactionwideAncillaryExists to set this counter or not...
Problem: this appear to require at least 30 monitors, maybe short but still, one by faction, and even so, what event to use in order to anticipate any instance of the glitch before using the counter in the Ceased failsafe?
I have ideas coming and going but no time to fully experiment for such a rare, but killer glitch if it happen.
Any ideas, thoughts?




Reply With Quote









































