Notepad++ User Defined Papyrus Script Language
Created by: Mystical
OVERVIEW
The NR2003 Papyrus Scripting Language is not recognized as a Script/Code Language by any text or IDE editors.
As a result this means the text appear plain (most likely as this readme file looks right now). Most common
scripting languages today have built in Languages that can highlight and identify syntax, keywords, operators,
Delimiters and etc etc that makes it not only easier to find the specific code fragment you are looking for but
also help prevent errors.
Since PSG scripting for NR2003 was only used in papyrus games (as far as access wise common users have) no public
Script languages to 'translate' PSG lines of code are available. This mean users must deal with plain text reading
thousands of lines of code and the best option is to insert my lines breaks in the form of commented out code to make
it easier for the read to scroll through and find the code they are on.
Well not anymore, that all has changed with the first available User Defined language addon for Notepad++. Simply follow the
instructions of this readme and whenever you open a PSG file in Notepad++ it will automatically light up with proper papyrus
language definitions and syntax so you can find everything you are looking for.
Before you install be please make note of the following:
What this file will DO:
What this file DOESN'T do:
INSTALLATION
1) Ensure you have Notepad++ installed (Recommended 8.0+ version 32 bit version of Notepad++)
2)With Notepad++ open go to Settings > Style Configurator and set Notepad++ theme to 'DarkModeDefault'


3) On this same section (Global Style) ensure 'Enable global foreground colour' is OFF. Feel free to adjust the foreground and background colors but recommended foreground be close to white and background to black/dark grayish

4)Unzip this folder and locate the file called 'papy_3do.xml'
5) In Notepad++ go to Language > User Defined Language > Define your Language...

6) From here you will see an 'import' button. Import the papy_3do.xml you should see an 'Import Successful' popup
7) Give the file the name 'papy_3do' and save it (if it is not already saved by default, it should be by importing already)
8) Choose on the drop down called 'User Language' the papy_3do'. After this ensure at the top the checkbox 'Ignore case' IS checked AND for Ext. it says 'psg'


9) Close the window and now open up a psg file in Notepad++
10) If it does not automatically register choose from Language menu at the bottom 'papy_3do'

11) Your psg script is now successfully highlighting in in Papyrus script language:

Bonus:
If you like the font I use you can download it here and install on your pc:
Roboto Mono SemiBold
fonts.google.com
After installation in Notepad++ go to Settings > Style Configurator and in Global override chose font style Roboto Mono SemiBold and font size to 10

USING FOLDS (ABILITY TO EXPAND / COLLAPSE CODE)
Notepad++ has a built in way to fold lines of text and hide them. This is very useful when working with large lines of code and having the ability to collapse
whole sections of code so you can ignore it while focusing on the sections you care about. This language has a custom built in identifier to collapse/expand as many
or as little lines of code you need.
To create these folds simply add these two lines in a section you wish to be able to collapse/expand:
Start your fold with:
#papy_group
End your fold with:
#papy_end
Example:

and when you collapse section:

You will now see a line from #papy_group to #papy_end that allows you to expand and collapse any lines of text between them
You can add as many of these 'folds' as you want. Keep in mind it is merely for organization purposes and only works in Notepad++ with this Language addon enabled.
It does not have any effect on the game code nor work in other text or IDE editors. Always make sure the hashtag # is before the names so the text is commented out
and will be ignored when you compile your 3dos.
KNOWN ISSUES / LIMITATIONS
SUPPORT
If you want to keep up to date on latest versions of this addon please visit the official thread
Created by: Mystical
OVERVIEW
The NR2003 Papyrus Scripting Language is not recognized as a Script/Code Language by any text or IDE editors.
As a result this means the text appear plain (most likely as this readme file looks right now). Most common
scripting languages today have built in Languages that can highlight and identify syntax, keywords, operators,
Delimiters and etc etc that makes it not only easier to find the specific code fragment you are looking for but
also help prevent errors.
Since PSG scripting for NR2003 was only used in papyrus games (as far as access wise common users have) no public
Script languages to 'translate' PSG lines of code are available. This mean users must deal with plain text reading
thousands of lines of code and the best option is to insert my lines breaks in the form of commented out code to make
it easier for the read to scroll through and find the code they are on.
Well not anymore, that all has changed with the first available User Defined language addon for Notepad++. Simply follow the
instructions of this readme and whenever you open a PSG file in Notepad++ it will automatically light up with proper papyrus
language definitions and syntax so you can find everything you are looking for.
Before you install be please make note of the following:
What this file will DO:
- Helps highlight text in PSG script files that is native to the papyrus scripting to make it easier to identify items such as state switches, variables, numbers, delimiters, operators, keywords, file formats, folds, etc etc. It provides better visual line breaks in your code, especially for car mods that can be 4k+ lines long and you need to scroll down to the damage section and hope you fight the region morphs section for example.
- Helps dim comment lines so only the 'active' lines of code are more prominent. This will not only make it easier to skim active code but also know where the deliberate comments or omitted lines of code are.
- Help prevent syntax or Keyword errors. For example if the Variable you type isn't correct it won't light up and that gives an indication there might be an error when you compile. This can allow you to catch these error easier and sooner. We've all been there where one comma or a case sensitive word broke your 3do compile.
- Allows you to create folds in your code. Similar to how Notepad++ lets you temporarily hide and unhide lines. There is a built in fold code you can use (see fold section below for more details.)
What this file DOESN'T do:
- Create PSG coding for you. You still need to understand PSG scripting for Mods or Trackside objects. Think of this like the visual NR2003 raceline you can toggle in the game where the acceleration and braking zones are. You still have to drive the car around the track. This language simply lights the way, but doesn't do the work for you.
- Make PSG coding easier for you. Yes, to an extent it does help in highlighting but this is a 'nice to have' addon. If you've done enough PSG scripting you probably don't NEED this. However even the most experienced coders use Language definitions so don't see it as a crutch ... but at the same time don't rely on it 100% to get your NR2003 scripting done either.
INSTALLATION
1) Ensure you have Notepad++ installed (Recommended 8.0+ version 32 bit version of Notepad++)
2)With Notepad++ open go to Settings > Style Configurator and set Notepad++ theme to 'DarkModeDefault'


