Logo Platform
logo amplifiers simplified

Modding Question - New unique Planets

Reply
Copied to clipboard!
7 years ago
Jan 28, 2018, 12:24:15 PM

Hey communtiy,

I never did a mod before but I would love to add more unique planets to the game.

I did not find anything on how to customize planet generation ect because the peolpe making the tutorials all seem to be interested in creating new ships and so on :(

Additionally I did not find any mods that do this.
I still would love to be able to change textures of potentual added planets in the mod myself.


If somebody who is more experienced with modding give me a tip on how to start I would be really grateful :)

0Send private message
7 years ago
Jan 28, 2018, 6:25:45 PM

There is a subfolder called GalaxyGenerator that has most of what you are looking for.


In the Simulation subfolder, to create the new unique planets, there are the files SimulationDescriptors[UniquePlanet]


For the graphics, the subfolder GUI GuiElements[UniquePlanets] 


There might be some more, but that should start you off.

0Send private message
7 years ago
Jan 28, 2018, 7:57:23 PM
Somentine wrote:

There is a subfolder called GalaxyGenerator that has most of what you are looking for.


In the Simulation subfolder, to create the new unique planets, there are the files SimulationDescriptors[UniquePlanet]


For the graphics, the subfolder GUI GuiElements[UniquePlanets] 


There might be some more, but that should start you off.

Great that helps me to orientate ,:D
Thanks Alot!

0Send private message
7 years ago
Jan 29, 2018, 10:33:29 AM

Hey folks!


We've recently added 30 new "fake" visuals for custom planets!

If you want your planets to have a new visual, name your planet types as following:

- PlanetTypeCustom01~20: the basic types with their own FIDSI (such as Jungle/Lava)

- UniquePlanetCustom01~10: the additional values, and unique name (such as Auriga/Tor)


If you're interested in creating a new planet type, you'll have to create these new elements:

- SimulationDescriptors: a lot of them! Most importantly, one descriptor for each new type or new unique planet.

- GuiElements: a lot of them too! They're the link between "gameplay" names (XML) and Localization and images.

- PlanetGameplayTypeDefinitions: one for each new type, which says what the temperature and tier are.

- WeightTableDefinitions: "PlanetTypeCustomXX_Size" will say what size your planet will be.

- PlanetColonizationConstructibleElement: Prerequisites on this thing says when your planet will be colonizable or not.

- PlanetTemperatureDefinition: used by the galaxy generator.

- PlanetRemappingDefinition: The visuals of these custom planets are placeholders, and you'll have to override them to have your own skin in their stead.


You'll have to override the following data:

- WeightTableDefinitions: add your planet type to the list of valid planet types for each star types you want them to spawn on, and to several other tables (look at the vanilla WeightTableDefinitions, each type is referenced a bazillion times).

- MinorFaction definitions: add new ColonizablePlanet entries so that a minor faction can colonize the planet when their population slots are full.


Optional:

- FactionTrait for home planet (for custom factions)

- PlanetImprovementMappingDefinition: what kind of improvements will Minor factions put on the planet.

- GuiPlanetTypeBaseStats: values displayed in the planet scan view


That's a lot of work, but it's mostly copy-paste!

I'll try to create an example mod for that when I have time.

0Send private message
7 years ago
Jan 29, 2018, 11:25:33 AM

Thanks Alot this is very useful information.

It would be a huge help if you could make an example mod and I would be really grateful :)
Meanwhile I try to find all of the files you mentioned *:D

0Send private message
7 years ago
Jan 29, 2018, 12:51:19 PM

OK... I am somewhat confused but still think I got some stuff right.

In Theory:

If i want to add a new planet type (like lava,Ocean ect.) i need to change stuff in the following files:
In Galaxy Generator:

-Planet Temperature definitions (Add and give values)

-Planer tier definitions (Add and give values)
-Weight table definitions (Add everywhere where other normal planet types are mentioned and give value)

In GUI:

-Gui Elements [Planet types] (Where I can Name and describe the planet.)

Questions: 

1. Where exactly are Icon Size Small&Medium in the game (the pics over the description?)

2. Is Planetoid the texture of the planets model? If not where do i refer to this? Mapping?

3. And where are the actual textures for the planets this is linked to? Should I just make a recources folder in my mod folder and place them there.

4. Am I able to link for example a Colonization Movie which is not in my mod folder?

-Anywhere else :/ ? (difference in function of PlanetGameplayTypes and PlanetTypes?)

In Localization:

-Should I just copy the "Assets Local" file and add my own text I link in Gui elements?

In Mapping:

- SO the PlanetRemapping file is not in the Public folder. But it is in the Example mod where you changed the homeworld             texture.

   I guess I copy this and rename everything linking it to new textures I made which I put into a new recources folder. (basically redoing what you did in the retexture example mod)

When it comes to the PlanetColonizationConstructibleElement file...

I understad the function but not where to find it in the file. Why is it a different file type btw?



Ok I know those are alot of questions and you probably got different things to do than explaining your file System to a modding noob but I would appruciate some answered questions or maybe an example mod that creates a new planet type and Unique planet so I and maybe some others could figure it out themselfes with the help of a finished example.

I'm still very thankful for your support :)



0Send private message
7 years ago
Jan 29, 2018, 3:03:52 PM

1. Where exactly are Icon Size Small&Medium in the game (the pics over the description?)

The icons referenced in the GuiElements are in the game's Resource files, you can extract them using tools such as UnityAssetBundleExtractor.

If you want to add your own images, you can do so by placing them in a subfolder named "Resources" in your mod folder. They must be the same size as the original ones, and be referenced in your new GuiElements. See the example mods or the modding guide for more info on these images.


2. Is Planetoid the texture of the planets model? If not where do i refer to this? Mapping?

The planetoid is actually the image shown in the Empire Summary's Systems screen:


The texture used by the planets must be overriden by creating a PlanetRemappingDefinition.

The process is straightforward: 

- Open the Resources export tool (Main menu > Mods > Game asset export) 

- Select and export the custom planet's textures

- This will create a folder containing the required XML for replacement, and the planet's original textures

- Modify the textures, add the PlanetRemappingDefinitions and the other files to your mod


3. And where are the actual textures for the planets this is linked to? Should I just make a recources folder in my mod folder and place them there.

The original textures are in the game's Resource file, and can be extracted with the resources export tool.

The new textures must be placed in your mod's Resource folder, and be referenced by the PlanetRemappingDefinitions (the auto-generated XML does it!)


4. Am I able to link for example a Colonization Movie which is not in my mod folder?

You can add a new colonization video, which has to be referenced in the Planet's ExtendedGuiElement (like the vanilla planet types).

However, the path originates from Steam/steamapps/Endless Space 2/EndlessSpace2_Data/StreamingAssets/, while your mod will be in Steam/steamapps/workshop/content/392110/your mod's ID.

You'll have to either have a very long path that goes up the folders then back down (I'm not sure it's possible), or tell the players to manually include the video in the StreamingAssets folder, which is not Workshop-compliant.


In Localization:

-Should I just copy the "Assets Local" file and add my own text I link in Gui elements?

You don't need to copy everything, just to add new lines for the text referenced in your new GuiElements!

In Mapping:

- SO the PlanetRemapping file is not in the Public folder. But it is in the Example mod where you changed the homeworld texture.

I used the Game asset export tool, which generated the XML files! It's much easier to do that, and much less error-prone.

When it comes to the PlanetColonizationConstructibleElement file...

I understad the function but not where to find it in the file. Why is it a different file type btw?

Planet colonization constructibles are in Public/Simulation/ConstructibleElement_Industry[PlanetColonization].xml, because in our code, they are a constructible which uses industry, before being a colonization constructible. The name doesn't matter, though! You can put anything in any file, as long as it's referenced in your mod core/skeleton/whatever the name is XML.


I'll try to create the mod on my personal time this week if I can, but I can't guarantee it!

0Send private message
7 years ago
Jan 29, 2018, 5:37:14 PM

First of all thanks alot for the detailed help with this. I really appruciate it!

I think I now understood everything I need to get it running but will return if i have more questions.

If you make an example mod in you personal time, it would be really nice but of course I don't want to steal your free time :P


For now, thanks Alot!


EDIT:

Question:

Am I able to add a new "PlanetTypeMycelium" or do I have to use "PlanetTypeCustom_01"?

If I have to use the custom one where exactly do I add the Planet types name that is shown ingame?

Updated 7 years ago.
0Send private message
7 years ago
Jan 30, 2018, 8:41:21 AM

You'll have to name it PlanetTypeCustom01, because that's how the prefabs/materials (visuals) are named in the game assets.

If you name it another way, it won't find the visual, and will fallback to something else (the Terran type's visual).

0Send private message
0Send private message
7 years ago
Jan 30, 2018, 6:48:17 PM

Dude ur a blessing,

Thanks alot!


Now its time to experiment 8)

0Send private message
0Send private message0Send private message
7 years ago
Feb 13, 2018, 4:11:40 PM

And this is the <Plugins> part of the mod's core file.

It's a lot of work, but you can now have up to 20 new planets, and 10 new unique planets which, in my opinion, is pretty great.


<Plugins>
       
    <!-- Add one DatabasePlugin for each type you modify. -->
    <!-- You can find the current existing DatabasePlugins on the G2G forum (in the modding guide I think) or an out-of-date version in this mod's Documentation. -->
           
    <!-- This entry allows you to reskin planets (custom visuals look bad so you override them) -->
    <DatabasePlugin DataType="PlanetRemappingDefinition, Assembly-CSharp">
        <!-- Path leading to the files, starting from the location of this XML file. Note that you can use * to include several files at once (eg. EntityActions[*].xml) -->
        <FilePath>Mapping/PlanetRemappingDefinitions.xml</FilePath>
    </DatabasePlugin>

    <!-- SimulationDescriptors are gameplay effects applied on elements such as planets, empire, or systems. -->
    <DatabasePlugin DataType="Amplitude.Unity.Simulation.SimulationDescriptor, Assembly-CSharp-firstpass">
        <FilePath>Simulation/SimulationDescriptors.xml</FilePath>
    </DatabasePlugin>

    <!-- These entries are required to include the new planet type in the galaxy generation. -->
    <DatabasePlugin DataType="GalaxyGeneratorWeightTableDefinition, Assembly-CSharp">
        <FilePath>GalaxyGenerator/WeightTableDefinitions.xml</FilePath>
    </DatabasePlugin>

    <DatabasePlugin DataType="Generator.Definitions.PlanetGameplayTypeDefinition, Assembly-CSharp-firstpass">
        <FilePath>GalaxyGenerator/PlanetGameplayTypeDefinitions.xml</FilePath>
    </DatabasePlugin>

    <DatabasePlugin DataType="Generator.Definitions.PlanetTemperatureDefinition, Assembly-CSharp-firstpass">
        <FilePath>GalaxyGenerator/PlanetTemperatureDefinitions.xml</FilePath>
    </DatabasePlugin>

    <!-- Colonization constructible -->
    <DatabasePlugin DataType="IndustryConstructibleElement, Assembly-CSharp">
        <ExtraTypes>
            <ExtraType DataType="PlanetColonizationConstructibleElement, Assembly-CSharp" />
        </ExtraTypes>
        <FilePath>Simulation/PlanetColonizationConstructibleElements.xml</FilePath>
    </DatabasePlugin>

    <!-- These must be defined in the list of "stuff a system can build" (IndustryConstructibleElement) and "stuff that can decide whether a planet is colonizable or not" (PlanetColonizationConstructibleElement). -->
    <DatabasePlugin DataType="PlanetColonizationConstructibleElement, Assembly-CSharp">
        <FilePath>Simulation/PlanetColonizationConstructibleElements.xml</FilePath>
    </DatabasePlugin>

    <!-- GuiElements bind the gameplay ugly names like PlanetTypeCustom01 to images and player-friendly text like "Arctic" -->
    <DatabasePlugin DataType="Amplitude.Unity.Gui.GuiElement, Assembly-CSharp-firstpass">
        <ExtraTypes>
            <ExtraType DataType="Amplitude.Unity.Gui.ExtendedGuiElement, Assembly-CSharp-firstpass"/>
        </ExtraTypes>
        <FilePath>Gui/GuiElements.xml</FilePath>
    </DatabasePlugin>

    <!-- Scanview data -->
    <DatabasePlugin DataType="GuiPlanetTypeBaseStats, Assembly-CSharp">
        <FilePath>Gui/GuiPlanetTypeBaseStats.xml</FilePath>
    </DatabasePlugin>

    <!-- Minor empire planetary improvement binding -->
    <DatabasePlugin DataType="PlanetImprovementMappingDefinition, Assembly-CSharp">
        <FilePath>Simulation/PlanetImprovementMappingDefinitions.xml</FilePath>
    </DatabasePlugin>

    <!-- Population political events. -->
    <DatabasePlugin DataType="PopulationEventDefinition, Assembly-CSharp">
        <ExtraTypes>
            <ExtraType DataType="PopulationPoliticalEventDefinition, Assembly-CSharp" />
        </ExtraTypes>
        <FilePath>Simulation/PopulationPoliticalEventDefinitions.xml</FilePath>
    </DatabasePlugin>

    <!-- Localization (transform "%UniquePlanetCustom01Title" into "Custom planet #1") -->
    <LocalizationPlugin DefaultLanguage="english">
        <Directory>Localization</Directory>
    </LocalizationPlugin>
           
</Plugins>

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message