• 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.
Apparently CK2 broke with Paradox tradition, and actually stores the map right-side-up. Go figure. Province Mapper has always automatically flipped the maps to make them easier to work with; I've made that optional in the build I just uploaded. Uncheck "Invert" when loading the CK2 map and you should be OK.
 
I'm wondering about converting titles to countries. Are we going to try and keep as many titles as possible, and do our best of reflect the structure of the realm? (Which is to say, all member titles become EU3 vassals of the leader of the independent realm, and the leader only owns those provinces that are his demesne in CK2).

Well, we have more problems, of course. Many provinces (counties, or equivalent) are going to be many-to-one converted to EU3. This means the titles themselves are going to have to be merged.


I know that something similar must have been solved already in KingofMen's DV to EU3 converter.


I also wonder about the HRE. Except for it's size, it plays pretty similar to any other kingdom, as far as I can tell - that is to say that there doesn't appear to be any HRE mechanics, as such. So can we justify converting the HRE in CK2 to an HRE in EU3?
 
I'm not sure how KoM did it, but I saw some of the action in the CK->IN converter when I updated it to HttT.

They traced out the vassal/liege relationships and scored them based on a number of factors. Everything above a certain score was merged into the liege's country. Things in the middle range were vassals. Ones scored low enough were independent. Then tags were mapped using a process pretty similar to what we do in the EU3->Vic2 converter. When the inevitable 'not enough EU3 tags' errors came up (edit: looking at the old thread, it looks like 173 is the limit), the scores were increased until there were enough tags. This ordering of things can also solve the many-to-one issues neatly, because you're figuring out who's eliminted before you start handing out EU3 tags.

There was also a special case for the HRE, where they had a higher threshold, and their number didn't get added to. For ages, that meant some games could not be converted at all, until I changed it when everyone else's score became ridiculous.


I'm thinking for the very early stages of things, I'm going to force anyone not independent to be merged into their liege, all the way the vassal/liege tree. That will give us a basic conversion mechanic so we can start developing other mechanics, and then we can start playing with rules for when merging should happen.

For the HRE, I think we'll eventually map most of the duchies to EU3 tags, but put in a mechanic for the whole thing to be converted to the HRE tag if sufficiently strong and centralized. If that happens too frequently in-game, outside of some serious powergaming, I'll be dissapointed (my England game hasn't given me too much leave to pay attention to the HRE. It's hard enough to keep England centralized and intact, and it's much smaller with succession laws that leave my primary heir strong). If the Kingdom of Germany title gets created, we'll probably give the holder the GER tag.

Of course, all that special logic for one Empire title makes me want to include special logic for the other Empire title. But there aren't any special Byzantine mechanics in EU3… :sad:

In any case, I suspect we'll have to play with things quite a bit. I'll try to dig up the logic from the old converter and we can dissect it. And maybe we can get KoM to describe the logic in his converter to us as well.
 
Last edited:
I forgot the code (and more importantly, the data file) for that converter are on SourceForge. Here is the data and (most of the) logic for independence determination in all its inner-platform-effect glory:

Code:
country_convert_rules = {
#	accepted culture:
#		For the purpose of determining counties which are "close" or "far" from their liege.
#		- liege if the ruler culture is accepted
#		- capital if the capital culture is accepted
#		- major_by_income if the dominant culture weighted with the province income is accepted
#		- major_by_province if the dominant culture by counting provinces is accepted
	accepted_cultures = { ruler capital major_by_income }

#	liege country modifier
#		Historically, some crowns were bad at keeping their vassals in their folds while others
#		were good.
	weak_crown = {
		GERM = { mod=1 best=vassal worst=r150 tier=duchy }
		ITAL = { mod=1 best=vassal worst=r100 tier=duchy }
	}

#	individual country modifier
#		This allows individual settings for tags.
#		It works as for weak_crown, but for specific countries; the result only applies to that
#			country in relation to its lord.
#		With this, you can decide that one specific country will have a greater chance to exist,
#			or even force it to be independent.
#		In the base version of the converter, this is not used; but you can use it for specific
#			needs.
	country_modifier = {  
		#C082 = { mod=2 best=vassal worst=r150 }
	}

#	The liege's piety, prestige or gold may influence the way his vassals see him ; in the reverse,
#		a vassal with too much gold/prestige or too low piety may think himself greater than he
#		should be.
#	This is taken into account by a complex rule:
#		L is the liege value, V the vassal's one:
#			* If L<0, then the minimal entry in the table is used
#			* If V<0, then the maximal entry in the table is used
#			* If both conditions apply, then both results are used
#			* if L*L+V*V <= radius*radius, then the result is 0
#				(too low values for both aren't significant)
#			* Otherwise, we check V/L as a percentage in the table
	prestige_radius = 200
	prestige = {
		100	= { mod= 1 }	#vassal prestige > liege prestige
		20	= { mod= 0 }
		0	= { mod=-1 }	#liege has at least 5*vassal prestige
	}
	gold_radius = 2000
	gold = {
		200	= { mod= 1 }	#vassal gold > 2*liege gold
		5	= { mod= 0 }
		0	= { mod=-1 }	#liege has at least 20*vassal gold
	}
#	For piety, it's a bit simpler because vassal would not try to
#		compare his score to his liege's score.
	liege_piety = {
		5000	= { mod=-1 }	#high piety: vassals tend to stick. RUC: increased to 5000 from 1500
		100	= { mod=0 }		#medium piety: no effect
		-9999	= { mod=1 }		#poor piety: vassal tend to distance themselves
	}

	vassal_piety = {
		500	= { mod=-1 }	#high piety: vassal tends to stick
		-9999	= { mod=0 }		#poor piety: no effect
	}

#	The liege personality may have influence
#	Possible fields are:
#		trait = value => to indicate positive/negative modifiers for the given trait
	liege_traits = {
		realm_duress = { mod=1 }
	}

#	The kind of crown may have influence
#		The fields are simple here! beware!
	tier = {
		#the normal ones are below (RUC)
		county=-2	# slightly less than Yves' normal
		duchy=0
		kingdom=2	#rare but can happen (jerusalem)

		#special massive-blobification results below.
		#county=-10
		#duchy=-10
		#kingdom=-10	 #rare but can happen (jerusalem)
	}

#	Vassal crowns: if the vassal has crowns on which the liege has no claim
#		only one level of crown is counted (i.e. this has no effects for county crowns when
#		comparing to a king!)
#	number of crowns = modifier (not cumulative)
	own_crowns = {
		#1 = { mod=1 }
		#2 = { mod=1 best=vassal  }
		#3 = { mod=2 best=vassal  }
	}

#	Liege doesn't hold the appropriate crown over the vassal's capital county
	liege_crowns = {
		not_king = { mod=2 }	#applies only if liege is king level
		not_duke = { mod=2 tier=county }
	}

#	Loyalty modifier
#	Possible fields are:
#		numbers from 0 to 100 in decreasing order: effect if the ruler loyalty is below (<=) the #		number (not cumulative)
	loyalty = {
		60 = { mod=1 }
		30 = { mod=2 }
		10 = { mod=3 }
	}

#	Rule specific to counties vassal to a duchy whose duke has decided to merge
	merged_liege = { mod=-2 tier=county }

#	The vassal personality may have influence
#	Possible fields are:
#		trait = value	=> to indicate positive/negative modifiers for the given trait
	traits = {
		rebellious	= { mod= 1 }
		loyalist	= { mod=-1 }
		just		= { mod=-1 }
	}

#	Different culture may have influence; to the difference of other indicators, culture is hard to
#		guess, because as long as the final country is unknown, it's precise culture is unknown
#		too. So the culture thing must be seen as a best guess as regards any number based on the
#		"majority".
#	Possible fields are:
#		ruler: effect if the ruler culture is not accepted
#		capital: effect if the capital culture is not accepted
#		numbers from 0 to 100 in increasing order: effect if that percentage of the duchy culture
#				(>=) is not accepted (not cumulative)
#			This percentage is computed depending on the accepted_cultures setting; if both
#			major_by_income and major_by_province are set, the modifier will be computed on the
#			base of the average of both ratios.
	culture = {
		ruler		= { mod=1 }
		capital		= { mod=1 tier=duchy }
		50		= { mod=1 }
		80		= { mod=2 }
	}

#	Global size (including own CK vassals if any -before conversion-) may have influence.
#	Possible fields are:
#		numbers, in increasing order: effect if the size is that many counties or more (>=)
#			(not cumulative).
	size = {
		0	= { mod=0 }		#hum... what does a duke with no demesne think ???
		1	= { mod=-1 }	#a small demesne is less likely to become independent
		2	= { mod=0 }
		4	= { mod=1 }
		7	= { mod=2 }
		10	= { mod=3 }
	}

#	After adding the modifiers together, check the results.
#	The constraints gained previously may modify that result.
	effect = {
		3	= union	#country becomes personal union
		5	= vassal	#country becomes vassal
		8	= ally	#country becomes ally
		11	= marry	#country becomes married
		15	= r150	#country becomes friend (100 relationship)
	}
}

Edit: Cleaned up. I still recommend looking through the original file on SourceForge. There are some interesting ideas for other areas of conversion in that data file.
 
Last edited:
Keep in mind that CK2 introduces Crown Authority, which is, by definition, a measurement of how independent vassals are.

Indeed, and that will be the major determinant. But I really suspect we'll need to make things more varied than just crown authority would allow us.
 
I determined that for my next phase, I only need a province field that listed an owner. The corresponding country field is completely unnecessary.

So I put in all the code that will take a province our province mapping file claims is ROTW and find out the EU3 owner in 1399, according to the history files. And make sure this province is output in the save. So far, it only does Ceylon/Sri Lanka. But if some people will start mapping ROTW provinces to the rule in the file (using the instructions linked at the beginning of this thread), more ROTW areas will be assigned to the proper owners.
 
So, all I need to do for rest of the world provinces when mapping is to select an EU3 province, select no CK provinces, and move on? Hell, even I have the patience for that!

I'll start doing North America forthwith.

Edit: Well, I tried to do North America and the carribean, but the provincemapper doesn't seem to want to save a mapping that isn't a complete link...


But in any case, can it not be automated? After europe is mapped, for every EU3 province that isn't mapped, create a link that contains only that province?


I'm gonna go ahead and map ireland, so that I have something to do.

EDIT: Well, that was quick. Moving on to the british isles.


EDIT: I don't seem to be able to commit code

pushing to ssh://hg.code.sf.net/p/ck2toeu3/source
searching for changes
abort: push creates new remote head 1f1446590deb!
hint: did you forget to merge? use push -f to force
[command returned code 255 Fri Feb 24 06:39:22 2012]

Here's the mappings for England Ireland Scotland and Wales

Code:
# England, Ireland, Scotland, and Wales
link = { ck2 = 5 ck2 = 4 ck2 = 3 eu3 = 372 }	# Ulster, Tyrone, Tyrconnell -> Ulster
link = { ck2 = 9 eu3 = 376 }	# Connacht -> Connaught
link = { ck2 = 11 ck2 = 8 ck2 = 7 eu3 = 373 }	# Dublin, Breifne, Oriel -> Meath
link = { ck2 = 15 ck2 = 16 ck2 = 12 ck2 = 10 eu3 = 374 }	# Ormond, Leinster, Ossory, Kildare -> Leinster
link = { ck2 = 14 ck2 = 13 eu3 = 375 }	# Desmond, Thomond -> Munster
link = { ck2 = 36 eu3 = 369 }	# Orkney -> Orkney
link = { ck2 = 37 ck2 = 39 ck2 = 40 ck2 = 45 eu3 = 252 }	# Caithness, Ross, Moray, Argyll -> Highlands
link = { ck2 = 35 eu3 = 253 }	# Innse Gall -> Western Isles
link = { ck2 = 41 eu3 = 251 }	# Buchan -> Aberdeen
link = { ck2 = 44 ck2 = 42 ck2 = 43 ck2 = 46 eu3 = 250 }	# Atholl, Strathearn, Gowrie, Fife -> Fife
link = { ck2 = 47 ck2 = 49 ck2 = 50 ck2 = 38 eu3 = 249 }	# Clydesdale, Carrick, Galloway, Teviotdale -> Ayrshire
link = { ck2 = 48 ck2 = 51 eu3 = 248 }	# Lothian, Dunbar -> Lothian
link = { ck2 = 52 ck2 = 56 eu3 = 246 }	# Northumberland, Durham -> Northumberland
link = { ck2 = 53 ck2 = 55 ck2 = 54 eu3 = 247 }	# Cumberland, Westmorland, Isle of Man -> Cumbria
link = { ck2 = 57 eu3 = 245 }	# York -> Yorkshire
link = { ck2 = 61 eu3 = 243 }	# Lincoln -> Lincoln
link = { ck2 = 58 ck2 = 59 eu3 = 244 }	# Lancaster, Chester -> Lancashire
link = { ck2 = 60 ck2 = 64 ck2 = 65 eu3 = 242 }	# Perfeddwlad, Gwynedd, Powys -> Gwynedd
link = { ck2 = 18 ck2 = 19 ck2 = 20 eu3 = 241 }	# Dyfed, Glamorgan, Gwent -> Glamorgan
link = { ck2 = 66 ck2 = 30 ck2 = 67 ck2 = 17 eu3 = 240 }	# Shrewsbury, Worcester, Warwick, Hereford -> Marches
link = { ck2 = 31 ck2 = 29 ck2 = 28 ck2 = 27 ck2 = 21 ck2 = 23 eu3 = 233 }	# Cornwall, Devon, Somerset, Dorset, Gloucester, Wiltshire -> Cornwall
link = { ck2 = 26 eu3 = 234 }	# Winchester -> Wessex
link = { ck2 = 73 ck2 = 25 ck2 = 24 eu3 = 235 }	# Kent, Sussex, Surrey -> Kent
link = { ck2 = 71 ck2 = 70 eu3 = 1860 }	# Suffolk, Norfolk -> Norfolk
link = { ck2 = 63 ck2 = 62 eu3 = 1861 }	# Derby, Leicester -> Derby
link = { ck2 = 68 ck2 = 69 eu3 = 237 }	# Northampton, Bedford -> Oxfordshire
link = { ck2 = 22 eu3 = 239 }	# Oxford -> Gloucestershire
link = { ck2 = 72 eu3 = 238 }	# Essex -> Essex
link = { ck2 = 32 eu3 = 236 }	# Middlesex -> London
 
Last edited:
This guide is right: that is a really useless error message! You'll need to first pull the latest changes from the repository, do the merge process (never done it myself, so I can't write out instructions), and then push the changes to the server.

As for ROTW provinces: we could just assume all unmapped provinces are ROTW, but I really don't like the idea of implicit rules like that. If nothing else, it robs us of our ability to provide an error message about unmapped provinces.
 
As for ROTW provinces: we could just assume all unmapped provinces are ROTW, but I really don't like the idea of implicit rules like that. If nothing else, it robs us of our ability to provide an error message about unmapped provinces.

How about we automate it? I know you'll need to write an app to do it, but once the Old World mapping is complete, for all EU3 province IDs, if the ID isn't mapped, create a new link with that EU3 province only? That way it is both automatic and explicitly defined. :p


Edit: Also, I can't figure out how to "merge". There is no obvious non-command line way to do it. (And I have an irrational fear of command line interfaces).
 
Last edited:
Edit: Well, I tried to do North America and the carribean, but the provincemapper doesn't seem to want to save a mapping that isn't a complete link...

I've put a new version up that won't skip one-sided links. It'll also mark both one-sided and many-to-many links so we can catch any that are unintentional.

But in any case, can it not be automated? After europe is mapped, for every EU3 province that isn't mapped, create a link that contains only that province?

It'd be an interesting strategy to automate mapping of ROTW provinces in some areas, at least. For instance, a quick little program could probably walk EU3's continent.txt, and null-link North and South America, Australia, and Oceania in one go, while leaving manual verification of borders in place for Africa and Asia.
 
