So "monitor_event FactionTurnStart FactionType slave" is better then?, hehe I accidentally did it that way xD as I was using a software that can edit both campaign scripts simultaenously
So "monitor_event FactionTurnStart FactionType slave" is better then?, hehe I accidentally did it that way xD as I was using a software that can edit both campaign scripts simultaenously
It was a mistake of mine; whatever we "gain" at the start of the availability of the ancillary, we lose it at the end of the availability. So it is no better than the other way (just keep it at FactionTurnStart and don't tell it to anyone )
Another one of the "easy" stuff, this time for the section "Setup Events". I_LocalFaction conditions are checked only if the DifficultyLevel is the appropriate.
Early campaign:
Spoiler Alert, click show to read:
Late campaign: Double FactionIsLocal condition was removed. The if about venice was also removed, as it contained nothing!
Spoiler Alert, click show to read:
A note: Everything I have post in this thread is for SS v6.4.
That part needs some clean up/tweaking as well...as it's targeting characters that dont exist, so i'll replace names with labels and tweak descr_start to include such labels
Some minor fixes in the "Major Events" section:
Major Events --Jerusalem Captured: Tweaked for no counters and less monitors, that terminate when they should.
Spoiler Alert, click show to read:
Major Events -- Capital Change: Only one monitor instead of two. Monitor terminates when it has nothing to do (that is, if campaign difficulty is easy).
Spoiler Alert, click show to read:
while we are at it, i think jerusalem captured by christians should have the requirement that is no longer held by crusaders
the other way would be with a counter but then an extra monitor would be requiredCode:;--- Jerusalem Captured monitor_event GeneralCaptureSettlement SettlementName Jerusalem and not CharacterReligion islam and not CharacterReligion pagan and not CharacterReligion heretic and not I_SettlementOwner Jerusalem = jerusalem; not sure if this would work though historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik terminate_monitor end_monitor
there is probably a better wayCode:declare_counter jerusalem_lost monitor_event SettlementTurnStart SettlementName Jerusalem and not FactionReligion catholic and not FactionReligion orthodox set_counter jerusalem_lost 1 terminate_monitor end_monitor monitor_event GeneralCaptureSettlement SettlementName Jerusalem and not CharacterReligion islam and not CharacterReligion pagan and not CharacterReligion heretic and I_CompareCounter jerusalem_lost = 1 historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik terminate_monitor end_monitor
Last edited by Melooo182; July 02, 2014 at 01:21 PM.
There is also a chance that jerusalem recaptures Jerusalem from those christians and it can go on this way... So, I'm thinking of this:
Asthe "GeneralCaptureSettlement" event exports totarget_faction, I'm thinking of this solution too:Code:;--- Jerusalem Captured monitor_event GeneralCaptureSettlement SettlementName Jerusalem and not CharacterReligion islam and not CharacterReligion pagan and not CharacterReligion heretic if I_SettlementOwner Jerusalem != jerusalem historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik end_if terminate_monitor end_monitor
The latter approach -if applied for islam and pagans too- may be a good "reason" to avoid termination of these monitors and have the "Jerusalem messages" multiple times (GeneralCaptureSettlement is not that heavy)Code:;--- Jerusalem Captured monitor_event GeneralCaptureSettlement SettlementName Jerusalem and not CharacterReligion islam and not CharacterReligion pagan and not CharacterReligion heretic and not TargetFactionReligion catholic and not TargetFactionReligion orthodox historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik terminate_monitor end_monitor
EDIT: Corrected previous typo error in the last monitor
Last edited by gsthoed; July 03, 2014 at 09:16 PM. Reason: correcting errors
I come back to the Faction Killer Workaround, because I think we've done something wrong.
These event_counters (status_sicily) were supposed to be able to be used in the EDB, weren't they? It seems that in EDB if an event_counter > 1, then it is recognized as =1.Code:monitor_event BecomesFactionLeader FactionType sicily set_event_counter status_sicily 2 ; not emerged=0 dead=1 alive=2 if I_CompareCounter sicily_died = 1 inc_event_counter killed_factions_count -1 end_if end_monitor
Maybe we have to remove these event_counters; maybe it should be better if we have this correspondence:
sicily is not emerged -- value for status_sicily unspecified
sicily is destroyed ("dead") -- value for status_sicily 0
sicily is alive -- value for status_sicily 1.
I have finished testing a fix for the reverting of campaign difficulty to medium level when a previous AI-controlled faction comes under human control (hotseat campaigning). I believe I am close to fixing for the battle dificulty too. I'll post it in the appropriate thread when ready.
The first part of these fixes can improve the non-hotseat campaigning too. It does exactly the same job with the "default" "Setup AI" section of the CS, but more monitors are terminated for all levels of campaign difficulty, except medium. In the attached file there are these new "Setup AI" sections for early and late campaigns respectively. In the spoiler, I present briefly these changes.
Step A) New Setup AI - Part 1
Spoiler Alert, click show to read:
EDIT: Actually, why I didn't do this?
Spoiler Alert, click show to read:
Last edited by gsthoed; August 03, 2014 at 04:49 AM. Reason: Upate
excellent findings, I would rep you but can't yet xD
Hey melooo and gsthoed very interesting discussion you guys have right here! While browsing the campaigns script myself, I noticed that the interactive events part is severly flawed and not working in the game right now.
original, not working code:
Spoiler Alert, click show to read:
set_event_counter great_fair_declined = 0 is wrong. should be: set_event_counter great_fair_declined 0
So the whole trait gaining/losing doesnt work. Fixed version without monitor conditions:
Spoiler Alert, click show to read:
As said, it works without monitor_conditions. Notice that you will have to adjust the great_fair trait gaining stuff in the export_descr_character_traits to match to great_fair_true or trait_fair_false instead of great_fair_accepted. The part with great_fair_true or false seems redundant, but the game checks the posibility for the character to gain a trait at the end of the turn, so the counter still has to be 1 until the prenextturnstart.
This method should also work for every other interactive event such as troubadours, councils, etc.
Thanks man for the contribution!
Hmmm these could be added to 'Is the AI?' prefactionsturnstart monitor
This is my take for the church councilsCode:monitor_event PreFactionTurnStart FactionIsLocal if I_EventCounter great_fair_true 1 set_event_counter great_fair_true 0 end_if if I_EventCounter great_fair_false 1 set_event_counter great_fair_false 0 end_if end_monitor
also simplified the event to be checked by the trait triggers to just 1 which can have a value of 1 or 2 and resetted to 0 with the prefactionturnstart
Spoiler Alert, click show to read:
Last edited by Melooo182; July 12, 2014 at 07:13 PM.
I like this version! Two notes though:
a) if we don't want this event to happen when not I_HotseatEnabled, why not terminating the first monitor?
b) I'm with Melooo182 about "resetting" counters in the "Is the AI?" section. Since the only value of great_fair_true great_fair_false event counters that will be used in EDCT file is 1, we can avoid using the if command and just set them to zero in each preturnstartCode:monitor_event FactionTurnStart FactionIsLocal and FactionBuildingExists > fairground and RandomPercent < 10 if I_HotseatEnabled terminate_monitor end_if historic_event great_fair true end_monitor
Melooo182: It is reported in docudemons that FactionReligion condition requires trigger faction. The event EventCounter exports only to event_counter. Also, troubadours_event_true in "Great Councils"?Code:monitor_event PreFactionTurnStart FactionIsLocal set_event_counter great_fair_true 0 set_event_counter great_fair_false 0 end_monitor
Last edited by gsthoed; July 13, 2014 at 08:43 AM.
Ah right :/ forgot to check thatMelooo182: It is reported in docudemons that FactionReligion condition requires trigger faction. The event EventCounter exports only to event_counter. Also, troubadours_event_true in "Great Councils"?
I had once a case which I cannot remember now in which the unspecified value didn't count as 0. In other cases it's true that it counts as 0. My previous suggestions to this point should be ignored.
But the issue about EDB remains. This might be useful http://www.twcenter.net/forums/showt...=1#post5555510
Quoted from that post:
Some things you need to know:
The requires event_counter line is a bit flawed in the EDB file. It will only detect 0 and 1 for event_counter values. Anything over 1 will be treated as a 1. If you need multiple options then you need multiple event_counters.
hmmm well emerging faction already use some event as a reference to actually emerge.
Teutonic Order emerges with the Inquisition event
Mongols and Timurids are bit trickier as they dont directly use an event but rather use it to make various stages of their invasions, so we could perhaps add a "set_event_counter mongols_emerged/timurids_emerged 1" in their scripts parts
I still don't know what use this could have but maybe some RR tweak submod that allows some AOR units only after these factions emerge...or the contrary allows some AOR units until these factions emerge.
so these would be ones used in EDB while the status 1/2 for traits or ancillaries
Last edited by Melooo182; July 14, 2014 at 11:44 AM.
Haven't tried, but mongols_invasion and timurids_invasion even_counters don't do the job? For example, as soon as timurids_invasion sets to 1, there is a monitor that starts spawning them in the same manner that inquisition triggers the spawning of teutonic_order; same for mongols.
Also I have a sort of a question
I_TurnNumber actually counts the turns and not years, right?
if so changing the year/turn ratio in descr_strat would make some of these scripted stuff appear in the wrong year, right?
maybe something like this would be better for great peoples ancillaries and other date dependant scripts
or just directly add them to the descr_events?Code:monitor_event EventCounter EventCounterType early_era and EventCounter = 1 add_events event counter 1105AD date 5 event counter 1108AD date 8 event counter 1115AD date 15 event counter 1142AD date 42 ...etc end_add_events terminate_monitor end_monitor
Last edited by Melooo182; July 14, 2014 at 01:26 PM.
As it is in v6.4, Great People Ancillaries is a turn dependent script. If you moddify the timescale, surely this approach of yours will make the appearance more historically accurate but it may not suit well for those that change the timescale for other reasons than make some events appear earlier or later in the campaign (for example you use 2TPY submod to disable ageing script and bring back devastation); these people will have to adapt the date-based events (and maybe several other stuff), there is no reason to make them adapt the previously turn-dependent ones too.
On the other hand, if you won't change the timescale, these extra EventCounter monitors are unnecessary, as you cannot avoid the monitor of (Pre)FactionTurnStart of slaves which determines the availability of Great People Ancillaries.