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

talias

Captain
56 Badges
Feb 7, 2011
389
19
  • Crusader Kings II
  • Europa Universalis IV
  • Hearts of Iron IV: Death or Dishonor
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Crusader Kings III: Royal Edition
I noticed that there isn't something like this (at least I didn't found such thing). Basically it's nothing complex, just some custom language files for Notepad++ to simplify writing events a bit.
I use it for latest Notepad++ 6.5 version but should also work for older version, only meant for default white style.

What it does is:
  • Highlights all CK2 scripting in different colors - commands(dark teal), comments(green), conditions(violet), scopes(purple), things that have multiple purposes(brown) and other unsorted things(blue);
  • Allows proper folding;
  • Supports auto-completion.
Screenshots (for those who really can't live without them):
Instructions:
If you have previous version you must first remove old language file, to do so in Notepad++ open "Language/Define your language...", in "User language" box at the top select CK2, select "Remove".

The zip file contains two files - CK2.xml and CK2lang.xml. Place CK2.xml in directory where you installed "Notepad++/Notepad++/plugins/API" (default path would be "C:/Program Files/Notepad++/plugins/API"). Run Notepad++ open "Language/Define your language...", click Import and chose CK2lang.xml. Open "Settings/Preferences/Auto-Completion" and check "Enable auto-completion on each input" and "Function completion".

To change font:
In Notepad++ open "Settings/Style Configurator..." and select either Default Style or Global override with global font, global font size checkboxes enabled.

To change keyword colors:
In Notepad++ open "Language/Define your language...", in "User language" box at the top select CK2, next select "Keyword list" tab, there click on "Styler" button and change foreground color.

Download link:
Latest version is released on 27.03.2014 for CKII 2.1.1
http://www.mediafire.com/download/bbuk2ezxeuxids5/CK2_notepad++_language.7z (Mirror)
 
Last edited:
  • 11
  • 6
  • 1Like
Reactions:
You are my new best friend. I have severe ADD so it's hard for me to focus on a lot of lines when everything is black and white with no differentiation between functions and the like. Now I can actually DO things. (because shiney)
 
This is indeed awesome. Especially when all the commands are correct to prevent very simple mistakes which can ruin a whole bunch of code (forgetting the is_ before a lot of condition for example).
 
Would it be an idea to combine this with the validator? This will make it easier for both to keep up to date with commands and which ones do not work. So false positives can be easily adjusted in the notepad file after they are reported for the validator (and vice versa)
 
great to see an updated N++ language file. the other one, which illathid hotlinked, hasn't been updated for quite a while and doesn't recognize newer commands.

on a side note, it would be nice if this could be linked either in Tools Mega Thread or the List of Mods thread by a Mod.
 
Updated with some missing commands taken from validator?

Would it be an idea to combine this with the validator? This will make it easier for both to keep up to date with commands and which ones do not work. So false positives can be easily adjusted in the notepad file after they are reported for the validator (and vice versa)
What do you mean?
 
It seems, that I will probably drop using PSPad and start working with this - it looks pretty awesome ;).
 
Updated with some missing commands taken from validator?


What do you mean?

Well, the validator is still being updated for false positives or missing things. So or:
- You have everything and he can use the complete set of commands/scopes/condition you have
- You don't and you can match your list of commands/scopes/condition and other stuff with the validator and make both somewhat more reliable.
 
Well, the validator is still being updated for false positives or missing things. So or:
- You have everything and he can use the complete set of commands/scopes/condition you have
- You don't and you can match your list of commands/scopes/condition and other stuff with the validator and make both somewhat more reliable.

Sounds pretty difficult to do. One is a Notepad++ language file, the other is Jamie's Validator. Those two aren't easily compatible.
 
Thanks for releasing this, it has already been incredibly helpful in my modding endeavors!
 
How would I go about setting your language file to use the font from the older version? I find it to be easier to read than the font you went with.
 
How would I go about setting your language file to use the font from the older version? I find it to be easier to read than the font you went with.
The old version had font I personally use set within the language file, overwriting the default fonts you can set from settings - to give users choice to change fonts easily I removed my font.

You can change the font from "Settings/Style Configurator..." and select either Default Style or Global override with global font, global font size checkboxes enabled. The old version had verdana font with size 9.

He's right though, Shouldnt there at least be different colors for scopes, commands and condition?
It possible and I plan to do it, but I will have to manually sort everything, so it will most likely take some time.
 
Thanks! But how would I go about experimenting with different colors? I'm having trouble seeing the darker ones.
In Notepad++ open "Language/Define your language...", in "User language" box at the top select CK2, next select "Keyword list" tab, there click on "Styler" button and change forefround color.