Imperator to CKII Converter - Development Thread (not for troubleshooting)

  • 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.
After a few requests for more options regarding the start date, I've implemented customizable date conversion into the converter.

Rather then generating 2 preset bookmarks at 100 AD and 1066 AD for each save game, only 1 bookmark will be generated, which can be customized with the following options: AD date, AUC date, Earliest date, and Custom date.

The AD date will use the AD date of the save, so a save game played until AUC 1229 would become 475 AD (dates earlier then 100 AD will become 100 AD). The AUC date option will use the AUC date directly as CK2's start date, so a save game played until AUC 1229 would start at 1229 AD. The Earliest date option will use 100.1.1, the earliest feasible date within CK2's engine, and Custom date allows the user to type in any date that they want, within year.month.day format (if the custom date is less then 100 AD, it will bump up to 100 AD).

Later dates may potentially bypass planned content to simulate the gap between I:R and CK2, so a game started at 475 AD wouldn't get events for the Rise of Christianity, for example.

Here's an example of how it looks within the Fronter interface: The 4 date options are available within the first field, and if I choose to do a custom date, I select "Custom Date" and put in that custom date in the second field.


1639881861328.png


Custom date in-game:
1639883201483.png
1639883379072.png


If a date is in the year 769 or later, instead of being called "Classical Antiquity," it'll instead use a CK2 bookmark name appropriate for that era. So if I set a custom date to be 1069.3.7, for example, the bookmark will be called "High Middle Ages," or if the custom date is 875.4.8, it will be called "The Old Gods."

The additional vanilla bookmarks have also been removed entirely, so now only the converted bookmark will be present on the character selection screen:

1639883606387.png
 
  • 2Like
Reactions:
I'm curious if it's possible to create a CK2 to CK3 converter. That way, you can play 700 years of CK2, focusing on the dark ages with the proper mods, and then convert to CK3 for more traditional medieval gameplay. This appears to be the best option for filling a gap in the timeline.
 
  • 4Like
  • 1
Reactions:
I'm curious if it's possible to create a CK2 to CK3 converter. That way, you can play 700 years of CK2, focusing on the dark ages with the proper mods, and then convert to CK3 for more traditional medieval gameplay. This appears to be the best option for filling a gap in the timeline.
Everything is possible. Will we do it? Nope.
 
  • 4Haha
  • 1Like
  • 1
Reactions:
My college semester has started up again, so much of my spare time will be taken up doing schoolwork, but I have added a new feature to the converter: Germanic and Baltic culture shifts.

Like with the Roman culture split, these culture shifts are a series of events and decisions after a certain date in order to allow the old Germanic and Baltic cultures to become their modern counterparts. Unless underneath an emperor of their culture, over time, Saxon in Britain will diverge into Anglo-Saxon, Saxon in other places will shift to Frisian after 769 AD, Suebi into German after 550 AD, Frankish to Dutch after 769 AD, and Suebi to Lombard in Italy after 550 AD.

For the Baltic cultures, instead of all converting from I:R as Old Prussian, they will convert as a new culture, Aestian, and from there slowly split into Latvian, Lithuanian, and Old Prussian after 450 AD (unless held together by an Aestian Empire), depending on the region.

After observing a few AI-only test runs, they seem to be working as intended. In this I:R savegame, a Saxon tribe conquered Britain and virtually assimilated the entire island, with some Saxon left in the mainland bordered by Norse and Suebi, along with a few Frankish provinces. After 75 years of gameplay, Saxon in Britain became Anglo-Saxon, Saxon in the mainland became Frisian, Suebi became German, and Frankish became Dutch. (Bedouin is in Europe because in the I:R save, I played as an Arabic tribe and migrated there)

1643459038024.png
1643459055634.png


And here's a separate test-run demonstrating the Baltic split. It starts out as Aestian, but over 100 years, it splits between Latvian, Lithuanian, and Old Prussian. (Lithuanian and Latvian in the first screenshot are from provinces outside of I:R's scope, which I haven't touched yet).

1643460366113.png
1643460329793.png



Certain vanilla culture shifting events, such as Frankish automatically converting to French or Saxon converting to German after the Widukind rebellion event chain, didn't make sense or work for a game coming from I:R, and so a few of them have been removed from the converter.


