• 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.
did you include the new scopes like any_character ?
I attempted to add everything that does something in the scripts, but the wiki isn't the best organized in some places and I'm sure I missed stuff. It looks like I missed any_character and (some?) of the other 2.5 scopes, so I'll add them in an update.
 
I attempted to add everything that does something in the scripts, but the wiki isn't the best organized in some places and I'm sure I missed stuff. It looks like I missed any_character and (some?) of the other 2.5 scopes, so I'll add them in an update.

Yeah, the wiki modding pages haven't been updated for 2.5 much yet...
 
I attempted to add everything that does something in the scripts, but the wiki isn't the best organized in some places and I'm sure I missed stuff. It looks like I missed any_character and (some?) of the other 2.5 scopes, so I'll add them in an update.
There are quite a few keywords used in council_positions and council_voting that aren't highlighted.
 
OK, here's an updated version with a bunch of 2.5 keywords added, including new scopes and stuff from council_positions and council_voting.

I'm not sure if the massive list of law stuff from council_voting should be highlighted and autocompleted (all the revoke_title_0, revoke_title_1, etc stuff), so it doesn't for now. What do people think about highlighting that?

Again, if anything's missing please post it here so I can update.

Installation instructions:
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".

Colors:
Unsorted is blue
Conditions are purple
Scopes are burgundy
Commands are dark teal
Multiple purposes/common keywords are brown
Comments are green

Collapsible comments: https://forum.paradoxplaza.com/foru...d-auto-completion.745679/page-3#post-20815473
 

Attachments

  • ck2_n++_252_3.zip
    19,9 KB · Views: 557
  • 2
  • 1
Reactions:
I'm not sure if the massive list of law stuff from council_voting should be highlighted and autocompleted (all the revoke_title_0, revoke_title_1, etc stuff), so it doesn't for now. What do people think about highlighting that?
I would say no, since those are law names, defined in common/laws, and not keywords.
 
  • 2
Reactions:
I would say no, since those are law names, defined in common/laws, and not keywords.
I agree with this viewpoint.
 
More keywords that need to be added (from government_flavor):
government_flavor
graphics
 
Hey, I just wanted to say thanks for making this! It will speed up my coding so much faster. My favorite part is being able to close sections of code I don't want to look at.

At first I was scared off by your mod, since you said it's apparently not compatible with the latest version of CKII, but I can say it's compatible enough that it doesn't matter. This is a must-have.
 
  • 1
Reactions:
Hey, I just wanted to say thanks for making this! It will speed up my coding so much faster. My favorite part is being able to close sections of code I don't want to look at.

At first I was scared off by your mod, since you said it's apparently not compatible with the latest version of CKII, but I can say it's compatible enough that it doesn't matter. This is a must-have.

I could not agree more.
 
umm i hate to interrupted with your modding but there have been somekind of shady individual kept asking for me to upload file to this forum,i am not sure if he going to get the other to upload it to this thread,and this just happen a few minute ago before i posted this comment. just reporting in. i am quite paranoid. i think that he should contact the OP of the thread instead of trying to make me do it for him.then he keep on refusing so i just spreading the word here.

sign with respect and sorry about wasting your time,
Vostov
 
I have prepared a small update. It should include most of 2.7 additions. I will post another update with 2.6 and 2.8 stuff soon.
Description:

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

Attachments

  • CK2_notepad++_language.zip
    18,3 KB · Views: 60
Last edited:
Thanks for the update! BTW at least from my phone the screenshot aren't showing up.

Would you allow me to take some of your keyword lists for a highlighting tool I'm doing for Sublime Text 3?
Oh, I forgot to delete the screenshot part from the description. There's no screenshot. :oops:

I just made an update basing on the last version. The original author is @talias, I believe, so you should probably ask him for permission.
 
Last edited:
UPDATE: Most of 2.6 additions.

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

Attachments

  • CK2_notepad++_language.zip
    18,5 KB · Views: 389
Here's a large update, hopefully making this up to date to the latest version, 3.2.1. The new files are almost double the size of the old ones. I strolled through all of the game's common files and found things not mentioned on the wiki and even the game's patch notes. Still, do let me know if anything's missing. Above instructions still apply.

I've made a few adjustments too, for consistency, and to bring out the important logic flow keywords, while hopefully still distinguishing other keywords from regular black text. Other colour suggestions are welcome. They are also easy to rewind to the old versions: Language -> Define your language -> Keywords Lists -> Styler. If you revert the colour of the 1st group back to the blue shade in the top row, most things will look as they did before.

I also moved a lot of conditions from the 1st group to the third, for consistency if nothing else.
 

Attachments

  • CK2_notepad++_language_v321.zip
    33,2 KB · Views: 47
Last edited:
I've been working on and off on another significant update. Sifting through old patch notes and scouring even more vanilla files, I found things going back years and even more terms documented nowhere. I've also cleaned up the old keyword lists for outdated terms and added functional highlighting for title and event_target scopes, though these may interfere here and there. They can be easily disabled, as per updated instructions contained in the download archive.

In addition, I've added two new highlighting languages for Graphics (.gui and .gfx) and Localisation (.csv and .txt for customizable localisation). They work similarly to the old ones.

Finally, I've updated installation and update instructions, for use with current, and hopefully future, Notepad++ versions. Detailed instructions inside the archive.

Please let me know if I've missed anything, or if you have constructive feedback!
 

Attachments

  • CK2_notepad++_language_v321_update.zip
    55,5 KB · Views: 61