Crusader Kings 3 Dev Diary #30 - Event Scripting

Welcome, comrades, to another dev diary! Today, we’ll be taking a look at the structure of an event in CK3, how they’re assembled in script, and how they differ from CK2.

Anatomy of an Event
The core of a standard character event is almost certainly quite familiar to you already: we have a title, a description, typically a portrait, and one or more options along the bottom.

In script, however, we’ve changed a few things around, looking to improve functionality, readability, and general script hygiene over time. Here’s a comparison of the start of an event in CK2 vs. CK3:
001.png


The first change you’ll notice is that we’ve swapped the event type and the event ID: an event is now created by a namespace (still defined at the top of each file) and unique ID, and the type defined inside the event, rather than the inverse. This means that you can now still read event IDs after folding the events themselves!

002.png


Next, is that we’ve changed how triggered text works. In CK2, this was a really useful tool for ensuring that flavour was localised appropriately to the player’s situation, and let us make events very broadly applicable whilst still feeling unique. It could, however, get a bit cumbersome, since we had no method for triggered text to be easily mutually exclusive, occasionally leading to situations like this:
003.png


Not the worst in the world, but pretty chonky for what we actually want it to do.

In CK3, we can cut this down by using a first_valid block inside triggered text blocks (as in the first image shown), picking the first entry from a list which meets a set of criteria. This means that, instead of having to make sure triggered text blocks are always mutually exclusive according to a trigger (and one which tends to increase in complexity along with the number of triggered texts), we can just order our preferred text logically according to fairly simple triggers.

For instance, if I have a triggered text block where the copy is different for a French character, an Ashari character, and a character who’s over eighty years old, with a fallback for anyone who doesn’t fit into those categories, I’d script something like the following:
004.png


This will then automatically proceed down the list. A French character would see one thing, a non-French Ashari would see another thing, a non-French non-Ashari who’s over eighty would see a third thing, and everyone else would see a fourth. This makes it incredibly easy to add new context-sensitive copy to both event descriptions and titles.

A further minor point, but as triggered text is now also kept within the body of a superior block, it’s far easier to sort on the fly: no matter how much triggered text you have, it’s just one click to collapse the body in your file editor of choice, not a dozen or more. When minimising clicks, every little bit helps!

Event Themes & Backgrounds
A couple of notable absences in the CK3 format are the picture & border blocks.

Well, that’s with good reason! These have mostly been subsumed into the new event theming system, which you can see in the very first CK3 script example above.

Themes are what decide on the event icon displayed in the top-left, helping to group together broadly-thematic sets of events, and to let the player know what they can expect an event to relate to. They also give us a default appropriate image background (which, itself, sets the lighting used on the character portraits), which will change according to your situation, and different sets of ambient SFX.

Backgrounds and theme icons can be overridden as necessary via a manual line of script if we feel like we’ve got a more appropriate one to show, too, so although the system is set-up to reduce the amount of work that goes in to adding extra flavour to each event, we still have total control over what flavour we actually include should we want it.

Needless to say, event themes are fully scriptable: you can mod in whatever icon, default background, character model lighting, & ambient SFX you like, as well as create and adjust themes with ease.

Portraits & Animations
The good stuff! Portraits in the new system are, very surprisingly, somewhat more dynamic than in CK2, and any given event can have between 0 and 5 total portraits present. Of these, two are fully animated (positioned to the left and the right, respectively), and three are headshots lined up evenly along the bottom of the event. These can be used in any combination you like to get just the right look for an event.

005.png


The left and right portraits can use any of a fairly wide array of animations created for release. Headshots are not animated, instead allowing you to visualise ancillary characters mentioned in the event’s description.

On Actions for All!
All events come from somewhere, and, in CK2 (especially earlier in the title’s life cycle), this was often done through the Mean Time To Happen system, which let us define roughly how long an event would take to fire in (typically) months. Unfortunately, when balancing extremely large numbers of events against each other, the flexibility of this system becomes more of a disadvantage than anything else, making it difficult to govern how frequently an event should spawn without particularly stringent triggers. It also caused a lot of weird statistical anomalies due to working off of pure probabilities, and absolutely tanked performance.

Over CK2’s long life, we started to move more towards triggering events via on_actions, small hooks in code attached to features or regular pulses that activate events (and, if necessary, effects) whenever that hook is called. These take a bit more work to balance, but give us much more control over how and when events are called, as well as making tweaking such significantly easier, and are super fast performance-wise.

For CK3, we use entirely on_actions to fire events. There’s quite an array hooked up from code, allowing us to trigger events either when a specific action occurs in the world (e.g., when a character is born) or on a regular pulse (e.g., every five years). These can be set to go off every time that on_action fires, or placed in a weighted list of potential events that might fire (in which case, weight multipliers still apply and support the usual factors and such).

One major improvement over CK2’s on_actions (other than a more thorough, rationalised system of use, which I think is very exciting but I also appreciate that other people lead much more interesting lives than me and may have stricter standards) is the addition of scripted on_actions! These allow us (and, of course, you!) to create and hook up on_actions entirely in script that behave as regular on_actions, instead of always having to rely on the hard-coded on_actions. Scripted on_actions then behave exactly as coded on_actions, acting as a complex of weighted & unweighted events/effects, just called from somewhere in the accessible-script rather than the inaccessible-code.

For instance, say I’ve made a new set of events about reconciliation after a civil war, neighbours learning to live side by side with each other after fighting for opposite lieges, that type of thing, and I want to hook it up to happen whenever a civil war ends. All I have to do to set up that flow is add something like this to the relevant war end effects:
006.png


And then create a file including this in the appropriate directory:
007.png


Anywhere that you can script an effect, you can script a reference to a new (or existing scripted) on_action.

The Immediate Block & You
A major new addition to CK scripting, which we use with extreme regularity in the immediate block, is the scripted list!

These allow us to sort through various groups, pick out relevant characters matching a set of criteria, and then sort within the list of relevant characters only with ease.

For instance, let’s say I want to grab every ornery old man from amongst my vassals and courtiers, I’d write something vaguely thus:
008.png


And then, I want to pick out the two angriest and orneriest from amongst them so that I can have them get into an argument in an event or what have you:
009.png


Sorted! I can then refer to these two characters in my localisation, apply effects to them, make them portrait characters, etc., as needed. You may note our cool new alternative_limit functionality: these are limits which are checked if the limit immediately above them fails.

That said, we’re all about minimising unnecessary maintenance and nipping potential bugs before they exist, and this script should still be setting off alarm bells, what with calling two separate lists that use the same conditions, which are, themselves, part of a separate scripted trigger.

There are a few ways we could solve this, but let’s go for showing off some new functionality, with the ordered_in_list effect:
010.png


Ordered_in_list takes a list, and, using a system called script_maths (which we’ll hopefully have time to talk about another time), assigns numerical values to items in that list. It then applies any effects in its block as normal to, by default, the highest valued item in the list (though, as here, we can tell it to apply its effects to any number of items in the list). Here, we were sorting a relatively small amount of list items by a fairly limited set of factors, but this sorting functionality can be as complex and as extensive as you require.

In other immediate block-related news, we’ve also made it easier to save scopes (formerly event targets, which you can see a bit of in the above example), and variables, and customarily use this block to define musical stings for maximum drama. Standard immediate block functionality (being executed before the event is displayed) is unchanged, and visible effects executed in the Immediate will be shown under a “Has Happened” header in all event option tooltips.

Options: Giving the AI Personality & Stressing Out Players
Finally, options. Options behave similarly to CK2, with a minimum of one per visible event and each option requiring a text label, but otherwise allowing you to enter any and various effects you fancy.

011.png


The two main additions to this area that you’ll notice are a drastically expanded use of ai_chance, and, fairly commonly, stress_impact.

