Jump to content

[mod] CK3 Storyline Editor


Recommended Posts

Posted (edited)

CK3 Storyline Editor


Hi everyone,

I've been working on a small browser tool for CK3 story mods for a while and I feel it's finally in a good enough state to share it with you guys.
The goal is simple: you don't need modding or Paradox scripting experience to make a story mod.

Hopefully it will empower some of you to make cool stuff :D

 

CK3 Storyline Editor is a visual editor that runs fully offline in your browser.

Instead of writing script by hand, you:

  • Design your story on a graph
    • each node is an event; lines show “if the player picks this option, go to that event.
  • Fill in forms
    • titles, descriptions, choices, when events fire, and what happens (gold, stress, traits, flags, etc.). The tool generates localization, trigger_event links, and the rest of the CK3 script.
  • Add more than events
    • story starts, repeatable events, decisions, character interactions, custom traits (including tracked traits with XP), story characters, flags, custom modifiers, custom artifacts and custom images (backgrounds, trait icons, etc.), converted to DDS when you export.
  • Check your work before testing in-game
    • live preview and Walk chain let you play through a rough mock of your mod in the browser. (Triggers are approximated, it’s not the real CK3 engine, but it’s useful for catching obvious mistakes.)
  • Save and export
    • project JSON for backups, autosave in the browser, and a one-click Export ZIP for a ready-to-use mod.
    • You can also import a mod ZIP (works well for mods exported by this tool, don't expect it to work correctly with any mod tho)

 

How to run it?

  • download the ZIP from here
  • double click index.html

 

There's a bundled demo (Dragon Slayer Saga) that you can just load the JSON and export as a mod, and a few starter templates if you want to click around before building your own mod from scratch. The templates are in order of complexity to showcase a bit of everything this tool can do.

 

If something breaks in-game
Export has been tested on a lot of story setups and works well for mods built in the tool. If CK3 throws errors, please send:

  • Your error.log from Documents\Paradox Interactive\Crusader Kings III\logs\
  • A short note with what broke and the name of your mod. 

That helps a lot with fixing edge cases.

 

Feedback welcome: bugs, ideas, “I wish it could…”, all good.

 

Mods you make are yours; no permission needed to publish them. A casual “made with CK3 Storyline Editor” credit is appreciated but not required.

 

Full disclosure: this tool was built with help from AI (coding assistant + iteration).

 

Changelog:

Spoiler

 

Version 1.5.2

Ui/Ux improvements

  • Refactor traits creation tab ui
  • Refactor add/has trait effect ui
  • Unify + button style
  • Clicking new event now created the new node in the middle of the current graph view

Version 1.5

  • Artifacts!
    • create weapon/armor/regalia/crown/trinket
      • rarity
      • effects
      • uniqueness
      • wear and tear
      • starting condition
    • Give/Remove and check if character have them in Events
  • Stat Weighted random list (PanPiela)

Version 1.4

  • Custom modifiers
    • new left tab to create modifier
      • also add option to choose from an icon of the game instead of only custom image
    • both character and county
    • support for remove/add and for how long in the events effect
    • triggers for "has modifier?"
    • fix template option trigger making all the options disappear (thanks @Elgate for finding it)

Version 1.3

  • Characters
    • Add possibility to spawn new NPCs 
      • in character tab use source -> spawn new 
    • refactored character filters to resemble more the effects in events
    • add filters for faith/culture (default to same as player)
    • hide script id behind toggle (you shouldn't care anyway
  • Events
    • refactored effects style to be more consistent and hopefully more intuitive to use
    • add new effects
      • opinion change
      • imprison
      • kill
      • add to court
      • remove from court
    • Add new options under "what happens next?" in events
      • other then the default one followup event you can now choose "random between a list" and "if/else" block
  • Bug fixing

 


 

Edited by gianclod
Posted

I love and hate you at the same time, mate. I've been learning with gemini how to do this ck3 mods shit. And now here you are simplifying it like that. Awesome!!! hahahaha. Though i am sure you're a godsend for a whole bunch of folks. And for me as well.  Downloaded it. Checked it out. Awesome!

 

Any thoughts on adding: activities, modifiers, portrait_modifiers or a trait directory-thingy, wherein you could save traits to use later or have the traits from carnalitas, phaze and co as sort of references you could tie events to?

 

TLDR.: You're a godsend!

Posted
7 minutes ago, Beasstmaster said:

I love and hate you at the same time, mate. I've been learning with gemini how to do this ck3 mods shit. And now here you are simplifying it like that. Awesome!!! hahahaha. Though i am sure you're a godsend for a whole bunch of folks. And for me as well.  Downloaded it. Checked it out. Awesome!

 

Any thoughts on adding: activities, modifiers, portrait_modifiers or a trait directory-thingy, wherein you could save traits to use later or have the traits from carnalitas, phaze and co as sort of references you could tie events to?

 

TLDR.: You're a godsend!

 

hey hey, thank you!!

 

activities might be a good one to add. for traits coming from other mods, technically if you know the trait key you should be able to interact with it with mod from this editor as well, a bit limited but it should kinda work. something similar to this maybe? 
image.png.9de7b3291b4943edeb871c0240538a95.png

another idea could be, i embed some of the most popular custom trait of those mods directly in the editor, but it can break things if then you don't have those mods installed. I'll have a think.

 

For your other questions:

You can make traits on the left panel

image.png.15a28fcc5cd5817fdc4fbc907cb2ef83.png

 

in both events and choices you can then add effects

 

image.png.333a05a381f73f4dd281076298539b86.png

 

for character portrait under the appearance tab of an event you can choose which character, which animation and outfit (i just added either normal clothes or naked for outfits)

 

image.png.0b2a440033b4c3df60e87959a69301ec.png

Posted (edited)
1 hour ago, Beasstmaster said:

I love and hate you at the same time, mate. I've been learning with gemini how to do this ck3 mods shit. And now here you are simplifying it like that. Awesome!!! hahahaha. Though i am sure you're a godsend for a whole bunch of folks. And for me as well.  Downloaded it. Checked it out. Awesome!

 

Any thoughts on adding: activities, modifiers, portrait_modifiers or a trait directory-thingy, wherein you could save traits to use later or have the traits from carnalitas, phaze and co as sort of references you could tie events to?

 

TLDR.: You're a godsend!

 

Using a LLM to learn how to mod CK3 (or to write code for a CK3 mod) is a terrible idea, given the scant documentation from even official Paradox sources. It will, among other things: make up triggers, effects, modifiers, etc. rendering it infeasible. It is brought up often enough that the CK3 Modding Co-op has a FAQ entry on why you shouldn't be using a LLM to mod CK3 (and why you shouldn't dump code output by a LLM and expect someone to come around and make it game-legible).

 

image.png.006de7dd8497fceeb7e1711967cacc17.png

 

And here's Saltfish, one of the biggest CK3 modders in the sinosphere, making the same point

 

image.png.880e7cf9910489aeada0014d74f806ee.png

 

You are better off learning through trial and error, while dissecting vanilla CK3 files and/or other mods' implementation of functionalities you want to apply; and using the script_docs command in the console dumps logs referring to triggers, effects, modifiers, etc. and its documentation. In the event that you do build a hyper-specialised model trained in whatever amount of CK3 structure that is available, you'd still need to know the difference between functional code and LLM hallucination.

 

Even then, mods that use AI extensively on other departments such as graphics, localisation, etc. (e.g. Elf Destiny, or anything Phaze made) are still at the end of the day scripted by a person. If any part of making a CK3 mod shouldn't be handed over for a mindless language model, it's the scripting.

Edited by Lyskorie
Posted
7 hours ago, Lyskorie said:

 

Using a LLM to learn how to mod CK3 (or to write code for a CK3 mod) is a terrible idea, given the scant documentation from even official Paradox sources. It will, among other things: make up triggers, effects, modifiers, etc. rendering it infeasible. It is brought up often enough that the CK3 Modding Co-op has a FAQ entry on why you shouldn't be using a LLM to mod CK3 (and why you shouldn't dump code output by a LLM and expect someone to come around and make it game-legible).

 

image.png.006de7dd8497fceeb7e1711967cacc17.png

 

And here's Saltfish, one of the biggest CK3 modders in the sinosphere, making the same point

 

image.png.880e7cf9910489aeada0014d74f806ee.png

 

You are better off learning through trial and error, while dissecting vanilla CK3 files and/or other mods' implementation of functionalities you want to apply; and using the script_docs command in the console dumps logs referring to triggers, effects, modifiers, etc. and its documentation. In the event that you do build a hyper-specialised model trained in whatever amount of CK3 structure that is available, you'd still need to know the difference between functional code and LLM hallucination.

 

Even then, mods that use AI extensively on other departments such as graphics, localisation, etc. (e.g. Elf Destiny, or anything Phaze made) are still at the end of the day scripted by a person. If any part of making a CK3 mod shouldn't be handed over for a mindless language model, it's the scripting.

Thanks for the warning! I  should double check my code more, i know this am just lazy. But one could argue that even if you use an llm, you are still going to inevitably use trial and error. And it is kinda hard to figure out what sorts of pulses there are or modifiers or in the example of portrait traits it is nigh impossible to remember all those body part building blocks one could manipulate. But yes you are right. I am leaning way too heavily on it, even if i do not copy and paste the code. One can't really cheat the learning curve and yet i tried and am guilty of it. 

 

TLDR.: Guilty of using LLMs as more than a crutch. Will try to not do it in the future. Thanks for the warning/reminder.

 

Idea: might go through all possible modifiers, bodypart names, modifiers, on_actions and trait varriables, character modifiers and so forth and create an interactive list or rather ".txt" file one could open or keep open in their .txt modding document and use as a guide for what is possible and what it does. 

Posted
8 hours ago, gianclod said:

 

hey hey, thank you!!

 

activities might be a good one to add. for traits coming from other mods, technically if you know the trait key you should be able to interact with it with mod from this editor as well, a bit limited but it should kinda work. something similar to this maybe? 
image.png.9de7b3291b4943edeb871c0240538a95.png

another idea could be, i embed some of the most popular custom trait of those mods directly in the editor, but it can break things if then you don't have those mods installed. I'll have a think.

 

For your other questions:

You can make traits on the left panel

image.png.15a28fcc5cd5817fdc4fbc907cb2ef83.png

 

in both events and choices you can then add effects

 

image.png.333a05a381f73f4dd281076298539b86.png

 

for character portrait under the appearance tab of an event you can choose which character, which animation and outfit (i just added either normal clothes or naked for outfits)

 

image.png.0b2a440033b4c3df60e87959a69301ec.png

I am going to repeat myself. You're doing the lords work! Portraits are a freaking CHORE to write. And i still do not quite understand the scope of the clothing options. Same with the effects I don't know them all from the top of my head so i always keep the 00_trait_info .txt file or whatever the ingame trait file is called in visual studio pro clutters things up. Like right now i got like 8 or 10 tabs open in visual studio pro lol

Posted
38 minutes ago, TheFlyingDick said:

Hey man great mod. Is it possible to make a big event window that shows an image instead of the characters? like the ones from phazes mods.

 

It's a custom event window type, and the image is the regular background override that you can already do in events. 

 

You will have to define the event window type and said background override, but it shouldn't be too hard. Look up some of the DLC content events as a pointer.

Posted (edited)
1 hour ago, TheFlyingDick said:

Hey man great mod. Is it possible to make a big event window that shows an image instead of the characters? like the ones from phazes mods.


For now no, it can just do some vanilla types, i've attached some screenshots of what the editor can do right now. Also found out the full screen one was being exported wrongly, will update the file shortly, thank you.

 

You can change the type by clicking any event node -> scroll down the right panel -> "event type & visibility"

image.png.564b641f9868a8eb8fa7693943701c19.png

 

to remove the characters and just show an image you can set up the appearance of your event like this

image.png.51eb2fbbc98635dff9e0b69025a96c9b.png

@Lyskorie suggestion sounds good tho, i'll look into it.

 

Spoiler

Screenshot 2026-06-11 112558 (1).jpgScreenshot 2026-06-11 112518 (1).jpgScreenshot 2026-06-11 112655.jpgScreenshot 2026-06-11 112726.png

 

Edited by gianclod
Posted
6 hours ago, Beasstmaster said:

Thanks for the warning! I  should double check my code more, i know this am just lazy. But one could argue that even if you use an llm, you are still going to inevitably use trial and error. And it is kinda hard to figure out what sorts of pulses there are or modifiers or in the example of portrait traits it is nigh impossible to remember all those body part building blocks one could manipulate. But yes you are right. I am leaning way too heavily on it, even if i do not copy and paste the code. One can't really cheat the learning curve and yet i tried and am guilty of it. 

 

TLDR.: Guilty of using LLMs as more than a crutch. Will try to not do it in the future. Thanks for the warning/reminder.

 

Idea: might go through all possible modifiers, bodypart names, modifiers, on_actions and trait varriables, character modifiers and so forth and create an interactive list or rather ".txt" file one could open or keep open in their .txt modding document and use as a guide for what is possible and what it does. 

I've recently been using AI to create mods, and I think this newly released file will allow the AI to learn how to use skills, making the implementation more efficient when using natural language. I repeatedly restarted during the creation process to test, and this file should significantly reduce my testing time. Thanks to the poster for this wonderful sharing!

Posted

Wow seems really cool, great job. Can't wait to try it out when I can, thank you for your work :) . I couldn't find the time to learn the machinations of paradox code, this will help immensely.

Posted
11 minutes ago, PanPiela said:

Absolutely amazing! Only problem I have - lack of some vanilla traits to choose from (like cruel or zealous)


i can definitely add them. I'll push another version later when i get home

Posted (edited)

I'm looking at it now. which other trait do you think the tool should hold by default? the vanilla game have 301 traits 😧 my tool hold 45 at the moment, i don't believe adding all 300 is a good idea, it might be more complete but it will make the user experience more complicated which is the opposite of what this tool is trying to achieve.
So here's a list of 60ish (divided in the categories you'll see in the tool), let me know if something is missing for you guys.
 

Personality

Ambitious, Content, Brave, Calm, Wrathful, Deceitful, Lustful, Chaste, Zealous, Cynical, Vengeful, Forgiving, Sadistic, Callous, Paranoid, deviant, bossy, arrogant

 

Lineage

Bastard, Legitimized bastard, Disinherited, Disputed heritage, Wild oat, Born in the purple, Inbred, Pure-blooded

 

Scandal

Kinslayer, Murderer, Adulterer, Incestuous, Excommunicated, Witch, Cannibal, Seducer, Torturer, 

 

Condition

Wounded, Scarred, One-eyed, Maimed, Ill, Depressed, Possessed, Lunatic, Incapable, Drunkard, pregnant

 

Congenital

Genius, Imbecile, Fecund, Beautiful, Ugly, 

 

Lifestyle

Poet, Blademaster, Pilgrim, Scholar, Adventurer, Peasant leader, Reveler, Hunter, Shieldmaiden, Viking, Varangian, Knight-errant

 

 

Edited by gianclod
Posted

This is great, the last time i tried to create some events got pissed halfway tru. im wondering if is it possible for these events to call actions like make love from carnalitas or cbo?.

Posted

some new goodies coming tomorrow, need to test everything actually works correctly
- ability to spawn new npc (instead of just finding an already existing npc)
- added in the end all vanilla trait (you will be able to chose between a default curated list, project specific traits or ALL)
- refactored a bit the effects tab it should be more intuitive to use
- added the ability to kill and imprison in the effect tab

 

14 minutes ago, rosheen said:

This is great, the last time i tried to create some events got pissed halfway tru. im wondering if is it possible for these events to call actions like make love from carnalitas or cbo?.

I'm still thinking how to add this, the ability to interact with other mods, for now you just have the custom ck3 script tab but to use it you actually need to write some code. For now my idea is to somehow scan other mods and make modules out of it that you can load in your project, so e.g. if you scan one of Phaze's mods you should be able to see traits specific to that mod in your editor.

Posted

Paradox should have released a tool like this ages ago. It seems so obvious to use a GUI for something that's so heavily based on syntax. Like 80% of the game could be made through a GUI tool, which makes me believe Paradox must have one of their own.

 

Glad someone finally did it. I'm sure it'll be useful even for experienced modders.

Posted

Thank you for this great tool, I always wanted to implement some ideas of mine into ck3 but didn'T have the time to lerne how😅

 

Quick question, after a few hours tinkerin with the various funktions, is it possible, to add artifacts with this tool?

Posted
7 hours ago, lostcause516 said:

can we like, add religious tenants or cultures or things like that with this?

 

9 minutes ago, frhghz said:

Thank you for this great tool, I always wanted to implement some ideas of mine into ck3 but didn'T have the time to lerne how😅

 

Quick question, after a few hours tinkerin with the various funktions, is it possible, to add artifacts with this tool?

 

Unfortunately no to both for now. 

 

I might need to start a to do list:

- custom modifiers

- interact with other mods

- artifacts 

- custom religion/ cultures

Posted (edited)

Hey hey, pushed a new version. here's what changed

 

  • Characters
    • Add possibility to spawn new NPCs 
      • in character tab use source -> spawn new 
    • refactored character filters to resemble more the effects in events
    • add filters for faith/culture (default to same as player)
    • hide script id behind toggle (you shouldn't care anyway

Character creation uses the same tab as before but you can now change the source to be "spawn new" you can then select filters to assign to the new character.
So for clarity the source "someone in the save" will try to find an existing npc that respect the filters you choose while "spawn new" will create a new npc with the attributes you define in those filters. 

 

Spoiler

image.png.a4a6b5a465fdc3559c656fae8b7f3c65.pngimage.thumb.png.d301078191382d80944e120dfcebfb5e.png

  • Events
    • refactored effects style to be more consistent and hopefully more intuitive to use

hopefully they are more intuitive to use now, I've also added a small text in plain english of what the effect will do.

 

Spoiler

image.png.9ba251a12d7bef13c79d07042ce6de5b.png

    • add new effects
      • opinion change (this is actually using a modifier)
      • imprison
      • kill
      • add to court
      • remove from court
    • Add new options under "what happens next?" in events
      • other then the default one followup event you can now choose "random between a list" and "if/else" block
Spoiler

image.thumb.png.a081e234cd0385d61a2a06249b541f19.pngimage.png.5758101cb1b0d3ee60610f55e3eacf8d.png

image.thumb.png.c5c8c8809831380b2cec30028c252b94.png

image.png.e93b0842db0aa8c1f8403279eb965712.png

 

I've also updated the demo project with this peasant charaacter

 

Edited by gianclod
Posted

I used your work to create mod 
how to create modifiers
I am a rookie. I can only read the original mod file. It is probably the first time I have tried to make it myself because your work gives me the feeling that it can be successful.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...