• 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
  • 59Love
  • 27
  • 5Haha
  • 5
  • 1
Reactions:

Salazard260

First Lieutenant
55 Badges
Jun 9, 2013
285
1.365
  • Cities: Skylines - Mass Transit
  • Crusader Kings Complete
  • Surviving Mars: First Colony Edition
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Cities: Skylines Industries
  • Victoria 3 Sign Up
  • Surviving Mars: First Colony Edition
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings II
  • Crusader Kings III
  • Stellaris
  • Empire of Sin
  • Stellaris: Federations
  • Imperator: Rome
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Reapers Due
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • Victoria 2
  • Crusader Kings II: Sunset Invasion
  • 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
Gay mariages as a game rule is the best way of implementing it imo, doesn't affect those who don't want to play around with it, much easier to have it on in mp games (than if it was a mod).

Quick questions :

- will the AI do it or just players ?

- Does it work with all mariage types (monogamy, polygamy, consorts etc)

- How is it unlocked ?
 
Last edited:
  • 32
  • 8Like
  • 5
  • 1
Reactions:

LeSingeAffame

Loyal ally to Durcorach the Black Drake
73 Badges
Sep 16, 2012
3.600
2.390
  • Crusader Kings II
  • Europa Universalis IV
  • Victoria 3 Sign Up
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Conclave
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome Sign Up
  • Imperator: Rome - Magna Graecia
Hell yeah, modding changes!

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.
I suppose not as you'd otherwise have explicitely said it, but does it also apply to doctrine parameters?
 
  • 3Like
  • 1
Reactions:

Wagshadow

Recruit
23 Badges
Dec 7, 2018
2
4
  • Stellaris - Path to Destruction bundle
  • Crusader Kings III
  • Stellaris: Lithoids
  • PDXCon 2019 "Baron"
  • Prison Architect
  • Stellaris: Megacorp
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • BATTLETECH
  • Stellaris: Leviathans Story Pack
  • Tyranny: Archon Edition
  • Stellaris
  • Pillars of Eternity
  • Cities: Skylines
  • War of the Roses
  • The Showdown Effect
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Magicka
  • Knights of Pen and Paper +1 Edition
So just to confirm about same sex marriage - in vanilla, it can either be toggled on to be globally possible, or toggled off entirely, correct?
Meaning we'd need mods to implement something like culture or religion based acceptance of same sex marriage?

Super happy with these additions in general, release day can't come soon enough!
 
  • 4Like
Reactions:

Alien-47

Sergeant
Paradox Staff
140 Badges
Sep 6, 2010
76
682
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Cities: Skylines - Snowfall
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Steel Division: Normandy 44 Deluxe Edition
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Victoria 2: Heart of Darkness
  • Cities: Skylines - Green Cities
  • Europa Universalis III
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Age of Wonders III
  • Victoria: Revolutions
  • Sword of the Stars II
  • Tyranny - Tales from the Tiers
  • Cities in Motion
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Pillars of Eternity
  • Magicka 2
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
Glitterhoof says: 4808 errors and 31 FPS on a dev PC
Do we need to worry?

I see several questionable assumptions with this question. First, devs have different PC, not all of them super-powerful, some are just normal. Second, it's a court scene with lots of people on high graphics settings, so you can go faster just by tuning graphics down a bit. Third, 30 FPS for a graphically rich but not very dynamic scene in a strategy game on a machine that matches graphics settings with its hardware capabilities is considered acceptable.

In short - no, no need to worry
 
  • 37
  • 9Like
  • 4
Reactions:

BrotherJonathan

Petty King of Washington
48 Badges
Jun 15, 2015
709
1.002
  • Victoria 3 Sign Up
  • Battle for Bosporus
  • Surviving Mars
  • Crusader Kings III
  • Europa Universalis IV
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Way of Life
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Conclave
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Sword of Islam
  • Knights of Honor
  • Steel Division: Normandy 44
  • Steel Division: Normand 44 - Second Wave
  • Steel Division: Normandy 44 Deluxe Edition
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Dharma
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
Glad that there is going to be an editor tool specifrically for courts. CKIII might be the most modder-friendly Paradox title yet.
 
  • 2
Reactions:

Bobwoodword

First Lieutenant
52 Badges
Dec 30, 2013
217
647
  • 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
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Majesty 2 Collection
  • Shadowrun Returns
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Stellaris: Necroids
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings II: Conclave
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
The addition of same-sex marriage is a welcome one. It's something I doubt I will make use of but it's great to have that type of flexibility for the people that want it Choice should be king in a sandbox game. If you can bang your brother-husband, Michael should be able to marry Joe.
 
  • 20
  • 17
  • 6Like
  • 1Haha
Reactions:

crowdemon

Lt. General
47 Badges
May 13, 2013
1.270
1.088
  • Crusader Kings II: Charlemagne
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • 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: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings III
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Stellaris: Ancient Relics
  • Crusader Kings II: Conclave
  • Europa Universalis IV
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Cossacks
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Call to arms event
Good stuff, thanks for this week DD.
 
  • 2Like
  • 1
Reactions:

SauronGorthaur

Captain
On Probation
24 Badges
Jun 4, 2014
454
1.646
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Crusader Kings II
  • Cities: Skylines
  • Stellaris
  • Europa Universalis IV: Call to arms event
Speaking of modifiers and cultures playing in different ways (and the whole focus on culture in the DLC), will there finally be an opinion modifier for a culture group (heritage after the rework)? They were a thing in CK2 but so far in CK3 there are only opinion modifiers for individual cultures.
 
Last edited:
  • 2Like
  • 1
  • 1
Reactions:

JacobiteJames

Banned
Nov 11, 2021
533
642
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!
Can I have a promise that same sex modding being allowed by the script won't cause it to happen with the rule turned off. Like how in ck2 you could have same sex lovers marry via the event chain with coming across lovers whilst the gates were lowered, in vanilla
 
  • 1Like
  • 1
Reactions: