• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Rrr

Sergeant
7 Badges
Mar 13, 2008
75
30
  • Cities in Motion
  • Crusader Kings II
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • 500k Club
  • Magicka
  • Cities: Skylines
A bit of intro
This is not story of Victoria2, not story of moding and not the story of weather Oman should be represented as slave country. Rather this is story how it look like that random circumstances influence the complex software development (in this case the game of Victoria).
A long time ago I have loved potential of Victoria, but hated its “unfinished” (bugy) state. However recently I was reading the forum and got inspiration. I decided to give another try and have a little play. Somewhere in my old archives I found a copy of Victoria 2 latest version..
So I started to play with Victoria, had a bit of fun but then the emersion breaking inconsistencies started to creep in. Ok – I thought. I will try to fix them .. This way my intended “light game of Victoria” degenerated into “game of moding” - as unfortunately it happens with Paradox titles. I will skip the details of "other modding", but the most recent discovery finally was the final nail in the coffin – I didn’t know if to rage or to laugh.
On topic
So in current vanilla (unmodified Victoria) version Oman (and several other countries) does not have slavery (while in real life they have). If you search the forum you can even find “clever opinions” on fact that this was “correct decision” taken by Paradox because “in game slavery does not represent whatever has happened in Oman” and other “obvious” reasons as that. Of course other opinion is also present.
Considering I personally disagree on those reasons I decided to mod Oman with slavery. Ok – I thought. I check the pop files and I find that vanilla Oman provinces already HAVE slave pops defined. However obviously if you start game as Oman you would find that those pops has turned into farmers upon start. So far so good. As we all (should) know in order to have slavery the country should have slavery reform passed (slavery allowed). To pass the slavery in game interface there is a bit of problematic since Oman is not civilized. However – I am doing moding – right? Right. I find the place where reforms are defined for a country (if you wonder it is “history\countries\OMA - Oman.txt”). There is “slavery = no_slavery” in vanilla, so I turn it to “slavery = yes_slavery”. Run the game. No nothing changes (I’ll skip observations and steps nonessential to the story).
Ok, maybe when creating uncivilized countries developers decided that uncivilized countries should not be allowed slavery at all. Ok, I will create new reform slavery2 (code in “issues”) and pass it at start. No change. Ok, maybe they do not allow more than given number of reforms, lets add effect of “slavery allowed” to already existing reform that is already passed. Surprise – no change. Some more guesses – no result.
Then maybe developers have hardcoded “slavery” reform effect into code and the actual existence of effect in “issues.txt” do nothing. In order to test the assumption I turn Oman civilized. Run the game. Nothing changes.
This becomes interesting. Maybe I need to specify on state level that slavery is allowed. I search the existing code and yes for someUSA provinces (not all) developers have specified that slavery allowed. Good. I do that for Oman province. Result – you guessed it - none. I do that for all Oman provinces including capital. No change. Maybe I need different continent. I relocate Oman to north America. No help either. Other reforms? Technologies? Then do some more “educated” guesses.
This becomes more interesting. I give Oman provinces to USA. Start the game. AND … suddenly the Oman provinces are slave owning with slave population.
It looks like developers have hardcoded country tags into game. But is sounds so unlikely and hex search on Victoria.exe can not find VNZ (venecuela - they have slaves to) as hardcoded.
But then I try educated guess of “order of things” are defined. And yes – finally Oman turns into slave state.
Conclusion
The most likely reason Oman as well as other countries that lost they slave population does not have slavery is because during Paradox development someone has created new templates for some countries that have different line orders (with the same content) in its initialization. And somewhere in game code the new “wrong” line order broke the country’s ability to become slave state at game start. And Paradox didn’t have time to investigate the code - so to maske the error for broken countries they just wrote additional line “slavery = no_slavery” and left things as they are (no slavery for Oman at game start).
Remarks
Sadly this is my impression of all Paradox titles. This type of bugs is way too often found in their games.
 
Half a day ago I believed that I am done with Victoria forever, however it turned out that „game of moding” is addiction you can’t stop so easy ;-)

On topic I would just add that 1/2 of existing African countries have slave pops, wrong initialization order and no_slavery, however other half has even left with yes_slavery (besides slave pops and wrong initialization order). So it looks like that masking the error was not properly executed.

