• 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.
*sigh* I'm fed up with this merging business. I can't work it out! It's so dumb. I miss SVN.

Can't say I blame you there. I actually started things with SVN, but the repository got corrupted, and it was either delete it and start over, or open a trouble ticket on SourceForge and wait for them to completely wipe out the changes that corrupted it. At least with Mercurial, the local copies of the repositories would preserve all our changes, so we don't start the clock back at 1.

Anyways, I think I've figured out merging, and am writing it up.

Edit: also, I checked in all those mappings you left here. Gonna try those out, then see if I can get in some easy coding changes before my cold medications knock me out.
 
Last edited:
Merging with Mercurial

Merging doesn't need to be done until you want to push all your commits to the SourceForge repository. You'll probably do so every time you commit, but there may come reasons not to.

Merging seems to work better from the Hg Workbench. That should be on your right-click menu when you click the project.

In addition to a bunch of other buttons, the toolbar contains the four important one from the synchronize tool. Start by clicking 'Check For Incoming Changes From Selected URL'. If there are no incoming changes, then everything is easy. Just push your changes to the server.

If there are changes, click 'Pull Incoming Changes From Selected URL' to get the changes. The upper part of the workbench will have a little graphic of the left visualizing how things have branched. Right click on the latest change to have come in remotely, then click 'merge with local'.

You'll get an initial dialog describing which version are being merged. Click Next. Mercurial will try to automatically merge what it can. But it will fail on the change log at the very least. Click the link that says 'resolved'. Close the upper dialog, then click Next on the merging dialog. On the final dialog, commit the merge.

And now you can finally push your changes to the SourceForge repository.

A new dialog will open. This is where things get misleading. Select the files in the 'Unresolved Conflicts' section and click 'Mark as Resolved'. They will move the the 'Resolved Conflicts' section. Select the files in that section and click 'Diff to Other'. Now, on my machine, this opens the files in Beyond Compare. Unless you've bought and installed it on yours (which I highly recommend, it's worth the money), you'll probably get a different tool. In any case, use the relevant tool to merge the files properly. And while doing so, add a line to the changelog about the merge, this will be its own commit. Save the files and close the diff app.
 
Out of interest, what needs coded right now? I'll have a look later to see if I can help with it.

What needs coding? Nearly everything. If you want to help out, I'm glad to get your assistance.

It'd be best to get your environment set up first. This project (like the other current-generation converters) is built using MS Visual Studio 2010, Express Edition. You'' also need to install Boost, and then set up some envoronment variables that point to the install locations for everything. I'll try to look up tose details tonight, but for now you might be able to deduce their values from the failures you'd get building everything.

For my automated build and test batch files, you'll need IZArc for zipping/unzipping files. Again, there' an environment variable pointing to the install location.

Finally, we're currently using Mercurial for source control, and have all the code on SourceForge. If you send me your SourceForge username, I can add you to the project.


As for what to do, there's enough structure that you could start adding more conversion detail to the ROTW provinces. Right now I only grab the owner from the history files. Try pulling the cores data from those files as well. That should allow you to gain an understanding of how we parse files and get information, as well as store and output information.
 
I've a new question of analysis.

Since CK2 is character-driven, we need to import character information. I'm anticipating generating a tree/forest of vassal/leige relationships. The question is, how does the save represent these relationships? I don't image building this data structure will be pretty, but it's pretty important.
 
I've a new question of analysis.

Since CK2 is character-driven, we need to import character information. I'm anticipating generating a tree/forest of vassal/leige relationships. The question is, how does the save represent these relationships? I don't image building this data structure will be pretty, but it's pretty important.

I'm on it.
 
I can't work out how dynasties work. Some dynasties are stored in the save file, some are not... but they look like this:

Code:
2001010=
	{
		name="of Jabloskow"
		culture="polish"
		coat_of_arms=
		{
			data=
			{
4 2 0 7 14 3 5 2 0 7 14 3 5 2 0 7 14 3 5 			}
			religion_group="christian"
		}
	}

Now, as for family trees, that seems pretty easy.

Code:
122=
	{
		birth_name="Harold"
		historical=yes
		birth_date="1025.1.2"
		father=120 <-----
		mother=101534 <-----
		spouse=123 <------
		attributes=
		{
6 8 6 5 9 		}
		fertility=0.500
		health=5.000
		traits=
		{
15 95 85 81 80 		}
		prestige=40.000
		piety=20.000
		religion="catholic"
		culture="saxon"
		dynasty=756
		dna="epdbiohgmkk"
		properties="fe0b0a0000"
		player=yes

Father, mother, and spouse reference other character IDs, so you can build a tree by walking through those values from the children up it seems.
 
Lieges are done by title, not by character, it seems. At the end of the file are the title entries. They look like this:
Code:
d_slovakia=
{
	liege="k_hungary"
	holder=472
	succession=gavelkind
	gender=cognatic
	law="succ_gavelkind"
	law="cognatic_succession"
	law="centralization_0"
	law="investiture_law_0"
	law="feudal_contract_2"
	law="feudal_tax_0"
	law="city_contract_1"
	law="city_tax_1"
	law="temple_contract_1"
	law="temple_tax_1"
	coat_of_arms=
	{
		data=
		{
0 1 13 16 0 14 7 		}
		religion_group="christian"
	}
	previous=
	{
472 	}
	set_investiture="head"
	history=
	{
		1066.1.1=
		{
			liege="k_hungary"
		}
		1066.1.1=
		{
			holder=472
		}
	}
	active=yes
}

"holder" points to a character, and "liege" points to another title.

EDIT: And the titles associated with provinces are listed in the province entry with "title=". There's also a set of entries that define the sub-province holdings (castles, towns, etc).

Edit 2: The title prefix indicates what level of title it is: b < c < d < k : bishopric < county < Duchy < kingdom (or their equivalents).
 
Last edited:
Out of interest, did you use the link generator I made?

I personally have not. We have a province mapper for province links, which is all I have been doing so far.

EDIT: Also, I can't work out which version of .net framework to install to get it to run.
 
Last edited:
My program just creates a listview of all provinces, then creates a link based on what ones you select. Didn't realise you already had something to do it for you though.

You need .net framework 4, sorry for not saying.
 
My program just creates a listview of all provinces, then creates a link based on what ones you select. Didn't realise you already had something to do it for you though.

You need .net framework 4, sorry for not saying.

Right, dtremenak's province mapper actually displays maps with clickable provinces, and is very powerful. Sorry you were pre-empted. :p
 
Analysis of titles

Just what I needed to know. Do all titles start with one of those prefixes? If so, it should be easy enough to identify them in the save.
 
Just what I needed to know. Do all titles start with one of those prefixes? If so, it should be easy enough to identify them in the save.

Actually, yes, they all have a prefix, and there's also an extra one "e" for "empire", as in "e_hre". I don't know if there's any extras. I'm having a much closer look now.

EDIT: Seems like that's all.
 
I've made it so we start at the date the CK2 game ended, and that ROTW province ownership changes appropriately from that.

Also, I released a 0.1 version build. Note some odd stuff around North Africa, and if the converted save is late enough, on Madeira and the Azores. I'm not sure if these are items best addressed in a future mod or what.
 
Note some odd stuff around North Africa, and if the converted save is late enough, on Madeira and the Azores. I'm not sure if these are items best addressed in a future mod or what.

Depends. What sort of off stuff?

EDIT: That file upload is still "pending". You might want to try again. :p