I downloaded the earliest shape when the thread was still locked, and it gave me some interesting ideas to pursue. I don't think I will be using your method as is, it seem too nerfing for some game situations, for the ai especially, and the way the faction_size is based on walls levels isn't too much to my liking.
I already have my share of long scripts too, so I think I will make a lighter thing somehow, both in gameplay and scripting as I am not looking for a hard level of recruitment limit.
Thanks for the inspiration, Giganfus my old friend. I will post my results if you, or anyone is interested. (maybe even if nobody is)
Would be interesting to see what approach you take. Seeing that you can't count units on the map it's a scripting mess anyhow, regardless from which angle you look at it.
I thought one stack per large settlement\castle (large stone wall\fortress) should keep things still rolling nicely.
I am a king among morons, I write while wanting to break my head in a wall... Really, I once knew the script replicator tool, but somewhere between my first attempts where I didn't really need it and the time it took to become good enough at scripting, I had completely forgot this tool!!! Thinking of who know how many time I wasted in the last two years or so in manually replicating some loooong scripts really make the wall tempting...
Well, it's not too late to use it and catch up on other scripts I never finished to replicate (what a...)
To get back on track, I am still in early thinking of how to exactly proceed but I am not looking so much at setting a hard limit on all units types rather than limiting some of them when they are useless and cost money for nothing on the ai, I wrote simple start like this to inspire myself for later:
Then proceed with the set/inc_recruit_pool according to who own what settlement on one Settlement/FactionTurnStart, the huge part that was hugely annoying me to think about but the script replicator should greatly help there.Code:declare_counter ship_number_aksum monitor_event CharacterTurnStart Treasury >= 10000 and FactionIncome >= 2000 if I_EventCounter aksum_turn > 0 if I_NumberOfSettlements aksum < 6 and I_CompareCounter ship_number_aksum > 5 set_event_counter ship_limit_aksum 1 end_if if I_NumberOfSettlements aksum < 6 and I_CompareCounter ship_number_aksum < 6 set_event_counter ship_limit_aksum 0 end_if ;;;; next end_if ;;;; next faction turn ;;; end_monitor ;;;; similar CharacterTurnStart but only for setting the limit event_counter when there is not enough finances monitor_event UnitTrained TrainedUnitCategory ship if I_EventCounter aksum_turn > 0 inc_counter ship_number_aksum 1 end_if ;;;; end_monitor
Since I am not looking for a real count of units, rather a estimation based on the factions means of spending and staying on float, finding the right balanced number of treasury and faction income versus the cost of some units types in my mod, then maybe something with the number of settlements, should make things simpler than counting a faction size by value of units and core walls. Though I expect it won't be exactly like above which just a little thinking ahead.
Last edited by selv; June 21, 2018 at 07:07 PM.
Unless I am missing something you never increase the aksum_turn counter which means the script won't progress.
The CharacterTurnStart event fires an extended number of times per turn and faction which might slow down processing time, rather use FactionTurnStart\End
I already have factions turn event_counters implemented in my mod, you gave me the tip, remember?
The above script start isn't even in my c_s yet, just in my notes for later, so I will see about deciding which final events I choose when I get to implementation, I know FactionTurnStart appear better, but I wanted to try something not directly related and CharacterTurnStart ended in my reminder notes.
Shh, I have a problem. Well it's the same as yours, the one where you can't count battle destroyed units, making the whole idea of setting a approximative max number of units even more dangerous than before to my mind, regardless of the approach taken, and I can't think of anything after a thousandth trip in the docudemon.
At least this trial gave me the idea of stopping/increasing the region/faction recruitment based of some very specific units types, it seem to actually solve some problems with specific things that are hard to push forward in my cai factions labels.
The rest of the idea isn't suited for me it seem. Maybe a other time.
Out of curiosity, does the ai really manage well with your recruitment limit in EB2, or a other mod you are using it with?
For some reasons, I keep picturing problems with ai not being able of taking advantages of opportunities, or unable to defend themself in nasty situations, because for all it's merit the script is just freezing/unfreezing pools on estimations/chances, without knowing what else is really going on?
Hello Gig,
just following your tutorial step by step, what isn't clear to me is 4b_capturechecks.
What do you mean by increasing the value 1,2,3 etc.?
Edit:
Also, I don't get what do you mean by matching the regions from the descr_regions?
Especially the counter region_001_frozen?
Code:if not I_IsFactionAIControlled [faction] terminate_monitor ; terminate monitor if faction is player controlled end_if if I_SettlementOwner [settlement] = [faction] ; does this faction own this settlement and I_CompareCounter exceedlimit_[faction] > 0 ; has this faction exceeded the upkeep limit and I_CompareCounter region_001_frozen < 1 ; is this pool NOT frozen freeze_recruit_pool region_001 true ; freeze the regional recruit pool set_counter [region]_frozen 1 ; set the 'region' counter true end_if if I_SettlementOwner [settlement] = [faction] and I_CompareCounter exceedlimit_[faction] < 1 ; is this faction below the upkeep limit and I_CompareCounter region_001_frozen > 0 ; is this pool frozen freeze_recruit_pool region_001 false ; unfreeze the pool set_counter [region]_frozen 0 ; set the 'region' counter false end_if