AI chance, as in CK2, governs the approximate chance that an NPC character will pick that option. In CK3, we’re making much more extensive use of this block, and of our exposed ai_value_modifiers (building a personality for each character based off how much/little of each value they have, in turn derived mostly from their traits) to ensure that characters act in accordance with their personality as much as possible by weighing almost all event options up or down based on appropriate ai_value_modifiers. The block still takes other triggers as well, so we can have the AI prefer an option more or less based on traits, if they’re at war, if the option relates to a rival, etc.

Stress_impact, meanwhilst, is how we organise the new stress mechanic, which you may remember from some diaries ago! Don’t stress (*ahem*) if you don’t: stress is, in a nutshell, a measure of negative effects that your character gains when performing actions that run contrary to their personality (e.g., a compassionate character does not enjoy torturing people).

We check for that here, by filling out the stress_impact block with any personality traits relevant to picking a particular option, and using the scripted stress_impact values. Due to sorcerous automagic, we can combine any number of stresses gained and lost in the stress_impact block, and it’ll be calculated on an event option into one number.

You can also add stress as an ordinary effect, outside of the stress_impact block, in which case it will not combine. If desired, you can even add multiple stress impact blocks, which will only combine the individual stress modifiers, or you can omit the block entirely. Whatever floats your scripting-boat.

And, with that, we come to the end of another dev diary. I’ll be around for a couple of hours to answer any questions you might have, and we look forward to seeing you ne-

A-aren’t you going to cover Triggers?
Ha, you fell for my cunning plot-twist. Hands up anyone who noticed the stealthy trigger spoiler in an earlier screenshot, you win exactly one internet point!

For everyone else, let’s have that screenshot again:
012.png


Now, a quick recap: scripted triggers in CK2 were a way of grouping a long list of requirements together under a single reference, and then referring to that reference when needing to check things.

For instance, say I have two places in an event where I need to check 20+ conditions: the event will be perfectly functional if I script all those conditions out twice, but what if someone in the future updates one set of triggers but not the other? Instant source of bugs. Now, what if I have to check those triggers more than twice, or across multiple events, or, for maximum-sadism, across multiple events in different files?

As you can imagine, that rapidly devolves into chaos. However, we don’t want to use less complex triggers, partially because that makes the title worse and less fun for everyone (is it really CK without ludicrous amounts of specificity?), and partially because that’s only reducing the scale of the problem, not fixing it.

Instead, we’d create a scripted trigger, which is the list of triggers written out once in a file that can be referenced by other files. Then, in any spot needing to check those triggers, we call the scripted trigger, which checks its contents. Any time the triggers need updating or fixing, simply fix the scripted trigger once, and, typically, all subsequent places that check the scripted trigger have been fixed by proxy also. Instant maintenance savings, immediate huge reductions in bug potential!

However, in CK2, these scripted triggers had to be stored inside a specific folder in /common, separate from the events (and other script) that they referenced. This may not sound like a huge deal, but it adds a bit of extra leg-work to creating and maintaining scripted triggers, and only really gives you a huge list of scripted triggers, some of which may be used only a few times in a couple of places.

In CK3, we’re improving on this by adding inline scripted triggers, meaning scripted triggers that can be written directly into the file that uses them, provided they are only used in that file. For more utilitarian scripted triggers that need to be used across multiple files, the old folder system still works. This lets us split up major and minor scripted triggers, and use scripted triggers (and, for that matter, scripted effects) significantly more thoroughly throughout the title, making it markedly easier for us (and you!) to create script that doesn’t compromise on complexity or detail whilst still being easy to maintain.

And with that, we come to the actual end of the dev diary. We look forward to seeing you next week!
 
  • 87
  • 60Like
  • 33Love
  • 5
  • 1Haha
  • 1
Reactions:

RelVleDy

