• 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.
Thanks for answering my all my questions so fast, just 1 last question, how will the English culture work when England stays(Anglo-)Saxon, will Saxons just be English or will they become Saxon, because I am pretty sure German Saxons of 1400 were quite different from the Enlish Saxons of 1066. And seeing how the English culture of 1400 is also quite a bit different from the Anglo Saxon culture, I am not sure how the Anglo-Saxons could realistically be imported to EU 3.(my guess is that you probably just make them English). Not to mention the flags would also be rather ahistorical(which is already the case in CK 2, but still).


First picture is the Lancaster-English flag, used in EU 3, the second picture is the Dragon of Wessex, the English coat of arms during Anglo-Saxon times, which should be the EU 3 flag if the Anglo Saxons won the Norman and Norwegian invasion of 1066.
View attachment 58390

In unmodded EU3, Saxon becomes English (we don't like it, either, but there really is nothing else to map it to). In modded EU3, cultures are all preserved.
 
It seems we've attracted a new coder, who areas of interest and everything!

But he's gone and asked a good question:
"As far as linking titles go, you'd be surprised how many of the titles have a direct EU3 equivalent, even down to the county level especially in Europe. This is a real godsend in the HRE, where we're going to have a bunch of independent states. Unfortunately, Franconia has no equivalent., and there are three each of Lorraines and Pomer*'s..

Looking down through these county level titles I wonder how we are going to handle the implementation of the Hanseatic league, if at all."

Ignoring for the moment out ideas of possibly handing of the EU3 HRE status to other CK2 empires, how the heck might we handle the Hanseatic (or other) trade leagues? How do we determine who leads one? How do we know who's in it?

Any ideas?
 
It seems we've attracted a new coder, who areas of interest and everything!

But he's gone and asked a good question:
"As far as linking titles go, you'd be surprised how many of the titles have a direct EU3 equivalent, even down to the county level especially in Europe. This is a real godsend in the HRE, where we're going to have a bunch of independent states. Unfortunately, Franconia has no equivalent., and there are three each of Lorraines and Pomer*'s..

Looking down through these county level titles I wonder how we are going to handle the implementation of the Hanseatic league, if at all."

Ignoring for the moment out ideas of possibly handing of the EU3 HRE status to other CK2 empires, how the heck might we handle the Hanseatic (or other) trade leagues? How do we determine who leads one? How do we know who's in it?

Any ideas?
Oh hey, that's me. Hi everyone, I'm greyhuge, and I just pushed through an update to the country/tag mapping file, it is now almost complete. I tested it with my saves and it definitely looks a lot better, though there are still problems.

Regarding the Hanseatic league, It would not have been a problem before HTTT, as the entire thing was managed through province modifiers and events throughout Northern Germany. However this was changed in HTTT and now they are actually a nation that leads a trade league as a merchant republic. At EU3: DW game start in 1399 there are 4 trade leagues, Venetian, Genoan, Hanseatic, and Novgorodrian. All control a center of trade they were all nations that had an approximately elective form of government.

Thus my first instinct is to have any nation that is a republic and any country of elective government of ducal tier or below that controls a center of trade at game start into a merchant republic. We should also take care to assign these new trade leagues the tags of the EU3 trade leagues, as these tags have special trade league missions to exploit. Initially, trade league members are not a problem, as any trade league can invite any nation to their trade league, and they will shortly have a healthy trade league in place. Later on we may try to implement an algorithm that gives a trade league members at game start but that can wait for later I think.
 
Sample code time!

This is the function that initializes an EU3 province:
Code:
void EU3Province::init(int newNum, Object* obj, date startDate, map< string, vector<string> >& mapSpreadStrings)
{

newNum is its number
obj is the parsed history file
startDate is the conversion date
mapSpreadStrings contains data on map spread (it maps a tag or tech group to a vector of tags)

Code:
	num = newNum;
Obvious, I hope.

Code:
	vector<Object*> ownerObj = obj->getValue("owner");
	if (ownerObj.size() > 0)
	{
		owner = ownerObj[0]->getLeaf();
	}
	else
	{
		owner = "";
	}

	vector<Object*> discoveredByObj = obj->getValue("discovered_by");
	for (unsigned int i = 0; i < discoveredByObj.size(); i++)
	{
		vector<string> discoverers = mapSpreadStrings[ discoveredByObj[i]->getLeaf() ];
		for (unsigned int j = 0; j < discoverers.size(); j++)
		{
			discoveredBy.push_back( discoverers[j] );
		}
	}
This part gets some basic data from the parsed file, demonstrating some uses of the Object class. It's a tricky one that you really have to play with a bit to learn.

Code:
	vector<Object*> objectList = obj->getLeaves();
	for (unsigned int i = 0; i < objectList.size(); i++)
	{
		string key = objectList[i]->getKey();
		if (key[0] == '1')
		{
			date histDate(key);
			if (histDate <= startDate)
			{
				vector<Object*> newOwnerObj = objectList[i]->getValue("owner");
				if (newOwnerObj.size() > 0)
				{
					owner = newOwnerObj[0]->getLeaf();
				}

				vector<Object*> discoveredByObj = obj->getValue("discovered_by");
				for (unsigned int i = 0; i < discoveredByObj.size(); i++)
				{
					vector<string> discoverers = mapSpreadStrings[ discoveredByObj[i]->getLeaf() ];
					for (unsigned int j = 0; j < discoverers.size(); j++)
					{
						discoveredBy.push_back( discoverers[j] );
					}
				}
			}
		}
	}
Loop through the leaves of the top-order Object, looking for any with a key starting with '1' (that is, the ones that start with a date).
Check if a given object is from before or on the start date.
If so, look for owner or discovered_by fields within those, and use any of those to update the appropriate members.

Code:
	inHRE = false;

	history.clear();
}
Give appropriate defaults to the rest of the members.


Clear enough, I hope? If not, let me know, I'll rewrite this to be more so.
 
And sample code on how to output a section of a save. Again from EU3Province:

Code:
void EU3Province::output(FILE* output)
{
	fprintf(output, "%d=\n", num);
	fprintf(output, "{\n");
	if (owner != "")
	{
		fprintf(output, "	owner=\"%s\"\n", owner.c_str());
	}
	for (unsigned int i = 0; i < cores.size(); i++)
	{
		fprintf(output, "	core=\"%s\"\n", cores[i].c_str());
	}
	if (inHRE)
	{
		fprintf(output, "	hre=yes\n");
	}
	fprintf(output, "	history=\n");
	fprintf(output, "	{\n");
	for (unsigned int i = 0; i < history.size(); i++)
	{
		history[i]->output(output);
	}
	fprintf(output, "	}\n");
	fprintf(output, "	discovery_dates={9999.1.1 9999.1.1 1458.4.30 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 }\n");
	fprintf(output, "	discovery_religion_dates={9999.1.1 1458.4.30 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 9999.1.1 }\n");
	fprintf(output, "	discovered_by={ ");
	for (unsigned int i = 0; i < discoveredBy.size(); i++)
	{
		fprintf(output, "%s ", discoveredBy[i].c_str());
	}
	fprintf(output, "	}\n");
	fprintf(output, "}\n");
}

Pretty much, just fprintf() everything in the format that an EU3 save should have. Subclasses have their own output() functions, and you can pass the output FILE* to them to make them output properly. The only real trick is to remember to call .c_str() on all strings, lest you crash the converter and have to puzzle over it for a bit (if I had a dollar for every time I've done that).

Why fprintf()? Because I'm a stick-in-the-mud who learned C first, and thinks streams are ugly and less clear. ;)
 
I just handled a rather old merge on our repository, please remember to pull in new changes and merge before you commit and/or push your changes.

This is mostly at me, because I'm pretty sure that was my fault. :rolleyes:
 
Also, I've gone and updated all the links under the 'Important Discussions' section in the second post here. And I added a section about unresolved bugs, crashes, and other oddities. So if you've posted about one, don't be too distressed at my lack of reply! I know there's issues and I'm keeping track, I'm just focused on the EU3 to V2 converter for a bit longer.
 
Have an idea for converting tags.

How many de jure duchies are there in CK2? Is it too many for EU3 to handle?

Idea:
All independent counties are merged with their de jure ducal liege. It seems like most counties are only one or two provinces at most, so I can't imagine doing this would ruin anyone's game much. Duchies/Kingdoms/Empires would convert with all of their de facto vassals, regardless of de jure lieges.

Say a Duke holds 50% of the de jure vassals, and the other 50% are independent counties. The independent counties would merge into the Duchy. Say a Duke hold 50% of his de jure vassals, and the other 50% are held by another Duke/King/Emperor. In this case the Duke only converts with the 50% he de facto controls. The other 50% stay with their de facto liege.

Now, say a county has no de jure ducal liege i.e. a duchy has 4 counties, but all 4 are independent and no one holds the title. In this case, the count that holds more than 50% of the provinces for that duchy (but simply hasn't created/usurped the title for some reason) becomes the head of state for that duchy in EU3. If no count holds more than 50%, the count that holds the most de jure vassal counties gets it. Failing this, the count with the highest personal prestige gets converted.

Thoughts?
 
Just wanted to say thank you for spending so much time on this, and wish you good luck with the project.
 
Hey, I was just wondering a little thing, how will my Kingdom of Frisia be imported, will it be the Kingdom of the Netherlands, Kingdom of Friesland, another random dutch kingdom or be a completely random country(something I really don't want).

Oh ye, I would like to add, my opinion is to make the provinces in EU 3 as vanilla as possible and don't let the province economy be based of the CK 2, sure, it might be fun, but stuff would turn out too weird, mostly with the AI that always acts like a idiot, I would hate to see my super strong maxed out personal provinces make my country so powerful that I can just steamroll everything because the AI of CK 2 is so stupid to not spend it's money on province improvements and instead on mercenaries it doesn't need.
 
I agree. The main appeal to a conversion from CK2 (for me) is really in the ahistorical details that crop up. I like to see provinces like Granada turn into pinnacles of civilization, whilst Rome gets sacked time and time again.
 
Hey, I was just wondering a little thing, how will my Kingdom of Frisia be imported, will it be the Kingdom of the Netherlands, Kingdom of Friesland, another random dutch kingdom or be a completely random country(something I really don't want).

Oh ye, I would like to add, my opinion is to make the provinces in EU 3 as vanilla as possible and don't let the province economy be based of the CK 2, sure, it might be fun, but stuff would turn out too weird, mostly with the AI that always acts like a idiot, I would hate to see my super strong maxed out personal provinces make my country so powerful that I can just steamroll everything because the AI of CK 2 is so stupid to not spend it's money on province improvements and instead on mercenaries it doesn't need.

I don't know about you, but in my games the AI almost always manages to bring their holdings up to a pretty good level.
 
I don't know how easy this would be to code as an algorithm but I did it by had with this approach:

1) Determine the correct owner of all provinces and identify them by their primary CK2 holding.
2) All rulers with EU3 tags equivalent to CK2 tags are assigned. If more than one ruler could be assigned the same tag (e.g. King of Burgundy and Duke of Burgundy are the primary titles of different people), the owner of the highest CK title is assigned. If one ruler has more than one EU3 tag among his CK2 titles, the first of his titles is the one he is assigned. Note that some of these rulers are vassals and the vassal relationship should be retained (except for HRE vassals)
3) All other realms, the Holy Roman Emperor, and the HRE's direct vassals are assigned the best remaining available tags in order of priority:
i) the Eu3 country containing the CK2 ruler's capital historically (base on 1399 or 1453, perhaps)
ii) an EU3 country with core on the CK2 ruler's capital in 1399
iii) an EU3 country with same/similar culture
iv) a country with the same religion in the same region
4) All vassals (except direct HRE vassals) that didn't have perfectly appropriate EU3 tags, were given their realm ruler's tag.

