Notepad++ User-Defined Language for rAthena NPC scripting.
You have to choose one of these options. If you want to change, remove the existing 'rathena' language
If you are using light-themed background, example Default white
- Open your Notepad++ and go to the Language > Define your language... > Import
- Choose file Notepadpp-rAthena-syntax-highlight.xml
If you are using dark-themed background, in this case is Vibrant Ink (one of default dark themes in Notepad++)
- Open your Notepad++ and go to the Language > Define your language... > Import
- Choose file rAthena-Vibrant-Ink.xml
If you are using dark-themed background, in this case is VS2015-Dark from VS2015-Dark-Npp
- Open your Notepad++ and go to the Language > Define your language... > Import
- Choose file rAthena-Vibrant-Ink.xml
Because there are many things can be added as rAthena auto-completion, for now the auto-completion list only for
- All script commands
- Mapflags
- Player's parameters
- Clif send type, example usage in
announce
such BC_ALL - Item bonuses
- Months and days
- Default event labels
- Copy an APIs/rathena.xml file to Notepad++ installation folder
Path\to\Notepad++\plugins\APIs\
. - Open menu Settings > Preferences... > Auto-Completion tab, check "Enable auto-completion on each input".
- Restart Notepad++.
- All script commands except
- Flow control: if else switch case default break for do while function end return
- Most usage script command as NPC dialog: next close close2 close3
- Variable with scope: @ . .@ '
- Variable with scope: $ $@ # ##
- Keywords using prefix for common labels and functions: On F_ S_ L_
- Mapflags: Mapflag identifier from doc/mapflags.txt
- NPC identifier: script shop cashshop marketshop itemshop pointshop duplicate mapflag boss_monster warp warp2
- All constants that grouped by prefix identifiers
- All constants that are not grouped by prefix identifier
- Item Bonuses constants
- Constants of NPC names (if only rAthena's script use
JT_
in script, this is not necessary)
- Flow control: if else switch case default break for do while function end return
- Most usage script command as NPC dialog: next close close2 close3
true
andfalse
Script/NPC file that loaded with rAthena UDL will be parsed by NPP functionList as
NPC is assumed as Class, and as its functions/methods are
- The NPC declaration itself is assumed as class constructor
- In-script function is assumed as function/method
- Label with prefix On is assumed as function/method
And these below are 'standalone' declarations will be assumed as functions (like C that has no class) and will be 'grouped' as Class-like
- monster: declarations of permanent monster spawn script line
- warp: declarations of warp script line
- warp2: declarations of warp2 script line
- shop: declarations of Shop NPC
- cashshop: declarations of Cash Shop NPC
- marketshop: declarations of Market Shop NPC
- pointshop: declarations of Point Shop NPC
- itemshop: declarations of Item Shop NPC
For mapflags, the Class-like group will have structure
<map2>mapflag
|- <mapflag1>
|- <mapflag2>
<map2>mapflag
|- <mapflag1>
|- <mapflag2>
- Find functionList.xml in your Notepad++ installation directory (it can be under
C:\Program Files\Notepad++
or%USER%\AppData\Roaming\Notepad++
depends on installation setup) - Read the instructions inside functionList.xml. DO NOT OVERWRITE YOUR LOCAL FILE
- The result will be like here for declaration
- and here for definition
- If you don't have rAthena UDL, you can make dummy UDL. Make sure the UDL name is rathena lowercase.
- Restart Notepad++
- Select the NPC/script file that you think as rAthena script, set the Language > rathena. The uploaded functionList.xml based on Notepad++ 7.6.6
Happy editing.