Logo Platform
logo amplifiers simplified
Endless Space 2
Universe banner wording

ENDLESS™ Space 2 is turn-based 4X space-strategy that launches players into the space colonization age of different civilizations within the ENDLESS™ Universe. Your Vision. Their Future.

Manual for modding Endless Space 2

Reply
Copied to clipboard!
7 years ago
Jul 20, 2017, 7:52:51 AM

Distributed Energy is tied to Orichalcix (TechnologyStrategicDeposit6) & Hazardous Mining Facility Is tied to Quadrinix (TechnologyStrategicDeposit6)


But Instead of redefining the improvements / specializations or moving the TechnologyStrategicDeposit5/6 techs why not just change the Technology Prerequisite for the resources themselves ?


In "Public\Simulation\EmpireImprovements.xml" it defines the techs that unlock each strategic resource (Quadrinix shown below)

<EmpireImprovementDefinition Name="EmpireImprovementStrategic6" Category="CategoryStrategic6" SubCategory="SubCategoryResourceExploitation">
        <TechnologyPrerequisite 
Flags="Prerequisite,Discard,Technology">TechnologyStrategicDeposit6</TechnologyPrerequisite>
        <SimulationDescriptorReference
Name="EmpireImprovementStrategic6" />
</EmpireImprovementDefinition>

It unlocks it with it's simulation Descriptor (No Hard coding here) found in "Public\Simulation\SimulationDescriptors[EmpireImprovements].xml"


<SimulationDescriptor Name="EmpireImprovementStrategic6" Type="EmpireImprovement">
   <Modifier 
TargetProperty="AllowToExploitStrategicRare2"     Operation="Addition" Value="1" Path="ClassEmpire/ClassColonizedStarSystem" TooltipHidden="true" />
   <Modifier
TargetProperty="AllowStrategicDeposit6"           Operation="Addition" Value="1" Path="ClassEmpire" TooltipHidden="true" />
</SimulationDescriptor>

To move the unlock of strategics just make a new tech definition (or pick an existing one) on the tech you want to move it too and then just replace the technological prerequisite in empire improvements with it.

0Send private message
7 years ago
Jun 22, 2017, 2:31:41 PM
Dagart wrote:

This list contains:
> Current Datatypes you can use to mod
> Current Datatypes but not moddable (for the moment)
> Current Datatypes but not moddable (and maybe never)
> New Datatypes still in dev (will be deployed in the next or an ulterior update), moddable or not

If The not all the datatypes all moddable why does the diagnostics show the game "Loading plugin files for database of type XYZ" for all 161 Datatypes.

Sorry for all the questions I'm just trying to understand the system, As there is only so much you can attempt to learn from looking in the assemblies

Ok, I will list that too!

I've tried to make a remaking of all 8 hero ship textures so that they are blue (as thats simple for a first retexture) but I could never guess the right names for the retextures. 

Also If I wanted to retexture the weapons to match would I need to set only one weapon to be retextured (as all weapon textures the same single texture file) or will I need to set them all to be retextured ? and if so what are the names I would need to retexture them ? (sorry for yet more questions)

0Send private message
7 years ago
Jun 23, 2017, 2:04:50 PM

For heroes spaceships, I listed the Remapping Definition names according to the Material Data names and the MaterialProperty Names, here: SpaceShip heroes.pdf.pdf

For heroes weapon modules, currently, they can't be reskinned. It's in our plans and I watch on it ;)

0Send private message
7 years ago
Jun 23, 2017, 9:23:13 PM
Dagart wrote:

For heroes spaceships, I listed the Remapping Definition names according to the Material Data names and the MaterialProperty Names, here: SpaceShip heroes.pdf.pdf

For heroes weapon modules, currently, they can't be reskinned. It's in our plans and I watch on it ;)

Thanks for this, I have just made and released a mod. I was wondering if there is any way to change the colour of the engine trail as default hero ships all have a blue trail but the pathfinders have a red one. Is this editable, not currently moddable or hardcoded?

Updated 7 years ago.
0Send private message
7 years ago
Jun 26, 2017, 8:43:37 AM

The mod looks cool ;)
For the trail, currently you can't (and I don't know if it can be added later):
> Create a new trail color: it's a particle system directly created in the game engine.
> Select the trail to applied on a ship: It's hardcoded to each ships (via the ship prefab from the game engine).

Updated 7 years ago.
0Send private message
7 years ago
Jun 26, 2017, 8:47:19 AM
Dagart wrote:
For the trail, currently you can't (and I don't know if it can be added later):
> Create a new trail color: it's a particle system directly created in the game engine.
> Select the trail to applied on a ship: It's hardcoded to each ships (via the ship prefab from the game engine).

Damn, Oh well the issue only affects pathfinder hero ships so its not the worse

0Send private message
7 years ago
Jun 30, 2017, 11:00:06 PM
Dagart wrote:
Ninakoru wrote:

Hi Dagart,


I'm trying to modify industry costs for buildings, but is not overriding the original values. My xml file contains this plugin element:


            <DatabasePlugin DataType="IndustryConstructibleElement, Assembly-CSharp">
                <ExtraTypes>
                    <ExtraType DataType="StarSystemImprovementDefinition, Assembly-CSharp" />
                </ExtraTypes>            
                <FilePath>Public/Simulation/ConstructibleElement_Industry[*].xml</FilePath>
            </DatabasePlugin>    


Adding the entire mod if you happen to check the issue:

Game Balance.zip


Also as a request, could you add the option to edit the registry file on a later patch? (Public/Registry.xml) There are a few cool formulas there that I want to mod :P

Good news: we corrected the bug in the last update and you will now able to override the original values.
Concerning the option to edit the registry file, we are on it.

Great! Good news indeed! :)

0Send private message
7 years ago
Jul 7, 2017, 8:14:59 AM

Hello there! Just wanted to report that, on a Mac, there doesn't seem to be a way or path by which I can access the "Public" game files with the core game data, and thus have no idea what the baseline is or how to change it effectively for modding. This is most likely because I'm absolutely terrible at navigating my computer, but it would nonetheless be nice to have a clear path, preferably in the manual itself.

0Send private message
7 years ago
Jul 7, 2017, 8:25:53 AM
Urzamax wrote:

Hello there! Just wanted to report that, on a Mac, there doesn't seem to be a way or path by which I can access the "Public" game files with the core game data.

In steam right click on endless space 2 and click properties then select the local files tab and click browse local files and you should see the public folder.

I'm on windows but I assume this would also work on a mac.

0Send private message
7 years ago
Jul 18, 2017, 3:24:36 AM

So I'm trying to make a simple mod right now, Government and by extension Laws, because I want to put some new benefits on Democracy and Federation and give Dictatorship more powerful laws just like Republic. Unfortunately, I cannot for the life of me figure out how to get the mod to show up in my Local Mods when I start the game, despite apparently following all of the instructions.


I'd like to point out as well that there is a comment for the FilePath function that talks about using * as a wildcard, but it is entirely unclear what that actually means, particularly as the example is missing from the comment. Also, in the SimulationDescriptors for SystemImprovements, the improvements are organized by Stages that are all out of whack in relation to where they actually are in the era's? It's very confusing.


Anyhow, I have the file here, I'd love to know what the heck is wrong and see if the correct solution can get commented into the original tutorial files next chance you get. Law & Order.xml


Aaaand lo and behold, apparently the Undo key combo deletes your files, somehow, so I just lost all the modifications I made to the Government file. Awesome.

0Send private message
7 years ago
Jul 18, 2017, 6:46:56 AM
IceGremlin wrote:

So I'm trying to make a simple mod right now, Government and by extension Laws, because I want to put some new benefits on Democracy and Federation and give Dictatorship more powerful laws just like Republic. Unfortunately, I cannot for the life of me figure out how to get the mod to show up in my Local Mods when I start the game, despite apparently following all of the instructions.

I'm assuming other mods show up in local mods, (If you don't have any local mods try downloading one of the starter pack mods and putting its folder into the "%Documents%/Endless Space 2/Community" Folder)

I have just looked at the XML file you attached and the issue is definitely the use of & (ampersand)

When you click on the link you provided it loads a page showing:

This page contains the following errors:

error on line 5 at column 35: EntityRef: expecting ';'

Below is a rendering of the page up to the first error.

This is because the ampersand has special meaning in XML, when it is placed there needs to be a symbol name and semicolon after it.

 Here is an Article Explaining this in more detail.


