Limit on number of effects in a single PlanetTrait?

While attempting to make a custom homeworld for my species (I'm pretty new to modding, and wanted something easy), I've discovered that GalCiv won't start if I have more than four EffectModifiers defined in a single PlanetTrait. I'm wondering if I'm just doing it wrong or I've run into a cap on the number of modifiers.

8,056 views 6 replies
Reply #1 Top

Nope planet traits cannot have more than 4 effects and I have yet to successfully add a single new planet trait.

I can get them to load up just fine, but as long as there are any new traits in a mod the game simply crashes straight to desktop as soon as you try to generate a map.

Reply #2 Top

You're doing something wrong Deathwynd. Planet traits work just fine, but yes, there is a 4 modifier limit (despite the XML schema saying otherwise).

 

Reply #3 Top

hrm ok I'll revisit the idea, I assumed since the file passed my xml compiler and the game didnt throw a hissy fit that it should work, wasnt using anything unusual just stuff thats already in the game files.

Well thanks for the info thats good to know.

Reply #4 Top

Deathwynd I also cannot get some planet traits to work, here, I will show you all the ones that do, and all the ones that don't:

 

Working:

Code: xml
  1. <PlanetTrait>
  2.     <InternalName>GasGiantColony</InternalName>
  3.     <DisplayName>Precursor Gas Giant Colony</DisplayName>
  4.     <Description>Sophisticated equipment rests in a stable orbit around this gas giant, allowing for a simple colony.</Description>
  5.     <EffectModifier>
  6.       <EffectType>Manufacturing</EffectType>
  7.       <Target>
  8.         <TargetType>Colony</TargetType>
  9.       </Target>
  10.       <BonusType>Multiplier</BonusType>
  11.       <Value>2</Value>
  12.     </EffectModifier>
  13.     <EffectModifier>
  14.       <EffectType>Research</EffectType>
  15.       <Target>
  16.         <TargetType>Colony</TargetType>
  17.       </Target>
  18.       <BonusType>Multiplier</BonusType>
  19.       <Value>2</Value>
  20.     </EffectModifier>
  21.     <EffectModifier>
  22.       <EffectType>GoodsAndServices</EffectType>
  23.       <Target>
  24.         <TargetType>Colony</TargetType>
  25.       </Target>
  26.       <BonusType>Multiplier</BonusType>
  27.       <Value>2</Value>
  28.     </EffectModifier>
  29.     <EffectModifier>
  30.       <EffectType>Tourism</EffectType>
  31.       <Target>
  32.         <TargetType>Colony</TargetType>
  33.       </Target>
  34.       <BonusType>Multiplier</BonusType>
  35.       <Value>2</Value>
  36.     </EffectModifier>
  37.   </PlanetTrait>
  38.   <PlanetTrait>
  39.     <InternalName>NoxCrashedShipWorld</InternalName>
  40.     <DisplayName>Crashed Nox Ship</DisplayName>
  41.     <Description>This planet has a crashed Nox ship that has been turned into a functioning military colony.</Description>
  42.     <EffectModifier>
  43.       <EffectType>Manufacturing</EffectType>
  44.       <Target>
  45.         <TargetType>Colony</TargetType>
  46.       </Target>
  47.       <BonusType>Flat</BonusType>
  48.       <Value>20</Value>
  49.     </EffectModifier>
  50.     <EffectModifier>
  51.       <EffectType>Research</EffectType>
  52.       <Target>
  53.         <TargetType>Colony</TargetType>
  54.       </Target>
  55.       <BonusType>Flat</BonusType>
  56.       <Value>10</Value>
  57.     </EffectModifier>
  58.     <EffectModifier>
  59.       <EffectType>PlanetaryDefense</EffectType>
  60.       <Target>
  61.         <TargetType>Colony</TargetType>
  62.       </Target>
  63.       <BonusType>Flat</BonusType>
  64.       <Value>0.5</Value>
  65.     </EffectModifier>
  66.   </PlanetTrait>
  67.   <PlanetTrait>
  68.     <InternalName>TiliGardenWorld</InternalName>
  69.     <DisplayName>Garden World</DisplayName>
  70.     <Description>This world is covered in verdant growth.</Description>
  71.     <EffectModifier>
  72.       <EffectType>Food</EffectType>
  73.       <Target>
  74.         <TargetType>Colony</TargetType>
  75.       </Target>
  76.       <BonusType>Multiplier</BonusType>
  77.       <Value>2</Value>
  78.     </EffectModifier>
  79.     <EffectModifier>
  80.       <EffectType>Growth</EffectType>
  81.       <Target>
  82.         <TargetType>Colony</TargetType>
  83.       </Target>
  84.       <BonusType>Multiplier</BonusType>
  85.       <Value>2</Value>
  86.     </EffectModifier>
  87.     <EffectModifier>
  88.       <EffectType>Approval</EffectType>
  89.       <Target>
  90.         <TargetType>Colony</TargetType>
  91.       </Target>
  92.       <BonusType>Multiplier</BonusType>
  93.       <Value>1</Value>
  94.     </EffectModifier>
  95.   </PlanetTrait>

 

Not Working:

Code: xml
  1. <PlanetTrait>
  2.     <InternalName>KellOrganoSyntheticWorld</InternalName>
  3.     <DisplayName>Synthetic World</DisplayName>
  4.     <Description>This world long ago turned synthetic, everything now works towards a common goal.</Description>
  5.     <EffectModifier>
  6.       <EffectType>Manufacturing</EffectType>
  7.       <Target>
  8.         <TargetType>Colony</TargetType>
  9.       </Target>
  10.       <BonusType>Multiplier</BonusType>
  11.       <Value>2</Value>
  12.     </EffectModifier>
  13.     <EffectModifier>
  14.       <EffectType>Research</EffectType>
  15.       <Target>
  16.         <TargetType>Colony</TargetType>
  17.       </Target>
  18.       <BonusType>Multiplier</BonusType>
  19.       <Value>2</Value>
  20.     </EffectModifier>
  21.   </PlanetTrait>

But why? The one that doesn't work is doing nothing new!

Reply #5 Top

I actually just found out a way to have as many effects in a planet trait as you'd like. So, when Sorentoft mentioned schemas I decided to look at them (I'd ignored them because they looked very important). I opened up the PlanetTraits schema and found toward the end of line 31 that you could set the minimum and maximum occurrences of EffectModifiers. I set the max to 20 and saved it. Now, I tried to get the game to load my custom modified schema from the mods folder, but it didn't work. I modified the schema in the main folder to allow 20 occurrences of EffectModifiers, then started the game. I got to the main menu fine, and tried to start a match. The match loaded fine and when I moused over my homeworld it had every single effect I could find.

If someone could tell me how to get schemas to load from outside the main folder (like from Mods), that'd be great.

Reply #6 Top

Yeah after going back and rehashing my work with my custom planet traits I found I had one world type that was crashing the game.

Commenting out that one world allowed the whole set except that one to work.

Even removing the special effects I was trying to use and just using effects that exist internal to the PlanetTraitDefs.xml that one entry still crashes the game so for now I ahve just commented it out.

MisterSaturnus it looks like you discovered the solution to your problem in the other thread.