I've put a new version up that won't skip one-sided links. It'll also mark both one-sided and many-to-many links so we can catch any that are unintentional.



It'd be an interesting strategy to automate mapping of ROTW provinces in some areas, at least. For instance, a quick little program could probably walk EU3's continent.txt, and null-link North and South America, Australia, and Oceania in one go, while leaving manual verification of borders in place for Africa and Asia.

Well, with the new version of the province mapper one sided mappings will be rather trivial to do. But I have one more request. Can their be hotkeys for "new mapping" and "new comment"? :p
 
Edit: Also, I can't figure out how to "merge". There is no obvious non-command line way to do it. (And I have an irrational fear of command line interfaces).

I've not had to do it, so I'm not entirely sure, but I get the impressions the options appear if you go into the syncronize dialog and pull from the server. The section in the manual for Tortoise HG is here.
 
Okay, I managed to finally actually push my changes to the repository, but only after remaking my local repository. Before then I was stuck on revision 6, I didn't know how to revert or merge my changes, and when I queried for changes I was told there weren't any (there were). So either Hg was confused, or it was confusing me, or both.

I also still don't know how merging works. Is it supposed to be part of Hg Commit? How the hell is that supposed to work? Does Hg commit get the latest changes automatically? Do i have to syncronise again after I've made changes but before I commit?
 
Mercurial is a DVCS. It's not really tied to a remote repository at all.

This means that there's a "standalone" way of working directly with the repository. Commit just puts changes into the local repository, and does NOTHING with remote. Push and pull interact with arbitrary remote repositories (doesn't even need to be the repository that you cloned from...if I make my local repository available on the internet, and gave you permissions, you could push and pull directly to it, without ever touching the SF repository). That means if you have multiple computers, it's easy to keep partial changes in sync without disrupting the central repository.

So if you want to put changes into a remote repository that you're actually staying in sync with (this is optional! you can cherry-pick changes, unlike svn), you need to:
1. "hg commit" to create a changeset with your changes in local.
2. "hg pull" to get the latest committed changesets from remote.
3. "hg update" to put the changesets you've just pulled into your working copy ("hg pull -u" does pull then update).
3. "hg push" to put your committed changesets in remote.

Keep in mind that I've never used TortoiseHg, since I've never needed Hg for a project on Windows...I assume that, like TortoiseSVN, the Tortoise menu options map pretty directly to the command-line commands. And this is all from memory; I haven't worked with Hg recently. So take it with a grain of salt :)
 
I created a quick link creator for you guys in the hopes that it would take some of the tedium out of actually creating the links.

You can download it here here.

Easy to use, just extract the rar to anywhere you want, you'll get an error on your first load, just hit continue then set the directories for your EUIII and CKII province path and hit save then restart the app. When you actually create a link, make sure you check the boxes of the provinces you want in the list views.

If you have any ideas on how to improve it, let me know!
 
Last edited:
I did some culture mappings.

Code:
cultureMap = {

link = { ck2 = scottish eu3 = scottish }
link = { ck2 = irish eu3 = irish }
link = { ck2 = welsh eu3 = welsh }
link = { ck2 = saxon ck2 = english eu3 = english }
link = { ck2 = norman eu3 = normand }
link = { ck2 = breton eu3 = breton }
link = { ck2 = frankish eu3 = cosmopolitan_french }
link = { ck2 = occitan eu3 = occitan }
link = { ck2 = basque eu3 = basque }
link = { ck2 = castillan eu3 = castillian }
link = { ck2 = portuguese eu3 = portugese }
link = { ck2 = catalan eu3 = catalan }
link = { ck2 = andalucian eu3 = andalucian }
link = { ck2 = maghreb_arabic eu3 = maghreb_arabic }
link = { ck2 = levantine_arabic eu3 = al_suryah_arabic }
link = { ck2 = egyptian_arabic eu3 = al_misr_arabic }
link = { ck2 = ethiopian eu3 = somali religion = muslim }
link = { ck2 = ethiopian eu3 = ethiopian }
link = { ck2 = bedouin_arabic eu3 = bedouin_arabic }
link = { ck2 = persian eu3 = persian }
link = { ck2 = turkish eu3 = turkish }
link = { ck2 = armenian eu3 = armenian }
link = { ck2 = alan ck2 = cuman ck2 = pecheneg ck2 = mongol eu3 = tartar }
link = { ck2 = russian eu3 = russian }
link = { ck2 = komi eu3 = uralic }
link = { ck2 = finnish eu3 = finnish }
link = { ck2 = lappish eu3 = sapmi }
link = { ck2 = swedish eu3 = swedish }
link = { ck2 = norwegian eu3 = norwegian }
link = { ck2 = danish eu3 = danish }
link = { ck2 = ugricbaltic eu3 = estonian }
link = { ck2 = lettigallish eu3 = latvian }
link = { ck2 = lithuanian eu3 = lithuanian }
link = { ck2 = prussian eu3 = old_prussian }
link = { ck2 = polish ck2 = pommeranian eu3 = polish }
link = { ck2 = bohemian eu3 = czech }
link = { ck2 = hungarian eu3 = hungarian }
link = { ck2 = romanian eu3 = romanian }
link = { ck2 = georgian eu3 = georgian }
link = { ck2 = greek eu3 = greek }
link = { ck2 = serbian eu3 = serbian }
link = { ck2 = croatian eu3 = croatian }
link = { ck2 = dutch eu3 = dutch }


#link = { ck2 = italian eu3 = lombard eu3 = umbrian eu3 = sicilian }
#link = { ck2 = german eu3 = pommeranian eu3 = prussian eu3 = hessian eu3 = saxon eu3 = rheinlaender eu3 = austrian eu3 = bavarian }

Code:
Revision	Log Message
---------	----------------
1		Initial commit
2		Initial parser
3		Automated build batch file
4		Copy data files on build
5		Automated Test and Build_and_Test batch files
6		Add initial province mapping with Iceland mapped
7		Output a minimal yet functional EU3 save
8		Add configuration file and relating code
9		ROTW provinces get ownership from EU3 install
10		England Ireland Scotland Wales mapped
11		CK2 cultures mapped, except for german and italian

I can't think of any way to differentiate between the German and Italian cultures short of using province IDs, and the mappings for those parts haven't been done yet. There are some other cultures that can be split in two in a similar way (Dutch -> Dutch and Flemish, Russian -> Russian, Byelorussian and Ruthenian, etc.)

That was my first time using tortoise hg, I hope what I did I did correctly.
 
I can't think of any way to differentiate between the German and Italian cultures short of using province IDs, and the mappings for those parts haven't been done yet. There are some other cultures that can be split in two in a similar way (Dutch -> Dutch and Flemish, Russian -> Russian, Byelorussian and Ruthenian, etc.)

I will quote an earlier post:

Code:
cultureMap = {

link = { vic = north_german eu3 = pommeranian eu3 = prussian eu3 = hannoverian eu3 = saxon  }
link = { vic = swiss eu3 = rheinlaender owner = SWI }
link = { vic = south_german eu3 = rheinlaender }

}

By using "owner = TAG" you can split one culture in to many by country. For example, to differentiate between dutch and flemish, you can do:

Code:
link = { ck2 = dutch eu3 = dutch owner = HOL } #The dutch dutch.
link = { ck2 = dutch eu3 = flemish owner = BEL } #The belgian dutch

However, can someone let us know if it is possible to define many owner tags, like this?

Code:
link = { ck2 = german eu3 = [german subculture] owner = [tag] owner = [tag] owner = [tag] }
 
However, can someone let us know if it is possible to define many owner tags, like this?

Code:
link = { ck2 = german eu3 = [german subculture] owner = [tag] owner = [tag] owner = [tag] }

None of that code has been created, so if you can dream of an algorithm to make it happen, it can be made so.

Also, I'm thinking of giving out cores for De Jure kingdoms, or in the case of Germany and Italy, De Jure duchies. Or perhaps I'll make that definable in a config file. It's kind of a vague notion thus far.