I made events to spawn armies. The error log doesn't tell me what's wrong, but the armies don't spawn.
country_event = {
id = fdarmy.3
hide_window = yes
is_triggered_only = yes
trigger = {
is_country_type = default
}
immediate = {
random_owned_planet = {
limit = {
is_colony = yes
not = {
num_districts = { type = district_firebase value > 0 }
}
}
every_planet_army = {
limit = { army_type = firebase_army }
remove_army = yes
}
every_owned_pop = {
limit = {
has_pop_flag = popf_spawned_firebase@planet
}
remove_pop_flag = popf_spawned_firebase@planet
}
}
random_owned_planet = {
limit = {
is_colony = yes
or = {
num_districts = { type = district_firebase value > 0 }
}
}
if = {
limit = {
not = {
any_owned_pop = {
or = {
has_job = artillerist
has_job = artillerist_drone
}
}
}
}
every_planet_army = {
limit = { army_type = firebase_army }
remove_army = yes
}
}
else = {
every_owned_pop = {
limit = {
has_pop_flag = popf_spawned_firebase@planet
nor = {
has_job = artillerist
has_job = artillerist_drone
}
}
remove_pop_flag = popf_spawned_firebase@planet
planet = {
random_planet_army = {
limit = { army_type = firebase_army }
remove_army = yes
}
}
}
while = {
count = 6
random_owned_pop = {
limit = {
or = {
has_job = artillerist
has_job = artillerist_drone
}
not = { has_pop_flag = popf_spawned_firebase@planet }
}
set_pop_flag = popf_spawned_firebase@planet
planet = {
create_army = {
owner = root
type = "firebase_army"
}
}
}
}
}
}
}
}
Last edited: