@Ferrous Will
I messed about a bit with the script files and came up with something that at least seems to end the purge on reconquering(I have only tested it on one planet mind you, and it might break something else):
If you want to give it a try, remember to make a backup of each of the two files that you need to edit
In the file "crisis_events_1"(in stellaris/events folder) add the following lines(within the "-----" to the end of it and save:
-----
# Planet retaken from Prethoryns
country_event = {
id = crisis.234
hide_window = yes
is_triggered_only = yes
trigger = {
NOT = {is_country_type = "swarm"}
}
immediate = {
FROMFROM = {
set_controller = root
purge = no
}
}
}
-----
And in the file "00_on_actions" (in stellaris/common/on_actions folder) locate the parat about "on_planet_attackers_win"
and add this line in the events list and save:
-----
crisis.234
-----
The section should end up looking like this:
-----
# Triggers country_event for the attacker upon victory
# This = country, leader attacker
# From = country, planet owner
# FromFrom = planet
on_planet_attackers_win = {
events = {
techrisk.4
colony.114
crisis.201
action.8
action.14
colony.158
crisis.2400
action.51
factions.12
crisis.234 #line we just added
}
}
-----
Good luck
