ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Neverwinter Script syntax and build

by CromFr ST3

Sublime Text completion, syntax highlighting and build system for NWScript (NSS) (NWN2 and possibly NWN1)

Details

Installs

  • Total 1K
  • Win 834
  • Mac 172
  • Linux 141
Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28
Windows 0 0 2 1 2 2 0 0 0 0 0 3 0 2 0 1 0 1 0 0 0 0 1 1 0 3 0 0 0 0 1 0 2 1 0 0 0 0 0 1 0 2 0 0 1 1
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1
Linux 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text completion and build tools for NWScript

animated demo

Features

  • NWScript
    • Syntax highlighting: A bit more accurate than the C syntax
    • Auto-completion: Functions, constants, #define and include scripts names
    • Documentation: Popups containing function documentation parsed from the script, with some additional notes for known badly behaving functions.
    • Snippets: while loops with GetFirst / GetNext functions, and other useful code snippets
    • Basic build tool: Run the compiler for a single script or for the entire module
    • Smart build tool: Quick multi-threaded compilation (only re-compile needed scripts)
  • 2DA syntax hilighting: Syntax highlighting and label column indexing (Ctrl+R)

Note: This package has been designed for NWN2 in mind, but it should work with NWN1 as well.

Installation

Compiler installation (required for using this package)

Chose either option 1 or 2

Option 1: Using the prepared zip

Option 2: By extracting scripts

  1. Download the AdvancedScriptCompiler (http://neverwintervault.org/project/nwn2/other/tool/advanced-script-compiler-nwn2) and extract content of StandaloneCompiler in

    • Windows: C:\Program Files (x86)\NWNScriptCompiler\
    • Linux: /opt/NWNScriptCompiler/
    • or any other path, but in that case you will need to update the path to NWNScriptCompiler.exe in:
      • The package settings (Preferences -> Package settings -> STNeverwinterScript -> Settings)
      • The nwscript.sublime_build file that is located in Sublime text package directory (Preferences -> Browse packages)
  2. Extract the NWN2 script data files (located by default in C:\Program Files (x86)\Atari\Neverwinter Nights 2\Data\Scripts*.zip) in

    • Windows: C:\Program Files (x86)\NWNScriptCompiler\Scripts\
    • Linux: /opt/NWNScriptCompiler/Scripts
    • or any other path, but you will need to update nwscript.sublime_build and the package settings as described above
  3. [Optional] You can delete ncs files from the Scripts directory, since only nss are required for compilation.

Extra steps for Linux

You need wine in order to use the NWNScriptCompiler.exe

apt-get install wine #Ubuntu/Debian users
yum install wine #Fedora/Redhat users
pacman -S wine #Arch-Linux awesome users

You also need to edit STNeverwinterScript settings (Preferences -> Package settings -> STNeverwinterScript -> Settings) to override the compiler and include paths for Linux (examples provided).

Sublime package installation

Install with PackageControl

  1. From Sublime Text: press Ctrl+Shift+P, write PCInstall, press Enter
  2. Search for STNeverwinterScript, press Enter
  3. Follow the Compiler installation instruction above, if you haven't already