Thanks to the When the World Stopped Making Sense (WtWSMS) mod for allowing the converter to use their content and thanks to the efforts of Canadian Lemur, the initial groundwork for Christianity has begun. Christianity does not spawn naturally in games yet, but in games converted from TinWiz's timeline extender mod, Christian countries and provinces will convert as pre-Nicene Christian. Once a pre-Nicene country has 60 Christian provinces, or 20 Christian provinces and 3 holy sites, it can take a decision to trigger the Nicene council, which will give all Christian characters a choice of converting to Nicene Christianity or Arian Christianity, which will also convert their Christian provinces to their denomination of choice.

Here's an example of the Nicene council in action:

1643462000261.png
1643462048579.png


The Christianity content is heavily work-in-progress, and as such, lacks localization and graphics, but is stable. In addition, Hunnic and Huna cultures from TinWiz's timeline extender mod are supported now as well.
 
Last edited:
  • 4Like
  • 2Love
Reactions:
After looking over Asddsa123 and m1061619's suggestions, I've decided to add an option in the converter to convert Imperator:Rome republics as CK2 merchant republics instead of monarchies:

20220305080725_1.jpg
20220305080718_1.jpg


1646579974854.png


Converted merchant republics will have their leader's family converted as a patrician house, and will have additional patrician houses generated for each of the country's great families from I:R. Except for the country leader's house, which will be led by leader of the country, each patrician house will be led by the eldest male character from the family, and all houses will have their own family palace. In the event that a republic in I:R had less then 5 families, CK2 will automatically create as many families as needed after the first month passes, and if creating houses for all of the major families + the ruler's would lead to more then 5 patrician houses, the extra families would not be converted.

In this screenshot, Carthage remained a republic, becoming a merchant republic and has the Gisgoids, Barcids, Bononids, Hannids, and Uxentidii as it's patrician families:
20220306082052_1.jpg


CK2 unfortunately has clunky engine restrictions that prevent merchant republics from being vassals to other merchant republics unless they share the same patrician families, making it impossible to convert I:R republic vassals to other I:R republics as merchant republics. Because standard republics are unplayable, and because a player may have been playing as a vassal, I:R republic vassals under other I:R republics will convert as monarchies. However, governorships of I:R republics will convert as regular unplayable republics vassals (unless led by a patrician), since they weren't playable in I:R and converting all governorships as powerful monarchies would be detrimental for merchant republic gameplay.

Fortunately the engine allows merchant republics to function as vassals underneath countries of other government types, so I:R republic vassals underneath monarchist and tribal overlords will still convert as merchant republics.

If the option to convert as feudal monarchies is chosen instead, republics will convert to monarchies, as they did prior to the update.

In addition to the merchant republic conversion, I also have created a new Romance divergence culture: Palmyrene, named after the Palmyrene empire that arose during the crisis of the third century, and will spawn in Roman-cultured lands in the Levant and Mesopotamian regions should Rome collapse. Mixing Assyrian and Italian names has produced glorious results, however, lol:

1646584233926.png
1646584168069.png


Finally, I've fixed the minor family naming bug and have moved the Cambrian and Eifrican cultures from the large Latin group into their own groups (Northern Romance and Afro-Romance), which'll be expanded as I create Romance divergence cultures.
 
  • 4Like
Reactions:
Hey there, folks! Is there currently any plan to add the rise of Islam to converted IR games? I’ve been prepping an event chain for that, and while I’d be happy to try and script it up if there’s interest, I also don’t want to step on any plans that you might already have in place.

EDIT: worded better
 
Last edited:
  • 1Like
Reactions:
Hey there, folks! Is there currently any plan to add the rise of Islam to converted IR games? I’ve been prepping an event chain for that, and while I’d be happy to try and script it up if there’s interest, I also don’t want to step on any plans that you might already have in place.

EDIT: worded better
I apologize for my slow response, I was busy with schoolwork and final projects. There is indeed a basic plan, but no work has started on it and is flexible to change/new ideas. We'd be happy to let you try scripting work if you would like to do it!
 
  • 1Like
Reactions:
will there be a triggered anglosaxon invasion of the british isles and a gradual split of brittonic cultures?

I'm hoping that with the migration era migrations, any tribe in the region'll be able to invade Britain, rather then a pre-scripted Anglo-Saxon invasion, so that there could potentially be a Suebi Britain, Vandal Britain, Norse Britain, or even a Gothic Britain.

Brittonic culture already converts as divided, with Taexalian, Votadinian, Damnonian, and Caledonian converting as Pictish, with the Dumnonians converting as Breton (since Cornish culture in vanilla CK2 is represented by Breton culture), and the other cultures converting as Welsh:
1653295631547.png


I figured that it made the most sense to convert them as separate, since the cultures already are divided in I:R and they exist separately within CK2
 
Last edited:
Hope this is the right place for this, but I 've updated the trait converter list. Added conversions for most of the Imperator Traits as well as corrected some trait conversions I felt were converted incorrectly.
 

Attachments

  • charTraitConverter.txt
    1,9 KB · Views: 0
  • Changed Traits.txt
    553 bytes · Views: 0
  • 1Like
Reactions:
Hope this is the right place for this, but I 've updated the trait converter list. Added conversions for most of the Imperator Traits as well as corrected some trait conversions I felt were converted incorrectly.
This is the right place! Excellent work, thank you so much! I'll do some testing first to see if everything is working, but this greatly helps the converter's development! You'll be added to the converter's credits
 
What started as a simple hotfix about 2 and a half months ago turned into an entirely new feature with a mammoth undertaking: Flag conversion.

1654155269330.png


I:R countries which have scripted flags will have those same flags transition into CK2, including flags from I:R mods such as Imperator:Invictus and HMO:

1654156094088.png


1654156515114.png


In addition, these flags will carry over to EU IV when used with the unofficial CK2 to EU IV converter:

20220602040348_1.jpg


While it sounds like a simple task to copy flags from one game to another, Imperator:Rome, unlike Crusader Kings 2, does not have static premade image files for country flags: Instead, all I:R flags are composed of a series of separate backgrounds, patterns, and emblems that are all recombined, resized, and recolored in-game according to a script. This necessitates that the converter read the flag scripts for each country, assemble each flag from separate image files, and then convert it to a format CK2 can understand.

In order to work with images, an image editing library was needed. Unfortunately no such library exists for Java, so I had to do a glorious workaround: A self-contained image editing software, ImageMagick, has been bundled with the converter, and is called upon by using command-line arguments. ImageMagick has a few quirks and difficulties with manipulating .tga and .dds files, so in order to get flags working, the converter first converts the .dds and .tga I:R emblems to .gif files (the same format commonly used for making memes), manipulates and combines them together as a single image, and then converts the final image from .gif to .tga.

Unfortunately flag scripts are stored in the game's files, rather then the save file, so there is no way for the converter to know how randomly generated flags like Boihaemia's and Olbia's were built, and so, those flags will not be able to convert. Governorship flags'll use a flag of one of their CK2 provinces, since I:R governorships have no flags to convert. A list of scripted vanilla flags that will convert can be found here.

In addition, thanks to the efforts by OurLordMonty, all I:R character traits are now fully mapped and converted to CK2.

And as a bonus, I've created the long-requested Punic divergence cultures. They function identically to the Roman divergence cultures, where that a strong Punic empire can prevent them from forming, while a collapsed Punic empire will result in Punic slowly diverging into other cultures. These cultures are Taliaite for Italy, Mlachthi for Pannonia and Illyria, Ysthyalm for France, Carthago Novan for Iberia, Pmpese for Sardinia, Epicrateian for Greece and Anatolia, Baratanac for Britain, Sidonian for the Levant and Mesopotamia, Ziqanmak'om for Germany and Scandinavia, and Sythchy for Poland and the Baltics:

1654160887813.png


Many of these alternate-history Punic culture names were taken from the I:R to CK3 converter with their kind permission, and finally Greek divergence cultures are on the way (they are more complicated then Punic ones and so they're still being worked on).
 
  • 2Like
Reactions:
Over the past 2 months I've been working on a gargantuan new feature that I have only just now finished: Dynamic Empire Splitting.

Similarly to how the Roman Empire historically split into Eastern and Western halves, a large, hegemonic empire in I:R with the Imperial Government form can now split itself in half, with an Empire to the East and another to the West. Both dejure and defacto boundaries will be partitioned between the two halves, and the original empire will be destroyed. The boundary line upon which the empire splits is determined by the territories it owns, so a Roman Empire with historical borders would split around where it did historically, while an Indo-Greek Empire spanning from Italia to India will split around Mesopotamia. Here are examples with various hegemonic empires:

Before:

1659413892922.jpeg


After:

1659413600705.png


Before:

20220725043957_1.jpg


After:

20220801024951_1.jpg


Before:


20220528013932_1.jpg


After:

1659430129685.png


The player will have a choice to rule over the eastern Half or the western half, and a random king-tier vassal will be chosen to rule over the other half. Each half of the empire will have a unique map color created for it, with the western empire color being a lighter version of the original empire's color, and the eastern empire will have a darker and bluer version of the original color (unless the original color was blue, in which case it'll be a darker and redder version).

