I was wanting to make a recurring event between start turn/date and end turn/date which either adversely or favorably effects population size/growth. Any help would be appreciated.
I was wanting to make a recurring event between start turn/date and end turn/date which either adversely or favorably effects population size/growth. Any help would be appreciated.
I was wanting to make a recurring event between start turn/date and end turn/date which either adversely or favorably effects population size/growth. Any help would be appreciated.
... i see there's no way to edit nor delete posts, which would be helpful here
We've got something like this in the SSHIP (well, perhaps a legacy of SS). It fires not periodically but depending on the FL trait, but it's easily adjustable to your wish - would be based only on a counter in the script.txt and the capability in the EDB.
1) in the EDCT:
Code:;======================================================================= ThinksOfHisPeople;----------------------------------------- Trait ThinksOfHisPeople Characters family NoGoingBackLevel 1 Level Thinks_Of_His_People Description Thinks_Of_His_People_desc EffectsDescription Thinks_Of_His_People_effects_desc GainMessage Thinks_Of_His_People_desc Threshold 42) in the scriptCode:;=======================================================================;--------- Thinks Of His People ------------------------- ; used in script ;------------------------------------------ Trigger ThinksOfHisPeople_add_1 WhenToTest CharacterTurnEndInSettlement Condition IsFactionLeader and Trait WideTraitSet = 0 and Trait BadAdministrator < 1 and Trait StrategyDread < 1 and Attribute Chivalry > 2 Affects ThinksOfHisPeople 1 Chance 2 ;------------------------------------------ Trigger ThinksOfHisPeople_add_2 WhenToTest CharacterTurnEnd Condition IsFactionLeader and Trait WideTraitSet = 0 and Trait BadAdministrator < 1 and Trait StrategyDread < 1 and Attribute Chivalry > 2 and CharacterNumTurnsIdle > 1 and Trait Gregarious > 1 Affects ThinksOfHisPeople 1 Chance 5 ;------------------------------------------ Trigger ThinksOfHisPeople_add_2 WhenToTest CharacterTurnEnd Condition IsFactionLeader and Trait WideTraitSet = 0 and Trait BadAdministrator < 1 and Trait StrategyDread < 1 and Attribute Chivalry > 2 and CharacterNumTurnsIdle > 1 and Trait KindRuler > 0 Affects ThinksOfHisPeople 1 Chance 5
3) in EDB:Code:monitor_event PreFactionTurnStart TrueCondition set_event_counter thinks_of_his_people 0 end_monitor monitor_event FactionTurnStart TrueCondition if I_EventCounter faction_turn_abbasid = 1 if I_FactionLeaderTrait abbasid ThinksOfHisPeople > 0 set_event_counter thinks_of_his_people 1 end_if end_if
Code:building core_building{ convert_to core_castle_building levels wooden_pallisade wooden_wall stone_wall large_stone_wall huge_stone_wall { wooden_pallisade city requires factions { all, } and building_present_min_level farms farms0 or hidden_resource cumans or hidden_resource desert { convert_to 1 capability { population_growth_bonus bonus 2 requires event_counter thinks_of_his_people 1
Last edited by Jurand of Cracow; September 02, 2021 at 09:23 AM.
Mod leader of the SSHIP: traits, ancillaries, scripts, buildings, geography, economy.
..............................................................................................................................................................................
If you want to play a historical mod in the medieval setting the best are:
Stainless Steel Historical Improvement Project and Broken Crescent.
Recently, Tsardoms and TGC look also very good. Read my opinions on the other mods here.
..............................................................................................................................................................................
Reviews of the mods (all made in 2018): SSHIP, Wrath of the Norsemen, Broken Crescent.
Follow home rules for playing a game without exploiting the M2TW engine deficiencies.
Hints for Medieval 2 moders: forts, merchants, AT-NGB bug, trade fleets.
Thrones of Britannia: review, opinion on the battles, ideas for modding. Shieldwall is promising!
Dominant strategy in Rome2, Attila, ToB and Troy: “Sniping groups of armies”. Still there, alas!
Wow - that's impressive! Thanks for the insight, and I'll be sure to study it. Fact is, having never written a trigger or event, much less a relatively simple historical event, that's what I was looking at doing here - i think. However, I wouldn't be surprised if there's better method or same method already in use by expert modders. Myself, I'm more neophyte than acolyte, much less expert - having been modding off and on for about five or six years. Recently however, I became more interested when I realized what I can do with the mapping, which has been a recent focus. So, in short, I'm here asking about programming - said recurring trigger/event - sort of off the cuff and by seat of my pants so to speak, as I'm not even sure if a trigger is necessary based upon its recurrence every turn. Full stop, I'm not sure the event I have in mind can be written, but at the end of every turn for designated length of turns, I'm needing an event that 'causes the population size to increase or decrease by specified design between 0-12.5%'. Perhaps what you have generously provided as example would fit that, however, I was thinking it would be a simple trigger and descr_event script? Thoughts?
Note when I say trigger of an event, having just recently taken study of the subject, I with the impression that's true statement, in as much triggered traits &/or events are basically the same thing - ?
Here's what I was thinking, as an example undeveloped idea: Trigger Monthly Growth Report; when to test Endturn; condition population_growth_bonus 0-24, condition population_growth_penalty 0-24; affects population_growth_bonus 0 (0-24) chance 2 (0-24), population_growth_penalty 0 (0-24) chance 2 (0-24) ... naturally, w/o enough development on my part for testing; hence, any helpful input appreciated.
Note I tried something similar to above outline via monitor_event in campaign_script, however it had no effect
everything you've described can be done but you need to get a bit of experience and knowledge.
events defined in descr_events fire only once so it's not really a good idea. there're also no scripts in this file, only pre-defined events.
you need to learn scripting to achieve it. get your hands dirty. I got my experience by copying scripts from other mods and then adjusting them.
True about descr_events. I was thinking campaign_script, but apparently my more sub-liminal understanding of subject superceded my typing - & thanks again for feedback! I'll take your advice, including instruction and/or knowledge of the issue. Likewise, if you think the monitor_event, or perhaps conditions, perhaps with trigger as the program script, in the campaign_script is the way to go, & could give a heads up on where to gain more knowledge on its protocol, i'd appreciate it! Given my recent interest, I've noticed resources are limited but some are found with much sifting. It's a bit frustrating when thinking it probably took the programmers a few seconds to write their scripts. Meanwhile, I've been picking around for a week trying to get enough info. to write three good lines
you may download the SSHIP and have a look at the files - I've included some hints for the potential moders.
obviously, a lot of threads on the TWC describe certain issues in very fine details
Cool! Thanks very much! I shall. Yes, TONS of fine detail info, however finding what if any conditions/affects the game will recognize for purposes of monitor_event has been challenging. I downloaded 'ultimate docudemons' for insight, but past conditions & affects such as population_growth_bonus & add_population command, neither of which appear to function, I'm still shooting blanks. So, for example: monitor_event, endturn, population_growth_bonus == 1, etc. & add_population 100 etc. likely isn't recognized with monitor_event. Hence, needing assistance at the mechanics level. I'll keep at it, but finding needles in haystacks is where it is. Hopefully SSHIP helps! Cheers