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

asnys

Second Lieutenant
29 Badges
May 23, 2016
123
12
  • Stellaris: Synthetic Dawn
  • 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
  • Crusader Kings II
  • Stellaris: Lithoids
  • Age of Wonders
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Federations
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Stellaris: Distant Stars
  • Crusader Kings II: Charlemagne
So I want to add a new planet modifier to the game. Does anyone know how to do that?

What I've been doing is adding entries to common/planet_modifier and common/static_modifier. But adding a common/static_modifier folder to the mod - even if it's empty - results in a game crash on launch. And adding a common/planet_modifier folder sometimes does and sometimes doesn't, in a strange and unpredictable fashion (it seems to cause a crash if there's anything in there, or if there was something in there last time the game loaded, but not if the folder's empty and it didn't previously contain anything). But I'm not sure if I'm doing something wrong or if this is a bug.
 
I have a file under common/static_modifers/civ_trade_static_modifers.txt with some modifiers in it that work perfectly fine for me.

Make sure you have the 's' at the end of modifiers, might be the problem.
 
  • 2
Reactions:
I haven't had any problem adding modifiers.

common/planet_modifiers/mymod_planet_modifiers.txt
Code:
pm_mymod_comet = {
    spawn_chance = {
        #None - From event
    }
   
    modifier = "mymod_comet"
}

common/static_modifiers/mymod_static_modifiers.txt
Code:
mymod_comet = {
    pop_happiness = -0.10
    icon = "gfx/interface/icons/planet_modifiers/pm_asteroid_impacts.dds"
    icon_frame = 3
}

localisation/mymod_l_english.yml (must be in UTF-8):
Code:
l_english:
 mymod_comet: "Comet Modifier"
 mymod_comet_desc: "This modifier makes people unhappy"
 
  • 2
Reactions:
Thanks for your help. I'm still baffled, though, because I copy-and-pasted the code InfiniteGremlin posted, and it crashes to desktop on launch. I don't have anything else in the mod at the moment, just those three files, and it launches fine without the mod...
 
Here's the full contents of my mod directory at the moment:

Code:
test.mod
690089574.mod (for the "More Events" mod)
test/descriptor.mod
test/localisation/mymod_l_english.yml
test/common/planet_modifiers/mymod_planet_modifiers.txt
test/common/static_modifiers/mymod_static_modifiers.txt

If I move everything out of the mod directory, then "More Events" still shows up in the launcher, but the test mod doesn't, and it launches fine.

Would it be possible for you to provide a copy of your mod with the changed planet modifier, or direct me to where I can find it online? At the moment, all I can think of is some extremely subtle, hard-to-spot typo.

Thank you both for your help!
 
Can you post the contents of the modifier files for us?

Edit: And the mod file as well.

I've attached a .zip with the directory. For those who don't want to download a .zip from a stranger, here are the contents, copy-and-pasted:

Test.mod:
Code:
name="Test"
path="mod/test"
tags={
   "Balance"
}
supported_version="1.0.3"

Descriptor.mod:
Code:
name="Test"
path="mod/test"
tags={
   "Balance"
}
supported_version="1.0.3"

mymod_l_english.yml:
Code:
l_english:
mymod_comet: "Comet Modifier"
mymod_comet_desc: "This modifier makes people unhappy"

mymod_planet_modifiers.txt:
Code:
pm_mymod_comet = {
  spawn_chance = {
  #None - From event
  }
  
  modifier = "mymod_comet"
}

mymod_static_modifiers.txt:
Code:
mymod_comet = {
  pop_happiness = -0.10
  icon = "gfx/interface/icons/planet_modifiers/pm_asteroid_impacts.dds"
  icon_frame = 3
}
 

Attachments

  • mod.zip
    9,5 KB · Views: 3
That did it! Thanks so much! :)

And I didn't see them until you pointed them out. Didn't even know they exist - apparently, according to Google, they're hidden files that MacOS creates to keep track of window positions. Learn something every day!
 
Can someone take a look at mine too? Don't know why it isn't working. I'm getting an icon showing up... but it's the generic one and not the one I specified. The modifiers do not get applied either. Help is greatly appreciated as I'm new to Paradox modding.
 

Attachments

  • planetmodifiers.zip
    1,8 KB · Views: 2