I want to add "weak magnetic field" and "mineral rich" to Mars and "hazardous weather" to Earth so I created a mini mod that would add a new Solar System. Everything checks out but I'm having a lot of trouble with adding planetary modifiers.
Here's what my code looks like:
I launched the game earlier with "planet_modifier = "pm_weak_weak_magnetic_field" immediately after the first "init_effect" in the Mars section like so:
What's odd is that when I launched the game with the bottom block of code, the Hazardous Weather modifier showed up on Earth but none of the modifiers showed up on Mars. When I tried switching to the first block of code (and I only modified the Mars section, didn't touch the Earth section) and relaunched the game, the modifiers weren't showing up on Mars (as before) AND the hazardous weather modifier had been removed from Earth.
I'm really stumped on this one. When I tried launching without the "planet_modifier" lines, the modifiers would show up but wouldn't list an icon, name, effect, or description. I've searched online to see how modifiers are done and I've looked in the planet modifiers file as well as the base prescripted solar system initialization file and I can't find how to do modifiers correctly.
Can someone please help me out here?
Here's what my code looks like:
Code:
planet = {
name = "NAME_Earth"
class = "pc_ocean"
orbit_distance = 25
orbit_angle = 120
size = 16
has_ring = no
entity = "continental_planet_earth2_entity"
tile_blockers = none
flags = { planet_earth }
init_effect = {
prevent_anomaly = yes
}
init_effect = {
add_modifier = {
modifier = "hazardous_weather"
days = -1
}
}
planet_modifier = "pm_hazardous_weather"
moon = {
name = "NAME_Luna"
class = "pc_barren_cold"
size = 5
orbit_distance = 12
orbit_angle = 40
has_ring = no
entity = "cold_barren_planet_luna_entity"
}
}
planet = {
name = "NAME_Mars"
class = "pc_continental"
orbit_distance = 25
orbit_angle = 60
size = 18
has_ring = no
starting_planet = yes
entity = "green_mars_entity"
tile_blockers = none
init_effect = {
generate_start_buildings_and_blockers = yes
}
init_effect = {
add_modifier = {
modifier = "mineral_rich"
days = -1
}
}
init_effect = {
add_modifier = {
modifier = "weak_magnetic_field"
days = -1
}
}
planet_modifier = "pm_mineral_rich"
planet_modifier = "pm_weak_magnetic_field"
}
I launched the game earlier with "planet_modifier = "pm_weak_weak_magnetic_field" immediately after the first "init_effect" in the Mars section like so:
Code:
planet = {
name = "NAME_Mars"
class = "pc_continental"
orbit_distance = 25
orbit_angle = 60
size = 18
has_ring = no
starting_planet = yes
entity = "green_mars_entity"
tile_blockers = none
init_effect = {
generate_start_buildings_and_blockers = yes
}
init_effect = {
add_modifier = {
modifier = "mineral_rich"
days = -1
}
}
planet_modifier = "pm_mineral_rich"
init_effect = {
add_modifier = {
modifier = "weak_magnetic_field"
days = -1
}
}
planet_modifier = "pm_weak_magnetic_field"
}
What's odd is that when I launched the game with the bottom block of code, the Hazardous Weather modifier showed up on Earth but none of the modifiers showed up on Mars. When I tried switching to the first block of code (and I only modified the Mars section, didn't touch the Earth section) and relaunched the game, the modifiers weren't showing up on Mars (as before) AND the hazardous weather modifier had been removed from Earth.
I'm really stumped on this one. When I tried launching without the "planet_modifier" lines, the modifiers would show up but wouldn't list an icon, name, effect, or description. I've searched online to see how modifiers are done and I've looked in the planet modifiers file as well as the base prescripted solar system initialization file and I can't find how to do modifiers correctly.
Can someone please help me out here?