• 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.

CK2 Dev Diary #49: Mods and mod telemetry

Good evening, everyone. I’m Magne “Meneth” Skjæran, one of the programmers on CK2. In the past I’ve written dev diaries about modding, optimization, and quality of life improvements, and I'm writing this somewhat belated (due to technical issues) dev diary.

Today, I return to the topic of modding, and how we work to make life easier for modders. As a former modder, this is a topic I care quite a lot about.

If you’re anything like me, what you really want is statistics. How many people use mods, and which mods are the most popular. Luckily I come armed with exactly that.

As you might know, whenever you play CK2, the game collects some pieces of information about your setup. Things like what version of the game you’re playing, if you’re playing single player or multiplayer, what mods you’re using, and similar. This is all aggregated so that we can see overall trends and consider what areas might need some extra attention.

For mods, the main thing the telemetry provides is how many people use mods overall, and what mods these people use. My data will all be from users who played yesterday; anyone who during yesterday started the game with one or more mods is counted exactly once as a “mod user”, and counted once for each mod they used.

All told, 42% of everyone who played the game yesterday was using at least one mod. This could be anything from a small UI tweak, to a total conversion mod.
On average, anyone using a mod was using 4.24 mods. Once you start using mods, most people are not content with just one.
Further, here’s the 20 most popular mods, and how many percent of mod users (not overall users; multiply by 42% to get that number) that use them:
  1. A Game of Thrones - 45.4%
  2. Ruler Designer Unlocked - 30.2%
  3. Your Personal Castle - 24.9%
  4. Sketchy Cheat Menu - 18.1%
  5. CK2 Russian Localisation - 13.7%
  6. Historical Immersion Project - 11.3%
  7. A Sensible New Family - 10.7%
  8. CK2Plus - 10.6%
  9. Bigger Interface - 9.0%
  10. Purchase Claims - 8.8%
  11. Patrum Scuta - 8.6%
  12. Unique Buildings - 8.4%
  13. Novus Graphicus - 8.3%
  14. A Revolutionary Borders Mod - 8.0%
  15. Shattered World - 7.5%
  16. Korean SingleByte Patch - 7.2%
  17. CK2Plus - India - 7.1%
  18. Damascus Steel + Ancient Swords - 6.5%
  19. Better Looking Garbs - 6.3%
  20. Abdication - 6.2%
Combined, these 20 mods represent 60% of all mod usage. Since people who use mods on average use more than just one, it also adds up to more than 100% of mod users.

That AGoT comes first is unlikely to be a surprise to anyone; it has long been the most popular CK2 mod. Fun fact: AGoT is so popular, that its most popular start date is the 4th most popular overall startdate, after 769, 1066, and 867.

What is more interesting is that in the top 5 mods, two are “cheat” mods. Since they can’t be used in multiplayer unless everyone has them enabled, the idea of “cheating” doesn’t make all that much sense of course, and should instead be seen as achieving more of a sandbox experience than what the vanilla game provides.

Beyond that, there’s two localisation mods in the top 20; one for Russian language and one for Korean. The sheer amount of work that goes into translating an entire game is impressive, and it is great to see the modders’ work recognized to such an extent. Localisation modding is actually something we recently improved; in the 2.7 patch we moved custom localisation out of the “common” folder and into the “localisation” folder, meaning that it is now possible to use the custom localisation system without changing the checksum. This is especially important for languages with more complex grammar than English, such as the gender rules in French. The official French translation has for a while made use of custom localisation to change a number of words based on whether they’re referring to men or women, but doing similar in a mod would mean changing the checksum, making it impossible for the mod’s users to obtain achievements and play multiplayer with people not using the mod. This is something I know the Russian localisation mod has had problems with, and is a change I hope will lead to even better localisation mods.

