was trying to get remove_division and delete_unit to work to clean up militia from Spain but i seem to be using them wrong, anyone with experience with it?
type = remove_division which = [div id type/-1] value = [div id id] # Remove a division from the scenario. -1 is a random division (the value field will be ignored).
type = remove_division which = "Exact Name" value = [country tag] # Remove a named division from the scenario (for a certain country.)
or this
type = delete_unit which = [unit id type/-1/-2/-3] when = [percent] # -1 is a random land unit -2 random naval unit -3 random air unit, "when" clause optional, if given integer value between 0 - 100 it will delete that percent of nation's existing corps/fleets/wings
type = remove_division which = [div id type/-1] value = [div id id] # Remove a division from the scenario. -1 is a random division (the value field will be ignored).
type = remove_division which = "Exact Name" value = [country tag] # Remove a named division from the scenario (for a certain country.)
or this
type = delete_unit which = [unit id type/-1/-2/-3] when = [percent] # -1 is a random land unit -2 random naval unit -3 random air unit, "when" clause optional, if given integer value between 0 - 100 it will delete that percent of nation's existing corps/fleets/wings
Code:
#########################################
# Civil War Cleanup by Evil Overlord
#########################################
event = {
id = 32490
random = no
country = SPA
persistent = yes
trigger = {
ai = yes
atwar = no
army = 30
militia = 1
}
name = "AI_EVENT"
style = 0
date = { day = 0 month = january year = 1937}
offset = 10
deathdate = { day = 29 month = december year = 1999 }
action_a = {
command = { type = delete_unit which = militia when = 100 }
}
}