Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Script Compiler for Enhanced Edition

GlorwingerGlorwinger Member Posts: 39
edited February 22 in Tools & Plugin Developers
*** UPDATE ***

I just posted an UPDATED script compiler to the vault and Github that works with NWN EE and the packed game files. This one is based on the Skywing compiler engine and is more robust and faster. There are a few things left on the ToDo list - visit the source repository below to see or add bugs and issues.


This has been tested on Windows, Linux, and Mac for both 1.74 (EE) and older 1.69 and things seem i order so far...

https://neverwintervault.org/project/nwn1/other/tool/nwnsc-nwn-enhanced-edition-script-compiler

Source code... https://gitlab.com/glorwinger/nwnsc

Post edited by Glorwinger on
Balanorthirdmousesquattingmonk

Comments

  • shadguyshadguy Member Posts: 118
    @Glorwinger

    Thank you. It sounds like this may be a separate branch from Skywing's work, based on the same source. Is my understanding correct? [ Reference: https://neverwintervault.org/project/nwn2/other/tool/advanced-script-compiler-nwn2 ]

    -Dave

  • GlorwingerGlorwinger Member Posts: 39
    It is the base for the Skywing Compiler. I am going to pull the parser from that one and update this one. It doesn't have all of the optimizations etc. of the Skywing version. This one was already cross platform and easier to update for NWN EE.

  • shadguyshadguy Member Posts: 118
    Cool, thank you for the follow-up. :) :)

    -Dave

  • HimmelweissHimmelweiss Member Posts: 56
    @Glorwinger

    This is really awesome, also using Visual Studio Code now for nwscript and made a build task with your compiler.

    Really awesome!!!

  • BalanorBalanor Member Posts: 138
    edited February 17
    I'm not able to get this to work. External script compilers are definitely not my thing.

    I put the nwnnss.exe in C:\Users\username\Documents\Neverwinter Nights
    Then I created a .bat in the same directory with the following in it since that was the example on the NWVault page:
    @ECHO OFF
    nwnnss compile -p /Applications/Beamdog/00829 -u "/Users/username/Documents/Neverwinter Nights/" *.nss
    PAUSE

    And it always errors out with:
    "Unable to locate or open Neverwinter Nights"

    What am I doing wrong?

  • FinalStandFinalStand Member Posts: 85
    Balanor said:


    nwnnss compile -p /Applications/Beamdog/00829 -u "/Users/username/Documents/Neverwinter Nights/" *.nss
    PAUSE

    And it always errors out with:
    "Unable to locate or open Neverwinter Nights"

    You probably need to give the full path to the -p parameter. Also use backslashes in windows, not forward slahes.

    Something like `-p C:\Applications\Beamdog\00829`

    Lastly, if you update your client in beam dog client the last directory name (00829) will change, so need to update your script everytime you update.

  • SherincallSherincall Member Posts: 257

    Lastly, if you update your client in beam dog client the last directory name (00829) will change, so need to update your script everytime you update.

    00829 is not a version, it's the code for "NWN:EE Head Start Standard Edition". If you update it, it'll stay in the same spot. If you install Digital Deluxe, you'll get a different number. And when it gets released, it will get a new number (and head start will become beta for patches).

  • FinalStandFinalStand Member Posts: 85

    Lastly, if you update your client in beam dog client the last directory name (00829) will change, so need to update your script everytime you update.

    00829 is not a version, it's the code for "NWN:EE Head Start Standard Edition". If you update it, it'll stay in the same spot. If you install Digital Deluxe, you'll get a different number. And when it gets released, it will get a new number (and head start will become beta for patches).

    Good to know. It did change on me once, but regardless, that should fix his problem.

  • GlorwingerGlorwinger Member Posts: 39
    I updated the first post above with an updated Compiler. This is based on the Skywing engine and is more robust and stable.

    Give this one a try and report any issues here or better in the Issue tracker via the link above.

  • BalanorBalanor Member Posts: 138
    edited February 24
    just to close the loop, and in case it might help someone else; with Glorwinger' and sherincall's help I did get the new compiler to work. the .bat I setup looked like this:
    @ECHO OFF
    nwnsc -n "\Users\balan\Beamdog Library\00829" -i "\Users\balan\Beamdog Library\00829\ovr" -l *.nss
    pause
    Thanks Glorwinger, for your work on this!

  • GlorwingerGlorwinger Member Posts: 39
    Updated nwnsc script compiler version 0.9.6 - https://neverwintervault.org/project/nwn1/other/tool/nwnsc-nwn-enhanced-edition-script-compiler
    • Fixed several null pointers and segmentation faults
    • Improved speed with compile optimizations
    • Redundant -l command line option not required when passing -n
    • When building for NWN EE the installdir ovr folder (override) will be processed for includes before the .bif files
    • Added -M to create Makefile compatible dependency files

    squattingmonk
  • fot1fot1 Member Posts: 41
    I could use some help to make this work. I'm on Linux with a steam installation. I'm getting a segfault. I'm not sure what is the right directory to point the compiler. Without a directory, I get the same "Unable to locate script nwscript.nss" error. My best try was this one:

    $ /nwnsc -p /steam/steamapps/common/Neverwinter\ Nights/data/ temp0/*.nss Segmentation fault (core dumped)

    I have tried all partial paths and no luck. strace tells me the following:

    access("/steam/steamapps/common/Neverwinter Nights/data/", F_OK) = 0 open("/steam/steamapps/common/Neverwinter Nights/data/", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 _llseek(3, 0, [2147483647], SEEK_END) = 0 _llseek(3, 0, [0], SEEK_SET) = 0 mmap2(NULL, 2147483647, PROT_READ, MAP_SHARED, 3, 0) = -1 ENODEV (No such device) mmap2(NULL, 2147487744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x77514000 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xffffffff} ---

    I wonder what is the directory I should point to the compiler?

Sign In or Register to comment.