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

goobermaster

Major
123 Badges
Aug 7, 2005
528
110
  • 500k Club
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • March of the Eagles
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Hearts of Iron 4: Arms Against Tyranny
  • Europa Universalis III: Chronicles
  • Arsenal of Democracy
  • Crusader Kings II
  • 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
  • Darkest Hour
  • Europa Universalis III
  • Hearts of Iron Anthology
  • Divine Wind
  • 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
  • Impire
Hi,

I originally posted this i the Quick Questions thread, but given that it's now fractured over several posts I wanted to consolidate my question.

I am planning on creating some mods around altered starting systems, and cannot for the life of me figure out why my specified planet modifiers/strategic resources never show up (not in game or in the planetary data in a save game). For some, I can get the survey event (such as alien pets giving the 'life encountered' event), but the resource still does not appear.

Following the example.txt in Stellaris\common\solar_system_initializers, this should work:

planet = {
name = "Example Planet"
class = "pc_molten"
orbit_distance = 30
orbit_angle = 15
size = 6
has_ring = no
home_planet = no
modifier = "pm_chthonian_planet" #<------------- Not in game
resource = "sr_betharian" #<------------- Not in game
}

planet = {
name = "Example2"
class = "pc_continental"
orbit_distance = 20
orbit_angle = 120
size = 22
has_ring = no
home_planet = no
tile_blockers = none
modifier = "pm_ultra_rich" #<------------- Not in game
modifier = "pm_carbon_world" #<------------- Not in game
resource = "sr_alien_pets" #<------------- Not in game, gives event when surveyed!
anomaly = "UPLIFT_SNAKEOID_CAT" #<------------- Works fine!
}

Both the modifier and resource point to entries in Stellaris' planet modifiers/strategic resources files. Anomalies work fine, and show up without any issues.

Has anyone here created some custom, static systems and overcome this problem?

Additionally, has anyone figured out how to (if it's even possible) specify resources to be found on barren objects (for collection by mining/research station, like 4 minerals, 3 energy, 2 physics, etc)?
 
  • 4
Reactions:
Hi,

I'm not sure if you've solved this yet, but I think I've worked it out, so I'll share for you and any others searching the forum for a solution.

I've made this system based on your code, and tested it by assigning it as a neighbouring system for a custom home system, then using observe mode to check the resources.

Code:
example_system_0 = {
    name = "Example System"
    class = "sc_g"                               
   
    planet = {
        name = "Example Star"
        class = star
        orbit_distance = 0
        orbit_angle = 1
        size = 30
        has_ring = no
        init_effect = {
            orbital_deposit_tile = {                    # for stars and uncolonisable planets/asteriods/gas-giants etc
                clear_deposits = yes                    # this line is essential to prevent stacking, especially with d_null_deposit (which messes things up)
                add_deposit = d_vast_energy_deposit        # deposits from common/deposits/00_deposits.txt
            }
        }
    }
   
    planet = {
        name = "Example Planet"
        class = "pc_molten"
        orbit_distance = 30
        orbit_angle = 15
        size = 6
        has_ring = no
        home_planet = no
        modifiers = none                                # prevents additional modifiers
        init_effect = {
            add_modifier = {
                modifier = "chthonian_planet"            # modifiers from the files in common/static_modifiers
                days = -1                                # permanent
            }
            orbital_deposit_tile = {                    # for stars and uncolonisable planets/asteriods/gas-giants etc
                clear_deposits = yes                    # this line is essential to prevent stacking, especially with d_null_deposit (which messes things up)
                add_deposit = d_betharian_deposit        # deposits from common/deposits/00_deposits.txt
            }
        }
    }
   
    planet = {
        name = "Example2"
        class = "pc_continental"
        orbit_distance = 20
        orbit_angle = 120
        size = 22
        has_ring = no
        home_planet = no
        tile_blockers = none
        modifiers = none                                # prevents additional modifiers
        init_effect = {
            add_modifier = {
                modifier = "ultra_rich"                    # modifiers from the files in common/static_modifiers
                days = -1                                # permanent
            }
            add_modifier = {
                modifier = "carbon_world"                # modifiers from the files in common/static_modifiers
                days = -1                                # permanent
            }
            orbital_deposit_tile = {                    # I tried using orbital_deposit_tile but it just used a random tile anyway
                clear_deposits = yes                    # this line is essential to prevent stacking, especially with d_null_deposit (which messes things up)
                add_deposit = d_alien_pets_deposit        # deposits from common/deposits/00_deposits.txt
            }
        }
        anomaly = "UPLIFT_SNAKEOID_CAT"
    }
}

By following this pattern you should be able to add any strategic resource or modifier to any star, planet, moon, asteroid, gas giant etc...

I worked this out by looking at how the anomaly events add modifiers/resources from the events/anomaly_events*.txt files. It's weird that the code in common/solar_system_initializers/example.txt was so misleading.

I hope this helps
 
  • 1
Reactions: