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

yemmlie101

Captain
3 Badges
Aug 28, 2015
311
705
  • Crusader Kings II
  • Crusader Kings II: Conclave
  • Hearts of Iron IV Sign-up
CK3 Mod Ed is an IDE specifically for creating mods for CK3 (though it could be in theory expanded for other Jomini scripting engine based games in future). It has intellisense, syntax highlighting, reference navigation, localization tools and other useful features, along with a project structure specifically tailored to CK3 mods.

1600689175747.png


--------------------------------

IMPORTANT NOTE: I've released this first version now to get some public testing done, its gotten to the point now where it needs other eyes on it to find issues and improve what is there.

1) There will likely be exceptions - I've fixed all the ones I can find, but it will still likely still have errors. If you get an exception please screenshot or paste the details from the crash dialog.

THE TOOL WILL CREATE REGULAR BACKUPS OF YOUR MOD - look in the My Documents/Paradox Interactive/CK3/CK3EditorData/CK3EditBackups directory and you'll find regular 15 minute incremental backups (up to 30) - this should ensure you never lose anything due to a program error.

2) The intellisense and syntax highlighting is still very much in its infancy, and will likely be regularly wrong or nonfunctional. There was a ton to work and puzzle out (From the Jomini manuscript from blackninja9939 in the Imperator forums https://forum.paradoxplaza.com/forum/threads/grand-jomini-modding-information-manuscript.1170261/, along with studying the CK3 files themselves) and I've likely made some wrong assumptions, and there'll likely be bugs. It will get better, but that's where I could really use some experienced modders help and feedback.

DO NOT RELY ON INTELLISENSE for now - it'll still be handy but don't take its word as gospel. I'd really appreciate feedback from people with experience if either options are missing from intellisense, or worse it's suggesting invalid things.

3) Not all moddable files are accessible to the tool yet. I've added the vast majority, but a few sub directories of common etc will not be visible to the tool whatsoever. These will likely not be used much by modders anyway, but will add them in future.

---------------------------------

TUTORIAL / INTRO VIDEO

Please excuse the mumbling and stuttering, I don't have a future on YouTube!


INSTALLATION INSTRUCTIONS

Requires .NET 4.0 framework. If it fails to load, its probably because you're missing this: https://dotnet.microsoft.com/download/dotnet-framework/net40

IMPORTANT USAGE NOTES:

****First time you open a mod, it may take a long time. It is creating a database of the current ck3 script files. Future loads will be much quicker. ****

The tool creates a database based on the scripts in the CK3 base files. It may be you need to flush these cached files out if there are ck3 updates, or if something goes wrong. However there is no automatic system to do this yet.

To do this manually, delete the Documents\Paradox Interactive\Crusader Kings III\CK3EditorData\CachedCK3Data folder, along with the Documents\Paradox Interactive\Crusader Kings III\CK3EditorData\behaviourData.bin file.

Download link:


Feedback extremely welcome, particularly from experienced modders who can easily tell if its giving out bad information or a common task is rendered awkward somehow.

EXTRA IMPORTANT NOTE: Due to a bug in the CK3 modding system due to load orders, cloning a single object into your project with a different filename will cause problems atm with the object not being active 50% of the times you load the game. Instead, for now you should use the overriding copying of entire files method via the project explorer.

ENJOY!
 
Last edited:
  • 14Like
  • 2
  • 1Love
Reactions:
Having a quick play around with it at the moment and so far haven't seen any crashes, seems pretty awesome so far! - just as a QoL thing it would be nice if the Localization Editor could be closed with ESC :)
 
  • 3Like
Reactions:
Wow - amazing job!! So cool to see something like this. I do my day job in an IDE and using text editors for modding has been a pain. Very excited to see where this goes!

I do keep on running into a bug though. When I search a custom localization file (i.e. in my mod) I get a null reference exception. Pasted below in the spoiler. It stops me from changing code tabs.

Code:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at CK3ScriptEditor.BasicFind.set_Window(ScriptWindow value)
   at CK3ScriptEditor.BasicFind..ctor(ScriptWindow window)
   at CK3ScriptEditor.ScriptWindow.TextAreaOnKeyPress(Object sender, KeyPressEventArgs e)
   at System.Windows.Forms.Control.OnKeyPress(KeyPressEventArgs e)
   at ICSharpCode.TextEditor.TextArea.OnKeyPress(KeyPressEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
Small update:


* Escape backs out of localization editor.
* Fixed potential exception with find window on localization files
* Added 'clone to mod' option as right click option on scriptobject explorer as well as in text editor.
 
I think that you should add some sort of loading indicator when you are loading in a mod, so nobody thinks that it crashed. Also, make it friendly for 4k screens :D

But truly great work. This will make modding sooo much easier
 
0.0.3 released

* Added font scaling menu option for 4k monitors
* Added loading progress bar.
* Fixed issue with find results not showing filename
* Added search on ScriptObject Explorer
* Added option to turn off empty categories on ScriptObject Explorer

 
Last edited:
  • 1Like
Reactions:
0.04 released

* Forbid object cloning into a filename that is alphanumerically lower than the source file it came from (thus would get overridden by the base version on mod load)
* Forbid on_actions being cloned, since they can have duplicates and will all activate rather than the base version being overridden..
* Added 'override to copy' for project explorer, to be able to copy a file or directory with all contents into the mod project.

 
IMPORTANT NOTE: Due to a bug in the CK3 modding system due to load orders, cloning a single object into your project with a different filename will cause problems atm with the object not being active 50% of the times you load the game. Instead, for now you should use the overriding copying of entire files method via the project explorer. There will be a tool in the editor to automatically make your mod extra mod compatible and stop overriding entire files in future .
 
Last edited:
  • 1Like
Reactions:
It's stopped working for me. I think this is because my mods list has a mod that no longer exists. The error message in the launcher is that the directory isn't valid, but the .mod isn't actually there anymore. I've tried reinstalling CK3 but have been unable to fix this :( NB it doesn't work no matter which version of the tool I use.

Update: managed to purge the missing mods from the launcher via messing with the DB. Launcher works fine but the tool is still not working. Deleted the tool config file and still doesn't work.
 
Last edited:
Getting this error when loading a mod. I think it may be related to the fact that our mod is in a Dropbox folder (not my choice). It seems to work if I load other mods - although not after I get the bug with the Dropbox mod first, then load another mod. I'm deleting the cache in between restarts to bug test.

************** Exception Text **************
System.IO.InvalidDataException: Path passed that doesn't fit in either mod or base directories.
at JominiParse.RefFilename..ctor(String filename)
at CK3ScriptEditor.ProjectExplorer.FillProjectView()
at CK3ScriptEditor.CK3ScriptEd.UpdateAllWindows()
at CK3ScriptEditor.CK3ScriptEd.Load(String modName)
at CK3ScriptEditor.CK3ScriptEd.loadModToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)