Logo Platform
logo amplifiers simplified

LO Guide to Modding ES2

Reply
Copied to clipboard!
7 years ago
Jan 6, 2018, 7:17:23 AM

ES2 modding limitations: the Unity Engine & prefabs


Endless Space 2 is developed in the Unity Engine and some of the game's architecture wasn't built with modding in mind.


One of Unity's defining characteristics is that it uses a system called prefabs. These are basically objects that are built inside of the Unity editor. 


Without being able to open the game up yourself in Unity--to alter core files, rebuild them and then to release your own copy of the game files--some parts of the game can't be modded.


Some examples of things that fall into this category are:

  • new animations
  • models
  • music


However, the devs are aware that people would love the ability to mod these parts of their games, and they've said in the past that they'll do their best to open up more of the game in the future when they get a chance to revisit the way their game is built (especially in future titles).




If you would like to know more about prefabs, you can check out Unity's explanation of prefabs in their video tutorial:


https://unity3d.com/learn/tutorials/topics/interface-essentials/prefabs-concept-usage

... or in their online manual:


https://docs.unity3d.com/Manual/Prefabs.html?_ga=2.234510750.1413458758.1515508677-341380902.1515073413

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 7:13:36 AM

You cannot add new animations for heroes and/or factions


- This is not currently possible in ES2 (S)

- The game was developed in the Unity engine, and this is a limitation of the game engine




Tips:

- You can still create new heroes and factions using static, 2D images

- There are still minor issues with creating new factions




See also:

- ES2 modding limitations: the Unity Engine & prefabs

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 4:55:46 AM

Guide to Localization


Notes:

- Localization files can be named anything; as long as they are located in the correct folder, the game will load them properly.

- If you do not include localization files for a non-English language, then players using those language options will have missing keys; the game does not default to English values.

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 4:08:22 AM

Guide to GUIElement


The path for custom icons in a mod is "Gui/NameOfImage"


For example:


<Icons>

<Icon Size="Small" Path="Gui/NameOfImage_Small" />
<Icon Size="Large" Path="Gui/NameOfImage_Large" />

</Icons>

The images should be saved in png format, and they should be located at:


ModFolder/Resources/Gui/NameOfImage_Small.png

ModFolder/Resources/Gui/NameOfImage_Large.png

[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 1:33:51 AM

Guide to SimulationDescriptor


This is an extremely rough list, taken from SimulationDescriptor files as I work through them




Example:


<Modifier TargetProperty="Happiness" Operation="Addition" Value="10" Path="./ClassColonizedStarSystem"/>

Types:


- HeroSkillSenator: Hero skills that take effect when a hero is leading a political party

- HeroSkillShip: Hero skills that take effect when a hero is leading a fleet.

- HeroSkillSystem: Hero skills that affect a system while a hero is assigned as a governor

- StarSystemImprovement: Buildings

Operations:


- Addition

- Percent


Binary Operations:


- Multiplication


Properties:


- BuildingBuyoutReduction: Discount when buying buildings with Dust

- ExperienceAtShipCreation: +XP added to each new ship built

- ExperiencePerTurn: +XP added to hero

- Happiness: +Approval

- ResourceBonus: +Strategics

- ShipBuyoutReduction: Discount when buying ships with Dust

- SystemEmpirePoint: +Influence

- SystemFIDSIPercent: +FIDSI percent on the whole system

- SystemGrowth: +Food

- SystemMoney: +Dust

- SystemMoneyUpkeep: +Upkeep

- SystemProduction: +Industry

- SystemResearch: +Science

- TradingCompanyHeaquarterCount: Increases the counter that tracks how many Trading HQs have been built


Properties (Unknown/Unsure/Unsorted):


- BonusPopulationFood

- DisableFoodConversion

- EmpireManpower

- GroundBattleBombardmentAttackerDamages

- GroundBattleDefenderTroopsMaxHealthMultiplier

- GroundBattleRoundImprovementDestructionProbability

- HeroUnlockThresholdModifier: ? Percentage of points needed for next hero

- MaximumSystemManpower: ?

- NetSystemProduction

- OverColonizationThreshold

- PassiveEnrollmentRate: ?

- PlanetRawDust: ? +Dust per planet

- PlanetRawFood: ? +Food per planet 

- PlanetRawFIDSI: ? + FIDSI per planet

- PlanetRawIndustry: ? +Industry per planet

- PlanetRawPrestige: ? +Influence per planet

- PlanetRawScience: ? +Science per planet

- Quality: Level of Spaceport?

- RawMaximumPopulation: ? Extra pop slots. I know there is a maximum pop limit (15?)

- ScienceBuildingCount

- SpaceportCapacity

- StarSystemImprovementIndustryToScienceEffect

- SystemMoneyFromProductionConversion

- SystemProductionFromGrowth

- SystemProductionFromProductionConversion

- SystemResearchFromProductionConversion

- TradingRouteIncomeModifier

- TradingRouteSystemBaseIncome

Notes:

- You can look up many properties if you look at the <SimulationDescriptor> the path points to; for example, many of these properties have context in the:


<SimulationDescriptor Name="ClassEmpire">

found in:


Simulation/SimulationDescriptors[Empire].xml

Other Concepts:

- BinaryModifier & BinaryOperation

- Values

- TooltipHidden="true"

- SearchValueFromPath="true"


Paths:


- on the Empire: "../ClassEmpire"


- on the Empire's probes: "ClassEmpire/ClassProbe"


- on a Colony "./ColonizedStarSystemStateColony"

- on a StarSystem: "./ClassColonizedStarSystem"


- on each colonized planet in a StarSystem: "./ClassColonizedStarSystem/ClassColonizedPlanet"

- on the strategics produced by a StarSystem: "./ClassColonizedStarSystem/ClassColonizedPlanet/ResourceTypeStrategic"

- on the hero assigned to a StarSystem: "./ClassColonizedStarSystem/ClassHero"


Paths (Unknown/Unsure/Unsorted):

- on a planet type: "./ClassColonizedStarSystem/PlanetGameplayTypeMeager"

- "./ClassColonizedStarSystem/ClassPlanet/ClassPopulation,PopulationMajor"


Notes:

- Paths can be combined, but inserting a comma between them.


For example:


Path="./ColonizedStarSystemStateColony,ClassColonizedStarSystem"




Upkeep


Notes:

- There are preset <SimulationDescriptor> for upkeep, and you can just choose an appropriate <SimulationDescriptor> and add it into your building, instead of manually setting an upkeep.



[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 5, 2018, 11:42:11 PM

Creating a custom building (aka star system improvements)


To understand the various ways in which you can unlock your custom building, please see:
- Unlocking your custom buildings: Overview




In Simulation/ConstructibleElement_Industry[*], create a new <StarSystemImprovementDefinition>


For example:


<StarSystemImprovementDefinition Name="StarSystemImprovementIndustry1" SubCategory="SubCategoryIndustry" ScoreProvider="StarSystemImprovementBuilt">

<SupervisorGain Name="Industry" />
<Cost ResourceName="SystemProduction">280</Cost>
<PathPrerequisite Inverted="false" Flags="Prerequisite,Discard">ColonizedStarSystemStateColony</PathPrerequisite>
<SimulationDescriptorReference Name="StarSystemImprovementIndustry1" />
<SimulationDescriptorReference Name="StarSystemImprovementUpkeepStage1Normal" />

</StarSystemImprovementDefinition>

See also:
- Guide to StarSystemImprovementDefinition




In Simulation/SimulationDescriptors[*], create a new <SimulationDescriptor>


For example:


<SimulationDescriptor Name="StarSystemImprovementApproval1" Type="StarSystemImprovement">

<Modifier TargetProperty="Happiness"  Operation="Addition" Value="10" Path="./ClassColonizedStarSystem"/>

</SimulationDescriptor>

Notes:

- This is where the game effects of the building are defined; one or more of these SimulationDescriptors are added to the StarSystemImprovementDefinition (see above).

- These SimulationDescriptors DO NOT have to share the same name as your building.


See also:

- Guide to SimulationDescriptor




In GUI/GuiElements[*], create a new <GuiElement>


For example:


<GuiElement Name="StarSystemImprovementDust4">

<Title>%StarSystemImprovementDust4Title</Title>
<Description>%StarSystemImprovementDust4Description</Description>
<Icons>

<Icon Size="Small" Path="Bitmaps/Dynamic/Improvements/StarSystem/StarSystemImprovementDust4Small" />
<Icon Size="Large" Path="Bitmaps/Dynamic/Improvements/StarSystem/StarSystemImprovementDust4Large" />

</Icons>

</GuiElement>

Notes:

- GUI stands for graphical user interface

- This is what makes your building visible in the UI

- The GuiElement Name attribute must be the same as the Name attribute in your StarSystemImprovementDefinition


See also:

- Guide to GUIElement




In Localization/english/ES2_Localization_Assets_Locales.xml, create two <LocalizationPair>


For example:


<LocalizationPair Name="%StarSystemImprovementFood1Title">Sustainable Farms</LocalizationPair>
<LocalizationPair Name="%StarSystemImprovementFood1Description">Advances in soil biology have opened the gate to new, low-impact farming methods that reduce the need for water, fertilizer, and sunlight. In addition, crops will be able to grow in extremes of temperature and soil quality.</LocalizationPair>

Notes:

- The LocalizationPair Name attributes should match up with what you put into the <Title> and <Description> tags in the GuiElement (see above)

- This is what adds your title and flavor text to the GUI


See also:

- Guide to Localization

Updated 7 years ago.
0Send private message
7 years ago
Jan 5, 2018, 11:38:26 PM

Guide to StarSystemImprovementDefinition


[More to come]


Updated 7 years ago.
0Send private message
0Send private message
7 years ago
Jan 4, 2018, 8:51:56 PM

Unlocking your custom buildings (aka star system improvements) from a quest


In QuestDefinitions[], in your <QuestDefinition> just before you close <ObjectiveSet>, create a <Reward>


For example:


...

<Reward Droplist="MyDroplist" Picks="1"/>

</ObjectiveSet>

...



In Droplists[], create a <Droplist>


For example:


<Droplist Name="MyDroplist">

<Unlock Name="MyNewStarSystemImprovement" SimulationTag="MyNewStarSystemImprovement"/>

</Droplist>



In ConstructibleElement_Industry[], add a <PathPrerequisite> with the following pattern:


<StarSystemImprovementDefinition Name="MyNewStarSystemImprovement">

<PathPrerequisite Inverted="false" Flags="Prerequisite,Discard">../ClassEmpire/ClassQuests,MyNewStarSystemImprovement</PathPrerequisite>

</StarSystemImprovementDefinition>

See also:

- Creating a custom building

Updated 7 years ago.
0Send private message
0Send private message0Send private message0Send private message
?

Click here to login

Reply
Comment