Terra Invicta

Terra Invicta

Big Country Economy Rework
110 Comments
Elmer Fapp Oct 27 @ 11:27am 
Yep, crashes when you click on a country. Big sad I wanted to come back and do a play-through but I'll just wait for this.
Indecisive Penguin Oct 17 @ 10:39am 
I also confirm that this legendary and glorious mod is now broken:

It's a MissingMethodException in
get_economyPriorityPerCapitaIncomeChange_Patch1

Let us pray to @Dmitri for a generous fix :)
xxertxx (Zertex) Oct 2 @ 1:26pm 
This Mod dosent seem to work on the current Experimental Version (0.4.101). the game throws an error anytime you try to click on a country. I cant post the full error in a Steam Comment but the main problem seems to be in:

"MissingMethodException: single PavonisInteractive.TerraInvicta.TIEffectsState.SumEffectsModifiers(Context,PavonisInteractive.TerraInvicta.TIGameState,single)"

A Fix would be much appreciatet @Dmitri :)
The Arbor Empire Sep 26 @ 7:39pm 
I forgot to mention, I did have to remove it once I got my stats where I wanted bc it caused massive lag spikes at the end of every day. Some values it's calculating are slowing it down tremendously. Fixed as soon as I removed this mod.
The Arbor Empire Sep 26 @ 7:37pm 
Still works! Makes mega nations feel MUCH more realistic. India is a PAIN to keep stable and improve since it's GDP is so low which feels more realistic and mega nations can actually utilize economies of scale. I unified the entire planet and without this mod I can make 1 MC/month, with the mod I make like 150/month which feels accurate to having literally the entire planet working on it. Fixed climate change in a month, actually reached the game min limit for CO2 PPM lol.
motthew Sep 18 @ 8:44am 
Is this still working?
Emrakul Sep 9 @ 5:21pm 
does this mod adjust the impacts of having high education on pop growth? cause if not i feel like perhaps it would be a good idea to put in an adjustment for the welfare priority to increase population growth to counter the squeeze high education seems to generate.

Perhaps this is my ideology peeking through but i feel like 'welfare' could include 'daycare, child rearing assistance, subsidised parenthood' etc.
MarvinEhre Sep 8 @ 11:58am 
@Schetefan123 no idea, but likely the regional setting decides decimal symbols and simmilar for games/programs started with the set regional setting.
Schetefan123 Sep 8 @ 10:23am 
@MarvinEhre: Why the hell does windows work this way, I tried it one layer deeper in the regional settings by just adjusting the numbers format which didn't change anything in game. Changing the regional settings to English (Europe) works.

But in that case back to the mod: to get values somewhat close to what is documented in the readme I need to set the GDP scanling factor down to something like 0.6 instead of the recommended 150. Is there some documentation on which setting does what?
MarvinEhre Sep 7 @ 1:27am 
@Schetefan123 from playing asian indie games, which sometimes also need a different format, have you tried going into your settings -> "date and time" -> "region" and than changed "regional format" than start the game, and than you should be free to change the setting back, as it only takes effect on games on launch for their settings.
Schetefan123 Sep 7 @ 1:21am 
I guess I found some explanation for the 0IP problem after running into it myself:

Numberformat localization
I'm running windows on my home countries localization settings, which include the decimal sign as ',', not '.' (This is the default for continental european languages according to wikipedia).
UMM only allows me to enter numbers as XXX,XX, but somewhere in the parsing for the mod it seems to simply throw out the ',' resulting in numbers that are a factor 100 larger than expected.
But I don't know how to fix this, simply going into the windows settings and switching the decimal sign didn't do anything (even after a restart), UMM still asks for a ',' in the input fields
RippedWeevil Jul 31 @ 8:26pm 
slight problem, I fixed the 0 IP problem with the built in settings (thanks for those) but now smaller countries are super producing research, some small countries in 2025 are already at level 15 education, I might see if it was something I did in the settings, every other IP value is a mostly flat rate with only minor differences from country size but it seems education is the exception.
Negative Ramos Jul 28 @ 11:03pm 
Started a game with it. Its *seemingly* working fine. As of 2031 I'm not noticing any issues as of yet.
Negative Ramos Jul 25 @ 10:41pm 
Is this working fine? Debating starting a new game and just saw these comments.
Dmitri  [author] Jul 11 @ 7:47pm 
I'll take a look. Update must have broken the logic.
Space Hats Jul 4 @ 2:15pm 
Seems nations don't generate any IP. IP is shown as 0 and priorities don't tick up at all.
cmoney Jun 30 @ 5:47pm 
When I have it on recommended settings (.4 IP power, .25 emissions, 150 billions per IP, 1.5 region, 50 population, .15 welfare) countries like china only get .41 monthly investment points which is not enough to offset their military
piddyx Jun 27 @ 8:52am 
What is a good value for the Population Scaler?
piddyx Jun 27 @ 1:48am 
I love this mod, as it corrects a major development flaw of the original game.

