Post news RSS On Vanilla Bugs, Nobel Prizes, an Update and Hiatus

Two months. I know it has been a while, but writing an update here is quite a lot of work. So they are more few and far between. Rest assured that the mod isn't abandoned though, real life just catches up sometimes. Anyway, the subject of today is something more useful for modders and maybe for my future self as a quick reference of what I fixed that's wrong in vanilla.

Posted by on

Usually when I notice a vanilla bug, the first thing I do is to check if other mods fixed it before me. I usually go to the classic and the biggest (NNM, PDM). It's a step just to see if I'm reinventing the wheel. Turns out, I didn't reinvent the wheel in none of the instances I found a vanilla bug, so this piece is more of a shout out for future modders: if you are doing a mod, or if you mod your own game just for your playthroughs, you might want to fix these things before.

What's a vanilla bug though? I call vanilla bugs flat out wrong values in the vanilla files that cause unintended behavior or simply stop intended behavior from happening. There are plenty of localization typos (that is, wrong text that doesn't affect gameplay) and that's outside the scope of this text (and I expect this text to have typos and its own problems too). Rest assured I fix them when I find them, but they don't affect the experience too much. In any case, let's start with the (relatively) harmless bugs I found.

Integer or Decimal

There's actually a more serious problem than an integer in place of a decimal

One of the common vanilla problems is when an integer is used in place of a decimal. For example, in each pop issue file, under Jefferson Method, pops won't care as much about pushing for literacy unless their literacy equals 50% or more. Or that's the original intention. Since the literacy scale goes from 0 to 1.0, 50% literacy would be represented as 0.5 in the game. A value of 50, used in vanilla, means 500% literacy, something impossible to achieve. As a result, pops would care more about passing Jefferson Method because the modifier would never go into action, as all pops are under 500% literacy.

Well, except that isn't really the case. There's something even more serious that is wrong with that pop issue that stopped pops caring about it altogether. I will talk about that late though.

In any case, under the Reactionary ideology in the same pop files, the same problem: an error where integers go and where decimals go.

Notice how literacy is written down

If you go over any event, you will see Plurality is counted as an integer (from 0 to 100). The intended use would be that pops in countries that don't have at least 20% plurality would be 20% more reactionary. Since it uses an integer, it means that the modifier doesn't apply to any country with over 0.2% plurality, that is, all countries. Fixing that is pretty simple, but most countries start with 25% plurality in vanilla, no matter how repressive or authoritarian, so the modifier itself wouldn't be notice or be that relevant. Still, it didn't work, not as it was intended anyway.


Does a country that doesn't have more than 30LR in any province in vanilla even exist? (excluding Jan Mayen)

Still on "not very important" vanilla bug section, when selecting a country to migrate too pops will take into consideration if the country will not have any provinces with Life Rating over 30 and if these provinces have more than 10% unemployed. The pop will check if there are labourers and farmers unemployed but right when they should check for craftsmen, they check for farmers again. It means that in a state of a country that doesn't have any province over 30LR and that has labourers/farmers employed but craftsmen unemployed, the pop would still choose the country despite the massive malus to immigration that should be affecting it.

Well, that's the exception of the exception. It's a very rare case, even more so because even the deserts in the arabian peninsula have like 35 LR. Something extremely unlikely. Countries that can receive immigrants are all in the new world too and none of them are all deserts (or low LR provinces), which makes the whole modifier completely pointless. Still, a bug is a bug. I oughta change it or remove it though, as of now even in HPM where the Canadian tundras don't have 35LR the modifier is pretty pointless, since having any province over 30LR will nullify it completely.

Binary Values

A little more serious than the last bug but still largely not important, when trying to invent clinical thermometers and binaural stethoscopes, the chance can be increased to 6% if you researched inorganic chemistry and organized factories. The problem here is that having or not a technology research is a binary switch, with 0 meaning "doesn't have" and 1 meaning "you have". Organized factories, a technology, has a value of 2, something that doesn't fly in a binary system. The game doesn't recognize that and the result is that the discovery chance can go up to 4% instead of 6%. Pretty irrelevant too, right? Well, the next one is a little more serious.

