Hi guys,
I'd appreciate some help. I'm trying to add some features to the search and rescure mission. I started a new thread, since this may contain some more general advice to people.
In the basic mission the main character Rumo is captured if he is killed in a battle against an enemy general (he doesn't really die though). He may also get captured if he loses a certain percentage of bodyguard in a battle and if he is unlucky enough.
Now I'm adding a feature where Rumo can be captured by 3 other factions without even entering battle. It describes a situation in which one or more of these factions have sent a special party to capture him. But for some reason I don't get the thing to work.
Here's what I try to do: every now and then one of these 3 factions "decides" to try to capture Rumo and the "chase is on". After a certain number of turns, the chase is ended and goes off. The player gets a warning whenever a chase by a faction is started and ended.
But for some reason the script (see below) does not function properly. As soon as I'm in turn 3 of the game, I get an announcement that the Goths have started a chase. And already next turn they have ended the chase, although the likelihood for these changes is not in accordance with that (as defined by the RandomPercent). Then afterwards I get messages of chase starts or ends from any of the 3 factions, in a seemingly irregular order. But something every turn, although it all should happen much less frequently.
It is almost as if the RandomPercent would not count at all here and that any of those conditions would always be regarded as "true". Can anyone explain why this is happening? Could it be that I have used RandomPercentage too many times in the script? I'm using it currently 15 times in total in the background script. Or can there be too many counters? Now I'm using 7.
Faction names, city names, advice threads should all be ok in other files.
Code:; Chase is on declare_counter chaseison_huns ; 2 = new (chase just started), 1 = old (chase not new), 3 = chase about to end set_counter chaseison_huns 0 declare_counter chaseison_roxolani set_counter chaseison_roxolani 0 declare_counter chaseison_goths set_counter chaseison_goths 0 ; Start chase monitor_event FactionTurnEnd huns and I_TurnNumber > 1 ; and DiplomaticStanceFromFaction sarmatians > Hostile and I_CompareCounter chaseison_huns = 0 and I_CompareCounter captive = 0 and RandomPercent < 10 set_counter chaseison_huns 2 end_monitor monitor_event FactionTurnEnd roxolani and I_TurnNumber > 1 ; and DiplomaticStanceFromFaction sarmatians > Hostile and I_CompareCounter chaseison_roxolani = 0 and I_CompareCounter captive = 0 and RandomPercent < 10 set_counter chaseison_roxolani 2 end_monitor monitor_event FactionTurnEnd goths and I_TurnNumber > 1 ; and DiplomaticStanceFromFaction sarmatians > Hostile and I_CompareCounter chaseison_goths = 0 and I_CompareCounter captive = 0 and RandomPercent < 10 set_counter chaseison_goths 2 end_monitor ; Notify the player of change in chase status (overlapping messages possible, I think only the last in row will show) ; Start monitor_event SettlementTurnStart SettlementName Sarmatium if I_CompareCounter chaseison_huns = 2 advance_advice_thread PromptThreadChaseisonhuns 1 set_counter chaseison_huns 1 end_if if I_CompareCounter chaseison_roxolani = 2 advance_advice_thread PromptThreadChaseisonroxolani 1 set_counter chaseison_roxolani 1 end_if if I_CompareCounter chaseison_goths = 2 advance_advice_thread PromptThreadChaseisongoths 1 set_counter chaseison_goths 1 end_if end_monitor ; End chase (two types for each faction) monitor_event FactionTurnStart huns if I_CompareCounter captive = 0 and I_CompareCounter chaseison_huns = 1 and RandomPercent < 5 set_counter chaseison_huns 3 end_if if I_CompareCounter captive > 2 set_counter chaseison_huns 3 end_if end_monitor monitor_event FactionTurnStart roxolani if I_CompareCounter captive = 0 and I_CompareCounter chaseison_roxolani = 1 and RandomPercent < 5 set_counter chaseison_roxolani 3 end_if if I_CompareCounter captive > 2 set_counter chaseison_roxolani 3 end_if end_monitor monitor_event FactionTurnStart goths if I_CompareCounter captive = 0 and I_CompareCounter chaseison_goths = 1 and RandomPercent < 5 set_counter chaseison_goths 3 end_if if I_CompareCounter captive > 2 set_counter chaseison_goths 3 end_if end_monitor ; Notify player of chase change ; End monitor_event SettlementTurnStart SettlementName Sarmatium and I_CompareCounter chaseison_huns = 3 advance_advice_thread PromptThreadChaseendhuns 1 set_counter chaseison_huns 0 end_monitor monitor_event SettlementTurnStart SettlementName Sarmatium and I_CompareCounter chaseison_roxolani = 3 advance_advice_thread PromptThreadChaseendroxolani 1 set_counter chaseison_roxolani 0 end_monitor monitor_event SettlementTurnStart SettlementName Sarmatium and I_CompareCounter chaseison_goths = 3 advance_advice_thread PromptThreadChaseendgoths 1 set_counter chaseison_goths 0 end_monitor




Reply With Quote