There’s also a number of graphics and interface mods, plus several other mods that change the graphics or UI as a part of a larger package (E.G., the optional revamped interface in the Historical Immersion Project). People have done a lot of interesting things with the UI, but I know from experience it can often be somewhat tedious work. In the hopes of making it a bit less tedious, we’re making a console command that’s before only worked in the debug version of the game (which is not publicly available) available to everyone in a future patch (not 2.7.1). This console command is simply called “guibounds”, and what it does is that whenever you hover over a UI element, the area it covers is highlighted, and the name of the element, its size, and the file and line it is defined on is shown. This functionality is actually available in the release version of the game right now in a somewhat obscure fashion: if you try to open the console while on the main menu, it’ll be enabled. However, once you get into the campaign there’s no way to actually disable it since the console command isn’t available.
Below is an image showing what the guibounds functionality does:
6va1zOmzsv2jlOkOICKd7p9r7PW1RH9fZRdLCMjbqG6EB8RmfYNdUKvfsWDbyxO6EaNeFQwXjFgJ9M7cwiAp1hZ84Zkrn_ts2K2mo9KTDPU9r0pNeJcjtWVl43NE9nHutqggErii


There’s also a few large mods beyond AGoT in the top 20. CK2Plus even manages to take two spots on the list by including a mod that toggles the existence of India, while being pretty much tied with the Historical Immersion Project; some days HIP leads, other days CK2+ does.
The rest of the mods are smaller, adding small pieces of focused functionality.
Both types of mods we’re always trying to help by making the game more moddable. One changelog entry I think a lot of modders will find useful is this, which will be included in 2.8:
- Most effects and triggers that take a number can now take a variable name instead, and will grab the variable from the current scope. E.G., "wealth = test_variable"
This should allow mods to do far more interesting things with variables than is currently possible.

As a final note, modding is something we on the CK2 team take very seriously. Mods have the ability to add a lot of interesting alternative ways to play the game, and therefore helps keep the game fresh even for veteran users. In general, improvements to moddability also opens up new possibilities for our content designers, or can save them time by making their work simpler.
We’re therefore constantly considering how we can ensure new additions to the game are moddable, and we often go back and tweak existing functionality to open it further to modding.
We would love to hear your thoughts on what we could do better in this regard.
 
@Meneth ,

Will it be possible for you all to integrate the moddability of all versions of Mercenaries and expand their modability?

Also, how about expanding and integrating the moddability of retinues so as to allow easy assignment of multiple cultural retinue and other types of retinues?

Defining their size and even their cost?
I'm not sure what you mean by "integrate" in this context?

Retinue size and composition is pretty simple isn't it? Not sure what you're asking for here.

One thing I would like to request as modder: allow dependent submods to overwrite single events in the main mod instead of whole files. This would make development and maintaining a lot simpler.
That's an interesting idea.
 
I'm not sure what you mean by "integrate" in this context?

Retinue size and composition is pretty simple isn't it? Not sure what you're asking for here.

Earlier Default Retinues, Newer Retinue Types, and Cultural Retinues are spread between different files.

Unit stats and special unit stats are split between defines and a separate file.

This is what I am talking about.

All unit stats should be together in one file.

All retinue types, sizes, and the like should all be together.
 
Thanks @Meneth ,very interesting dev diary.

I personally use ironman&achievement compatible mods only, like BiggerInterface,German Localization Improvement and Century Gothic Font for Tooltip & Interface.

In my first modding experience I ran into a file-structure issue:

In german language the army strengh in the faction tab is cut off, so one can't see it's current strengh.
The German Localization Improvement (GLI) fixed this by using two textlines laying over the factions banner.
Cause of the alphabetic prioritization Bigger Interface removed this fix made by GLI.
So I tried to make my first own mod, called: A compatible Mod

I used the fix made by GLI as template and increased the size of the plot banner dds in the factions tab, so two text lines are shown properly at it.
I then repositioned all texts and icons in interface/domestic_factions.gui.
But the backers of a faction and their icons are located in another gui file, in interface/domestic_plots.gui.
So I have to stop here, cause I don't want to mod half of the intrigue tab :/

mod restrictions 2.jpg


I think its to late for CK2, but for a CK3 I would really like the possibility
that a dds (icon,frame,button,box,portrait etc.) could have different positions in different tabs.
 
I've seen most of those on the steam workshop I just figured a lot of them were horribly outdated.

Also I would have assumed the miscellaneous mods would by far outnumber the big named well known ones. I guess I have vastly overestimated the people who tweak the game themselves.
 
Last edited:
Earlier Default Retinues, Newer Retinue Types, and Cultural Retinues are spread between different files.

All retinue types, sizes, and the like should all be together.
Aren't all retinue types in 00_retinue_subunits.txt?