Static Portrait Guru
40 Badges
Jul 13, 2008
627
837
  • Stellaris: Distant Stars
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Tyranny: Archon Edition
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV
  • Crusader Kings II: Charlemagne
  • Crusader Kings II
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
I noticed in the code there's character facial expressions. As a modder, can we import static-images as portraits? I need to add anime waifus. Preferably, I'll have a static-image for each expression and I can code it to the use the appropriate one based on the situation.

If it doesn't support static-images, would I need 3D software? If so, what is recommended?
 
Last edited:
  • 8
  • 2Haha
  • 1
Reactions:

SchwarzKatze

Field Marshal
45 Badges
Nov 8, 2008
5.250
3.487
  • Europa Universalis IV
  • Stellaris
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
Can you clarify if Mean Time To Happen is reduced to a small number of events, supported but not used in vanilla, or completely removed?
 
  • 2Like
  • 1
Reactions:

Princess Stabbity

Random Nonsense Generator
49 Badges
Oct 20, 2016
723
990
twitter.com
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III
  • Stellaris: Federations
  • Magicka 2
  • Crusader Kings II: Charlemagne
  • Age of Wonders: Planetfall Season pass
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Pillars of Eternity
  • Crusader Kings II: Rajas of India
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Megacorp
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Surviving Mars
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
  • Age of Wonders: Planetfall Sign Up
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders III
>O< !!!

AAaaaah! I want ALL OF THIS in Stellaris! These two functions alone...
008.png

010.png

...fulfil most of my scripting wishlist and do it better than the clunky array setup I would have settled on!

Now I want to make mods for two Paradox games simultanously...
Ehehe... I'm in danger.
 
  • 2Like
  • 2
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
77 Badges
Aug 28, 2013
2.369
6.249
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • 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
  • Crusader Kings II: Legacy of Rome
Can you clarify if Mean Time To Happen is reduced to a small number of events, supported but not used in vanilla, or completely removed?
Completely removed, it is gone entirely in Imperator too and I don't see it ever making a come back in any future games as on a Jomini level the event class and manager does not handle mean time to happen, it is just objectively worse than on actions in pretty much every way:
  • Bad on performance
  • Not reliable to fire
  • Cannot weight relative to other events easily
  • Overall harder to maintain and control
 
  • 19
  • 5
  • 1Like
Reactions:

Rokh

Big Bird
52 Badges
Sep 27, 2013
411
322
  • For The Glory
  • Sengoku
  • Victoria 2: A House Divided
  • Pillars of Eternity
  • Crusader Kings II
  • Europa Universalis III
  • Stellaris
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Age of Wonders III
  • Europa Universalis IV: Rule Britannia
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Europa Universalis IV: Pre-order
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Darkest Hour
  • Magicka 2
  • Crusader Kings II: Jade Dragon
Oh my, scriptable on_actions, my wet dream come true :oops:

Helpful for modders I guess, but not much for the rest of us who hunger for CK3 info.
This is not only helpful for modders, it's also helpful for anybody else who doesn't mod but likes using mods. If you ever play with mods, this DD is indirectly important to you as well ;)
 
  • 4
  • 1Like
Reactions:

Rockphed

Uncultured Barbarian
19 Badges
Jan 31, 2017
1.065
69
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Surviving Mars: Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Surviving Mars
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Sword of Islam
  • 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
Completely removed, it is gone entirely in Imperator too and I don't see it ever making a come back in any future games as on a Jomini level the event class and manager does not handle mean time to happen, it is just objectively worse than on actions in pretty much every way:
  • Bad on performance
  • Not reliable to fire
  • Cannot weight relative to other events easily
  • Overall harder to maintain and control
But this doesn't mean that we will be seeing all events on the 2nd of the month, right? Just that on the second an event fires and selects all the other events that need to happen to our poor, hapless character this month.
 
  • 1Like
Reactions:

jumbi

Elder Councillor & Servant of the Masters
97 Badges
May 18, 2013
682
1.364
  • Stellaris: Galaxy Edition
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Crusader Kings II
  • Stellaris: Galaxy Edition
  • Steel Division: Normand 44 - Second Wave
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • A Game of Dwarves
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Age of Wonders III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Charlemagne
  • Magicka
  • Europa Universalis IV: Res Publica
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Reapers Due
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Europa Universalis IV
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
But this doesn't mean that we will be seeing all events on the 2nd of the month, right? Just that on the second an event fires and selects all the other events that need to happen to our poor, hapless character this month.
In the custom civil war on action example, it looks like you can provide a custom range for the events to fire in, 6 to 12 months in this case (or I'm mistaken and it'll trigger once in 6 months and once again in 12, but the former seems more useful and likely to me)
 
  • 2
  • 1Like
  • 1
  • 1
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
77 Badges
Aug 28, 2013
2.369
6.249
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • 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
  • Crusader Kings II: Legacy of Rome
But this doesn't mean that we will be seeing all events on the 2nd of the month, right? Just that on the second an event fires and selects all the other events that need to happen to our poor, hapless character this month.
Not really, the events can be delayed to run at a later date in a random range instead of on the same date. And of course this is only for various pulse events, reactive on actions and being part of other people's event chains will be at entirely different date ranges still.
 
  • 12
  • 3Like
Reactions:

NoobLord

Corporal
57 Badges
May 11, 2013
32
57
  • Crusader Kings II
  • Europa Universalis IV
  • Stellaris: Nemesis
  • Europa Universalis 4: Emperor
  • Stellaris: Federations
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars
  • Crusader Kings III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
Will you guys release your in-house syntax highlighting to the general public?
 
  • 10Like
  • 1
Reactions:

Penguin Zero

Sergeant
59 Badges
Dec 22, 2014
85
330
  • Crusader Kings II: Charlemagne
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Rights of Man
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings III
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Holy Fury
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
One thing that occurred to me looking at the shouty-man example: will there be a way to set up those lists ordered by numbers of some connection a character has? For instance, could you make an ordered list of rulers in your realm by the number of direct vassals they have, or a list of people sorted by how many friends they have, or a list of Muslim rulers sorted by number of wives? I've got very little experience modding, but I can see all sorts of uses for those in events.
 
  • 1Like
Reactions:

Nicolas-

Nc-Rm
32 Badges
Oct 24, 2015
716
1.521
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Nemesis
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Rome: Vae Victis
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV
  • Stellaris: Synthetic Dawn
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Rome Gold
Will there be modding dev diaries before release? I'm curious what other functionalities/features you guys decided to carry over from Imperator (which really had very good modding capabilities)..
 
  • 1Like
Reactions:

Aerkhanite

Great Batavian
70 Badges
Jan 22, 2013
176
48
  • Divine Wind
  • Europa Universalis IV: Mare Nostrum
  • Sengoku
  • Magicka
  • Heir to the Throne
  • Hearts of Iron III
  • Cities in Motion 2
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: Rajas of India
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Darkest Hour
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Surviving Mars
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • PDXCon 2017 Awards Winner
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Crusader Kings III
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
Code:
has_culture = culture:french
has_faith = faith:ashari

Nani? Why the extra faith:/culture: ?
 
  • 1
  • 1Like
Reactions:

SchwarzKatze

Field Marshal
45 Badges
Nov 8, 2008
5.250
3.487
  • Europa Universalis IV
  • Stellaris
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
Probably culture groups and religion groups
 
  • 1
  • 1Like
Reactions:

Tuo

A third-rate duelist
30 Badges
Feb 14, 2017
1.452
5.540
  • 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: Sword of Islam
  • Crusader Kings II
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings III
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Cities: Skylines - Natural Disasters
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Cities: Skylines
Code:
has_culture = culture:french
has_faith = faith:ashari

Nani? Why the extra faith:/culture: ?

I would hazard a guess it's because custom faiths can have custom names, and as such you could have a faith called "french" - that is, if custom faith names are identified as such, and not as, say, "customcatholicfaith1".
 
  • 2Like
Reactions:

Waverunner

0111000001100101011011100110100101110011
70 Badges
Dec 2, 2014
113
97
  • Cities: Skylines - After Dark
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Monks and Mystics
  • Surviving Mars
  • Hearts of Iron IV Sign-up
  • 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
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Crusader Kings II: Holy Fury Pre-order
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Crusader Kings III Referal
  • Europa Universalis IV
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
  • Crusader Kings II
Thank you, this is the most interesting dev diary yet. Moddability is one of the reasons CK2 is so popular. I cannot wait to re-experience ATE and ASOIF mods in CK3.
 

darkporter85

Recruit
2 Badges
Dec 21, 2013
2
8
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
Throughout Medieval History Cavalry played a paramount role in warfare. Seeing footman sprites in a game about Medieval times is very sad. So, Paradox , please can you make cavalry sprites instead of these. It is all about immersion and such. It was so disappointing to see "infantry" as your army representation on the game map that i started drinking again(been sober for the past three months )(jk). A mounted warrior is so symbolic to that period that you guys really must implement it. From the steppes of Mongolia to the arid Moroccan flatland. From Denmark to Italia a warrior on a HORSE was dominating the battlefields of that period. So WHY ON EARTH FOOTMAN SPRITES?? When you think of that period you imagine Norman proto knights with a spear and a tear shield, or Teutons with their intimidating helmets (i am Russian, so read Sergei Eisenstein: Aleksandr Nevsky). English knights with lions on red or French with lilies on blue. Mounted Mongols with their steppe horses, bringing a rain of arrows on their foes, Arabs on their graceful horses. BUT NOT FOOTMEN.
I am opening a campaign against footman sprites. Lord Jesus help me in my endeavors.
 
  • 4
  • 1
Reactions:

pcuser1584789

First Lieutenant
34 Badges
Jan 5, 2017
259
100
  • Crusader Kings II: Charlemagne
  • Cities: Skylines Deluxe Edition
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Sword of Islam
  • 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
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Crusader Kings III
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Way of Life
  • Cities: Skylines
  • Europa Universalis IV
this is not actual scripting, these are data structures and we can set values... you should provide a .NET api, there are many things I am unhappy with in ck2 I wish I could just fix myself. Give us a .NET api and let us fix the game ourselves

this code is terrible, let us use a proper language, any normal programming language, python whatever, anything but this!
 
  • 10
Reactions:

blackninja9939

Experienced Programmer - Crusader Kings 3
77 Badges
Aug 28, 2013
2.369
6.249
  • Crusader Kings III
  • Stellaris: Federations
  • Battle for Bosporus
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis IV
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • 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
  • Crusader Kings II: Legacy of Rome
this is not actual scripting, these are data structures and we can set values... you should provide a .NET api, there are many things I am unhappy with in ck2 I wish I could just fix myself. Give us a .NET api and let us fix the game ourselves

this code is terrible, let us use a proper language, any normal programming language, python whatever, anything but this!
> these are data structures and we can set values
I mean, that sums up the core of like most of all programming languages... Our scripting language is even turing complete... ;)

A .NET, python, lua or any other language API is very unlikely for the simple fact we don't internally use that. The amount of time it would take to re-expose everything via another language is just not a time investment we can ever really justify, along with the up front time cost that also then becomes another thing to have to maintain and we'd also then need to take the overhead of those languages into account when working on performance.

And I'd highly doubt it will fix the things you likely want to script anyway, its not going to un-hardcode all the things that are already hardcoded which is the impression I get from you pointing out short comings of the scripting in CK2.

Our script language is by no means perfect, but its plain english and very easy for non programmers to get to grips with to work to make things, as well as easy for us on the programming side to add new triggers and effects etc.
 
  • 7
  • 3
  • 2Like
Reactions: