• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

SmallStarfishOnleviathan

Private
15 Badges
Apr 7, 2020
19
1
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Synthetic Dawn
like this code, i need to know which building is broken then repair it

planet = {
every_building = {
limit = {
is_broken = yes
}
repair_building = yes
}
}

sometimes, i need to calculate buildings in the same category.

planet = {
num_buildings = {
AND = {
type = building_bureaucratic_1
type = building_bureaucratic_2
type = building_bureaucratic_3
}
value < 3
}

add_building = building_bureaucratic_1
}

how to do these?
 
That's not possible as far as I know. At least not with dedicated functionality.

You could do a workaround with a planetary variable that increments by 1 whenever tier 1 on such a building is constructed (by using the on_built functionality in the building code).

Not sure if the on_destroy and on_building_demolished have been restored though. They weren't functional in earlier versions, and without them maintaining that variable may be a bit wonky.