In addition, unique flags will be dynamically generated for each half of the empire, based off of the original empire's I:R flag. All colors on the I:R flag which match the original empire's map color will be changed to the eastern or western empire's map color, respectively. In the event that the I:R flag had no colors that matched the empire's map color, the background color will be changed to the eastern or western map color, and if the empire had no scripted I:R flag, the eastern version will have a purple filter applied to it.

Here are examples:

Carthage:

1659430716335.gif
........................................
1659430731133.gif

Eastern Carthaginian Empire..........................................................................Western Carthaginian Empire

Gaul:

1659430818561.gif
........................................
1659430836803.gif

Eastern Gallic Empire........................................................................................Western Gallic Empire

Maurya:

1659430944770.gif
........................................
1659430927265.gif

Eastern Mauryan Empire...................................................................................Western Mauryan Empire

Seleukids:

e_SEL_eastDev.gif
........................................
e_SEL_westDev.gif

Eastern Seleukid Empire....................................................................................Western Seleukid Empire

Rome has a special exception, where the Eastern Roman Empire will use the vanilla Byzantium color and flag, and the Western Roman Empire will use it's historical Chi Ro symbol from the Timeline Extender mod:

e_roman_empirwest_westDev.gif


Upon splitting the empire, the player will receive a powerful bloodline, with a dynamically generated icon based off of the country's flag:

1659432441061.png


1659432452532.png


1659432537045.png


1659432647972.png


Unique icons for the decision will also be generated, made using a similar formula to the bloodline icon:

1659432819919.png


1659432869216.png


1659432929479.png


But splitting your glorious empire permanently would be pretty bland, so the original empire can be revived from the ashes if a player can manage to recover most of the core imperial provinces and destroy the other half of the empire. Once restored, all territories dejure to the eastern and western halves will become dejure to the restored empire, and the emperor will have access to the Imperial Reconquest CB on all lands that were apart of the empire at the time it was originally split.

1659433350723.png


Unique decision icons will be generated based off of the original empire's flag:

1659433497977.png



1659433585310.png

1659433924029.png


1659433988903.png


1659434159506.png


Upon restoring the empire, the player will receive a powerful bloodline with a dynamically generated icon based off of the I:R flag:

1659434381267.png


1659434407698.png


1659434533819.png


1659434621115.png


1659434748416.png

(Note the last two screenshots were taken from WIP versions before the localization was created, but the icon is generated the same in the final version)

The Eastern Roman Empire is an exception, where instead they'll retain the vanilla CK2 restore Rome decision and events.

In addition, I've finally gotten around to doing the heavily-requested Greek divergence cultures. Most of the names were taken from the unofficial CK2 to EU IV converter. They are similar to the Roman and Punic divergence cultures, but with a spicy twist: Some cultures, like Magna Graecian and Massalian, already exist in I:R, and so those cultures will convert 1:1 as the divergence cultures, rather then converting as Greek. If they cease to exist in I:R, they can be reformed after converting through natural divergence.

Here's the full list:

Magna Graecian (Greek in Italy)
Massalian (Greek in France and Britain)
Cyrenaican (Greek in North Africa and Cyrenaica)
Indo-Greek (Greek in India)
Empurian (Greek in Iberia)
Histrian (Greek in Poland)
Bactrian (Greek in Bactria and Central Asia)
Ptolemaic (Greek in Egypt)
Leucaethiopian (Greek in East Africa)
Pulian (Greek in Germany and Scandinavia)
Seleucian (Greek in Persia and Mesopotamia)
Tylosi (Greek in Arabia)

1659435322546.png


As can be seen in that screenshot, because this update has taken so long to make, I've decided to add bonus divergence cultures! Some of these were taken from the EU4 to Vic2 converter.

They are:

Lässin (Roman in Germany and Scandinavia)
Indo-Roman (Roman in India)
Bazramani (Roman in Persia)
Galatian (Gallic, Noric, or Lepontic in the Middle East)
Nilan (Roman in East Africa)
Antonian (Roman in Egypt)
Azdi (Roman in Arabia)
Montanan (Roman in the Southern Caucuses)
Olbian (Roman in Eastern Ukraine and the Northern Caucuses)
Chadian (Roman in West and Central Africa)
Rhogian (Roman in Poland)