Thanks @Meneth ,very interesting dev diary.

I personally use ironman&achievement compatible mods only, like BiggerInterface,German Localization Improvement and Century Gothic Font for Tooltip & Interface.

In my first modding experience I ran into a file-structure issue:

In german language the army strengh in the faction tab is cut off, so one can't see it's current strengh.
The German Localization Improvement (GLI) fixed this by using two textlines laying over the factions banner.
Cause of the alphabetic prioritization Bigger Interface removed this fix made by GLI.
So I tried to make my first own mod, called: A compatible Mod

I used the fix made by GLI as template and increased the size of the plot banner dds in the factions tab, so two text lines are shown properly at it.
I then repositioned all texts and icons in interface/domestic_factions.gui.
But the backers of a faction and their icons are located in another gui file, in interface/domestic_plots.gui.
So I have to stop here, cause I don't want to mod half of the intrigue tab :/

View attachment 260169

I think its to late for CK2, but for a CK3 I would really like the possibility
that a dds (icon,frame,button,box,portrait etc.) could have different positions in different tabs.
The box the backers are in is defined in domestic_factions.gui. Can't you simply move/resize it? It's at the bottom of the file, and is named "backer_box".
 
You made my evening/night :D
Just move a whole box, very smart, too smart for me I suppose :rolleyes:
Glad to hear that's likely to work :)

In general, virtually all cases where some GUI element is from a different file it is a case of being contained in a list box. It does mean you can't edit the GUI element itself without it being changed everywhere it is used, but the box itself is pretty much always editable.
 
Glad to hear that's likely to work :)

In general, virtually all cases where some GUI element is from a different file it is a case of being contained in a list box. It does mean you can't edit the GUI element itself without it being changed everywhere it is used, but the box itself is pretty much always editable.
I used the debug mode, so it shows me the backers of a faction are located in domestic_plots.gui and not in domestic_factions.gui.
So I didn't realize the backers are contained in their own box. That's really nice, thanks a lot,Meneth.
And now excuse me,Sir , I have to work ;)
 
I find it hard to believe, that no "font" mods are in that list.
Or is it maybe, because there are so many differet font mods, that none gathers enough single users to appear in that statistic?
Well, at least for me I can't play CK2 without a mod, that makes the font bigger. I really don't like the small and blurry vanilla text, I literally get headaches from playing with those :/
 
I used the debug mode, so it shows me the backers of a faction are located in domestic_plots.gui and not in domestic_factions.gui.
So I didn't realize the backers are contained in their own box.
Yeah, the box itself pretty much never shows up in guibounds. Not 100% sure why; might be because it can't be directly interacted with.
 
They aren't on Steam and they aren't here, but I'm kinda morbidly curious how many play those CK2 "porn" mod(s? Is there more than one? Probably...). Not that map painting isn't already quite sexy, of course.
 
On average, anyone using a mod was using 4.24 mods
That could be closer to 6 as some people (including myself) manually merge mods to avoid compatibility issues. I generally merge 6-20 mods into one folder, and launch from one of them. So i use 10-12 on average even if it registers as 1 in your statistics. The real magic is to figure out how many users does this (not that it is really important).
 

While we're talking about modding improvements, is there any chance of CK2 getting an update in terms of Steam Workshop? Stellaris and HOI have a few neat features, such as displaying mod compatibility with updates.

On that note, any chance we could get the file size cap for mods raised? I know more recent games, mods can be much larger, but CK2 is capped at 50mb. Raising it means some mods, like the aforementioned After The End, could actually be hosted there and be seen. Currently, I think there's only two total conversion mods on Steam due to those size constraints.
 
That could be closer to 6 as some people (including myself) manually merge mods to avoid compatibility issues. I generally merge 6-20 mods into one folder, and launch from one of them. So i use 10-12 on average even if it registers as 1 in your statistics. The real magic is to figure out how many users does this (not that it is really important).
Chances are that the impact on the overall number is very low, as I doubt especially many people do this. They'd all be somewhere in the "other" category I suppose, which is 40% of mod use.
 
What will next dev diary be about?
 
So, I will ask this because I saw it get asked and then subsiquently buried probably. Is there anything one of the mods listed does that Paradox would want to include in later DLC? Or bar that in CK3?