Shrine of Kynareth

Oblivion. 10% Playing, 90% Modding.

Notepad++ Syntax Highlighting

January 8, 2020 My Mods Version 1.2

I'm one of those scrubs that still don't have the CSE installed and also sometimes write scripts (or parts thereof) during lunch break or similar. The lack of proper syntax highlighting bothered me, so I added it to Notepad ++.
This was created in Notepad++ v7.8.2.

To install, go to Language > User Defined Language > Define your language. Then click on import and select the downloaded xml file.

How to use

I made two, one for white background, one for black background. You can also easily edit the colors yourself (especially if pink and purple isn't your thing :D). I have no idea about normal highlighting conventions, sorry.

Since Oblivion scripts aren't really saved as a normal file, I made up some file extension. .tes4 will apply the formatting automatically, so you could save the files as .tes4 or .txt.tes4. Otherwise just select the formatting from the Language menu.

I tried to add as many of alternative functions as I knew, like both SCAonActor and StopCombatAlarmOnActor, or PurgeCellBuffers and PCB. Let me know if any are not recognized or wrong.

How to edit to your own taste:


Go again to Language > User Defined Language > Define your language. If it's not selected already, select TES4 Script in the top dropdown menu. There are several fields, all fields have a "Styler" button, clicking on it allows you to select color and font-style.

The groups are used as follows:

Tab 1 "Folder & Default"

  • Only one of the 3 fields is used. It's used for everything that can be collapsed (i.e. code between blocks, like Begin/End and If/Endif). Default is Purple and Bold. For ( ) to be colored, they must have some space. If ( i == 1 ), not if (i==1).

Tab 2 "Keyword Lists"

  • The 1st group is a continuation of the previous one. It contains things that are also used in blocks, like Continue and GoTo, but don't always make sense to be collapsible (at least... not to me). It is also Purple and Bold.
  • The 2nd group contains vanilla CS functions like AddItem and Activate. Default is Medium Blue and Bold.
  • The 3rd group contains variable declarations, such as int, short and float. Both vanilla and OBSE. Default is Pink and Italic.
  • The 4th group contains OBSE functions up to OBSE 21 (I hope I got them all) like AddItemNS or MessageBoxEx. As I (and I assume a lot of people nowadays) always create OBSE mods, it uses the same style as vanilla CS functions. It is easy to change this here. Default is Medium Blue and Bold.
  • The 5th group contains certain values that are accepted by certain functions, like actor values or animation names (Forward, Idle, Alchemy, Blunt, etc) and also the special float variable fQuestDelayTime and special globals like GameHour. Default is Cyan and Italic.
  • The 6th group contains Begin blocks like GameMode, MenuMode. Default is Purple and Italic.
  • The 7th is the rest of the OBSE functions. Turns out, after adding all different versions of functions, it was too much text for one field :D Default is Medium Blue and Bold.
  • The 8th group contains commands from other OBSE plugins. Currently supported are Blockhead, MenuQue, ConScribe, Pluggy, NifSE and AddActorValues. The default is Red and Bold.

Tab 3 "Comment & Number"

  • The ; for comments is set here. Default is a Light Grey and Italic.
  • Even though nothing is entered into the fields in Number style, the Styler is used to format numbers. Default is Pink.

Tab 4 "Operators & Delimiters"

  • Operators style sets the look of operators like +, -. ==, or &&, both for OBSE and vanilla. Default is Medium Green and Bold. [ and ], as used for example for arrays, will also use this formatting.
  • Delimiter 1 style sets the look of text in quotation marks, like message boxes or console output. Default is a Lavender-ish color.

Update 2020-01-10:
Fixed the OBSE functions being cut off by character limit
Moved "Function" to block section 6

Direct download, file size: 209.98 KiB

Download from external site

About

Welcome to my little place where I talk about playing Oblivion, and about modding Oblivion, and about making mods for Oblivion and about ...

Archive