Converter Series: Time Keeps On Slippin’ Into the Future

With the converted save now starting at the point in time the former save ended, there’s an obvious problem: borders change between 1399 and 1453. Fortunately, that’s an easy update. The history file we read for each province has a list of dates, and some of those dates specify a change in ownership. Even better, the dates are in order.

So, I update the converter to read through those dates, and for each, check if it’s from before or exactly on the start date. If so, check if there’s an owner field, and if so, make that the current owner.

Also, another programmer on the forums gets everything set up, and points out I forgot to include some files I created in the repository. They exist on my system, so everything seems fine, but when he gets a copy of the repository, he can’t build the converter. So I check in the files.

Relevant repository links:
Start date taken into account for ROTW provinces
Added missing CK2World files

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

ASL Translation of Every New Day

Seeing as I’m going to see Five Iron Frenzy in concert this Friday, I thought I’d share my old American Sign Language translation of ‘Every New Day’. This is in a modified form of gloss, and the transliterations of signs are from A Basic Course in American Sign Language, Second Edition. Except where they aren’t and you’re dealing with my memories of signs my teacher taught me nearly a decade ago. Best of luck.

 

PAST I YOUNG, A-LITLLE TURN-ON-LIGHT, I PAY-ATTENTION (but curve it towards the light).
LIFE? NEW. EVERY-DAY I THINK I CAN FLY.
MY HUNGER? I EXPECT. MY EXPECT? I NOT SEE.
I HAVE WINGS. DREAM FLY.
RECENTLY NOT FEEL FLY.

PAST STARS TURN-ON-LIGHT
(use touch-feel handshape to demonstrate stars twinkling)
BEFORE FIRST WORD SPEAK.
BEFORE WORLD START.

FATHER, I NEED YOU.
YOUR STRONG MY HEART HEAL.
I WANT FLY (show ascending) EVERY-DAY AGAIN.

PAST I SHORT, MOST (show reaching) NOT TALL.
I? THINK WORLD SMALL. FEEL I CAN FLY.

FAR
(point to the distance between the hands)? FOREVER.
HEAVEN THERE.
HERE HE KNEEL, MAKE ME (honorific).

FATHER, I NEED YOU.
YOUR STRONG MY HEART HEAL.
I WANT FLY (show ascending) EVERY-DAY AGAIN.

PEACE. HOPE. LOVE. [JESUS CHRIST*]
or alternately depending on what words Reese inserts:
YOU NOT ALONE. YOU NOT ALONE. YOU NOT ALONE. YOU NEVER ALONE.

MAN FIGHT SELF. FIGHT MACHINE. FIGHT WORLD. ALL MEN FIGHT I.
WAR CONTINUE. WISDOM NOT HAVE. FAULT (show as massive, stagger under the weight).
HARD BREATH, WALK. MOUNTAIN TALL. I WAIT HERE (make the sign low).
WANT EXCUSE. HUNGER PEACE. GOD GIVE-ME.

YOUR HANDS HEAL.
GOD EXCUSE OUR DIRTY SOUL AGAIN++++.

JESUS CHRIST. LIGHT (both hands) WORLD (between the lights). LIGHT+.
YOU IN OUR HEART FOREVER.

FREEDOM (make it huge) MEANING LOVE NOT HAVE COST.
NOT HAVE START. NOT HAVE FINSISH.

MY HEART HERE. GIVE-TO (towards wherever you placed God for pronoun usage).
YOURS FOREVER.

ONLY YOU (honorific) CAN MAKE. EVERY-DAY SEEM NEW.


* It’s a reference to a song by a band you’ve never heard of (Cryptic, by Mortal).

Converter Series: Data Files From Others and Bugfixes.doc

