I'd like to create a triggered modifier which causes a -1 stability hit whenever rebels capture a non-overseas province (-2 stability hit if the province is the capital province). What's the easiest way to write this? Thanks in advance.
I'd like to create a triggered modifier which causes a -1 stability hit whenever rebels capture a non-overseas province (-2 stability hit if the province is the capital province). What's the easiest way to write this? Thanks in advance.
Don't know any way with a triggered modifier, but you could use an event like this:
Don't forget to replace to xxxx with a free event number.Code:province_event = { id = xxxx trigger = { REB = { controls = THIS } is_overseas = yes } mean_time_to_happen = { days = 1 } title = "EVTNAMExxxx" desc = "EVTDESCxxxx" option = { THIS = { stability = -1 } } }
After that put the event number in common/on_actions.txt under on_siege_won. You can see in this txt how it has to look like. Don't know if it works, but its my first idea. Can't guarantee for the code to work since I delved into this only recently. Maybe someone with more experience can correct this if it's wrong.
If it's right, then you'd have to make another event, looking almost the same but with an increased stability hit and an addition in the trigger (something like is_capital = yes but I am far away from being sure on this one ).
Currently modding for my private pleasure...and maybe releasing it later on.