However, I wish to ask one question. In my game, the IP of a country is always shown as 0 or a negative number. Is this a quirk of the mod? Or is it something else, like a bad setting or mod conflict or bug?
The Sour Kraut Jun 23 @ 7:58am 
Only issue so far was that I got a NaN on inequality with some AI nations lmao, says Extreme Inequality NaN. Other then that I've noticed that in the early spoils priority absolutely ♥♥♥♥♥ the climate lmao my world went up nearly 50C in the span of 5 years, I had to invest into so many nuclear bombs to counteract this.
IndyTheCommando Jun 16 @ 12:18pm 
Haven't encountered any issues as of yet. I figured out that you have to manually update mods every time. While frustrating, it ain't a huge deal. Many thanks for your help!
Dmitri  [author] Jun 16 @ 7:20am 
If you have a NaN, the easiest way to fix it is to open the save in Tise and manually edit in something appropriate.
IndyTheCommando Jun 15 @ 9:52am 
I see. Thank you for the tips, I'm still trying to learn how to nation build in that game lol. It's a learning experience for sure. So are already existing saves affected by the latest update to the mod or am I going to have to start a new playthrough?
Dmitri  [author] Jun 15 @ 9:38am 
Default is correct. This version of the mod disables breakaways, so it SHOULD work somewhat smoothly. Cohesion is being driven by a number of things, basically you want high democracy (10.0 is ideal), Inequality as low as possible, and lots of public support for your faction. That said, it IS possible the game just not going to let you have good cohesion in a meganation. I am currently doing a test playthrough (taking copious notes) and cohesion is one of the things I may have to mod, alongside Funding, Spoils, and Military priorities. They are currently out of whack.
IndyTheCommando Jun 15 @ 7:43am 
Also what are the recommended settings for the Unity Mod Manager settings for this mod? I just have them at the default values and haven't really noticed anything different with my gameplay. (Default meaning the values that came with the mod, not the vanilla values)
IndyTheCommando Jun 15 @ 7:41am 
Wait so... What do people with already existing saves before the fix have to do? Do we have to start from scratch all over again? I tried to unify North and South America but every time I try to do it South America collapses. I'm /assuming/ it's because both nations have like less than 1 cohesion which I'm having so much trouble figuring out how to get back up. My issue might be that I'm trying to do both Knowledge /and/ Unity at the same time. I resolved that already, and am focusing on Knowledge only to try to help get my Democracy score up and also focusing on Welfare to get inequality as low as possible. But I also read on the other mod (the United Earth mod) that there's something going on with the mod regarding breakaways as well? Not sure if that's related to my current predicament?
Agraza Jun 9 @ 12:09am 
much love. I had to edit a save file several times to undo it a few weeks ago.
Epic, thank you
Dmitri  [author] Jun 7 @ 1:57pm 
Short version: fixed.
Long version: fiiiiiiiixeeeeed!
Even longer version: Unification called on a breakaway called for the region joining before transferring country-wide values to the new nation. So inequality was calculated as NaN - Not a Number - and promulgated as such. Fixed now.
Dmitri  [author] Jun 7 @ 12:15pm 
OK... so NaN doesn't happen on unification, only on breakaway?
also tryed to bump up gdppc to 6k and inequality down to 1 for both djibouty and ethiopia, still NaN inequality
cant provide save because i redownloaded the game (cloud no work), was tested with 3 groups:
1.your mod only,
2. with my mod list (without your mod)
3 with vanilla

NaN didn´t appear in vanilla, and in my modlist
it did only with your mod

Testing i did: Opened debug mode and annexed/unifyed random countries

Unifying that causes NaN inequality:
russia with turkey
Ethiopia Djibouty
Tanzania (WAF) Somalia (if Somalia has all 3 of its claims)

Don´t know how or why, but annexing/unifying with a country in some cases Creates the NaN inequality.
The only corelation i found is that it only happens if a country immediately declares independence after unifycation/annexation.
It will have NaN inequality, if you annex it, you will get NaN inequality.
Dmitri  [author] Jun 6 @ 12:59pm 
@Peachy Also what are the numbers before unification, exactly? Population, GDP/capita, inequality for both nations.
Dmitri  [author] Jun 6 @ 12:31pm 
TLDR: You understand it correctly. SumEffectsModifiers is an internal function that allows the game to modify investment effects based on specific sourceState. Basically if there is "+2% Economy Investment" effect somewhere, this function takes care of the math. I have not messed with it at all. (Also, I have a decently detailed readMe in my mod. Let me know if it is not sufficient for explanation purposes)
Dmitri  [author] Jun 6 @ 12:22pm 
@Blue Feel free: https://discord.gg/srehe4zt This is my personal discord, probably the easiest way to get a hold of me.
Dmitri  [author] Jun 6 @ 12:20pm 
NaN value shouldn't be happening. Do you mind sharing a save game right before the merger so I can see what is going on?
Barosz Gádžožrút 902 01 Jun 6 @ 10:43am 
yo, no idea why but this mod breaks inequality when merging african nations, europe nations are ok, I tryed equalising their gdp (both 6k) and lowering their inequality (both had below 2 ) and it still turned to NaN value, no ammount of investment in welfare fixes it.
Blue Jun 6 @ 3:42am 
Part 3:

