Which problem? Being able to destroy buildings doesn't help us in the least with attritionOriginally Posted by BozosLiveHere
![]()
destroy_unit - but as you mentioned that takes out an entire unit rather than reducing the number of men in a unit (which would be the desired result).
Epistolary Richard's modding Rules of CoolCool modders make their mods with the :mod command line switch
If they don't, then Cool mod-users use the Mod Enabler (JSGME)
Cool modders use show_err
Cool modders use the tutorials database
Cool modders check out the Welcome to the Modding Forums! thread
Cool modders keep backups
Cool modders help each other out
I realize this thread (on this site at least) is pretty much dead, but I figured I'd still put this out there.Re-Emergent factions
A problem (depending on the intentions of the script writer of course) with your solution is that a random horde will spawn when the last city is captured if any family member still lives.
If you only want your scripted army to appear at your designated time change
tohorde_min_units 10
horde_max_units 20
horde_max_units_reduction_every_horde 10
horde_min_named_characters 2
I'm not sure if they all have to be 0, but I know this works.horde_min_units 0
horde_max_units 0
horde_max_units_reduction_every_horde 0
horde_min_named_characters 0
This way the faction will die normally, but still remain in the code to be revived at a later date.
This will record as an error in the log
but otherwise causes no problems.14:56:45.739 [script.err] [error] Script Error in medimod/data/descr_sm_factions.txt, at line 22, column 32
file: "descr_sm_factions.txt": horde_min_units should be nonzero!
It is also a good idea to script in neutrality with all factions at the point of death as, because they are still present, thier relations (stance and faction standing) prior to death is still remembered by other AI factions. Thus, if you kill a factions you will always be considered 'AtWar' with them even though they are dead. This also causes some complications on re-birth as the horde AI is uncontrolable and will not consider previous relations until a setlment is occupied.
Just in case it is useful for somebody, I report here a method to start the campaign in the middle of the initial year, instead of at the beginning.
Let's say we want a 12 turns per year campaign, but it must start in September of 1212.
We use alpaca's script modified in this way:
But the year (seen using show_hud_date = true configuration option) will change in turn 12, not in turn 4. For this purpose we must add new options:Code:declare_counter season_counter set_counter season_counter 9 monitor_event FactionTurnStart FactionIsLocal inc_counter season_counter 1 ; 0 equals winter if I_CompareCounter season_counter == 0 console_command season winter end_if if I_CompareCounter season_counter > 0 console_command season summer end_if ; Reset the counter on the autumn turn so that it'll be 0 next turn if I_CompareCounter season_counter == 11 set_counter season_counter -1 end_if end_monitor
I've used this system in the first tests of a campaign with 50 turns per year, beginning in the 34 turn of the first year, and it works (only tested the first "New Year Event").Code:declare_counter season_counter set_counter season_counter 9 declare_counter year_counter set_counter year_counter 0 monitor_event FactionTurnStart FactionIsLocal inc_counter season_counter 1 ; 0 equals winter if I_CompareCounter season_counter == 0 console_command season winter end_if if I_CompareCounter season_counter > 0 console_command season summer end_if ; Reset the counter on the autumn turn so that it'll be 0 next turn if I_CompareCounter season_counter == 11 set_counter season_counter -1 end_if if I_CompareCounter season_counter == 0 inc_counter year_counter 1 end_if if I_CompareCounter year_counter == 1 console_command date 1213 end_if if I_CompareCounter year_counter == 2 console_command date 1214 end_if ; more lines are needed depending on the duration of the campaign. end_monitor
I'd like to set a script similar to the very first script in this thread, i.e. adding money to a faction that captures a settlement. However, I want to add a different set of conditions:
For example, consider Jerusalem:
If a Catholic faction captures Jerusalem from a Muslim faction, it gets bonus money.
Otherwise, it doesn't.
If a Muslim faction captures Jerusalem from a Christian faction, it gets bonus money.
Otherwise, it doesn't.
So I need to check the faction that owned the settlement before its capture. Also, would I need to repeat this script for every faction, i.e. Moors, Egypt & Turks for the Muslims, and England, etc. for the Catholic?
Ancestry: Turkish & Irish. Guess my favorite factions!
Bookmarks