Back to the beginning

Go back to the first image. I mention there's another problem there, and the problem is right in the beginning.

How you do it right.

is_next_reform in this context refers to the issue in scope. It stops pops from caring about a reform that can't be passed. So if the next issue is not wealth voting, that is, if the current reform is NOT wealth_weighted_voting (the issue before wealth_voting), pops won't care about wealth_voting. In Jefferson Method issue, the only way pops would care about that issue at all is if the next issue would be proportional_representation, that is, if the current issue if Jefferson Method. The end result is that no pop will ever care about pushing for Jefferson Method and no pop will make a movement to change that unless the current voting system is already jefferson method, in that case, they may push to change to proportional representation. Countries ran by the AI will never change their voting system unless it already is jefferson method, since the AI avoids or completely ignores reforms without a movement backing it up. So you basically have issues taking up processing power and not doing anything at all.

Nobel Prizes

Lastly, Nobel Prizes. You probably saw the events for them several times. Simple event, doesn't say much, same image, gives you 10 prestige. After getting a few, they are gone forever. Paradox actually has a full Nobel Prize system - each nobel prize category has 35 events, even if they are all copypasted and basically say the same thing and show the same thing. However, due to how they were created, they all contain an error that stops 29 of 35 events for each category to fire. There are total 175 events spread through 5 nobel prize categories. From these, 30 events work while 145 don't, for a total of 1450 prestige that is never spread around besides the wasted processing power.

All those events not firing because of one number

After a Nobel Prize event fires, it sets a global flag saying which nobel prize was given. In this case, it was the sixth one. The next event checks if the previous nobel prize was given and if it was not, it can't give the nobel prize. After the 6th nobel prize is handed out, the event for the 7th one doesn't check if the 6th one was given, it checks for the 8th one. That makes impossible for the nobel prizes to ever go over the 6th one. This I consider is one of the biggest vanilla bugs,due to the sheer amount of prestige that should be handed out that it isn't.

These are all that I can remember. On another note, I'm changing the nobel prizes a little bit too. Physics nobels will be more common in GPs with high literacy and with lots of pops, to avoid strange circumstances. The events also add a country flag to indicate who got what nobel so in the future a tool like the the V2 save game economy analyzer can be modified to count nobels per country (this already can be done manually). For now only the physics nobel were changed, and I added custom images and descriptions for all physics nobel as well to avoid the same event every year and make it interesting. I still need to develop a way so some years the nobel might not be handed out, like it happened IRL, but in a way that it doesn't screws up the event chain.

In any case, that's it for now. The new (old, actually. I had this build for a time, didn't have the time to upload it here) version of the mod should be up already, the changelog will be in the moddb download page. The next version will take a while as I finish some IRL stuff. I don't think it will take too long though. There's a few messages and comments for me to see too. Hang on, I will get to it and I will reply.

Perfidious - - 2 comments

Hello! I don't know exactly where I would post this, but I've greatly enjoyed this mod and found it to be my personal favorite for Victoria 2 that I've found thus far. I would like to make one suggestion: California should have cores in Nevada, Utah, and the lands west of greater Texas north of N36. The current cores only give California its state borders as of 1851, whereas as a Mexican province its borders were this: .Regardless of whether or not this is implemented, thank you for creating the mod and best of luck.

Reply Good karma Bad karma+3 votes
rrpg - - 9 comments

I have crash problem. When I try to launch the game with the mod and just before the menu (in the end of the last loading screen)it's always crash.

Reply Good karma Bad karma+1 vote
Guest - - 694,939 comments

If you replace the rivers.bmp in the mod's map folder with the original rivers.bmp the game will launch

Reply Good karma Bad karma+1 vote
Snihjen - - 1 comments

Thank you, this worked.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.