sorry for the wall of text, I hope It isn't to much of a bother for you

here a link to explodoboys mod, if you're interested:
https://steamcommunity.com/sharedfiles/filedetails/?id=3442443447
Blue Jun 6 @ 3:38am 
Part 2:

the get_economyPriorityPerCapitaIncomeChange Patch uses this "TIEffectsState.SumEffectsModifiers" function from basegame that I can't figure out. Do you have any Idea what it does and how it works?
Also said patch doesn't return false at the end (when decompiled), meaning the original function should not get skiped? Doesn't seem intentional to me.

Do you maybe have a discord or something where i could join to discuss this? I didn't find a thread on the offical terra invicta discord.
Blue Jun 6 @ 3:37am 
hey,
I've been using explodoboys economic equalization mod, which makes scaling linear with gdp and population.
While trying to expand my modding skills beyond notepad .json editing, I also stumbled across your mod and am currently trying to decipher the code and understand the maths.

If I understand this correctly, your mod also makes scaling linear, by setting the "IPpowerMultipier" to 1 and making "PriorityEffectScalingPatch" linear, used by the basegame to calculate the strength of other priorities.
Noteably this does not include Military (also basegame funding seems wierd, scaling with controlpoints).
the welfare priority only gets overwritten to introduce the infrastructure modifier.

Do I understand that correctly?
Dmitri  [author] Jun 4 @ 1:36pm 
@MrWayne Sent you an invite. I am always happy to talk about people's ideas.
@lucasbader97 I did not change anything that pertains to direct investment.
lukasbader97 Jun 4 @ 1:57am 
Is there any use for money now?
The direct investment costs really much and has almost no impact.
MrWayne May 31 @ 5:17pm 
The game dev(s) made some very questionable decisions, which often dont make sense (neither from gameplay, nor realism perspective). Unfortunately my modding skills are capped at tweaking numbers with notepad, so let me know if u're interested to go an extra mile. maybe i've some ideas u're willing to implement in ur mod :)
MrWayne May 31 @ 5:10pm 
well, the game equalizes the gdp across the country instantly upon merging, which is not realistic, but ok from the game perspective. therefore it shouldnt result in additional inequality upon unification/conquest. its not realistic, but thats a totally different story. in terms of gameplay it makes sense, creating huge amounts of inequality upon merging countries often makes them useless as inequality translates into (much) less IPs via unrest, which is not a short-term cost, but rather a permanent debuff. I just merged Syria with Lebanon. Result: 9.3 Unrest, -7.1 Cohesion and -2.8 Cohesion resting point, 9.3 unrest and 8.8 resting point, basically 0 IPs as well.
Dmitri  [author] May 28 @ 9:40am 
That said, this is all systems design discussion, let's make sure there isn't a glitch in the matrix. For people experiencing massive inequality spikes, what are the GDP/capita, inequality levels, and populations of two countries you are joining?
Dmitri  [author] May 28 @ 7:28am 
Inequality calculation are in the readme and are GDP/capita and population based. It creates two "income poles" around GDP per capita per country, based on preexisting inequalities (the larger inequality, the further away from GDP / capita in both direction those poles are), and then scales them by relative population, calculates new GDP/capita for the new country, and extrapolates the new inequality. Riddle me this: if you unify a massive country where people make, say, 60k a year on average, and a massive country where people make, say, 5k a year on average, what do YOU think inequality in a resultant country should be? And let's say, for argument's sake, both countries had LOW inequality to begin with? (I can probably add a toggle to disable this behavior, but it IS realistic)
MrWayne May 26 @ 11:33am 
Conclusion: i agree with ur general idea, that it shouldnt be fully linearly equalized: inequality 1 + inequality 5 ≠ inequality 3 (assuming both countries have same gdpcp and population), it should be somewhat higher, but it shouldnt be something like 7. the current calculation unfortunately results in obscene amounts of inequality, and it gets worse the more countries u add up.

P.S. if possible, pls revert this change or give us the possibility to do so manually/change the calculation to our liking.
MrWayne May 26 @ 11:32am 
thx for this mod, i've been enjoying this mod quite a lot, until i started merging some nations. i've only unified china and taiwan and some african nations into east african federation. the results: merged china had an increase in inequality of about 0.2-0.3 (from 3.8 to 4.xx), which is kinda annoying, but manageable. east african federation ended up on 6.4 inequality after adding 4 countries. the result: basically unplayable country since the inequality spiked from 3.8-4.1 across separate contries to 6.4 on a bigger one => calculated cohesion value of -1.61... => unrest through the roof => effective ip = almost zero. it'd take take me around 50-60 years on 100% welfare with a councilor permanently assigned to stabilize missions to bring it back to the level where it was a few monthes ago... and it get worse and worse with every single country u add up, meaning federations are very bad unless u merge big nations, which are very close in inequality.
Agraza May 25 @ 11:11am 
even normal nations create largte inequality when annexing. even if both nations had low inequality. it appears out of nowhere. otw good mod
Chyrhyme May 22 @ 1:06am 
To follow up, the problem seems to be with the AA. Anywhere you liberate from them changes to NaN inequality, and will follow into unification, etc.