Latitude
Posted: Mon Aug 04, 2025 6:09 am
I've been trying to make it so Solar Plants have latitude-dependent output, ranging from the standard +25% Production around the equator to a mere +5% at the poles (with a +2% bonus if there's any Desert in the city radius).
So I changed the Solar Plant effect to a series of declarations like so:
And now my Solar Plants don't work. None of them are showing any output other than the occasional single Shield from the Desert bonus (which is working fine) even though any latitude from pole to pole should match one of the Latitude rules. This is the same syntax sandbox uses in its examples. If I change the range on the Latitude rules to Local or City, it just refuses to load the ruleset at all. What's up? Can I not use Latitude in effect requirements? Is it only for buildings and extras?
So I changed the Solar Plant effect to a series of declarations like so:
Code: Select all
[effect_solar_plant_factory_solar_25]
type = "Output_Bonus"
value = 25
reqs =
{ "type", "name", "range", "present"
"Building", "Factory", "City", TRUE
"OutputType", "Shield", "Local", TRUE
"Building", "Solar Plant", "City", TRUE
"Building", "Nuclear Plant", "City", FALSE
"Building", "Fusion Plant", "City", FALSE
"MaxLatitude", "200", "Tile", TRUE
"MinLatitude", "-200", "Tile", TRUE
}
[effect_solar_plant_factory_solar_20N]
type = "Output_Bonus"
value = 20
reqs =
{ "type", "name", "range", "present"
"Building", "Factory", "City", TRUE
"OutputType", "Shield", "Local", TRUE
"Building", "Solar Plant", "City", TRUE
"Building", "Nuclear Plant", "City", FALSE
"Building", "Fusion Plant", "City", FALSE
"MaxLatitude", "400", "Tile", TRUE
"MinLatitude", "201", "Tile", TRUE
}
; etc...
[effect_solar_plant_factory_solar_desert]
type = "Output_Bonus"
value = 2
reqs =
{ "type", "name", "range", "present"
"Building", "Factory", "City", TRUE
"OutputType", "Shield", "Local", TRUE
"Building", "Solar Plant", "City", TRUE
"Building", "Nuclear Plant", "City", FALSE
"Building", "Fusion Plant", "City", FALSE
"Terrain", "Desert", "City", TRUE
}