I was able to get almost all the countries in my game assigned that way and only had to pull out-of-region or religiously inappropriate tags for a few rulers. I created the vassals based on having available tags rather than crown authority or relationship because it was easy. On the plus side, it means the vassal tags all make sense, but it does mean that countries like France tend to devolve into a ton of vassals, while the Scandinavian countries and England tend to remain as big blocks. If you want to honor the crown authority in the CK game, it might make more sense to create all the realms first and then create vassals only for countries with lower crown authorities, using the same sort of prioritization to assign tags.
 
magritte2's post gave me an idea. What if two or three extra tags for each region were thrown into EU3 to be assigned to CK2 tags that don't have an EU3 equivalent? For example, if some independent county in western Europe still exists at the end of a CK2 campaign, but there is no equivalent EU3 tag, instead of giving it some off the wall, out of region leftover tag from asia or something, you'd have a backup tag for that region that, historically, would've at least been in the same ballpark? Just thinking out loud.
 
I converted my 1202 save just to try it out and everything is just complete madness, first off, all countries have names that don't make sense, Frisia became some kind of Russian kingdom, my kingdoms I got in CK 2 are all split into independent kingdoms all ruled by the same guy(at least the same name) although there is no personal union between them, there are no dynasties, no cultures, all kind of messed up things.

So either it's really really beta, my starting date is too soon or the download link on sourceforge isn't up to date. Regardless, I want to offer my help in this project, mostly because I really want to use it with my CK 2 save and it pains my heart to see it so messed up.

So anyway, my modding skills of CK 2 aren't that great, although some of the converter things look really easy to modify, if there is any boring stuff that needs to be done, like linking nations, PM me.
 
Back online, and with a lot of replies to make it seems. Here goes.

Have an idea for converting tags.

How many de jure duchies are there in CK2? Is it too many for EU3 to handle?

If you mean vanilla EU3 then yes, by a rather extreme margin. If you mean adding them in to a mod, I suspect so, but we also want to allow people who dislike mods to use the converter.

Idea:
All independent counties are merged with their de jure ducal liege. It seems like most counties are only one or two provinces at most, so I can't imagine doing this would ruin anyone's game much. Duchies/Kingdoms/Empires would convert with all of their de facto vassals, regardless of de jure lieges.

Say a Duke holds 50% of the de jure vassals, and the other 50% are independent counties. The independent counties would merge into the Duchy. Say a Duke hold 50% of his de jure vassals, and the other 50% are held by another Duke/King/Emperor. In this case the Duke only converts with the 50% he de facto controls. The other 50% stay with their de facto liege.

