Logo Platform
logo amplifiers simplified

Troubles with creating custom FactionAffinity

Reply
Copied to clipboard!
7 years ago
May 27, 2017, 4:30:43 PM

Hello, i would like to create some parasitic faction, which invades and eat others alongside star lanes.


Right now, i would like to create some mix between Cravens and Unfallen.


The colonization system is based on creep, like Unfallen ones.

The population grows in majority by eating others, like vodyanis.

Planets with only the faction population won't be able to have more population.


I'd see them as a big swarm, eating population on their path, but without any other reproduction possibility. You won't be able to grow population on your own.


Right now, here's what I plan :


One faction with :

1) One trait which gives -30 happiness and 0% FIDS on non-faction population (she's supposed to be still fighting the invader until she's assimilated)

2) One ability which needs 2 turns to transform one non-faction pop into one faction pop and creating some army.

3) A faction pop which can't grow (like the riftborn ones)

4) A custom planet with 1 parasite and 2 minor faction.


Then if possible :

1) Allowing the root system to be automatic on invaded planets.

2) The parasite will be created with the same traits than the assimilated one.

3) The creep will be able to extend by itself to other empty systems. But colonization will remove one population from the first/nearest planet.


Right now, I use a custom faction with Riftborn workers and Unfallen roots, but I can't add any minor pop to my starting planet, so it seems I really need my n°3 to get my n°4...



Anyway, my problem is still at the start, i'm not used to english words and it's my first mod, so I already have troubles with n°1.

I created a custom trait, but I still have some "how do I do that" problems.


 (my first try)

How do I manage to do : -30 happiness and 0% FIDS on non-faction population ?


Alternative : Should I drop the unfallen thing and create from the cravers affinity faction ? Can/How do I merge both ?


Sorry for the broken english. Have a good day.

Updated 7 years ago.
0Send private message
7 years ago
May 27, 2017, 9:48:22 PM

2) One ability which needs 2 turns to transform one non-faction pop into one faction pop and creating some army.

3) A faction pop which can't grow (like the riftborn ones)

For these two you can do it by making a custom Major Population.

2 can be done using Horatio's Genetic Alteration Lab builds effect  (see Public/Simulation/ConstructibleElement_Industry[StarSystemImprovement].xml)


<StarSystemPopulationTransformImprovementDefinition   Name="StarSystemImprovementCloneMajorPopulation" SubCategory="SubCategoryPopulation" ScoreProvider="StarSystemImprovementBuilt"
PopulationSource="Minor" PopulationSourceHeuristic="LowestCount" PopulationDestination="Major" PopulationDestinationHeuristic="LowestCount"  PopulationToTransformCount="1" >
<CustomCost ResourceName="SystemProduction">1280</CustomCost>
<PathPrerequisite Inverted="false"   Flags="Prerequisite,Discard">../ClassEmpire,AffinityGameplayHoratio</PathPrerequisite>
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Disable">ColonizedStarSystemStateColony/ClassColonizedPlanet/PopulationNonMajor</PathPrerequisite>
<TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyCloneMajorPopulation</TechnologyPrerequisite>
<SimulationDescriptorReference Name="StarSystemImprovementCloneMajorPopulation"/>
</StarSystemPopulationTransformImprovementDefinition>


3 can be done using the Riftborn population definitions (see Public/Simulation/SimulationDescriptors[Population].XML) 

<!-- Time Lords -->
<SimulationDescriptor Name="ClassPopulationStarSystemAffinityTimeLords" Type="ClassPopulationStarSystem">
<Modifier TargetProperty="CannotMigrate"             Operation="Force"    Value="1" TooltipHidden="true"/>
<Modifier TargetProperty="ShouldPopulationGrow"           Operation="Force"    Value="-1" TooltipHidden="true"/>
<Modifier TargetProperty="MaximumSystemProductionStock"   Operation="Force"    Value="$(MaximumSystemGrowthStock)"  Path="../ClassColonizedStarSystem,ColonizedStarSystemStateOutpost" SearchValueFromPath="true" Priority="1" TooltipHidden="true"/>
<Modifier       TargetProperty="PopulationWithGrowth"       Operation="Subtraction" Value="$(PopulationCount)"                      Path="./ClassStarSystem" TooltipHidden="true"/>
</SimulationDescriptor>



0Send private message
7 years ago
May 28, 2017, 9:58:50 AM

Thank you ! I'll look into major civs first then.


I have trouble to find herited classes and simulationDescriptor [type, modifiers...] definitions. Where can I find them ?

Updated 7 years ago.
0Send private message
7 years ago
May 28, 2017, 10:54:32 AM

I'm not sure what exactly you looking for, all simulationDescriptor's are found in Endless Space 2\Public\Simulation 

but if your looking for a particular definition (I.E ClassPopulationStarSystemAffinityTimeLords)

the best tool is using notepad++ and it's find in files function to search Endless Space 2\Public for that definition

0Send private message
7 years ago
May 28, 2017, 11:51:33 AM

Sorry, it's still messy for me. I'm looking for an index or a documentation with all actions available. One header-like file, with the arguments available and so.


I'm not used to XML but I'm beginning to understand the node system, except for the path and countpath.


For example, what is the difference between "Happiness" and "BonusPopulationHappiness" ? Where can I see that ?

0Send private message
7 years ago
May 28, 2017, 12:34:04 PM

There is no list of modifiers available. you just have to find which ones are used in the files and use them 

What program are you using as notepad++  will highlight the XML syntax for you

path is used to tell modifiers where they are modifying I.E. a damage modifier with normally  have a path of classModuleWeapon as its modding the weapon damage

countpath is just what that bit of code is counting the numbers of

0Send private message
7 years ago
May 30, 2017, 6:39:54 PM

It seems pretty complicated, so I give up and move on until some faction/Affinity example, tutorial or manual shows up ^^


Good  luck and have fun ! Can't wait to see what will appear. Since Long War 2  came out, I'm pretty hyped by anything that concerns modding.

0Send private message
?

Click here to login

Reply
Comment