You can't have a monitor inside another one. You could just use the Condition monitor anyways and add "and FactionIsLocal" to it.
EndedInSettlement doesn't take a parameter, either, you can't check the character name anyhow afaik.
You can't have a monitor inside another one. You could just use the Condition monitor anyways and add "and FactionIsLocal" to it.
EndedInSettlement doesn't take a parameter, either, you can't check the character name anyhow afaik.
Yep, our inability to check the character's name for anything prevents us from having quite a few neat features![]()
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
You can get rid of one of the monitors, either by using an 'and' as was suggested, or by using an 'if'. Also, I think that this is how you use EndedInSettlement:
Code:script declare_counter loop set_counter loop 0 monitor_event CharacterTurnStart Quintus and EndedInSettlement replenish_units Quintus end_monitor while I_CompareCounter loop = 0 end_while end_script
Myyrdal,
Thanks for your suggestion. Interesting behaviour with your version of the script. If Quintus is NOT in a settlement, his units get replenished. If he IS in a settlement and needs replenishment, the game CTDs. I'll try a couple more things.
If I change the monitor like so:
Quintus gets replenished whether he is in friendly or enemy lands, and the game still crashes if he is in a settlement when replenished. I am starting to have serious doubts that my mod is even possible.Code:monitor_event CharacterTurnStart Quintus and not InEnemyLands replenish_units Quintus end_monitor
Could it be a problem with the authomatic slow replenishment of the general unit in a settlement?
In fact the general unit in campaign has not a fixed number of soldiers and this type of script may interfer with that feature.
Perhaps it is a silly question but, can you link the replenishment to a settlement instead of a general?
Managing generals in settlements is quite an awkward business with other commands also (e.g. console_command move_character creates a ghost character when you're trying to teleport someone in a city..), so it's probably that. I also doubt that you'll be able to replenish settlements, but trying wouldn't hurt.
Bookmarks