I've written a small program using NWNScriptLib which can run simple script snippets without launching the game. This program may be useful to you if you want to test a very simple section of script without having to reload the entire game each time.
The program runs compiled script files, so you need to compile a script before you can run it.
Please note that only a very small number of functions in nwscript.nss (84 total in the first release) are implemented, so you would be best served by copying and pasting the snippet you want to run into a standalone script.
To print to the screen from the script, use the Print* functions (such as PrintString).
The script launcher is best suited for providing a test environment to get things like string manipulation working right.
You can grab the launcher applet here: Click Here
It's a console (command line) program. Usage is:
NWNScriptConsole <path to .ncs file> [script param1] [...script paramN]
Optionally, you can run a script in a .mod file by using the following command line:
NWNScriptConsole -module <modname> <name of script without ncs extension> [script param1] [...script paramN]
The ScriptActions.txt file included in the NWNScriptConsole.zip lists all the supported nwscript.nss functions. If you call any other nwscript.nss functions, the script will fail.
For advanced usage, instruction level tracing of the script can be enabled with the -scriptdebug 3 option. For example, "NWNScriptConsole -scriptdebug 3 <path to .ncs file> [script param1] [...script paramN]"
You need to exactly match the number of parameters that the script expects when running NWNScriptConsole, or the script will fail with an internal error.
Standalone NWScript runner
Débuté par
SkywingvL
, juil. 13 2010 06:18
#1
Posté 13 juillet 2010 - 06:18
#2
Posté 14 juillet 2010 - 03:21
Also to go with something like this there are some GREAT things to Compile outside the ToolSet. ProgrammersNotepad2 along with FancyColors(Vault) nssclc(Vault) and some solid direction following -- compiling outside the toolset was never so easy - saves tonnes of time when debugging inside the NWN2 game- Makes for faster loading of the game without the CPU demand the toolset has.





Retour en haut