So my suggestion is never use a & symbol in an XML document if you can help it, 

you could have you RuntimeModule something like this:

<RuntimeModule Name="LawAndOrder" Type="Extension" Version="Release">

You will also want to remove the ampersands from your file path, speaking of

I'd like to point out as well that there is a comment for the FilePath function that talks about using * as a wildcard, but it is entirely unclear what that actually means, particularly as the example is missing from the comment.

Your file system should match the public folder one, but your file names do not. In your case you only need one file of Simulation Descriptors (you can just merge the 2 files contents into one file). 

Your also using the wrong datatype, Here is how you could have it:

<DatabasePlugin DataType="Amplitude.Unity.Simulation.SimulationDescriptor, Assembly-CSharp-firstpass">
    <FilePath>
Simulation/SimulationDescriptors[LawAndOrder].xml</FilePath>
</DatabasePlugin>

The "GovernmentDefinition, Assembly-CSharp" Datatype is for GovernmentDefinitions.xml file and "LawDefinition, Assembly-CSharp" is for the LawDefinitions.xml. Since you only changing SimulationDescriptors you use its datatype.


Anyhow, I have the file here, I'd love to know what the heck is wrong and see if the correct solution can get commented into the original tutorial files next chance you get. Law & Order.xml

Surprisingly I think in my tutorial file (for custom faction traits) I actually wrote a warning regarding using the "&" symbol. I would support amplitude adding a warning somewhere as it will catch out people unfamiliar with XML.

Also on a different note, when uploading files I would suggest having them in zip files as many browsers like to open these links as pages (XML & HTML files particularly). While files can always be directly downloaded by holding Alt and using the link not many people know this.

Updated 7 years ago.
0Send private message
7 years ago
Jul 18, 2017, 8:07:58 AM

Thanks Cyrob! I added a warning concerning spaces and special characters, to the tuto and the comments in the starterpack.

0Send private message
7 years ago
Jul 20, 2017, 6:06:04 AM

On another note, apparently in ConstructibleElement_Science[QuadrantEconomyandTrade], the second and third tier Strategic deposit techs are tied to their associated buildings/planetary specializations. As such, I can't move the strategic deposits to another tech without their buildings coming along for the ride, which is proving a bit of a problem as I'd like to move the second and third tier Strategics an era down to reduce every other quadrants slavish reliance on the Economy quadrant to function.


I couldn't begin to guess how I would create wholesale the tech definitions needed to separate the Strat resources from their associated buildings, as it's not an issue with the Tier 1 Strat techs, and I didn't expect that any system improvement would just not have

Updated 7 years ago.
0Send private message
7 years ago
May 24, 2017, 4:37:51 PM

This is great news, I look forward to seeing what developments come from this. In the meantime I'm happy to have have my Example Faction Trait file & Tutorial added here.

If your taking requests, the ability to add Hero models, animations & textures would be nice to have down the line, but for now I would suggest you add something functionality like <ES2Version>1.0.1</ES2Version> to the mod Root files that allows the game to warn if a mod is out of date (more for when large updates / DLC come out and can change the way the games works and cause incompatibility) Also adding scroll wheel functionality on the mod selection menu would be nice

Updated 7 years ago.
0Send private message
7 years ago
Jul 20, 2017, 9:25:21 AM
CyRob wrote:

But Instead of redefining the improvements / specializations or moving the TechnologyStrategicDeposit5/6 techs why not just change the Technology Prerequisite for the resources themselves ?


Simple: I have no idea what I'm doing and am playing this all by ear, because the Modding Tutorials flew way over my head and explained very little to me. I only came on here because what I had gleaned from experimentation was that I was doing things right according to what rules I had figured out, and thus I couldn't tell if there was something wrong or I just didn't get another, deeper rule. It's like early alchemy, you keep breaking the rules until you figure out what they are. Most of what you just described doesn't mean anything to me, but I get what the Empire Improvements part is and where it's located, so I at least know where to bodge it and that I can in fact fix this.


Thank you for the explanation, and I'll implement it right away! I'll be glad to see this problem fixed so I can play with a smoother, less Economy quadrant reliant economy.

0Send private message
7 years ago
Jul 20, 2017, 9:50:03 AM
IceGremlin wrote:

Simple: I have no idea what I'm doing and am playing this all by ear, because the Modding Tutorials flew way over my head and explained very little to me. I only came on here because what I had gleaned from experimentation was that I was doing things right according to what rules I had figured out, and thus I couldn't tell if there was something wrong or I just didn't get another, deeper rule. It's like early alchemy, you keep breaking the rules until you figure out what they are. Most of what you just described doesn't mean anything to me, but I get what the Empire Improvements part is and where it's located, so I at least know where to bodge it and that I can in fact fix this.


Thank you for the explanation, and I'll implement it right away! I'll be glad to see this problem fixed so I can play with a smoother, less Economy quadrant reliant economy.

I think everyone doing modding here plays it by ear. Most of what I know has come from reading the files and experimentation. I know I still have plenty more to learn as almost every time I answer a question on here I don't know the answer and have to dive into the files to find it. That’s how I’ve ended up learning most stuff. It's how I learnt about what I just posted, I didn't know about it 3 hours ago.




In regard to some of the stuff not meaning anything to you;


The General structure of the files is that for every thing  there is a Definition in the relevant file normally labelled <Thing’sTypeDefinition Name=”Thing”> 

Now the definition is the framework of the thing it normally does not contain any information (there are exceptions) but rather tells the game where to get the information. 

If the thing has an effect it will have a <SimulationDescriptorReference> that tells the game the effect is difined in the <SimulationDescriptor> with Whatever name. 

Simulation Descriptors contain Modifiers which just define an effect to apply to a certain path.


Now back to the Definition, They can have <SomethingPrerequisite> that define what is required before they come into effect / are available.

Definition’s can be linked to <GuiElement> just by them sharing the same name=”thing” the Gui element defines the thing’s title and description and picture (if applicable)


I think that covers the basic structure if that helps, I'm happy to answer any questions.

 

0Send private message
7 years ago
Jul 20, 2017, 11:45:31 AM

That little explanation of the difference between Definitions, Descriptors, and Prerequisites already made a lot of my work easier and all of this make more sense. I'll probably have questions later, especially as I run into issues with faction specific technologies as prerequisites and other things, since I don't kn


But I am now well on my way to a grand full conversion mod! So thank you for the help, it means a lot.


EDIT: Nevermind, the problem I thought I had before I actually have now. The planetary specializations for Food in the Science quadrant are inextricably linked to their associated techs, so I can't actually move them as they aren't separate techs in the list. There's no
        <SimulationDescriptorReference Name="TechnologyPlanetFood1"  />

in ConstructibleElement_Science[QuadrantScienceandExploration], though there is a TechnologyPlanetFood3 in the Empire Development quadrant.


It looks like I'll have to create a new tech for the other two planetary specialization levels, but I have no idea how to decouple them from their current techs, which is the same problem I was having before except this time these aren't Empire Improvements so I can't just change the prerequisites.

Updated 7 years ago.
0Send private message
7 years ago
Aug 4, 2017, 4:32:22 PM

Hey Modders!
With the next update, mods concerning the ships reskin will require some changes to continue working.
> RemappingDefinitions no longer requires a path:
Current version : <RemappingDefinition Name="Prefabs/Game/SpaceShips/SS_Heroes_Small_01">
New version : <RemappingDefinition Name="SS_Heroes_Small_01">

And last, when you export materials and textures, an XML file is also exported to help you to create your mod.

So don't forget to update your mod after the new patch and let us know if you have questions!

0Send private message
7 years ago
Aug 4, 2017, 4:40:36 PM

Thanks for the heads up, I might not have noticed one of my mods had broken for a while without it.

I'll make the changes ready to upload when the update comes out.


Speaking of, is there any planed timeframe for when the update is expected?

0Send private message
7 years ago
Sep 16, 2017, 9:08:10 PM
Dagart wrote:

The mod looks cool ;)
For the trail, currently you can't (and I don't know if it can be added later):
> Create a new trail color: it's a particle system directly created in the game engine.
> Select the trail to applied on a ship: It's hardcoded to each ships (via the ship prefab from the game engine).

Any update on this? I figure it's likely to remain inaccessible. :/

0Send private message
?

Click here to login

Reply
Comment
0Send private message