1659443725671.png

(Indo-Roman names are certainly glorious)

Localization from I:R mods is now dynamically copied and support has been added for the newly-released Sunset Invasion mod for I:R and the original Mesoamerican Hibernia mod:

1659436626647.png


1659436646125.png
1659436683914.png



Massive changes have been made from the first public release 0.1 Assyrian almost a year ago, and so it is time for a new version of the converter: 0.2 Belgae, A Cultured Update. Given all of the culture changes, I figured that "A Cultured Update" was the perfect description.

1659436966067.png


A full list of patch notes will be posted in the release thread shortly.
 
Last edited:
  • 5Like
  • 3Love
Reactions:
Will Sunset Invasion from CK2 still fire?
It should, but I don't have the DLC, so I can't check it in-game. If it doesn't fire, let me know and I'll see if I can fix it
 
Does the converter currently take into account pops and buildings in Imperator when converting to CKII holdings?
It doesn't take into account I:R buildings, but it does take into account I:R pops. The pops of the I:R territories that comprise a single CKII province are added together, and depending on how many pops there are, holding slots and holdings will be created.

All CK II provinces have at least 1 holding and 1 holding slot, regardless of pop total, and the pop thresholds for adding holding slots are 15, 40, 60, 85, 100, 300, and 500. The pop thresholds for adding new holdings are 30, 80, 120, 170, 600, and 1,000. A combined CKII province with 150 pops, for example, would have 5 total slots for holdings and 4 built holdings. I think that the formula needs to be readjusted, since it tends to leave few open holding slots for constructing new buildings.

Government forms in CKII depend upon the capital holding, so monarchies will have the first holding in all of their territories be a castle, followed by a city, a church, and any additional buildings shall be cities. Republics use the reverse, where the first holding shall be a city, followed by a castle, church, and remaining buildings shall be castles. Tribes will have all holdings convert as tribal holdings
 
  • 1Like
  • 1
Reactions:
It doesn't take into account I:R buildings, but it does take into account I:R pops. The pops of the I:R territories that comprise a single CKII province are added together, and depending on how many pops there are, holding slots and holdings will be created.

All CK II provinces have at least 1 holding and 1 holding slot, regardless of pop total, and the pop thresholds for adding holding slots are 15, 40, 60, 85, 100, 300, and 500. The pop thresholds for adding new holdings are 30, 80, 120, 170, 600, and 1,000. A combined CKII province with 150 pops, for example, would have 5 total slots for holdings and 4 built holdings. I think that the formula needs to be readjusted, since it tends to leave few open holding slots for constructing new buildings.

Government forms in CKII depend upon the capital holding, so monarchies will have the first holding in all of their territories be a castle, followed by a city, a church, and any additional buildings shall be cities. Republics use the reverse, where the first holding shall be a city, followed by a castle, church, and remaining buildings shall be castles. Tribes will have all holdings convert as tribal holdings
How would I tweak the formula? Poked around but couldn't see anything immediately obvious
 
How would I tweak the formula? Poked around but couldn't see anything immediately obvious
It's something that needs to be changed in the source code, currently in the provinceCreation method in output.java. Once edited using a Java IDE like Eclipse, the source code can then be recompiled with the new formula. Currently the source code is available on the project's main page on GitHub, currently in ImperatorToCk2/ImperatorToCk2/src/main/java/ImperatorToCK2/

What changes to the formula did you have in mind?
 
Last edited:
It's something that needs to be changed in the source code, currently in the provinceCreation method in output.java. Once edited using a Java IDE like Eclipse, the source code can then be recompiled with the new formula. Currently the source code is available on the project's main page on GitHub, currently in ImperatorToCk2/ImperatorToCk2/src/main/java/ImperatorToCK2/

What changes to the formula did you have in mind?
I was honestly just going to fiddle with the formula and see how various trial saves came through - I'm planning on using CK2 to cover approx 300-900AD in my megacampaign via bashing it together with WTWSMS, so was initially going to try keeping holding slots the same but tripling or quadrupling the thresholds for prebuilt holdings.

Java's beyond my skillset, but I have been making some tweaks to the converted cultures and making cultural buildings/retinues. Some are somewhat save-specific (moved Wusun to a 'West Sinic' group after they migrated to Poland), but most are just for common converter cultures - Punic, continental celtic, etc. Will upload those once I've gone through the cultures.
 
  • 1Like
Reactions: