Converter Series: What Year is It?

At this point, the converter doesn’t specify the date in the converted save file. This causes all saves to load up at the default start date for EU3, October 14, 1399. However, CK2 plays until 1453. It’d be nice to transfer the date over during conversion.

It’s actually not too hard, because yet again I borrow code from the other converter. This time it’s a class that encapsulates the CK2/EU3 date data. And, yes, the class is named ‘date’. Like so many of the existing data structures, it knows how to configure itself if passed the correct portion of a parsed save or data file. And because it’s also used on the EU3 side, it knows how to output itself.

I also finally create the CK2World class. It has an init() function that takes a parsed save as input. This function just grabs the date for now. Then it has the function getEndDate(), which retrieves a copy of the date for external uses.

EU3World is given an init() function that takes a copy of CK2World, and which saves a copy of the date. And the output() function is updated to output that date.

All in all, an easy change.

Relevant repository links:
EU3 starts at the date CK2 ended

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>