Having trouble getting a planet modifier to spawn in a system initializer.

  • 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.

sdeezie

space cadet
107 Badges
May 7, 2013
196
243
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Crusader Kings III
  • Age of Wonders: Planetfall - Revelations
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Flashpoint
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Stellaris: Necroids
  • Shadowrun: Dragonfall
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Stellaris: Ancient Relics
  • Stellaris: Humanoids Species Pack
  • BATTLETECH
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Natural Disasters
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Stellaris: Lithoids
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV
  • Crusader Kings Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders: Planetfall
  • Prison Architect: Psych Ward
Hi again. :)

So I am trying to add the "bleak_planet" modifier to a planet made in a system initializer.

I have tried:

modifier = "pm_bleak_planet"
modifiers = "pm_bleak_planet"
modifier = "bleak_planet"
modifiers = "bleak_planet"

And none of those seem to work when surveying the planet on new game start, though it otherwise spawns correctly as best I can tell.

Any ideas? :)
 
Last edited:

Warchild421

Captain
99 Badges
Aug 12, 2015
391
90
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
Hi again. :)

So I am trying to add the "bleak_planet" modifier to a planet made in a system initializer.

I have tried:

modifier = "pm_bleak_planet"
modifiers = "pm_bleak_planet"
modifier = "bleak_planet"
modifiers = "bleak_planet"

And none of those seem to work when surveying the planet on new game start, though it otherwise spawns correctly as best I can tell.

Any ideas? :)


For a starting system you can not have it have modifiers, as far as I can tell at this point. To add a modifier to a non-start system you have to add this code to right under "has ring = "
 
  • 1
Reactions:

sdeezie

space cadet
107 Badges
May 7, 2013
196
243
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Crusader Kings III
  • Age of Wonders: Planetfall - Revelations
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Flashpoint
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Stellaris: Necroids
  • Shadowrun: Dragonfall
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Stellaris: Ancient Relics
  • Stellaris: Humanoids Species Pack
  • BATTLETECH
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Natural Disasters
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Stellaris: Lithoids
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV
  • Crusader Kings Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders: Planetfall
  • Prison Architect: Psych Ward
OK, I've tried exactly your code, and it is still not spawning the modifier for me. :(

planet = {
name = "Mars"
class = "pc_martian"
orbit_distance = 20
orbit_angle = 60
size = 16
entity = "barren_planet_mars_entity"
tile_blockers = none
has_ring = no
init_effect = {
add_modifier = {
modifier = "atmospheric_hallucinogen"
days = -1
}
}
}

If I add "pm" to make it "pm_atmospheric_hallucinogen", I see a modifier icon when I survey the planet, but no effect and no localization... somehow it is not finding the modifier, perhaps? I have included the 00_static_modifiers and 00_planet_modifiers in my mod directory.
 

sdeezie

space cadet
107 Badges
May 7, 2013
196
243
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Crusader Kings III
  • Age of Wonders: Planetfall - Revelations
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Green Cities
  • BATTLETECH: Flashpoint
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Stellaris: Necroids
  • Shadowrun: Dragonfall
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Stellaris: Ancient Relics
  • Stellaris: Humanoids Species Pack
  • BATTLETECH
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Natural Disasters
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Stellaris: Lithoids
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV
  • Crusader Kings Complete
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders: Planetfall
  • Prison Architect: Psych Ward
Oh, and I added a custom planet class, as well, which is being referenced above:


pc_martian = {
entity = "barren_planet"
entity_scale = @planet_standard_scale
icon_frame = 10
picture = pc_desert
tile_set = pc_desert

atmosphere_color = hsv { 0.1 0.4 0.7 } #DONE
atmosphere_intensity = 1.0
atmosphere_width = 0.5

min_distance_from_sun = 40
max_distance_from_sun = 200
spawn_odds = 0

city_color_lut = "gfx/portraits/misc/colorcorrection_desert.dds"

extra_orbit_size = 0
extra_planet_count = 0

chance_of_ring = 0

planet_size = { min = 12 max = 30 }
moon_size = { min = 6 max = 10 }

colonizable = yes
colonization_tech = { "tech_continental_colonization" }
ideal = yes
}


I'll try again with Mars as a desert planet, since that might be part of the problem. :)

EDIT: That wasn't the problem. "pm_whatever" just spawns a modifier icon with no effect or description, still.
 

Warchild421

Captain
99 Badges
Aug 12, 2015
391
90
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
If it is a starting system it doesn't like modifiers, I'm not sure why it doesn't but that's what ive been able to figure out. haven't spent to much time trying to add them after I realized it doesn't like them on the starter. Adding them to the "neighbor" systems at the bottom though, it likes that. If you put that planet in the "neighbor" does it take it?
 

Bdziou

Recruit
44 Badges
Mar 23, 2015
1
1
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Stellaris: Galaxy Edition
  • Stellaris: Apocalypse
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Stellaris: Necroids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis 4: Emperor
  • Stellaris: Leviathans Story Pack
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
In folder "events" (not "event_chain" from "common" folder) there is file "game_start.txt". It is responsible for generating systems in game, as well as wiping out every modifier that was created in capital systems.

event = {
id = game_start.2
hide_window = yes
is_triggered_only = yes

immediate = {
every_country = {
limit = { exists = capital_scope }
capital_scope = {
solar_system = {
every_system_planet = {
if = {
limit = { has_modifier = hazardous_weather }
remove_modifier = hazardous_weather
}
if = {
limit = { has_modifier = dangerous_wildlife }
remove_modifier = dangerous_wildlife
}
if = {
limit = { has_modifier = weak_magnetic_field }
remove_modifier = weak_magnetic_field
}

...and so on for most modifiers.


I have wiped line:

if = {
limit = { has_modifier = natural_beauty_field }
remove_modifier =natural_beauty_field
}

and as part of system initialazer made planet with following code

planet = {
name = "Manticore "
class = "pc_arid"
orbit_distance = 37
orbit_angle = 96
size = 25
starting_planet = yes
has_ring = no
tile_blockers = none
init_effect = {
add_modifier = {
modifier = "natural_beauty"
days = -1
}
}

and it worked fine, spawning in game planet with "Natural beauty", all desc, img and bonuses are working.

You probably can add exception from that rule for your system only, I didn't do it (yet).
 
Last edited:
  • 1
Reactions:

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
So as I said in another thread just now, the problem is I believe a hidden event that fires at the start of the game going through all starting systems in the game and removes all modifiers.

Code:
event = {
    id = game_start.2
    hide_window = yes
    is_triggered_only = yes
   
    immediate = {
        every_country = {
            limit = { exists = capital_scope }
            capital_scope = {
                solar_system = {
                    every_system_planet = {
                        if = {
                            limit = { has_modifier = hazardous_weather }
                            remove_modifier = hazardous_weather
                        }
                        if = {
                            limit = { has_modifier = dangerous_wildlife }
                            remove_modifier = dangerous_wildlife
                        }
                        if = {
                            limit = { has_modifier = weak_magnetic_field }
                            remove_modifier = weak_magnetic_field
                        }
                        if = {
                            limit = { has_modifier = strong_magnetic_field }
                            remove_modifier = strong_magnetic_field
                        }
                        if = {
                            limit = { has_modifier = unstable_tectonics }
                            remove_modifier = unstable_tectonics
                        }
                        if = {
                            limit = { has_modifier = tidal_locked }
                            remove_modifier = tidal_locked
                        }
                        if = {
                            limit = { has_modifier = chthonian_planet }
                            remove_modifier = chthonian_planet
                        }
                        if = {
                            limit = { has_modifier = asteroid_impacts }
                            remove_modifier = asteroid_impacts
                        }
                        if = {
                            limit = { has_modifier = extensive_moon_system }
                            remove_modifier = extensive_moon_system
                        }
                        if = {
                            limit = { has_modifier = carbon_world }
                            remove_modifier = carbon_world
                        }
                        if = {
                            limit = { has_modifier = wild_storms }
                            remove_modifier = wild_storms
                        }
                        if = {
                            limit = { has_modifier = low_gravity }
                            remove_modifier = low_gravity
                        }
                        if = {
                            limit = { has_modifier = high_gravity }
                            remove_modifier = high_gravity
                        }
                        #if = {
                        #    limit = { has_modifier = hollow_planet }
                        #    remove_modifier = hollow_planet
                        #}
                        if = {
                            limit = { has_modifier = mineral_rich }
                            remove_modifier = mineral_rich
                        }
                        if = {
                            limit = { has_modifier = ultra_rich }
                            remove_modifier = ultra_rich
                        }
                        if = {
                            limit = { has_modifier = mineral_poor }
                            remove_modifier = mineral_poor
                        }
                        if = {
                            limit = { has_modifier = titanic_life }
                            remove_modifier = titanic_life
                        }
                        if = {
                            limit = { has_modifier = mineral_poor }
                            remove_modifier = mineral_poor
                        }
                        if = {
                            limit = { has_modifier = asteroid_belt }
                            remove_modifier = asteroid_belt
                        }
                        if = {
                            limit = { has_modifier = natural_beauty }
                            remove_modifier = natural_beauty
                        }
                        if = {
                            limit = { has_modifier = atmospheric_aphrodisiac }
                            remove_modifier = atmospheric_aphrodisiac
                        }
                        if = {
                            limit = { has_modifier = atmospheric_hallucinogen }
                            remove_modifier = atmospheric_hallucinogen
                        }
                        if = {
                            limit = { has_modifier = lush_planet }
                            remove_modifier = lush_planet
                        }
                        if = {
                            limit = { has_modifier = bleak_planet }
                            remove_modifier = bleak_planet
                        }
                        if = {
                            limit = { has_modifier = irradiated_planet }
                            remove_modifier = irradiated_planet
                        }
                    }
                }
            }
        }
    }
}
 
  • 2
  • 1
Reactions:

gerishnakov

Captain
44 Badges
Feb 14, 2016
312
237
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Stellaris
  • Stellaris: Synthetic Dawn
  • Hearts of Iron III
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Nemesis
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Sign Up
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV
  • Victoria 2
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Stellaris: Megacorp
So, if I was to simply comment out the whole event that removes modifiers from starting systems, would that remove it entirely from the game? Also, would the change affect the prescripted races' systems, such as Sol if you're playing as humanity?
 

Warchild421

Captain
99 Badges
Aug 12, 2015
391
90
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
This is the file to be able to add modifiers to your system while not having the AI do the same. It can give you a significant bonus to start.
 

Attachments

  • Custom System.zip
    688 bytes · Views: 9
  • 2
Reactions: