Tuesday, March 7, 2017

Prussian Amazons: Part 58: 1190: Patch 2.7.0 Interlude

With 2.7.0 patch and Monks and Mystics DLC coming out, it will be the second version update this campaign. The first 2.6.1 to 2.6.3 update which was totally my fault for messing up mod setup - and which I did somewhat poorly.


Updating existing campaign is always messy. In case of CK2 the biggest problem is traits. Save game stores traits by their IDs not names, and there's no namespacing like each file starts with next 1000 - it's just sequential numbers.

So in 2.6.1 traits were:
  • 1 to 239 - game traits
  • 240+ - mod traits
Then 2.6.3 added traits 240 to 253, so any character which had mod traits before now had some completely different traits instead.

Fortunately the only trait mods I ran were recomputable, with traits like "duchy hair", "accept invite" etc., so I "solved" this problem by writing a script to remove all mod traits before migration. I mistakenly only ran it for live characters, so some early historical characters are now messed up with weird traits.

I think I have enough information to fix this if I ever wanted to do really deep analysis of my campaign history, but I probably won't bother.

I assume IDs are used to save some space, and devs could completely avoid this problem by just including this tiny array of ID to trait name mappings inside the save game - as I've seen some other formats do (like Total War's .esfs).

This problem doesn't affect just mods - they messed it before by adding traits not at the end of the trait list, wrecking people's even unmodded campaigns.

Fortunately it was not too hard to create a script to edit save games by replacing some trait IDs with some other trait IDs, so I'm prepared with my save game cleaner.

And indeed 2.6.3 added traits 240-253, and 2.7 adds traits 256-315, so without tools modded campaigns are impossible to upgrade cleanly.

Third party mods

I have 30 mods installed, which I'll have to triage:
  • quite a few I noticed I didn't really use ever, so I just disabled them
  • a lot are just UI improvements like Orange Ransom Button, which is a huge eyesight saver, and many of them won't be needed
  • a lot of UI mods like Notify on Adulthood, and Title Info I'll still need
  • some are adding extra content without modifying base game, like Your Personal Castle, Random Hordes, so should work right away
  • I avoided all mods that do complex modifications to multiple game files, as that would mess with my mods
  • Anime Portraits - it still works, but it might clash with new graphics
  • Cultural Bonuses - it modified static modifiers, so it would need update. It's nice mod, but not nice enough for me to wait.

Syntax changes

I also do a lot of modding on my own, and for that I need to parse game files.

First problem is that the finally extended their mod language to support >= operator. Originally they only had = which for numerical values actually meant >=. This was expressive enough, but it led to some really confusing tooltips. In HoI4 they added explicit > and <. And now it's the first time I see explicit >= and even ==.  Extrapolating current trend Victoria 3 will have support for ===, regular expressions, and AJAX.

There was also minor problem with fake dates like "8.6.632", which means 632th day of June, year 8 - which I worked around by treating any fake date as a String instead. And of course there were some random typos as usual with new code. I think actual Paradox parser is a lot more forgiving than mine.

My own mods

I also do a lot of modding on my own, and these are often quite extensive, but for most part I tried to code them as a series of surgical patches - check those files, find this, edit this way.

I currently have 50 active patches, and I went through them one by one to make sure they still work - a few needed fixing, but most worked out of the box.

Expansion not quite as advertised

And now it seems to be working.

There's just one more problem - Buddhist and Jains are the only two religions without access to any fun secret societies. I could join the silly monks, but that offers nothing other than celibate trait, which is silly and pointless.

And Dev Notes specifically said that Kali worship is available to "Indian faiths", not just to Hindus as it ended up.

I can either change religion to get that content, or play 250 years of vanilla, or do some modding.

No comments:

Post a Comment