Terra Invicta

Terra Invicta

83 betyg
Population Growth Rework
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
1.718 MB
29 maj, 2023 @ 15:12
23 maj @ 11:28
7 ändringsnotiser ( visa )

Abonnera för att ladda ner
Population Growth Rework

Beskrivning
Currently, a nation's education level will have massive penalty on the population growth.
The penalty is capped at -4.49% annual population growth at ~11 education.

This mod changes the penalty cap to -3.36% at 8 education. If you are noticing a hopeless decline of the global population in late game, this mod should provide a fix to that.

Requires a mod manager.

!!! This mod is made for validation-release, might cause crash if pop growth mechanism is being updated in the validation branch.

To switch to validation-release: Right click game - properties - beta - select validation from drop-down.

Populära diskussioner Visa alla (1)
2
11 feb, 2024 @ 16:42
Crash on new game unpause
Brahkam
57 kommentarer
Eiliya 25 aug @ 6:26 
感谢更新🫡
Cardinal_Z  [skapare] 23 maj @ 12:04 
Updated.
Cardinal_Z  [skapare] 22 maj @ 18:04 
Ok I'm back, will update this soon.

The equation was moved to the getter a long time ago, I didn't know how to use harmony on getter back then :P
Taytoh 18 maj @ 10:54 
@Blue could you try uploading it again or could ya send that file my way? I'd really appreciate it as im trying to start a new game to see the update stuff without dealing with negative pop growth modifiers. If you're willing, just shoot me a friend request. Thanks!
Blue 12 apr @ 6:29 
I made a version running on 0.4.78, but I can't upload it, no idea why.
@Cardinal_Z if your want my code, I'd be happy to give it to you.
Blue 12 apr @ 3:58 
public double get_annualPopulationGrowth()
{
double num = 4.49788037409348;
return Mathd.Max(Mathd.Clamp(num + Mathd.Max(-num, -0.418190741 * (double)this.nation.education) + -0.0624798523403752 * (double)this.nation.cohesion + 9.80843732089162E-06 * (double)Mathf.Min(180000f, this.nation.perCapitaGDP) + -0.115739931206548 * (double)Mathf.Sqrt(Mathf.Abs(this.latitude)) + (double)((this.annualPopGrowthModifier + this.nation.template.popGrowthModifier) * Mathf.Max(0f, (25f - TITimeState.CampaignDuration_years_Exact()) / 25f)) - (double)(this.xenoforming.xenoformingLevel / 200f) - (double)(this.nuclearDetonations * 4), -10.0, 10.0) - (double)(Math.Max(0f, Mathf.Abs(GameStateManager.GlobalValues().temperatureAnomaly_C) - 8f) * ((this.template.environment == EnvironmentType.Beneficiary) ? 0.5f : ((this.template.environment == EnvironmentType.Vulnerable) ? 2f : 1f))), -100.0) * 0.01;
}
Blue 12 apr @ 3:58 
moved to getter function in TIRegionstate.annualPopulationGrowth variable
also some stuff was added to the equation
explodoboy 13 mar @ 17:33 
Some more info for whenever the experimental changes come into effect:

The equation where the pop growth modifier is calculated has been moved to a variable with a getter function. The part where the Education modifier is calculated is done in a Mathd.Max(). You should be able to set the desired maximum by reducing the first parameter's value from:

[0 - 4.49788037409348]

to something else.
Cardinal_Z  [skapare] 13 mar @ 16:35 
Thanks for the log! will look into it.
explodoboy 13 mar @ 13:18 
This appears to cause a crash on the latest experimental version. Be aware if any of you intend on using this on the betas.

---

For the mod author. It appears that ModifyGDP() has been renamed, removed, or its parameters changed:

MissingMethodException: void PavonisInteractive.TerraInvicta.TINationState.ModifyGDP(double)
at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.PavonisInteractive.TerraInvicta.TIRegionState.GrowPopulationByMonth_Patch1(PavonisInteractive.TerraInvicta.TIRegionState)
at PavonisInteractive.TerraInvicta.TINationState.MonthlyNationUpdate (System.Single eyes) [0x00261] in <fc64ee07b6424672ad1bcb59c1f0c3e5>:0
at