3) On this same section (Global Style) ensure 'Enable global foreground colour' is OFF. Feel free to adjust the foreground and background colors but recommended foreground be close to white and background to black/dark grayish

4)Unzip this folder and locate the file called 'papy_3do.xml'
5) In Notepad++ go to Language > User Defined Language > Define your Language...

6) From here you will see an 'import' button. Import the papy_3do.xml you should see an 'Import Successful' popup
7) Give the file the name 'papy_3do' and save it (if it is not already saved by default, it should be by importing already)
8) Choose on the drop down called 'User Language' the papy_3do'. After this ensure at the top the checkbox 'Ignore case' IS checked AND for Ext. it says 'psg'


9) Close the window and now open up a psg file in Notepad++
10) If it does not automatically register choose from Language menu at the bottom 'papy_3do'

11) Your psg script is now successfully highlighting in in Papyrus script language:

Bonus:
If you like the font I use you can download it here and install on your pc:
Roboto Mono SemiBold

Google Fonts: Roboto Mono
Roboto Mono is a monospaced addition to the Roboto type family. Like the other members of the Roboto family, the fonts are optimized for readability on screens
After installation in Notepad++ go to Settings > Style Configurator and in Global override chose font style Roboto Mono SemiBold and font size to 10

USING FOLDS (ABILITY TO EXPAND / COLLAPSE CODE)
Notepad++ has a built in way to fold lines of text and hide them. This is very useful when working with large lines of code and having the ability to collapse
whole sections of code so you can ignore it while focusing on the sections you care about. This language has a custom built in identifier to collapse/expand as many
or as little lines of code you need.
To create these folds simply add these two lines in a section you wish to be able to collapse/expand:
Start your fold with:
#papy_group
End your fold with:
#papy_end
Example:

and when you collapse section:

You will now see a line from #papy_group to #papy_end that allows you to expand and collapse any lines of text between them
You can add as many of these 'folds' as you want. Keep in mind it is merely for organization purposes and only works in Notepad++ with this Language addon enabled.
It does not have any effect on the game code nor work in other text or IDE editors. Always make sure the hashtag # is before the names so the text is commented out
and will be ignored when you compile your 3dos.
KNOWN ISSUES / LIMITATIONS
- This addon is currently in BETA 0.9. While 99.9% of the known and commonly used papyrus coding that modders use for Mods and TSO's is added some of the rarer keywords could be missing or incorrect. In the event you know of extra papyrus lines please report them in the official thread:
- This addon was made with the intention of using NotePad++ Dark Mode theme. If you use a brighter background theme you may have to adjust some of the language colors that are highlighted. You can do this by editing the User Defined language from: Language > Definite Your Language (make sure in drop down list the papy_3do is chosen) then edit the colors for each section to your liking
- This addon was tested on and worked with Windows 10, 8.4.5 32 bit version of Notepad++ local version (portable should be fine too). No guarantee it may work on older versions or 64 bit Notepad++ (as 64 bit has different addon compatibility). Use at your own discretion. Not responsible for any settings/Notepad++ issues you may incur using this.
SUPPORT
If you want to keep up to date on latest versions of this addon please visit the official thread
Last edited: