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

CK3 Dev Diary #87: Royal Modding

Hello everyone and welcome to the 87th CK3 Dev Diary!

I’m Matthew, one of the Programmers on the CK3 team, and today I am going to talk to you about a variety of improvements and changes we’ve done to modding for the 1.5 patch which will be accompanying the Royal Court Expansion.

We’ve added a variety of mod support in 1.5 so I’m not gonna cover everything, but I will give a few big ticket items that will let mods do a lot more fun custom things as well a few smaller fun ones. I’ve also attached the output of script_docs on 1.5 at the end so modders curious about the new triggers and effects in game can get a bit of a sneak peek for the release.

The Royal Court​

Of course the Royal Court itself is open to mods, it is all defined in the gfx/court_scene folder though the majority of the complex scene_settings itself is best built using the in-game editor that we are shipping with the court scene. It lets you position and change objects and switch between different settings much faster than trying to edit them all by hand.

Trust me, cause I remember the time whilst the editor was work in progress and doing changes by hand crushed my soul.
The in-game editor tool for the royal court 3d scene

I am not going to go into a huge amount of detail on the royal court modding because it is actually pretty straightforward with the editor, you position things and pick the assets you need for a configuration and then it just puts things there.

One aspect I will go into a bit more info on quickly is the character positioning, because the rest of the positioning is set within the editor but the characters are not positioned individually because of course not every court has the King of England to reference.

Instead the character positions are given a set of valid roles, and you pick a position where someone who has one of those roles may go. For example the two guards you see in the back are two positioned instances of the guard and knight role, which has a variety of rules of who it should pick.

If you have a bodyguard or champion court position appointed for example then it tries to use them as a special guard, but if you do not then it will fallback to picking any of your knights instead. You can also have some more special roles such as if you have a court jester or poet appointed then they can show up in your court too.
The script for the poet court scene role


Characters can not show up in multiple different roles and it is a “greedy” picking of first come first served in who is taken up, but you can write some fairly complex rules to decide who can go where as well as what animations they can choose from!

Same-Sex Marriage​

Coming with 1.5 is support for same-sex marriage, not only just in mods either but as a new game rule alongside the Same-Sex relations game rule so you can use it in un-modded games too. We've updated a variety of AI logic and interactions and content to take that into account when playing.
Same-sex marriage between the Duke of Brittany and his husband

Mods are of course able to implement this into their different worlds without it having to be a game rule, it can be based on different cultures or anything in the game world at all.

This is something that we’re very happy to be able to put into the game and have support in the game rules for unmodded games too, it is something that a lot of the team and community wanted and we are glad it is finally going to be shipped in 1.5.

Scripted Widgets​

CK3 is one of our most moddable games yet, not just in terms of the content that can be added but the system's mods can script. And our new UI system is the most open we’ve had in terms of what custom UIs mods can add and edit, but one issue it had was letting you add brand new things entirely and keeping compatibility nicely.

In 1.5 there is a new system called “scripted widgets”, what they allow for in essence is a mod to define their own brand new windows in the gui files and then add an entry into the gui/scripted_widgets folder with the name of their gui file and the main window.

For example:
gui/test_custom_widget.gui = my_first_cool_test_widget
gui/test_custom_widget.gui = my_second_cool_test_widget

Then with that simple line of script their window will appear in the game in the same way any of the windows we support in code do. Now of course there are some limitations, the windows do not have any special data context like a code one does but it can access anything that is set globally or on the local player character which covers more than enough cases normally.
A scripted widget making a new example window with a testing button

This may not sound hugely impactful, but it means that mods going forward can easily create large systems which can then more easily be compatible with other mods that add systems or if they feel brave enough even with larger Total Conversions if they do not cross over in incompatible design choices.

I am really excited to see the new UIs that mods end up making for their gameplay systems and getting to try a few different mods together. Hopefully their windows have a bit more functionality and effort put into it than my testing one…

Value Breakdowns​

Another bit of UI functionality that mods could not nicely mimic is getting breakdowns of their numbers in the same way we break down a value like your prestige income or how much piety it’s gonna cost to start that war in their own UI.
In 1.5 we’ve added the GetScriptValueBreakdown UI function which lets you specify the name of the script_value you want to break down and the scope context to do it on and it gives you the exact same data as if we’d natively done it from code.

For example in my custom widget I’ve made the button tooltip give a breakdown of the cost if I were to increase my crown authority entirely separate from the usually needed button to evaluate that cost in the realms UI.
Example of custom value break downs in custom UIs

We hope this will let mods better explain their own custom values in a more clear way, be that something like your mana in a fantasy mod or custom score for a special event chain.

Events and Localization​

To make life easier for our modders and designers to work with events we’ve added and reworked a few debug buttons in the event window.
Now every event has these five icons in the top right corner.
The 5 debug icons in the event window

In order they let you:
  • Regenerate the event contents, useful if you’ve changed something that cannot hot reload.
  • Toggle the data system globally, this makes most everything in square brackets show exactly what you typed instead of localizing to some output, this is available via the console commands too
  • Copy the event text to your clipboard
  • Shows you the trigger evaluation that had to be true for you to get this event
  • Debug info about the current scope context and how keys used to build the description
We’ve found that having easy access to these makes it a lot simpler to debug events and iterate on content.

Though do be warned that toggling off the data system can give you some truly cursed looking windows since now instead of seeing the number 4 you see the joyous underlying constructs such as this monstrosity of a window:
The character window with the localization data system disabled showing the raw function calls

In a more mechanical improvement we’ve also added a boilerplate reduction for having events on a cooldown, instead of needing to manually check and juggle flags and variables yourself you can now specify a cooldown on the event in days/weeks/months/years as some value and it will automatically handle applying a flag that will clear after that time blocking the event from being fired on a character.

Console Commands​

We have added a variety of new console commands in 1.5 to help make creating and testing mods a bit easier, and instead of explaining them myself I am just gonna cheat and rip their change log entries out!
  • Added console command "bypass_requirements" (alias "bypass") that lets you do decisions, interactions, schemes, laws, and title creation despite the requirements not being met
  • Added console command "instasiege"
  • Added console command "save_every" and startup parameter "-save_every=x". These will make a save every x years, and ensure they do not get overwritten by normal autosaves
  • Added console command AI.try_send_decision
  • Added console command AI.try_send_interaction
  • Added console command Ironman.ToggleIgnore. When ignored, saves will act as if they're not ironman, including that when you hit save it'll result in a non-ironman save. This can be toggled during gameplay
  • Added console command ToggleShowAllKillers
  • Added console command complete_schemes, guaranteed_scheme_success/failure, and guaranteed_scheme_secrecy_success/failure. The success/secrecy ones only affect the player
  • Added console command set_date
  • Added console command show_regions_in_tooltip
  • Added console command toggle_keys_on_map
  • Added console commands "yesmen_instant" (AKA "ymi") and "instant_responses". The yesmen button in the console can now be right-clicked to run "yesmen_instant"
The bypass and save_every commands have been especially helpful in setting up scenarios to test scripts and make sure it works exactly as you had intended in your mods. As are the forcing the AI to try out an interaction instead of waiting for them to do it of their own free will.

Modifiers Everywhere​

In 1.5 we’ve made some improvements to modifiers so if you use an invalid modifier type somewhere it will error and let you know its not going to work.

Which has been very useful as in 1.5 we’ve greatly expanded upon modifier support in buildings, now buildings can not only apply modifiers to you in general but they can also apply specific modifiers based on culture parameters which are applied by traditions. These can be used in the modifiers affecting the character, province, county and duchy_capital_county modifiers.

In addition there is a province_terrain_modifier which can apply a modifier based optionally on: terrain type, being coastal, being by a river, and by culture parameter. So traditions can really matter in your mods and let cultures play in vastly different ways.
The script for various culture tradition based modifiers on buildings

Clock’s a ticking​

Release day is coming soon and we’re very excited to see what mods are going to do with Royal Court, especially with the court scene itself which we hope in the future to see some fantastic 3D scenes especially from fantasy mods.

I’m gonna get back to the last minute release period scramble, thank you for reading and I hope you’re looking forward to Royal Court’s release and the great mods we’re gonna be able to see in the future too!
 

