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.

[Modding Tutorial] : Faction Traits + Example Mod

Reply
Copied to clipboard!
7 years ago
May 20, 2017, 10:55:18 AM

While we're waiting for the official modding manuals I thought I might help with modding in the meantime.

So far, I have messed around with faction traits for custom factions, If you want to create custom traits (or edit existing ones) here is how:

Firstly, download this ExampleTrait mod and add it to the community folder (you need to create it if you have not already) It should be located at %MyDocuments%\Endless Space 2\Community But it can vary. Once unzipped into the folder you should be able to run the game and find it in the mods menu, if you activate it you should find 2 new example traits (one has 2 levels) in the start modifiers section of the custom empire creation screen.


ExampleTrait.zip


I have put many comments in each of the files explaining what each part does to my knowledge.

So that you can change bits around, reload the mod and end up creating a mod for yourself.


Using a mod to edit vanilla Traits instead of add them:

I was asked this on the workshop so I'm writing it here in case anyone else finds it useful.

Changing a trait requires less work than creating one, If you want to change a traits effect the only file you need from the example trait zip above is the SimulationDescriptors[ExampleTrait].XML in that file use the name of an already existing trait e.g. FactionTraitBigFleets1 and set the modifier to what you want e.g. with big fleets trait maybe you want to increase command points but also increase upkeep costs. and that's it the mod should overwrite vanilla. you may also want to use the FactionTraits[ExampleTrait].xml file to adjust the costs of traits you edit. Also make sure to remove database plugins (in ExampleTrait.xml) for any files you delete as they are not necessarily and might case issues.


If you have any questions about it or want me to try create a tutorial for a different type of mod please ask.

Updated 7 years ago.
0Send private message
7 years ago
May 20, 2017, 7:50:12 PM

Here is a list of some Target Properties that can be used in Simulation Descriptors for traits along with their commonly used paths and operations:

To be used in this fashion: <Modifier TargetProperty="[Target Property]" Operation="[Operation]" Value="[Number]" Path="[Path]"/>


Target Property Name
Commonly Used OperationsCommonly Used PathsDescription of PropertyExample of Use
HappinessPerPeace
Addition
ClassEmpire/ClassColonizedStarSystem
Affects Happiness by X amount for every empire at peace with youFactionTraitNaive1
HappinessPerAlliance
Addition
ClassEmpire/ClassColonizedStarSystem
Affects Happiness by X amount for every empire in a alliance with you
FactionTraitNaive1
MinimumTrend
Force
ClassEmpire/ClassMajorRelationWithMinor
Affects how negative a relations trend can be 
FactionTraitBigBrothers
MaximumMovement
Addition
ClassEmpire/ClassGarrison/ClassShip
ClassEmpire/ClassColonizedStarSystem/ClassGarrison/ClassShip

Affects the movement points available to ships
FactionTraitFastTraveler1
MaximumShipProbeStock
Addition
ClassEmpire/ClassGarrison/ClassShip,ShipRoleExploration
ClassEmpire/ClassColonizedStarSystem/ClassGarrison/ClassShip,ShipRoleExploration

Affects the amount of probes available to exploration ships
FactionTraitEfficientExplorer1
MaximumEmpireManpowerStock
Percent
ClassEmpire
Affects the manpower limit
FactionTraitPatriots1
InfantryMaxHealth
Percent
ClassEmpire
Affects infantry Health
FactionTraitFearlessWarriors1
InfantryMinDamages
Percent
ClassEmpire
Affects the minimum damage infantry do
FactionTraitBrilliantStrategists1
InfantryMaxDamages
Percent
ClassEmpire
Affects the maximum damage infantry do
FactionTraitBrilliantStrategists1
MaximumCommandPoints
Addition
ClassEmpire
Affects max fleet size
FactionTraitBigFleets1
GarrisonMoneyUpkeep
Percent
ClassEmpire//ClassGarrison/ClassShip (IDK why there is a // either)
Affects fleet upkeep costs
FactionTraitBigFleets1
Damage
Percent
ClassEmpire/ClassGarrison/ClassShip/ClassSection/ClassModule,ClassModuleWeapon
Affects ship weapon damage
FactionTraitDeadlyWeapons1
TradingCompanyLevelUpMultiplier
Percent
ClassEmpire/ClassTradingCompany
Affects the speed at which Trading companies level up
FactionTraitKingpinExecutives
ShipHealth
Percent
../ClassEmpire/ClassGarrison/ClassShip
Affects ship health
FactionTraitOptimalDefense1
Upkeep
Percent
ClassEmpire/ClassGarrison/ClassHero
ClassEmpire/ClassColonizedStarSystem/ClassHero

Affects heroes upkeep cost
FactionTraitLegendaryHeroes1
ExperiencePerTurn
Addition
ClassEmpire/ClassGarrison/ClassHero
ClassEmpire/ClassColonizedStarSystem/ClassHero
Gives heroes X experience per tern
FactionTraitLegendaryHeroes1
Updated 7 years ago.
0Send private message
0Send private message
7 years ago
Sep 14, 2017, 2:55:02 AM

What would be the best way to go and make a mod for making research take longer? like for instance just a simple x2 cost on science, or a 1/2 modifer on all science production. I'm not the best at programming but I'd like to learn :D

0Send private message
7 years ago
Sep 14, 2017, 7:30:30 AM

Don't worry Xml is quite easy to read and write compared to most programming languages.

If you use a program that highlights the syntax then it gets much easier, I recommend using Notepad++ (It's Free)


Research Costs are currently individually for each tech in;

"Public\Simulation\ConstructibleElement_Science[QuadrantScienceAndExploration\Military\EmpireDevelopment\EconomyAndTrade].xml" Files.

But they are set using a formula which makes them easy to change in bulk

<CustomCost ResourceName="EmpireResearch">Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCurrentCost) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostStage[EraNumber]Multiplier) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCost[QuadrantName])</CustomCost>

The formulas all refer to variables that are set in "\Public\Simulation\SimulationDescriptors[Research].xml"

The Easiest way to double all the technology costs would be to edit the 5 "TechnologyCostStage[N]Multiplier" 's by doubling their current basevalues. 


The TechnologyCostQuadrant...Multiplier's are changed in-game by improvements so editing them would require further edits to keep game consistency.


If you (or anyone reading this) have any more questions regarding this or another area feel free to ask.


0Send private message
6 years ago
Aug 8, 2018, 11:00:31 PM

Say for whatever reason I wanted to add a weapon module as a starting technology. How would I go about doing that?

0Send private message
6 years ago
Aug 9, 2018, 12:33:27 PM

Hey Legendkiller,


Here's what you would have to do:

- Find the TechnologyDefinition of the technology you want the module to be linked to.

- Add a new TechnologyPrerequisite in the module's ModuleDefinition so it matches one of the SimulationDescriptorReference listed in the TechnologyDefinition

- Add a new FactionTrait which unlocks the technology


Do you want to create a new module, create a new technology, create a new trait, or use only existing data?

Updated 6 years ago.
0Send private message
6 years ago
Aug 9, 2018, 9:12:43 PM

I was originally going to add a new trait that includes starting weapon modules, but I found another way to do it, hence the other post. I just need to find the weapon modules to add which is the problem.

0Send private message
5 years ago
Nov 26, 2018, 1:25:45 PM

Registered an account just to say thanks. Super straightforward guide- got a fully functional trait on my first try. After that I downloaded the More Traits mod for inspiration of other possibilities- highly recommended if you plan to mess with traits. He does some very creative things with them.

I had a little trouble finding this on google- ended up googling Endless Space 2 Modding Forum. My initial searches were misses, so adding a few here.

Endless Space 2 adding traits

Endless Space 2 add a trait

Endless Space 2 creating a new trait

Endless Space 2 creating traits

0Send private message
?

Click here to login

Reply
Comment
0Send private message