Now, say a county has no de jure ducal liege i.e. a duchy has 4 counties, but all 4 are independent and no one holds the title. In this case, the count that holds more than 50% of the provinces for that duchy (but simply hasn't created/usurped the title for some reason) becomes the head of state for that duchy in EU3. If no count holds more than 50%, the count that holds the most de jure vassal counties gets it. Failing this, the count with the highest personal prestige gets converted.

Thoughts?

Eh, I really dislike the idea of merging independent rulers in to other realms. I'd rather force some vassals to be absorbed before doing something like this. (I mean, I feel kind of bad about the steps we'll have to take over independent barons).

Just wanted to say thank you for spending so much time on this, and wish you good luck with the project.

You are most welcome!

Hey, I was just wondering a little thing, how will my Kingdom of Frisia be imported, will it be the Kingdom of the Netherlands, Kingdom of Friesland, another random dutch kingdom or be a completely random country(something I really don't want).

Well, it's entirely possible things will change in the future, but as of now the kingdom of Frisia has dibs on the Netherlands tag.

Oh ye, I would like to add, my opinion is to make the provinces in EU 3 as vanilla as possible and don't let the province economy be based of the CK 2, sure, it might be fun, but stuff would turn out too weird, mostly with the AI that always acts like a idiot, I would hate to see my super strong maxed out personal provinces make my country so powerful that I can just steamroll everything because the AI of CK 2 is so stupid to not spend it's money on province improvements and instead on mercenaries it doesn't need.

I think it would be horrible to spend time turning Bilyar into the jewel of the east only to see it all evaporate because the game expects that it got sacked and ruined by the Golden Horde.

I agree. The main appeal to a conversion from CK2 (for me) is really in the ahistorical details that crop up. I like to see provinces like Granada turn into pinnacles of civilization, whilst Rome gets sacked time and time again.

One of the old CK: DV To EU3 converters (the mod one, IIRC) gave you options on how the economy was translated (historical, converted, or blended). I've seen enough opinions on both sides this that I'm inclined to do the same.

I converted my 1202 save just to try it out and everything is just complete madness, first off, all countries have names that don't make sense, Frisia became some kind of Russian kingdom, my kingdoms I got in CK 2 are all split into independent kingdoms all ruled by the same guy(at least the same name) although there is no personal union between them, there are no dynasties, no cultures, all kind of messed up things.

So either it's really really beta, my starting date is too soon or the download link on sourceforge isn't up to date. Regardless, I want to offer my help in this project, mostly because I really want to use it with my CK 2 save and it pains my heart to see it so messed up.

So anyway, my modding skills of CK 2 aren't that great, although some of the converter things look really easy to modify, if there is any boring stuff that needs to be done, like linking nations, PM me.

It's really, really beta *and* your starting date is too soon. :-D Had we tech or economy conversion in place, central and eastern asia would likely be ready to eat you alive (they start with their 1399 data and we then adjust for later dates). Also, see the faq in the OP regarding nations ending up in strange places.

That said, we'll gladly take more help. I'll PM you, though we keep development discussion on this thread, so everyone can keep informed.