Attachments

  • effects.log
    288,5 KB · Views: 0
  • event_scopes.log
    302 bytes · Views: 0
  • event_targets.log
    22,2 KB · Views: 0
  • modifiers.log
    58,9 KB · Views: 0
  • on_actions.log
    35,7 KB · Views: 0
  • triggers.log
    195,8 KB · Views: 0
  • 104Like
  • 60Love
  • 27
  • 5Haha
  • 5
  • 1
Reactions:

MoeinSS

TaeWang
104 Badges
Feb 9, 2016
94
199
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Green Cities
  • Victoria: Revolutions
  • Rome Gold
  • Sengoku
  • Stellaris: Digital Anniversary Edition
  • Victoria 2
  • Rome: Vae Victis
  • Stellaris: Leviathans Story Pack
  • Age of Wonders
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III Complete
  • Arsenal of Democracy
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings Complete
  • For The Glory
  • Hearts of Iron III
  • Europa Universalis III Complete
  • The Kings Crusade
  • Crusader Kings II: Jade Dragon
  • Majesty 2
Can you allow us to actually change the names of titles for clan rulers? As of now, it only shows dynasty names on the map and even if you manually change the title name, nothing happens. For example, when i change the "Arabian Empire" in 867 to "Abbasid Caliphate", it still shows "Abbasid", no matter what. I know you can do this by changing the dynasty name, but i think being able to change the actual title name fits better.
 
Last edited:
  • 1Like
Reactions:

Grand Admiral Edward

Colonel
17 Badges
Sep 5, 2020
810
610
  • Crusader Kings II: Sword of Islam
  • Crusader Kings III
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Will it be possible to add rooms like a Throne Room through mods? For example, a dungeon or an observatory
If that's the case, where does the Throne Room end and it becomes a castle (and so what's the point of the throne room, instead of a barony)? Another problem would be the modelling...
But I do sort of like that idea. Maybe it would open up some Merchant Republic ideas, which btw, I never bought Paradox's excuse on they "didn't like the succession" argument. If they didn't like elective successions, why is does Scandinavian or Princely Elective exist?
 

pengoyo

Penguin
71 Badges
Dec 9, 2015
1.337
4.019
  • Crusader Kings III
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines
  • Imperator: Rome Deluxe Edition
  • Magicka 2
  • Cities in Motion 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
Same sex marriages sound like a surefire way for AI dynasty to go extinct even more and create chaos.
I could also see it create larger realms as partitioned lands are reconsolidated by some of the siblings engaging in same-sex marriages. Really depends on how the AI has been programed to consider these marriages.
 
  • 3
  • 2Like
  • 1
Reactions:

Anarcomu

First Lieutenant
18 Badges
Feb 26, 2019
200
127
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
Same sex marriages sound like a surefire way for AI dynasty to go extinct even more and create chaos.
I personnaly would like the AI to only use it under conditions : already having two or more heirs, or not possessing nor inheriting titles. Just with that, I think it would be ok. Maybe for polygamous or concubinage, you could allow it as long as you have at least one fertile marriage/concubine, or at the very least you would have room to allow one (fertile).
 
  • 1
Reactions:

Lineana

Private
61 Badges
May 3, 2006
19
24
  • Hearts of Iron IV: Field Marshal
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Victoria 2: A House Divided
  • Crusader Kings II: Reapers Due
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Battle for Bosporus
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV
  • For the Motherland
  • Hearts of Iron III
  • Crusader Kings II
  • Impire
  • Leviathan: Warships
  • Rome Gold
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Supreme Ruler: Cold War
  • The Showdown Effect
This is really awesome, simply perfectly done.
1.5 and Royal Court is an update that offers an incredible evolution of the game. Cant wait to play it, will be long multiplayer sessions.

My custom mod set already has a witch ritual as a mean of gaining children without a suitable partner.
But will adoption be coming with 1.5?
 
  • 2Like
Reactions:

Sirsquier

Recruit
6 Badges
Sep 2, 2020
2
1
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
Just wondering, if Same-sex Marriage is set too off, that means only by a mod it can be enabled correct? Because it'd be very immersion breaking for games which one wants to have realism in.
 
  • 9
Reactions:

pengoyo

Penguin
71 Badges
Dec 9, 2015
1.337
4.019
  • Crusader Kings III
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines
  • Imperator: Rome Deluxe Edition
  • Magicka 2
  • Cities in Motion 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
Just wondering, if Same-sex Marriage is set too off, that means only by a mod it can be enabled correct? Because it'd be very immersion breaking for games which one wants to have realism in.
It's definitely a game rule, not a mod, that now determines if same-sex marriages are possible in a play through. But I assume it works how the gender equality, same-sex acceptance, and sexuality distribution game rules already do in game; where there are set to the historical values by default. So they are opt-in game rules for those who want them.
 
  • 4
Reactions:

condorcet01

Private
90 Badges
Jul 25, 2014
13
55
  • Rome: Vae Victis
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Arsenal of Democracy
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Knights of Honor
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: Field Marshal
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II: Sunset Invasion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Third Rome
  • Europa Universalis III Complete
  • Europa Universalis III: Collection
  • Hearts of Iron IV Sign-up
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Victoria 3 Sign Up
  • Europa Universalis III Complete
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Conclave
All this looks amazing. I was wondering, is it possible for the team to add a page to the ledger that lists the accumulated renown for each dynasty in the game (ideally along with other information about each dynasty, like number of living members, etc)
 
  • 2
  • 1Like
Reactions:

pengoyo

Penguin
71 Badges
Dec 9, 2015
1.337
4.019
  • Crusader Kings III
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines
  • Imperator: Rome Deluxe Edition
  • Magicka 2
  • Cities in Motion 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
Now every event has these five icons in the top right corner.
View attachment 798176
In order they let you:
  • Regenerate the event contents, useful if you’ve changed something that cannot hot reload.
  • Toggle the data system globally, this makes most everything in square brackets show exactly what you typed instead of localizing to some output, this is available via the console commands too
  • Copy the event text to your clipboard
  • Shows you the trigger evaluation that had to be true for you to get this event
  • Debug info about the current scope context and how keys used to build the description
I am very happy to hear about this new functionality for debugging events. :D But is it possible to toggle these symbols on and off in debug mode? I like using debug to easily launch new events for screen shots of my mods. But would prefer not to have distracting symbols in the corner.
 
  • 1Like
Reactions:

xking

Second Lieutenant
21 Badges
Dec 5, 2011
130
424
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
  • Majesty 2 Collection
  • Stellaris: Nemesis
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • 500k Club
It's definitely implementable, I have done so in my mod, Celebrate Crimes (though I renamed the base game doctrine level of "accepted" to "allowed" and the more tolerant level above that I called "celebrated"). For mods, 1.5 will just allows same-sex marriage, rather than just same-sex concubines, to be implementable now however the modder chooses.

edit: clarity
I have your mod, It's pretty cool.
 
  • 1Love
  • 1
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
Paradox Staff
78 Badges
Aug 28, 2013
2.401
7.847
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
One other thing I'd like to see be moddable is dead characters coming back to life
Not likely to happen, once someone is dead we delete large amounts of data about them which putting back together would be rather complicated. And likely introduce bugs into the base game of unintended necromancy.
 
  • 21
  • 2Like
  • 1
Reactions:

† Kyrie †

Second Lieutenant
50 Badges
Dec 2, 2015
112
55
steamcommunity.com
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron III
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Cities: Skylines Industries
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Cities: Skylines - Parklife
  • Cities: Skylines - Campus
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Field Marshal
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV
Not likely to happen, once someone is dead we delete large amounts of data about them which putting back together would be rather complicated. And likely introduce bugs into the base game of unintended necromancy.

i will copy character and start new game . how can i do this easily ? I tried dna but it didn't work game crashed . and i'm going to change the DNA of a few of my favorite characters.
 
  • 1
Reactions:

Prometheus_1

General
71 Badges
Feb 9, 2015
2.288
823
www.deviantart.com
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Imperator: Rome
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome Sign Up
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Stellaris: Galaxy Edition
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris
  • Steel Division: Normandy 44
  • Cities: Skylines - Parklife
  • Pillars of Eternity
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Stellaris: Distant Stars
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
  • Victoria 3 Sign Up
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Stellaris: Synthetic Dawn
  • Battle for Bosporus
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: El Dorado
Hello everyone and welcome to the 87th CK3 Dev Diary!

I’m Matthew, one of the Programmers on the CK3 team, and today I am going to talk to you about a variety of improvements and changes we’ve done to modding for the 1.5 patch which will be accompanying the Royal Court Expansion.

We’ve added a variety of mod support in 1.5 so I’m not gonna cover everything, but I will give a few big ticket items that will let mods do a lot more fun custom things as well a few smaller fun ones. I’ve also attached the output of script_docs on 1.5 at the end so modders curious about the new triggers and effects in game can get a bit of a sneak peek for the release.

The Royal Court​

Of course the Royal Court itself is open to mods, it is all defined in the gfx/court_scene folder though the majority of the complex scene_settings itself is best built using the in-game editor that we are shipping with the court scene. It lets you position and change objects and switch between different settings much faster than trying to edit them all by hand.

Trust me, cause I remember the time whilst the editor was work in progress and doing changes by hand crushed my soul.
View attachment 798174
I am not going to go into a huge amount of detail on the royal court modding because it is actually pretty straightforward with the editor, you position things and pick the assets you need for a configuration and then it just puts things there.

One aspect I will go into a bit more info on quickly is the character positioning, because the rest of the positioning is set within the editor but the characters are not positioned individually because of course not every court has the King of England to reference.

Instead the character positions are given a set of valid roles, and you pick a position where someone who has one of those roles may go. For example the two guards you see in the back are two positioned instances of the guard and knight role, which has a variety of rules of who it should pick.

If you have a bodyguard or champion court position appointed for example then it tries to use them as a special guard, but if you do not then it will fallback to picking any of your knights instead. You can also have some more special roles such as if you have a court jester or poet appointed then they can show up in your court too.
View attachment 798189

Characters can not show up in multiple different roles and it is a “greedy” picking of first come first served in who is taken up, but you can write some fairly complex rules to decide who can go where as well as what animations they can choose from!

Same-Sex Marriage​

Coming with 1.5 is support for same-sex marriage, not only just in mods either but as a new game rule alongside the Same-Sex relations game rule so you can use it in un-modded games too. We've updated a variety of AI logic and interactions and content to take that into account when playing.
View attachment 798177
Mods are of course able to implement this into their different worlds without it having to be a game rule, it can be based on different cultures or anything in the game world at all.

This is something that we’re very happy to be able to put into the game and have support in the game rules for unmodded games too, it is something that a lot of the team and community wanted and we are glad it is finally going to be shipped in 1.5.

Scripted Widgets​

CK3 is one of our most moddable games yet, not just in terms of the content that can be added but the system's mods can script. And our new UI system is the most open we’ve had in terms of what custom UIs mods can add and edit, but one issue it had was letting you add brand new things entirely and keeping compatibility nicely.

In 1.5 there is a new system called “scripted widgets”, what they allow for in essence is a mod to define their own brand new windows in the gui files and then add an entry into the gui/scripted_widgets folder with the name of their gui file and the main window.

For example:
gui/test_custom_widget.gui = my_first_cool_test_widget
gui/test_custom_widget.gui = my_second_cool_test_widget

Then with that simple line of script their window will appear in the game in the same way any of the windows we support in code do. Now of course there are some limitations, the windows do not have any special data context like a code one does but it can access anything that is set globally or on the local player character which covers more than enough cases normally.
View attachment 798178
This may not sound hugely impactful, but it means that mods going forward can easily create large systems which can then more easily be compatible with other mods that add systems or if they feel brave enough even with larger Total Conversions if they do not cross over in incompatible design choices.

I am really excited to see the new UIs that mods end up making for their gameplay systems and getting to try a few different mods together. Hopefully their windows have a bit more functionality and effort put into it than my testing one…

Value Breakdowns​

Another bit of UI functionality that mods could not nicely mimic is getting breakdowns of their numbers in the same way we break down a value like your prestige income or how much piety it’s gonna cost to start that war in their own UI.
In 1.5 we’ve added the GetScriptValueBreakdown UI function which lets you specify the name of the script_value you want to break down and the scope context to do it on and it gives you the exact same data as if we’d natively done it from code.

For example in my custom widget I’ve made the button tooltip give a breakdown of the cost if I were to increase my crown authority entirely separate from the usually needed button to evaluate that cost in the realms UI.
View attachment 798179
We hope this will let mods better explain their own custom values in a more clear way, be that something like your mana in a fantasy mod or custom score for a special event chain.

Events and Localization​

To make life easier for our modders and designers to work with events we’ve added and reworked a few debug buttons in the event window.
Now every event has these five icons in the top right corner.
View attachment 798176
In order they let you:
  • Regenerate the event contents, useful if you’ve changed something that cannot hot reload.
  • Toggle the data system globally, this makes most everything in square brackets show exactly what you typed instead of localizing to some output, this is available via the console commands too
  • Copy the event text to your clipboard
  • Shows you the trigger evaluation that had to be true for you to get this event
  • Debug info about the current scope context and how keys used to build the description
We’ve found that having easy access to these makes it a lot simpler to debug events and iterate on content.

Though do be warned that toggling off the data system can give you some truly cursed looking windows since now instead of seeing the number 4 you see the joyous underlying constructs such as this monstrosity of a window:
View attachment 798175
In a more mechanical improvement we’ve also added a boilerplate reduction for having events on a cooldown, instead of needing to manually check and juggle flags and variables yourself you can now specify a cooldown on the event in days/weeks/months/years as some value and it will automatically handle applying a flag that will clear after that time blocking the event from being fired on a character.

Console Commands​

We have added a variety of new console commands in 1.5 to help make creating and testing mods a bit easier, and instead of explaining them myself I am just gonna cheat and rip their change log entries out!
  • Added console command "bypass_requirements" (alias "bypass") that lets you do decisions, interactions, schemes, laws, and title creation despite the requirements not being met
  • Added console command "instasiege"
  • Added console command "save_every" and startup parameter "-save_every=x". These will make a save every x years, and ensure they do not get overwritten by normal autosaves
  • Added console command AI.try_send_decision
  • Added console command AI.try_send_interaction
  • Added console command Ironman.ToggleIgnore. When ignored, saves will act as if they're not ironman, including that when you hit save it'll result in a non-ironman save. This can be toggled during gameplay
  • Added console command ToggleShowAllKillers
  • Added console command complete_schemes, guaranteed_scheme_success/failure, and guaranteed_scheme_secrecy_success/failure. The success/secrecy ones only affect the player
  • Added console command set_date
  • Added console command show_regions_in_tooltip
  • Added console command toggle_keys_on_map
  • Added console commands "yesmen_instant" (AKA "ymi") and "instant_responses". The yesmen button in the console can now be right-clicked to run "yesmen_instant"
The bypass and save_every commands have been especially helpful in setting up scenarios to test scripts and make sure it works exactly as you had intended in your mods. As are the forcing the AI to try out an interaction instead of waiting for them to do it of their own free will.

Modifiers Everywhere​

In 1.5 we’ve made some improvements to modifiers so if you use an invalid modifier type somewhere it will error and let you know its not going to work.

Which has been very useful as in 1.5 we’ve greatly expanded upon modifier support in buildings, now buildings can not only apply modifiers to you in general but they can also apply specific modifiers based on culture parameters which are applied by traditions. These can be used in the modifiers affecting the character, province, county and duchy_capital_county modifiers.

In addition there is a province_terrain_modifier which can apply a modifier based optionally on: terrain type, being coastal, being by a river, and by culture parameter. So traditions can really matter in your mods and let cultures play in vastly different ways.
View attachment 798190

Clock’s a ticking​

Release day is coming soon and we’re very excited to see what mods are going to do with Royal Court, especially with the court scene itself which we hope in the future to see some fantastic 3D scenes especially from fantasy mods.

I’m gonna get back to the last minute release period scramble, thank you for reading and I hope you’re looking forward to Royal Court’s release and the great mods we’re gonna be able to see in the future too!
Could you add please the ability to enable achievements also for localization mods ? Since Paradox doesn't want to translate into Italian or other important languages perhaps could be nice if you allowed localization mods to not invalidate the checksum.
 
  • 3
  • 1
Reactions: