Colonization Events and Planet Types

Is there a way to add code to a planet type to make it trigger a specific colonization event?  E.G.  Active Core worlds get the Earthquakes event, Frozen Worlds get the Ice Bridge, Desert Planets get the Giant Worms (let's be honest, THAT is the most important one!).

I know how and where to change the traits for the planet types, I just don't know how to code that.

6,831 views 3 replies
Reply #1 Top

This is possible, yes. When defining planet traits (see PlanetTraitDefs.xml or better yet DLC4_PlanetTraitDefs.xml), you add an xml element <ColonizeEvent>EventName</ColonizeEvent>.

Obviously, this must point to an event's internal name.

So, for example, in the Precursor World DLC, the planet with a Thulium Moon (first in the DLC4_PlanetTraitDefs.xml file) points to <ColonizeEvent>ThuliumMoonEvent</ColonizeEvent>, which is located in the file DLC4_ColonizeEventDefs.xml under the internal name ThuliumMoonEvent.

There's a lot of modding involved here between creating the planet itself, the event and the event choices, and then all the flavor text.

I hope this helps!

Reply #2 Top

Yes, that is exactly what I needed!  Thank you!

Reply #3 Top

You're welcome.