Sharing about the last code update gets people on the forum’s excited. DasGuntLord01 (the analysis guy) maps the British Isles. Tamius23 maps CK2 cultures to EU3 cultures, which is needed, if not in the short term. DasGuntLord01 tries to map ROTW provinces, but the tool we’re using doesn’t handle that case. Dtremenak updates the tool, and DasGuntLord01 does a whole bunch more mappings (Africa, the Middle-East, and the ROTW), but has troubles with the merge process in Mercurial, so I commit the changes for him.

And see I’ve two bugs in my code already. First, I assumed all provinces have an owner field. There are lots of empty provinces in the world, so that’s a faulty assumption. Second, I only accounted for three digits in ROTW province numbers. There are almost 1900 provinces, so this leads to a crash when provinces numbers from 1000 onward overflow the buffer used to turn them from integers to strings.

The first bug takes a light amount of rework in how I pull out results from the parsed save. The second takes only a single character to fix (specifying how many digits long the numbers will be).

And with those bugs fixed, I can take advantage of the data provided by the others:

Though Europe is still less than interesting:

Relevant repository links:
Endland, Ireland, Scotland and Wales mapped
CK2 cultures mapped, except for german and italian
Gunther’s province mappings
Fix bug uncovered by ROTW mappings

Converter Series: The Rest of the World

One of the things that makes this converter interesting is that the geographic scope of CK2 and EU3 are different. CK2 covers Europe, Northern Africa, the Middle East, and a little of Central Asia. EU3 covers all of Earth. This means we have to fill in data for everything outside the European region. Fortunately, all of this data is in an open format, so I just have to grab it from the EU3 install.

I create a class for EU3 provinces (creatively named EU3Province). For now it just stores its province ID number and the tag corresponding to its owner. The tag is a three character identifier for an EU3 country. Interestingly, I don’t have to input anything about these anywhere else at this point. EU3 seems good about filling in missing data. The class knows how to output itself and initialize itself given a parsed data file.

Now the tricky part: identifying which provinces need this data. Our province mappings are stored in a data file of the form

# Iceland
link = { ck2 = 1 eu3 = 370 } # Vestisland -> Reykjavik
link = { ck2 = 2 eu3 = 371 } # Austisland -> Akureyri

which will allow me to generate a map (or dictionary in some languages) that allows me to specify an EU3 province and get a list of corresponding CK2 provinces. At this stage I copy the code to do that from the EU3 to V2 converter. As well, I bring over code that generates a reversed version of this map. Knowing a CK2 province, you can get a list of EU3 provinces. I use this to define the rest of the world (ROTW) provinces. Given an entry in the data file like this

# ROTW
link = { eu3 = 572 eu3 = 573 }

(note the lack of a CK2 province number), the EU3 provinces will map to CK2 province number 0, an invalid number.

In EU3World, I create the function setupRotwProvinces(), which takes as input the inverted province mapping. I find all EU3 provinces corresponding to CK2 province 0, open their data file, parse it, and pass the parsed file to a newly created EU3Province instance. That done, I store this instance in EU3World.

I also update EU3World’s output() function. It now calls all stored EU3Province instances’ output() function.

The resulting code works as expected. I only put the two entries above in the relevant data file, so just a little bit of the ROTW appears appropriately. Still, the groundwork is laid.

Relevant repository links:
ROTW provinces get ownership from EU3 install

Converter Series: Stealing My Own Code (Configuration)

I continue the process of stealing my own code with a clever bit that allows me to read in a configuration file. This will allow users to specify some options, and pass in information that I need to know.

Inside the program, all this configuration is stored in a singleton, which allows me to access it from anywhere without too much overhead. I just have to include configuration.h, and then call Configuration::getWhateverItemICareAbout() and I get the current setting of the item I want.

I know that I’ll need all kinds of information from both CK2 and EU3, so I put the install locations for both in the config file. Then I add code that tests if those locations exist, and spits out an error message otherwise. Because it’s best to catch errors often, and if I don’t spit out a clear error message about that, people of the forums will bug me forever over something they forgot to configure.

Relevant repository links:
Add configuration file and relating code