Logo Platform
logo amplifiers simplified

QQ About Population Modding

Reply
Copied to clipboard!
8 years ago
May 8, 2017, 2:15:58 PM

I found how to slow down Population Growth with this XML:


<Modifier TargetProperty="PopulationGrowthMalus" Operation="Subtraction" Value="0.5"/>


How would I do the opposite? I was thinking about creating a Minor Faction that bred like rabbits


-KnyghteFall



0Send private message
8 years ago
May 9, 2017, 8:08:44 AM

On a hunch, I'd say you could do that by changing Operation="Subtraction" into Operation="Addition" and change the Value to whatever you want.

The property starts at 1 in SimulationDescriptors[Population].xml:

<Property Name="PopulationGrowthMalus"        BaseValue="1"         MinValue="Negative"/>

And is used to multiply the NetPopulationScore (in the same .xml)

<Modifier TargetProperty="NetPopulationScore"          Operation="Multiplication"                    Value="$(PopulationGrowthMalus)"                   TooltipHidden="true"/>

However, don't forget to check how it looks in the tooltip and chnage the text of the localization keys accordingly to reflect the new effects (ex: avoid negative wording on positive effects etc...)


Tell me if this works

0Send private message
8 years ago
May 9, 2017, 4:33:38 PM

Is there a way to specify an alternate tooltip? I don't want to modify the localization key for all instances of this property/descriptor, just this one instance of it.


Edit: Using any of these XML didn't work:


<Modifier  TargetProperty="PopulationGrowthMalus" Operation="Addition" Value="5" Path="../ClassPopulationStarSystem"/>

<Modifier TargetProperty="PopulationGrowthMalus" Operation="Addition" Value="8"    Path="ClassEmpire" Priority="1" /> />
<Modifier TargetProperty="PopulationGrowthMalus" Operation="Multiplication" Value="8"    Path="ClassEmpire" Priority="2" />/>    


It would show in the tooltip, but it didn't seem to have any effect. Instead, I ramped up the SystemGrowth property instead. It's not the same, but it has a similar effect.


Updated 8 years ago.
0Send private message
8 years ago
May 10, 2017, 9:16:34 AM

Well then I'd say you'd be better off creating a new property that would impact the growth of population.

This way you could create your own GuiElement with your own localization.

If you need help with that, don't hesitate to ask for help

0Send private message
8 years ago
May 10, 2017, 3:25:05 PM

I could use some help finding the right property to modify the Population growth directly, like the PopulationGrowthMalus does. Here's what I did instead:


<BinaryModifier TargetProperty="PlanetPopulationFood"  Operation="Addition" Left="25" BinaryOperation="Multiplication" Right="$(Population)" Path="./ClassColonizedStarSystem/ClassPlanet" SearchValueFromPath="true"/>


I've applied it to a StarSystemImprovement assigned to the home planet. In essence, it adds 25 food per population in the home system. While it accelerates population growth in the home system/on the home planet, it also has a side effect of sending out large amounts of food when building an Outpost. 

0Send private message
8 years ago
May 11, 2017, 8:48:54 AM

You could try, instead of increasing the amount of Food, reducing the property PopulationGrowthUpkeep ?

I believe it would make your population grow faster without producing large amounts of Food - if I'm not mistaken, your population would simply need less food to grow!

Updated 8 years ago.
0Send private message
8 years ago
May 11, 2017, 5:28:42 PM

From my experiments, that property *does* affect how much food your population eats, but it doesn't affect population growth directly. From what I can tell, it takes 300 food to trigger an addition of 1 population. If I have 1 Population, I'm only eating 1 food. If I change the PopulationGrowthUpkeep, I believe it affects how much food my population is consuming. So, when I have 2 population, I'll still only be eating 1 food. But it's my SystemGrowth that affects how much food I'm producing and "fills the bucket" of how much food before I hit 300 or the next trigger for a population bump. 


So, I think I need to find what property affects that "300/population trigger" and mod that :)


EDIT: I think I found the formula, but I'm not sure how to tell the game to apply it to my faction. I found this formula in the Registry.xml file:


<GrowthFormula>(300 * Property(Empire, @ClassEmpire, GameSpeedMultiplier) * $(Population))</GrowthFormula>


I tried adding it to the PopulationDefinitions.xml, but it didn't seem to affect anything.



Updated 8 years ago.
0Send private message
?

Click here to login

Reply
Comment