Logo Platform
logo amplifiers simplified

LO Guide to Modding ES2

Reply
Copied to clipboard!
7 years ago
Jan 6, 2018, 7:17:21 PM

Guide to PathPrerequisites


Misc:

- TechnologyPrerequisites are actually PathPrerequisites preceeded by ".../ClassEmpire/ClassResearch" (S)

- You can check for multiple tags at once. (S)


[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 11, 2018, 1:39:31 PM

New/extra planet prefabs & materials


[Rough]


This is not live yet; this is not organized. This is just collecting information that seems noteworthy.


From @MonAmiral in Discord

Hey folks, I've added new planet prefabs and materials which aren't used in the vanilla game

it means you will be able to add new planet types/unique planets with their own visuals, instead of having to modify a vanilla one

I don't think it'll be public before the end of the modding contest though

Names must be PlanetTypeCustom01~20 and UniquePlanetCustom01~10

20 types, and 10 uniques

I've created the data only for the first type, as an example

(so you'll have to override the first one and add the other ones)

Note that mods that add new planet types might not be compatible with each other, because they might either use the same planet types, or simply because they override the same GalaxyGeneratorWeightTable

(like, if it replaces the content of "StarTypeAcademy_PlanetTypes")

and...


The prefabs I have added can use the vanilla XmlMapping for ClassPlanet.Body (what CyRob linked)

So you just have to add the descriptor PlanetTypeCustom01 in SimulationDescriptors.xml

list it as a valid type in PlanetGameplayTypeDefinitions

and add it to a GalaxyGeneratorWeightTable such as StarTypeYellow_PlanetTypes

they'll naturally spawn, and use the new prefab, whose visual you can override with a PlanetRemappingDefinition

There are a lot of other things to do, like create the colonization constructible (required for colonization, even if not doing it via Construction queue), list it as a colonizable planet for minor factions, add GuiElements and set the FIDSI values

but it's mostly copy-paste

and a code example from @Cyrob from his Community Mod Project:


<XmlMapping Name="ClassPlanet.Body"><GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_UniquePlanetTerrans_00')" Condition="$(Type) eq ('PlanetTypeGlobalCity')"/><Fallback><GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_UniquePlanetSykagoja_00')" Condition="$(Type) eq ('PlanetTypeGlobalFarm')"/><Fallback><GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_UniquePlanetTimeLords_00')" Condition="$(Type) eq ('PlanetTypeGlobalLab')"/><Fallback><GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_UniquePlanetTor_00')" Condition="$(Type) eq ('PlanetTypeGlobalForge')"/><Fallback> <GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_{0}_00_{1}', $(Type), $(ExplorationState))"/> <Fallback>  <GameObject Name="Format('PlanetGeneric.Body_{2}({1})', $(Type), $(GUID), $(ExplorationState))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_Generic_00_{0}', $(ExplorationState))"/>  <Fallback>   <GameObject Name="Format('{0}.Body({1})', $(UniquePlanet), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_{0}_00', $(UniquePlanet))"/>   <Fallback>    <GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_{0}_00', $(Type))"/>    <Fallback>     <GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Prefabs/Game/Environment/Planet/PlanetBody_PlanetTypeTerran_00"/>    </Fallback>   </Fallback>  </Fallback> </Fallback></Fallback></Fallback></Fallback></Fallback></XmlMapping>

And one more code example from @Cyrob in Discord:


<GameObject Name="Format('{0}.Body({1})', $(Type), $(GUID))" Prefab="Format('Prefabs/Game/Environment/Planet/PlanetBody_UniquePlanetTerrans_00')" Condition="$(Type) eq ('PlanetTypeGlobalCity')"/>

 

"This makes the planet type I've added (PlanetTypeGlobalCity) use the PlanetBody_UniquePlanetTerrans_00 prefab (Raia)"

Updated 7 years ago.
0Send private message
7 years ago
Jan 10, 2018, 5:48:49 AM

Guide to PathPrerequisite


[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 10, 2018, 5:42:27 AM

Checking for quest completion


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="MyUnlockName" SimulationTag="MyQuestTag"/>

</Droplist>



You can then use a <PathPrerequisite> with the following pattern:


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

... to check to see if your quest has been completed.




See also:

Guide to PathPrerequisite


Updated 7 years ago.
0Send private message
7 years ago
Jan 7, 2018, 11:04:08 PM

Best Practices: Understanding Scope


Whether you're making your own game--or just creating a mod--scope is probably the most important thing to keep in mind.




This video from Extra Credit is my favorite explanation of scope:






As hobbyist game designers--or maybe just enthusiastic players--everything starts with, "This game would be so much cooler if..."


The moment we make a change, we start to get excited!


We're adjusting the world. 

We're changing things. 

Fixing them!


And in our heads, we're always making things better through our changes.


That's part of the magic of modding. You're not paying for your own time, and so you have the freedom to dream up pretty much anything. 


It feels like you have unlimited resources. 

It feels like you can accomplish anything.


But you don't have unlimited resources (aka time and passion) and if you don't get your scope down early, you're probably not going to accomplish much at all.




Personal Story:


My very first mod for an Amplitude game was a cocky, little thing called Tales of Auriga for Endless Legend.


My scope was easy to define: Everything!


I figured out how to do a lot of neat things, but I actually accomplished very little.


I classify that mod--it doesn't even work with the last release of EL--as a catastrophic failure!


And to be fair, I had a lot of fun designing it.


I got passionate about coding and organizing, and I can honestly say that it has inspired me and that I learned a lot from that experience.


I believe that, as long as you're prepared to throw all your work away at the end, go for it and have fun with a massively-scoped mod.




So what's the alternative?


I personally believe in smaller, focused, modular mods that combine together to create something amazing.




Helpful Links:

- Extra Credits: Game Design: 87 Videos on Game Design

- 5 Tips to Narrow Your Game’s Scope

Updated 7 years ago.
0Send private message
7 years ago
Jan 7, 2018, 7:58:28 AM

Creating new hero skills


[More to come]

0Send private message
7 years ago
Jan 7, 2018, 6:42:37 AM

Guide to HeroDefinition


<HeroDefinition> is found in:


Simulation/HeroDefinitions.xml



HeroDefinitions have a very strict format. You must include every part of the HeroDefinition.


An example of a complete <HeroDefinition>:


<HeroDefinition Name="YourHeroName">

<Skill Name="HeroSkill01Sophons01"/>
<Skill Name="HeroSkill02Sophons01"/>

<Affinity Name="HeroAffinitySophons"/>
<Class Name="HeroClassAdministrator"/>
<Politics Name="HeroPolitics01"/>

<ShipDesign Name="ShipDesignHeroSmall04Defender"/>

<SkillTree Name="HeroSkillTreeGeneric"/>
<SkillTree Name="HeroSkillTreeSophons"/>
<SkillTree Name="HeroSkillTreeAdministrator"/>

<LevelUpRuleReference Name="HeroLevelUpRule"/>

</HeroDefinition>



The Name property in <HeroDefinition>: 


<HeroDefinition Name="YourHeroName">

... must be a unique name.


If you use a name that already exists, you will overwrite the previous hero.




The <Skill> tag:


<Skill Name="HeroSkill01Sophons01"/>

...defines the starting skills for the hero




You can find the starting skills created by Amplitude in:


Public/Simulation/HeroSkillDefinitions[*].xml



The Name property you're looking for in the <Skill> tag of <HeroDefinition> is the same as the Name property in the <HeroSkillDefinition>


For example:


<HeroDefinition Name="YourHeroName">

<Skill Name="HeroSkill01Sophons01"/>

...

and...


<HeroSkillDefinition Name="HeroSkill01Sophons01">

<SkillLevel Name="HeroSkill01Sophons01_1">
<ShipSimulationDescriptorReference Name="HeroSkillShip25_FleetDefense_Percent_0"/>
<MasteryLevel Class="HeroMasteryCommand" Levels="1"/>
</SkillLevel>

</HeroSkillDefinition>



However, these <HeroSkillDefinition> actually lead to another file:


Public/Simulation/SimulationDescriptors[HeroSkill].xml



I have found that the easiest way to set starting skills--unless you plan to create your own--is to work backwards from SimulationDescriptors[HeroSkill].xml


At the end of the file--currently after line 1219--you will find a section labeled "Starting Skills"


You can read through those skills until you find a skill that fits your new hero. 


For example:


<SimulationDescriptor Name="HeroSkillSystem59_Dust_Flat_0" Type="HeroSkillSystem" IsSerializable="false">

<Modifier TargetProperty="SystemMoney"Operation="Addition"Value="15"Path="ClassColonizedStarSystem" />
<!-- FEEDBACK FOR SCAN VIEW -->
<Modifier TargetProperty="BonusHeroSystemDust"  Operation="Addition"Value="15"Path="ClassColonizedStarSystem" TooltipHidden="true"/>

</SimulationDescriptor>


... increases the Dust produced by a system by 15, which is perfect for my new economic advisor hero.




You can then take the Name property of the SimulationDescriptor that you want to use, for example:


<SimulationDescriptor Name="HeroSkillSystem59_Dust_Flat_0" Type="HeroSkillSystem" IsSerializable="false">

...and do a search in HeroSkillDefinitions.xml to find a <HeroSkillDefinition> that is already set up with that skill.




I found two skills already set up:


<HeroSkillDefinition Name="HeroSkill02Eyders01">

<Tags>ColonizedStarSystem</Tags>
<SkillLevel Name="HeroSkill02Eyders01_1">
<SystemSimulationDescriptorReference Name="HeroSkillSystem59_Dust_Flat_0"/>
<MasteryLevel Class="HeroMasteryWit" Levels="1"/>
</SkillLevel>

</HeroSkillDefinition>

and...


<HeroSkillDefinition Name="HeroSkill02Unfallen02">

<Tags>ColonizedStarSystem</Tags>
<SkillLevel Name="HeroSkill02Unfallen02_1">
<SystemSimulationDescriptorReference Name="HeroSkillSystem59_Dust_Flat_0"/>
<MasteryLevel Class="HeroMasteryWit" Levels="1"/>
</SkillLevel>

</HeroSkillDefinition>



If I want to take a shortcut, I can simply use either of these skills for my new hero.


For example:


<HeroDefinition Name="YourHeroName">

<Skill Name="HeroSkill02Eyders01"/>

...

or...



<HeroDefinition Name="YourHeroName">

<Skill Name="HeroSkill02Unfallen02"/>

...



Warning!

If Amplitude (or another mod) ever modifies these <HeroSkillDefinition> it will also modify your hero's skills.


For this reason, you may wish to create a completely new <HeroSkillDefinition> for your hero.




See also:

Creating new hero skills




For the Name property of <Affinity>:


<HeroDefinition Name="YourHeroName">

...
<Affinity Name="HeroAffinitySophons"/>

...

... you can pick any of the affinity names from:


Simulation/HeroAffinityDefinitions.xml



For the Name property of <Class>:


<HeroDefinition Name="YourHeroName">

...
<Class Name="HeroClassAdministrator"/>

...

... you can pick any of the hero class names from:


Simulation/HeroClassDefinitions.xml



For the Name property of <Politics>:


<HeroDefinition Name="YourHeroName">

...
<Politics Name="HeroPolitics01"/>

...

... you can pick any of the politics names from:


Simulation/HeroPoliticsDefinitions.xml

For quick reference:


01: Industrial

02: Scientist

03: Pacifist

04: Ecologist

05: Religious

06: Militarist




[More to come]:


<ShipDesign Name="ShipDesignHeroSmall04Defender"/>

<SkillTree Name="HeroSkillTreeGeneric"/>
<SkillTree Name="HeroSkillTreeSophons"/>
<SkillTree Name="HeroSkillTreeAdministrator"/>

<LevelUpRuleReference Name="HeroLevelUpRule"/>

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

Unlocking your new heroes 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">

<Hero Name="MyNewHero" Spawn="true" Level="10"/>

</Droplist>



Important!

There are two optional properties in the droplist example above.




First, in the following example:


<Hero Name="MyNewHero" Spawn="true" Level="10"/>

... Spawn="true" tells the game that it should immediately give the empire a copy of that hero.




Second, in the next example:


<Hero Name="MyNewHero" Spawn="true" Level="10"/>

... Level="10" tells the game to make that hero level 10 when it is spawned.




See also:

- Creating a new hero

Updated 7 years ago.
0Send private message
0Send private message
7 years ago
Jan 7, 2018, 6:32:20 AM

Creating a new hero


To understand the various ways in which you can unlock your new hero, please see:
- Unlocking your new heroes: Overview




In Simulation/HeroDefinitions.xml, create a new <HeroDefinition>


For example:


<HeroDefinition Name="YourHeroName">
<Skill Name="HeroSkill01Sophons01"/>
<Skill Name="HeroSkill02Sophons01"/>

<Affinity Name="HeroAffinitySophons"/>
<Class Name="HeroClassAdministrator"/>
<Politics Name="HeroPolitics01"/>

<ShipDesign Name="ShipDesignHeroSmall04Defender"/>

<SkillTree Name="HeroSkillTreeGeneric"/>
<SkillTree Name="HeroSkillTreeSophons"/>
<SkillTree Name="HeroSkillTreeAdministrator"/>

<LevelUpRuleReference Name="HeroLevelUpRule"/>
</HeroDefinition>

Notes:

- HeroDefinitions have a very strict format; you must include every part of the HeroDefinition


See also:
- Guide to HeroDefinition




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


For example:


<HeroGuiElement Name="YourHeroName">

<Title>%YourHeroNameTitle</Title>
<Description>%YourHeroNameDescription</Description>
<Icons>
<Icon Size="Medium" Path="Gui/YourHeroName_Medium"/>
<Icon Size="Large" Path="Gui/YourHeroName_Large"/>
<Icon Size="Mood" Path="Gui/YourHeroName_Mood"/>
</Icons>

</HeroGuiElement>



Important!

The <Title> is especially finicky, and it will not find the localization key unless you adhere to the following naming format:


<Title>%YourHeroNameTitle</Title>

Your localization key MUST end with "Title" and it cannot have an underscore preceding it.


For example, the following would not work for me:


<Title>%YourHeroName_Title</Title>



See also:

- Guide to GUIElement




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


For example:


<LocalizationPair Name="%YourHeroNameTitle">Name Of Hero</LocalizationPair>
<LocalizationPair Name="%YourHeroNameDescription">Flavor text for new hero</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 6, 2018, 8:47:10 PM

How to make shields absorb all damage


Objective:

- You want shields to absorb all damage from all weapons until they are depleted.




In SimulationDescriptors[ModuleWeapon].xml, found in:


Simulations/Battles/

... you'd need to adjust the property for each of the base weapons.


For example, in:


<SimulationDescriptor Name="ClassModuleWeaponKinetic"  Type="ClassModuleWeapon">

... you will find a <Modifier> with a TargetProperty="ShieldPenetrationFactor"


For example:


<Modifier TargetProperty="ShieldPenetrationFactor" Operation="Addition" Value="0.9" Path="ClassModuleWeapon" TooltipHidden="true"/>

You simply need to change:


Value="0.9"

to...


Value="0"

Tips:

- There are probably many other ways to do this.

Updated 7 years ago.
0Send private message
0Send private message
7 years ago
Jan 6, 2018, 8:28:06 PM

You cannot alter starting anomalies or the size of home planets


Both of these things are controlled from outside of the xml and cannot be currently modded. (S)




Tips:

- There may be a workaround for anomalies, if you add them via a quest, but this is more advanced/complicated. (S)

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 8:18:57 PM

Studying other mods


[More to come]

0Send private message
7 years ago
Jan 6, 2018, 8:19:21 PM

Publishing to the Steam Workshop


[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 7:26:23 PM

Where are mod files stored?


Tips:

- Make sure you are absolutely sure where your active installation for ES2 is located; you can have older, abandoned installations if you have multiple Steam Libraries (S)




Mods can be created, installed and/or loaded from default two locations.


The first--aka Local--is located at:


Documents/Endless Space 2/Community/ModFolder/ModContents

The second location--aka Workshop--is located at 


SteamLibrary/steamapps/workshop/content/392110/ModID/ModContents



392110 is the number assigned to ES2 on Steam.


You can see this in the web address of the store page on Steam:


http://store.steampowered.com/app/392110/Endless_Space_2/



The ModID is a number assigned to your particular mod.


You can find this number in two places.


First, it can be located in PublishedFile.Id in your mod's root folder. This file is created the first time you publish your mod to the Steam Workshop and should never be edited/deleted.


Second, you can find this in the web address of a mod subscription page:


http://steamcommunity.com/sharedfiles/filedetails/?id=1077924717

In this case, 1077924717 is the number assigned to the G2G Balance Mod published by Amplitude for testing purposes.




Notes:

- You can use this information find your mod once you publish it to the Steam Workshop

- You can also use this information to download and study other mods for reference


See also:

- Publishing to the Steam Workshop

- Studying other mods

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

Preface



This whole forum is a wonderful resource for modding ES2. This thread is my personal contribution and I hope you find it helpful. I will curate this thread with descriptions, links, discussions and guides that I find helpful and informative.


Also, please note there may be errors in this guide. I'm a hobbyist modder and a volunteer; and I'm learning with everyone else. If you do find an error, or want to contribute something helpful, please feel free to send me a PM, or to post here with your correction.



(S) provides a link to source material which credits the author and provides context/examples

* Items marked with an asterisk are incomplete/placeholders for future content; needed to give this guide structure.



FAQ



-


Current Modding Limitations



- ES2 modding limitations: the Unity Engine & prefabs


- You cannot add new animations for heroes and/or factions

- You cannot add new models


- You cannot alter starting anomalies or the size of home planets

- Some faction traits are hard-coded *


- You cannot alter the game's soundtrack (or it is very difficult to do)


Best Practices



- Understanding Scope


- The best way to add new content in your mod

- Think twice before making a "simple" change to a base game definition

- Try not to replace base game files & definitions (unless that is your intention)

- Studying other mods *


General Information



- Where are mod files stored?

- Publishing to the Steam Workshop *

- How the game loads your mod files *


- Guide to DataTypes *


- Guide to Localization *


- Guide to GUIElement *

- Guide to SimulationDescriptor *


- Guide to PathPrerequisitive *


Buildings (aka Star System Improvements)



- Unlocking your custom buildings: Overview *

- Unlocking your custom buildings from a quest


- Creating a custom building

- Guide to StarSystemImprovementDefinition *


Combat



- How to make shields absorb all damage


Heroes



- Unlocking your new heroes: Overview

- Unlocking your new heroes from a quest


- Creating a new hero

- Guide to HeroDefinition


- Creating new hero skills *


Quests



- Checking for quest completion


- Unlocking your custom buildings from a quest

- Unlocking your new heroes from a quest


Misc/Unsorted



- New/extra planet prefabs/materials



Other Helpful Info/Links (Alphabetical)



- Example Hero Example Mod (by Amplitude)

- Faction Traits and Example Mod (by Cyrob)

- Manual for Modding Endless Space 2 (by Dagart)

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 7:20:18 AM

Guide to DataTypes


[More to come]

Updated 7 years ago.
0Send private message
7 years ago
Jan 6, 2018, 7:17:43 AM

Some faction traits are hard-coded


[More to come]

Updated 7 years ago.
0Send private message
0Send private message
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

Characters : 0
No results
0Send private message