As I reread my post I see that it may look like some newbie have encountered his first bug and now raging.
So just in order to add to list of “great features” there are these “fine” features in “common\ pop_types.txt” that many “modders” never notice exists as they are not logical.
Like:
1. it is generally known that in
group = {
modifier = {
factor = 0.1 #
unemployment = 0.1
country = { religious_policy = pro_atheism }
}
modifier = {
factor = 0.2
unemployment = 0.1
country = { religious_policy = secularized }
}
modifier = {
factor = 0.3
unemployment = 0.2
country = { religious_policy = secularized }
}

}
those modifier are additive.
However generally unknown is that in this particular example the second and third modifier would NEVER fire (2 reasons). That is religious_policy = secularized would get 0 modifier. Why? Because group is being added only as long as previous modifier is true. As soon as any of modifier becomes false (not applied) the modifiers below will never be executed.


2. This means that all numbers (such as unemployment = 0.2 ) should be added in order from biggest to smallest, while not ={} numbers should go smallest to biggest. Guess what – how many moders do that?

3. Only some commands work. And you never know which will work before you explicitly test them.
Such as loved by moders command,ex “type = farmers”. “type =” does not work in pop_types.txt (however it works elsewhere)
Or rich_strata_everyday_needs. Diferent spelling (I am telling from memory). Funny thing is that poor_strata_everyday_needs and midle_strata_everyday_needs and rich_luxury needs work. However particular rich_strata_everyday_needs. (here again I stress I do not remember which version didn’t work exactly and my spelling here is incorrect).

Yes - and you would NEVER be notified that you have entered command that does not work. Wrong commands will be simply ignored (or actualy all commands after wrong command within procedural scope will be ignored) letting moders happily claim that their particular code has solved all the problems they have seen before them.


4. The also “not ={ someSimpleConditionCheck } “modifier NOT always being the opposite of “sameSimpleConditionCheck”. In reality you should always check as both can return false (fail) depending on content inside.
5. From old days I remember
modifier = {
some condition
}
working differently than
group = {
modifier = {
same condition
}}
And I am talking exclusively about pop_types.txt not differences with code in folder pop_types\
it looks like having modifier specified in group would always add them up between groups too.
I remember that simply stating modifier will work unexplainably under some circumstances. (I never bothered to investigate after I found out that group was a reliable way getting results. Based on unknown condition simple modifier either changes if it multiplies or adds up its factor (or maybe it works consistently but just occasionally simple modifier does something random, it could be )).

6. Vanilla content of pop_types.txt. - I can only hope that it does exactly what its developer thought it does. Of course intentions can not be judged.

7. The end result is that vanilla migration “works” only because there is large number of modifiers that basically shuts down migration and to oppose it USA has several things such as continet, “statue of liberty” (or was that homestead act) that each is many times (I forget – 10?100?) more powerful than effect of any reform. And then there is random number generator that allows other American countries to get some immigrants ;-).
The assimilation either does not work at all or work in America because of such things as continent bonuses etc.
And there is case of small migrating pops assimilating into lowest id existing pops regardless of culture, religion etc.


And again this is not about Victoria, I remember same kind of feeling from CK2 (before a year approximately), however I do not really remember or want to go in details.


Overall problem is that by allowing low quality code (nonworking) somewhere Paradox is creating features that work more like random number generators rather than has any meaning. And then on top of that code some other person (within Paradox ) is writing perfectly correct, valid and well thought up code – but the game does not work as expected. And this other person starts doing “shortcuts” and “approximations” and hacks start to appear. Therefore the longer you develop the game, the less core features that made sense on day of version 1 actually keeps being relevant or even making sense in say version 8.
 
Oman can't have slaves because the Omani states in Africa aren't "slave states," therefore all slaves on them are automatically freed whether the country allows slavery or not.

It's not the only one in this boat. Korea is supposed to have a substantial amount of slaves, and does if you look at their population breakdown on the country select, but lets them all go because none of its states are slave states.
 
No. As I said Oman can not have slaves because HOD expansion has diferent line order in country definition files. If you keep the same content but change line order then at game start Oman provinces automaticaly gain slave state status.
I have tested this. It works like this.
That is way USA have slave states.
(ok for oman you must also change yes_slavery, but for example sokoto you have only to change the line order in country definition files.)