Terra Invicta

Terra Invicta

Population Growth Rework
57 kommentarer
Eiliya 25. aug. kl. 6:26 
感谢更新🫡
Cardinal_Z  [ophavsmand] 23. maj kl. 12:04 
Updated.
Cardinal_Z  [ophavsmand] 22. maj kl. 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 kl. 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. kl. 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. kl. 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. kl. 3:58 
moved to getter function in TIRegionstate.annualPopulationGrowth variable
also some stuff was added to the equation
explodoboy 13. mar. kl. 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  [ophavsmand] 13. mar. kl. 16:35 
Thanks for the log! will look into it.
explodoboy 13. mar. kl. 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
explodoboy 13. mar. kl. 13:18 
PavonisInteractive.TerraInvicta.Systems.PeriodicUpdates.NationPeriodicUpdate.OnMonthlyUpdate () [0x00028] in <fc64ee07b6424672ad1bcb59c1f0c3e5>:0
at PavonisInteractive.TerraInvicta.Systems.PeriodicUpdates.NationPeriodicUpdate.OnUpdate () [0x00054] in <fc64ee07b6424672ad1bcb59c1f0c3e5>:0
at Unity.Entities.ComponentSystem.InternalUpdate () [0x0002b] in <71a923f2243a46869ff8bc8b0adc1c52>:0
at Unity.Entities.ScriptBehaviourManager.Update () [0x00000] in <71a923f2243a46869ff8bc8b0adc1c52>:0
at Unity.Entities.ScriptBehaviourUpdateOrder+DummyDelagateWrapper.TriggerUpdate () [0x00000] in <71a923f2243a46869ff8bc8b0adc1c52>:0
BeyondTilted 27. aug. 2024 kl. 8:52 
its not the gdp the math says the growth rate should be higher than what it is, its barely positive in like every country at around .03%. specifically im looking at Germany mainly and my math says it should avg around .5% with how much gdp it has, i also have a mod that removes the per region negative, so im wondering if maybe one of the other mods i have is messing with it too, or if the region mod is somehow messing with it. the math i did prior to adding the mods was accurate so either the mods arent working as stated or the combination is messing it up
Cardinal_Z  [ophavsmand] 26. aug. 2024 kl. 23:33 
Maybe it's the GDP value? It's been a while but I thought it was an ugly number.
BeyondTilted 26. aug. 2024 kl. 23:04 
I understand that I was just wondering because I can’t get the math to work out with what I’m actually seeing in game with the mod on, might be a different mod affecting it not sure.
Cardinal_Z  [ophavsmand] 26. aug. 2024 kl. 21:45 
Assuming there is absolutely no other factors, then it would be 1.14%. However that's rarely the case. Game also consider factors like per capital GDP, cohesion, global warming, altitude and xenoforming.
BeyondTilted 26. aug. 2024 kl. 21:16 
question, so with this mod, if a country has 8 education, then would the growth rate be +0.1% per $10 000 and plus 0% for education or would it be plus 1.14% (4.5-3.36%)?
luke738 24. apr. 2024 kl. 0:02 
Huh, looks like EducationChangeReason is in the regular release too now.
Cardinal_Z  [ophavsmand] 21. apr. 2024 kl. 23:08 
Thank you luke for solving the mystery! In fact, this mod is made for the validation release, and the description for that is somehow lost after a previous update.....

The crash that some people are experiencing should be solely due to the change in AddToEducation method. The second argument is required in the validation release but not in the official release.

I will change the description immediately...
luke738 21. apr. 2024 kl. 22:29 
The AddToEducation method no longer takes a second argument, EducationChangeReason doesn't exist any more. Changing that and recompiling got my new games to unpause.
Silverbattleship 21. apr. 2024 kl. 8:12 
还是会每月第一日跳出
Cardinal_Z  [ophavsmand] 16. apr. 2024 kl. 9:52 
Made an attempt to fix the crash caused by this mod...
Lekelokobs 13. mar. 2024 kl. 17:34 
This mod is causing crashes on new month
Merko71 1. mar. 2024 kl. 10:04 
Does this work with existing saves? It doesen't seem to work in my ongoing campain. Unity Mod manager says it's installed.
DirtNap 14. feb. 2024 kl. 10:28 
fwiw, UMM wants a version of 0.3.126 when the non-beta version of TI is at 0.3.125

that's not the issue of course, but you need to opt into the beta just for UMM to work properly.
TheHalfwayXBray 11. feb. 2024 kl. 16:43 
@MarvinEhre I'm having the same issue and I can't find any fix for it.
MarvinEhre 30. jan. 2024 kl. 6:34 
@Hebrux I meant, that it maybe is an issue between this mod and unity mod manager, not a general unity mod manager issue.
Hebrux 30. jan. 2024 kl. 6:33 
Look in the general discussion. There's a fix for the Unity Mod Manager crashes
MarvinEhre 22. jan. 2024 kl. 12:42 
Maybe it is a Unity Mod Manager issue? As I get the crashes at the points even with only this mod active.
MarvinEhre 22. jan. 2024 kl. 12:25 
I got crashes with this mod too, after a couple of years, it crashes at the 1st of a month.
Tal'Raziid 15. jan. 2024 kl. 0:35 
Yeah, it was this mod. Disabling it and then relaunching the game to load the save lets me continue
Tal'Raziid 15. jan. 2024 kl. 0:24 
I jsut tried a new game and it also crashed after unpause. Going to remove this mod and see if it runs
半世癫 6. jan. 2024 kl. 12:21 
在旧档上用会崩溃
Cardinal_Z  [ophavsmand] 2. jan. 2024 kl. 16:00 
Just sent you an friend request
MASTERGUNNS75 2. jan. 2024 kl. 11:29 
How should I send the log and where can i find the exact log you are looking for? Sorry, I have never really messed with mods before.
Cardinal_Z  [ophavsmand] 2. jan. 2024 kl. 11:16 
I'm not experiencing crash with my save, can you try send me the log?
Cardinal_Z  [ophavsmand] 2. jan. 2024 kl. 11:11 
@MASTERGUNS75 Have you tried starting a new save?
Cardinal_Z  [ophavsmand] 1. jan. 2024 kl. 16:39 
It's probably an issue in my code, I'll look into it.
MASTERGUNNS75 1. jan. 2024 kl. 12:39 
I followed the directions by changing it to the "assembly" option, but the game still crashes the moment I click unpause/play. Do I need to do something to the mod folder itself?
Cardinal_Z  [ophavsmand] 31. dec. 2023 kl. 8:43 
Updated, if your game was crashing on startup, try uninstalling UMM and reinstall with "assembly" option instead of "doorstop proxy". if your game was crashing on unpause, this update should have resolved it.
Cardinal_Z  [ophavsmand] 24. dec. 2023 kl. 11:39 
Will do, sorry I was away for the past month.
AndrewM 21. dec. 2023 kl. 9:20 
Any update?
absolluts 30. nov. 2023 kl. 13:35 
Borsti,
I don't have this problem.
Although my game crashed on startup due to UnityModManager.
But since your game crashes on play, the file “steamapps\common\Terra Invicta\Logs\TerraInvicta.log” can help you figure out the problem. Pay special attention to the [ERROR] lines
Borsti 30. nov. 2023 kl. 8:00 
causes the game to crash on unpause in 3.115
Toren 9. okt. 2023 kl. 9:54 
Kids are also a retirement plan for some people who cant save enough to properly retire.
Henrique Lique 23. sep. 2023 kl. 9:29 
Smak64 i'm pretty sure the reason why low education = higher birth rate have nothing to do with pensions.

The reason is pretty simple. Well educated people calculate costs of having kids, consider the effect those kids will have on their life, have better sex education regarding preservatives and have plenty different hobbies entertainment.

Poor people with low education usually have bad sex education, live in unstable families, and the only available free entertainment is dance and sex (And most of the poor countries dances are very sexualized)
clarkeveritas 22. aug. 2023 kl. 14:05 
It does seem that the more developed nations are having rapid decreases in growth rate. Japan is having a REALLY bad issue with that and the US is as well, just not as bad (although we still have growth because of immigration rather than birthrate). There are a few other reasons birthrates are not doing so hot in developed nations but I'm not going there, but I'm sure you can use your imagination.
In terms of the game, though, I like the idea of this mod.
Smak64 18. aug. 2023 kl. 13:21 
In terms of low unity raising population growth, I think the game does it way because it seems to correlate like that.
Countries with lower political stability have a tendency to have very high birth rates (Not a rule, Iran is an easier exception to point out), though it's different across each country - sometimes to very wild degrees. That said, there's a bit of logic to it - people generally want a safety net for themselves as they get older, it's why pensions are a thing - saving up so you have something to fall back on when you get older. If you can't rely on the existing systems and government because the country is more or less at war with itself, then you rely on having kids so they can provide that safety net and take care of you when you're too old to do so yourself.
Marutotigre 13. juli 2023 kl. 13:32 
I'm not sure how that makes sense. To me, if you have a vastly disunited population that dosen't have any common ground, people wouldn't really be incentivised by it to make more children.
Cardinal_Z  [ophavsmand] 13. juli 2023 kl. 9:24 
Game actually has unity dependant growth rate, but lower unity gives higher birth rate.
Marutotigre 12. juli 2023 kl. 19:38 
I feel like both unity and inequality should have an influence on birthrate. A very nationalistic population would generaly be more prone to ''do their part'' by having multiple childrens and having a low inequality should make people more hopefull for the future so they would be more willing to have children without dreading for their future.