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

Crusader Kings III Dev Diary #55 - Modding Improvements

Good afternoon, all

I’m here today with a short dev diary on some upcoming improvements to moddability. We’re not quite ready yet to make any announcements about upcoming features and so on, but we thought you might be interested in hearing about some modding improvements we've been working on.

In an upcoming patch which I will from now on call 1.3.X (due to the exact version number being unknown at this time), we’ve spent a bit of time on making the game more moddable based on requests we’ve had from the modding community. In particular we would like to thank the Modding Co-op for coming up with a curated list of requested functionality. The curation of this list made it easy for us to get a good overview of what functionality the community would like, and limited to those requests that’d benefit a lot of modders rather than just a handful. As the amount of time we could spend on modding improvements this time around was rather limited, having an already curated list to pick from was great.
From that list we picked some of the simpler requests; things that’d require relatively minimal code and would only affect mods. We will likely implement more from this list in the future, though our list for 1.3.X is unlikely to expand.

In addition to implementing some functionality based on these requests, we’ve also had some conversations with modders, and looked at some common pain points. We can’t address most of them right now, but one we noticed is that a number of mods use the DummyMale and DummyFemale characters for a lot of things they weren’t meant for. This was a result of lacking functionality, which we have now introduced in 1.3.X.
With the need for this dummy-character removed, we will be deprecating it. That means that it’ll continue to work 1.3.X which introduces the replacement functionality, but that they will be largely removed in 1.4 to ensure that script and code are more maintainable in the long-term.

Another bit of functionality that we think modders will be interested in is that of same-sex concubinage. Proper support for
it will come alongside other modding improvements in 1.3.X. Before 1.3 the gender restrictions for concubinage were possible to work around (but could cause bugs), which is no longer possible in 1.3. In 1.3.X we support it more fully, eliminating odd edge-case bugs and the like.
Further, we plan to support same-sex marriage for mods in 1.4. Due to larger technical risks surrounding it, it was not feasible to include that in 1.3.X; we need more time to test it to ensure that this support does not introduce bugs in the vanilla game. We're really looking forward to being able to support more diverse experiences with this mod support.

Mods add so much to the experience of our games, and moddability has been something we’ve considered throughout CK3’s development. As a former CK2 modder myself, it’s great to see all the things the modding community is producing.

Finally, here’s all the modding improvements we plan to release in 1.3.X:
- User Modding: Add CloseGameView data function so mods can close specific in game views.
- User Modding: Add GetTraitFromGroup and GetTraitGroupLevel data functions on Character.
- User modding: make_concubine now supports same-sex concubinage
- User Modding: Add GetTraitGroup( 'tag' ) and Trait.GetGroup data functions to get trait groups.
- User Modding: Add HasTrait and HasTraitFromGroup data functions to Character.
- User modding: Added data functions GetTraitsWithFlag and GetTraitsWithoutFlag
- User modding: Added datamodel GetTraits on TraitGroup
- User modding: Added effect deactivate_holy_site
- User modding: Added effect remove_dynasty_perk
- User modding: Added effect remove_innovation = innovation_key
- User modding: Added effect set_army_location
- User modding: Added effects clear_traits and copy_traits
- User modding: Added effects set_age and change_age
- User modding: Added list builder x_culture_global
- User modding: Added trigger has_innovation_flag
- User modding: Added trigger perks_in_<lifestyle>, to query how many perks exist in a given lifestyle (rather than how many a specific character has)
- User modding: spawn_army will now only spawn levies if scripted to do so
- User modding: Add GetGlobalVariable and GetGlobalList data functions for getting data saved from script.
- User modding: Add MakeScopeValue, MakescopeFlag, and MakeScopeBool to create scope objects out of primitive types directly since they are not automatically creatable via the MakeScope member on complex types like Character.MakeScope.
- User modding: Add ScriptValue data function to scope objects which will evaluate a script value just with that scope object as root.
- User modding: Made the Localize data function allow the key it references to also call other data functions in it like SelectLocalization does.
- User modding: Add AddList data function for GuiScope, it is to add_to_list what AddScope is to save_scope_as.

That’s all for today! I’m excited to see what the modding community will do with these added pieces of functionality.
 
  • 92Like
  • 29
  • 25
  • 9
  • 6Love
  • 1Haha
Reactions:
Great to see modding same sex concubines and even marriage in is being made possible, thanks !

On the same note, if a religion has full acceptance of same sex relations (which is very rare is base religions) wouldn't it make some sense to allow same sex concubines as well (if the religion also allow concubines / consorts) ? Not marriage or primary spouses that would break the AI but as concubines ?
 
  • 10
  • 2
Reactions:
I'm not a modder, but these look like good changes. I'm also glad that Paradox cleared up the same-sex marriage modding controversy by re-enabling it and explaining why it was disabled in the first place (because of bugs). This is something quite a few modders asked for AFAIK, and also quashes the rumors that Paradox made the original change due to pressure from homophobic trolls.

As for new content, I tend to agree with the view that they're probably saving any big announcements for PDX Con. I have a feeling that there we'll get word of a major expansion then.
 
  • 4
  • 1Like
Reactions:
It is good to see the same sex modding options coming in future updates.

I will still like to ask that these options be added to the base game as a religious tenet that could be selected when you reform your faith or create a new one (as others have pointed out some of the options available when you reform your faith can lead to highly ahistorical outcomes anyway). I am aware that same sex marriage would, under the game rules, lead to a game over so perhaps same sex marriage would only be allowable with concubinage/polygamy?

Still, glad to see the options so far.
It's possible we'll do something like that in the future, but for 1.3.X we don't have the time and resources to do so.

What about sex_gender?
That's significantly more complicated than the modding support we're adding in 1.3.X, same-sex concubines included. It is probable we'll add support for set_gender at some point in the future, but it isn't something we can currently commit to.
 
  • 21
  • 9Like
  • 2
Reactions:
A monarch is only in charge so long as people listen to them. Even the current faith reform system is already a little too 'easy', in my opinion (there should be a limit of changes you can make when reforming, imo, necessitating multiple reforms if you want to completely change everything around), and I think most, perhaps even all, of the current faith aspects have basis in at least one historical culture, which wouldn't be the case with same-sex marriage.

"My loyal subjects, we must eat the flesh of our mothers who we are married to!" "Yes, the king is wise, the king is wise!" "And two men can get married!" "KILL HIM! KILL THE HERETIC!"
 
  • 25Haha
  • 10Like
  • 1Love
  • 1
Reactions:
Thanks Meneth! I'm glad personally to know that this list has in fact helped you guys as well :), thanks as always!
 
  • 2Like
  • 1
Reactions:
"My loyal subjects, we must eat the flesh of our mothers who we are married to!" "Yes, the king is wise, the king is wise!" "And two men can get married!" "KILL HIM! KILL THE HERETIC!"
I don't think anyone believes the first is realistic, either, and it's part of why the modular religion system is pretty bad.
 
  • 10
  • 3
Reactions:
Can you please please please make hotkey modding work? By that I mean, changing the shortcuts.shortcuts file. It simply does not work at this moment. When adding a new shortcut to that file, copying that into a mod folder, it will simply not accept the changes. Nothing changes. Only when I directly write the changes into the actual shortcuts.shortcuts file in the game directory will it accept these changes.

Something is not working with the shortcuts file, when putting it into a mod directory. Pleeeeeease look into that. I don't want to cannibalize the screenshot hotkey for my console access mod anymore.
This is a known bug at least, but sadly I cannot say when it will be fixed as we fix bugs in priority order so it really depends on the amount of other bugs.
 
  • 15
  • 1Like
  • 1
Reactions:
I don't think anyone believes the first is realistic, either, and it's part of why the modular religion system is pretty bad.
Yet it is the system we have, so is it really plausible to object to one on the grounds of realism whilst the other is possible?

At some point the fact it is a game and games have to work in certain ways does come into play. Pure realism is impossible and probably not even desirable if we ultimately want to enjoy ourselves.
 
  • 19
  • 4Like
Reactions:
I'm not going to lie, I'm a little disappointed. This dev diary feels like something that could have been thrown together in less than 30 minutes, and yet it still needed to be delayed. It's good to see that modding is being made better, but it would have been nice to at least get a little hint of things that are coming in the future, or at least a rough roadmap for the next year or so. Still, I'm glad that there is another patch coming soon, although I hope it will have more than just modding stuff.
 
  • 13
  • 8
  • 1Like
Reactions:
While alt-history is an important aspect of Crusader Kings, I feel like same-sex marriage is a bit too ahistorical. After all, same-sex marriage wasn't legalized anywhere in the world until the year 2000 (even if there are occasional instances of same-sex unions, mostly from the 1970s onwards). That said, I would not be opposed to same-sex concubinage in the base game, as that would be a more 'official' relationship in a faith that is polyamorous and accepting of same-sex relationships.

And of course, I'm very glad to see same-sex marriage for modding as an option on the horizon, more modding options is always better! (and despite my argument above, I won't rule out that I may download a mod that implements it at some point in the future)
If same-sex marriage from your point of view more ahistorical than cannibalistic, feministic islamic cult with sacret lies, what is completly possible in game right now, then, well... :rolleyes:
 
  • 31
  • 3
  • 1Haha
Reactions:
Further, we plan to support same-sex marriage for mods in 1.4. Due to larger technical risks surrounding it, it was not feasible to include that in 1.3.X; we need more time to test it to ensure that this support does not introduce bugs in the vanilla game. We're really looking forward to being able to support more diverse experiences with this mod support.
Oh awesome! I never expected this feature, but it's really cool to see! Thank you so much for doing this!
 
  • 3Like
  • 1
Reactions:
If same-sex marriage from your point of view more ahistorical than cannibalistic, feministic islamic cult with sacret lies, what is completly possible in game right now, then, well... :rolleyes:
Hey! My custom warmongering, cannibal, female dominated, Buddhist faith is completely historical, learn some history!!!!!
 
  • 10Haha
Reactions:
I don't think anyone believes the first is realistic, either, and it's part of why the modular religion system is pretty bad.
Jesus let people have fun, the AI isn't going to create a religion like that, and if you don't want to you don't have to.
 
  • 25
  • 1
Reactions: