Howdy, Stranger!

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

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

NWNX

245

Comments

  • OrleronOrleron Member Posts: 5
    Would there be plans to add VaultSTER to that NWNX plugin list? CoPaP relies on that plugin to allow players to travel from one PW to another.

  • TsaisTsais Member Posts: 11
    Thanks so much for the sneak peak! Very excited to see the API.

    Quick question: virusman had added some really nifty NWNX functions for saving a placeable and its inventory (SQLSCOExec()/SQLRCOExec()) in a single blob, which l found really useful. Any idea if the new version of NWNX will have something like that for persistent storage?

    Also, is there going to be a way to hook into the timer bar like the StartTimingBar()/StopTimingBar() functions from nwnx_funcsext?

  • LiarethLiareth Member Posts: 74
    The source code (including API) for 8149 has now been released. 8150 API to follow when the build is live to the public.

    https://code.nwnx.io/nwnxee

  • GlorwingerGlorwinger Member Posts: 40
    @Liareth - the new Readme.md specifies GCC 6.4.0+ vs 5.40+ from you previous notes - is 6.4.0+ correct?

  • LiarethLiareth Member Posts: 74
    edited December 2017
    @Glorwinger I don't know, hence the question mark! I haven't tried a bunch of old compilers. I just listed the compiler I compile on. Give it a shot and see what happens.

  • GlorwingerGlorwinger Member Posts: 40
    @Liareth - OK I have tried 6.3 and 7.2.0... both still have a few warnings and errors when executing the Makefile

    make -j 8 Scanning dependencies of target BeaEngine [ 1%] Building C object NWNXLib/External/BeaEngine/CMakeFiles/BeaEngine.dir/src/BeaEngine.c.o [ 3%] Linking C static library libBeaEngine.a [ 3%] Built target BeaEngine Scanning dependencies of target NWNXLib [ 6%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Plugin.cpp.o [ 6%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/API/Globals.cpp.o [ 7%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/DynamicLibraries.cpp.o [ 10%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/Assembly.cpp.o [ 10%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/ASLR.cpp.o [ 12%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/API/Linux/API/UnityBuild.cpp.o [ 15%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/FileSystem.cpp.o [ 15%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Hooking/FunctionHook.cpp.o [ 16%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/Memory.cpp.o [ 18%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/Syslog.cpp.o [ 20%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Platform/Time.cpp.o [ 23%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Events/Events.cpp.o [ 23%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Config/Config.cpp.o [ 24%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Hooks/Hooks.cpp.o [ 26%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Log/Log.cpp.o [ 27%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Metrics/Metrics.cpp.o [ 29%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Metrics/Resamplers.cpp.o [ 30%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Patching/Patching.cpp.o [ 32%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Plugins/Plugins.cpp.o [ 33%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Tasks/Tasks.cpp.o [ 35%] Building CXX object NWNXLib/CMakeFiles/NWNXLib.dir/Services/Messaging/Messaging.cpp.o [ 36%] Linking CXX static library libNWNXLib.a [ 36%] Built target NWNXLib Scanning dependencies of target Core [ 38%] Building CXX object Core/CMakeFiles/Core.dir/EntryPointLinux.cpp.o [ 40%] Building CXX object Core/CMakeFiles/Core.dir/NWNXCore.cpp.o In file included from /projects/nwnx/NWNXLib/./Services/Log/Log.hpp:102:0, from /projects/nwnx/Core/NWNXCore.cpp:12: /projects/nwnx/NWNXLib/./Services/Log/Log.inl: In instantiation of ‘static std::__cxx11::string NWNXLib::Services::Log::FormatString(const char*, Args ...) [with Args = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /projects/nwnx/NWNXLib/./Services/Log/Log.inl:53:53: required from ‘void NWNXLib::Services::Log::Write(NWNXLib::Services::LogSeverity, NWNXLib::Services::LogSeverity, const string&, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:12:5: required from ‘void NWNXLib::Services::Log::Info(const string&, NWNXLib::Services::LogSeverity, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:78:5: required from ‘void NWNXLib::Services::LogProxy::Info(const char*, Params ...) [with Params = {}]’ /projects/nwnx/Core/NWNXCore.cpp:78:61: required from here /projects/nwnx/NWNXLib/./Services/Log/Log.inl:61:34: warning: format not a string literal and no format arguments [-Wformat-security] const int ret = std::snprintf(nullptr, 0, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:65:18: warning: format not a string literal and no format arguments [-Wformat-security] std::snprintf(buffer.get(), len + 1, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 41%] Linking CXX shared library ../../Binaries/NWNX_Core.so [ 41%] Built target Core Scanning dependencies of target BehaviourTree Scanning dependencies of target Administration Scanning dependencies of target Chat Scanning dependencies of target Creature Scanning dependencies of target Events Scanning dependencies of target Object Scanning dependencies of target Metrics_InfluxDB Scanning dependencies of target Data [ 43%] Building CXX object Plugins/BehaviourTree/CMakeFiles/BehaviourTree.dir/BehaviourTree.cpp.o [ 46%] Building CXX object Plugins/Administration/CMakeFiles/Administration.dir/Administration.cpp.o [ 46%] Building CXX object Plugins/Creature/CMakeFiles/Creature.dir/Creature.cpp.o [ 47%] Building CXX object Plugins/Metrics_InfluxDB/CMakeFiles/Metrics_InfluxDB.dir/Metrics_InfluxDB.cpp.o [ 49%] Building CXX object Plugins/Chat/CMakeFiles/Chat.dir/Chat.cpp.o [ 52%] Building CXX object Plugins/Data/CMakeFiles/Data.dir/Data.cpp.o [ 53%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events.cpp.o [ 53%] Building CXX object Plugins/Object/CMakeFiles/Object.dir/Object.cpp.o In file included from /projects/nwnx/NWNXLib/./Services/Log/Log.hpp:102:0, from /projects/nwnx/Plugins/Administration/Administration.cpp:10: /projects/nwnx/NWNXLib/./Services/Log/Log.inl: In instantiation of ‘static std::__cxx11::string NWNXLib::Services::Log::FormatString(const char*, Args ...) [with Args = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /projects/nwnx/NWNXLib/./Services/Log/Log.inl:53:53: required from ‘void NWNXLib::Services::Log::Write(NWNXLib::Services::LogSeverity, NWNXLib::Services::LogSeverity, const string&, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:19:5: required from ‘void NWNXLib::Services::Log::Notice(const string&, NWNXLib::Services::LogSeverity, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:84:5: required from ‘void NWNXLib::Services::LogProxy::Notice(const char*, Params ...) [with Params = {}]’ /projects/nwnx/Plugins/Administration/Administration.cpp:77:60: required from here /projects/nwnx/NWNXLib/./Services/Log/Log.inl:61:34: warning: format not a string literal and no format arguments [-Wformat-security] const int ret = std::snprintf(nullptr, 0, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:65:18: warning: format not a string literal and no format arguments [-Wformat-security] std::snprintf(buffer.get(), len + 1, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 55%] Building CXX object Plugins/Data/CMakeFiles/Data.dir/Providers/Array.cpp.o [ 56%] Building CXX object Plugins/Metrics_InfluxDB/CMakeFiles/Metrics_InfluxDB.dir/InfluxDBClient.cpp.o [ 58%] Linking CXX shared module ../../../Binaries/NWNX_Creature.so [ 60%] Linking CXX shared module ../../../Binaries/NWNX_Object.so [ 61%] Linking CXX shared module ../../../Binaries/NWNX_Administration.so [ 63%] Linking CXX shared module ../../../Binaries/NWNX_Chat.so [ 64%] Linking CXX shared module ../../../Binaries/NWNX_BehaviourTree.so [ 64%] Built target Creature [ 64%] Built target Object [ 64%] Built target Administration Scanning dependencies of target Player Scanning dependencies of target Ruby Scanning dependencies of target ServerLogRedirector [ 66%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Helpers.cpp.o [ 67%] Building CXX object Plugins/Player/CMakeFiles/Player.dir/Player.cpp.o [ 67%] Built target Chat [ 69%] Building CXX object Plugins/Ruby/CMakeFiles/Ruby.dir/Ruby.cpp.o [ 70%] Building CXX object Plugins/ServerLogRedirector/CMakeFiles/ServerLogRedirector.dir/ServerLogRedirector.cpp.o [ 70%] Built target BehaviourTree Scanning dependencies of target SQL [ 72%] Linking CXX shared module ../../../Binaries/NWNX_Metrics_InfluxDB.so Scanning dependencies of target ThreadWatchdog [ 73%] Building CXX object Plugins/SQL/CMakeFiles/SQL.dir/SQL.cpp.o [ 75%] Building CXX object Plugins/ThreadWatchdog/CMakeFiles/ThreadWatchdog.dir/ThreadWatchdog.cpp.o [ 76%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events/AssociateEvents.cpp.o [ 76%] Built target Metrics_InfluxDB Scanning dependencies of target Tracking [ 78%] Building CXX object Plugins/Tracking/CMakeFiles/Tracking.dir/Tracking.cpp.o In file included from /usr/include/ruby-2.3.0/ruby.h:33:0, from /projects/nwnx/Plugins/Ruby/Ruby.cpp:10: /usr/include/ruby-2.3.0/ruby/ruby.h:127:73: error: size of array ‘ruby_check_sizeof_long’ is negative typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1]; ^ /usr/include/ruby-2.3.0/ruby/ruby.h:131:76: error: size of array ‘ruby_check_sizeof_voidp’ is negative typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1]; ^ In file included from /usr/include/ruby-2.3.0/ruby/intern.h:35:0, from /usr/include/ruby-2.3.0/ruby/ruby.h:1992, from /usr/include/ruby-2.3.0/ruby.h:33, from /projects/nwnx/Plugins/Ruby/Ruby.cpp:10: /usr/include/ruby-2.3.0/ruby/st.h:52:93: error: size of array ‘st_check_for_sizeof_st_index_t’ is negative typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int)sizeof(st_index_t) ? 1 : -1]; ^ [ 80%] Linking CXX shared module ../../../Binaries/NWNX_Player.so In file included from /usr/include/ruby-2.3.0/ruby/ruby.h:1992:0, from /usr/include/ruby-2.3.0/ruby.h:33, from /projects/nwnx/Plugins/Ruby/Ruby.cpp:10: /usr/include/ruby-2.3.0/ruby/intern.h:47:33: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] void rb_mem_clear(register VALUE*, register long); ^ /usr/include/ruby-2.3.0/ruby/intern.h:47:45: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] void rb_mem_clear(register VALUE*, register long); ^~~~ In file included from /projects/nwnx/NWNXLib/./Services/Log/Log.hpp:102:0, from /projects/nwnx/Plugins/ThreadWatchdog/ThreadWatchdog.cpp:4: /projects/nwnx/NWNXLib/./Services/Log/Log.inl: In instantiation of ‘static std::__cxx11::string NWNXLib::Services::Log::FormatString(const char*, Args ...) [with Args = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /projects/nwnx/NWNXLib/./Services/Log/Log.inl:53:53: required from ‘void NWNXLib::Services::Log::Write(NWNXLib::Services::LogSeverity, NWNXLib::Services::LogSeverity, const string&, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:26:5: required from ‘void NWNXLib::Services::Log::Warning(const string&, NWNXLib::Services::LogSeverity, const char*, Params ...) [with Params = {}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /projects/nwnx/NWNXLib/./Services/Log/Log.inl:90:5: required from ‘void NWNXLib::Services::LogProxy::Warning(const char*, Params ...) [with Params = {}]’ /projects/nwnx/Plugins/ThreadWatchdog/ThreadWatchdog.cpp:74:99: required from here /projects/nwnx/NWNXLib/./Services/Log/Log.inl:61:34: warning: format not a string literal and no format arguments [-Wformat-security] const int ret = std::snprintf(nullptr, 0, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 81%] Linking CXX shared module ../../../Binaries/NWNX_ServerLogRedirector.so Plugins/Ruby/CMakeFiles/Ruby.dir/build.make:62: recipe for target 'Plugins/Ruby/CMakeFiles/Ruby.dir/Ruby.cpp.o' failed /projects/nwnx/NWNXLib/./Services/Log/Log.inl:65:18: warning: format not a string literal and no format arguments [-Wformat-security] std::snprintf(buffer.get(), len + 1, format, args ...); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [Plugins/Ruby/CMakeFiles/Ruby.dir/Ruby.cpp.o] Error 1 [ 81%] Built target Player CMakeFiles/Makefile2:1164: recipe for target 'Plugins/Ruby/CMakeFiles/Ruby.dir/all' failed make[1]: *** [Plugins/Ruby/CMakeFiles/Ruby.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 83%] Building CXX object Plugins/Tracking/CMakeFiles/Tracking.dir/Targets/Activity.cpp.o [ 86%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events/ClientEvents.cpp.o [ 86%] Building CXX object Plugins/SQL/CMakeFiles/SQL.dir/Targets/MySQL.cpp.o [ 87%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events/ExamineEvents.cpp.o [ 89%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events/ItemEvents.cpp.o [ 89%] Built target ServerLogRedirector [ 90%] Linking CXX shared module ../../../Binaries/NWNX_Data.so [ 92%] Building CXX object Plugins/Events/CMakeFiles/Events.dir/Events/StealthEvents.cpp.o [ 93%] Linking CXX shared module ../../../Binaries/NWNX_ThreadWatchdog.so [ 93%] Built target Data [ 93%] Built target ThreadWatchdog [ 95%] Linking CXX shared module ../../../Binaries/NWNX_SQL.so [ 96%] Linking CXX shared module ../../../Binaries/NWNX_Tracking.so /usr/bin/ld: cannot find -lmysqlclient collect2: error: ld returned 1 exit status Plugins/SQL/CMakeFiles/SQL.dir/build.make:124: recipe for target '../Binaries/NWNX_SQL.so' failed make[2]: *** [../Binaries/NWNX_SQL.so] Error 1 CMakeFiles/Makefile2:1278: recipe for target 'Plugins/SQL/CMakeFiles/SQL.dir/all' failed make[1]: *** [Plugins/SQL/CMakeFiles/SQL.dir/all] Error 2 [ 98%] Linking CXX shared module ../../../Binaries/NWNX_Events.so [ 98%] Built target Tracking [ 98%] Built target Events Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

  • LiarethLiareth Member Posts: 74
    @Glorwinger Looks like you don't have the right ruby headers installed and configured. (You need the 32-bit headers)

  • GlorwingerGlorwinger Member Posts: 40
    @Liareth I'm not finding a clear way to do that for ruby on Ubuntu 16.04 64 bit. GCC wasn't hard. Are you build with a 32-bit instance of Linux? I can spin up another VM quickly if so. Quick searches on Ruby don't seem like it's a simple task to have both 32 and 64 or even install the 32 bit option.

  • SherincallSherincall Member Posts: 387
    FWIW, I never could compile the ruby plugin on a 64bit host. You may need to manually edit the ruby headers to remove the static assertions..

  • meaglynmeaglyn Member Posts: 78
    Should be a way to specify which plugins you want to build and leave ruby out, I'd hope.

  • VanesVanes Member Posts: 2
    edited December 2017
    I just managed (after several hours of testing) to build all the plugins on Ubuntu 16.04 x64.

    What I had to do was install Ruby 32bit. I used the rnv ruby package manager. If you already have x64 ruby installed, you might run into issues so uninstall that first or figure out how to have both installed. I couldn't have both with the same version installed at the same time...also you may run into issues if you install several different package managers for Ruby so beware.

    (always do this first :D)

    sudo apt-get update

    (following instructions from https://rvm.io/ for the following basically)

    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
    \curl -sSL https://get.rvm.io | bash -s stable

    rvm get head
    rvm install 2.4.2 --32
    rvm --default use 2.4.2

    And to get the SQL plugin to compile I had to install libmysqlclient (32bit) using the following (Thanks Garreatt):

    sudo apt install libmysqlclient-dev:i386

    Also to correctly get it to compile only using the 32bit libraries, you have to use the following lines when running cmake (thanks Niv):

    cd ~/nwnx/unified
    mkdir build && cd build
    CC="gcc -m32" CXX="g++ -m32" cmake -DCMAKE_BUILD_TYPE=Release ../
    make -j 8

  • TimendainumTimendainum Member Posts: 24
    There is a docker image floating around you can build it with in docker. I think they also released binaries.

    Docker images and such are being shared and talked about on the NWNX discord.

  • WhitegraveWhitegrave Member Posts: 37
    Pardon my ignorance here. Is this an NWNX release? Is this a build I can use to run an EE server that relied on NWNX functions previously? Windows 10

  • ELadnerELadner Member Posts: 9
    I see the MySQL connector. Any ETA on the PostgreSQL connector?

  • BalanorBalanor Member Posts: 169
    @Whitegrave Beamdog is only doing the Linux version of NWNX for EE at this time. Not sure if they'll do one for Windows, or rely on someone in the community to figure that out on their own. The good news is that if you are using NWNX primarily for the additional scripting functions it provided, it *sounds* like some/much/most of that functionality is planned to be ported to the base game - so you may not have to wait for NWNX on Windows.

  • thurgoodthurgood Member Posts: 3
    edited February 2018
    Thanks, Vanes, for helping with the correct version of ruby (I had to use gpg2 on ubuntu 16.04 BTW)
    EDIT: use version 2.3.0 not 2.4.2 as mentioned in vanes's post (the latter worked at the time but doesn't now)

    Anyone trying to get it working with Ubuntu 16.04 (since it is the LTS version) be aware that you will the gcc-6-multilib and g++-6-multilib packages to compile, which are not provided in the default repositories. The following link details how to add the additional repos that contain them:

    https://askubuntu.com/questions/746369/how-can-i-install-and-use-gcc-6-on-xenial

    Be sure to grab the multilib versions if you are on x64 systems and need the i386 support (hint.. you do)

    since these will not become your default toolchain you will need to use the following command to get cmake to make use of them:
    CC="gcc-6 -m32" CXX="g++-6 -m32" cmake -DCMAKE_BUILD_TYPE=Release ../

    oops.. had to edit as I forgot the versions in the cmake command :/

    Post edited by thurgood on
  • QuilistanQuilistan Member Posts: 93
    Forgive me for being ignorant. I am Returning to NWN after a long break, and am relearning a lot!

    I had NWNX2 running to start and restart (if needed) my PW server. This morning I ran the update to the Head Start. Now NWN2 will not start the server. I believe I have gotten all needed files back in their place, and made sure the ini file was correct with module name and what not, since I know the update removed them.

    I am wondering if it (nwnx2) doesn't work with the new update? I am running it on Windows 10.
    I can start the server manually with no issues.

  • GlorwingerGlorwinger Member Posts: 40
    NWNX needs to be updated for 8152. @Liareth will be providing that update in the next few days. I will publish a Docker Image shortly after that but the updated binaries should be available on the nwnx.io site.

  • PhenomenPhenomen Member Posts: 33
    edited December 2017
    Quilistan said:

    I am wondering if it (nwnx2) doesn't work with the new update?

    Old nwnx2 is not compatible with EE. Also new NWNX has different API so you will have to rewrite your scripts if you want to transfer PW to EE.

  • QuilistanQuilistan Member Posts: 93
    Thanks for the info.

    I think all I previously used it for was to start/restart the server and keep it running if it crashed, and that was actually working before I updated to the latest version. At the very lest it started the server ;)

    Anyway, looking forward to whats coming up. Lots to learn for me, been away for several years.

  • TsaisTsais Member Posts: 11
    Are there .so files available at nwnx.io and I just missed them, or is the only option at the moment to build from source? If build-only, does it matter if Linux is 32- or 64-bit, and is one preferred by the developers (or easier to install)?

  • thurgoodthurgood Member Posts: 3
    If you run a 64 bit version of linux you will probably still have to add in the 32 bit library support. Nwnx itself is currently only 32 bit and the beamdog installer appears to only be available in 64 bit

    So I would suggest a 64 bit linux with added 32 bit libraries

  • TsaisTsais Member Posts: 11
    edited December 2017
    So I was finally able to get the binaries built for the new NWNX, but I don't see any information regarding a startup script - is there one? I tried modifying my old script, this time preloading NWNX_Core.so instead of nwnx2.so, but in the absence of docs, I'm completely guessing here. If any information about startup scripts and options (.ini) exists, I may have completely overlooked it. Anyone know?

    PS: output I've got so far:

    Neverwinter Nights Server Build:8152 Copyright BioWare Corp 1998-2004 Registering crash signal handlers. Server: Loading... Working Directory For Game Install Is: Working Directory For Your Resources Is: /home/tsais/.local/share/Neverwinter Nights I [23:35:02] NWNX_Core: Server is running version 8152. I [23:35:02] NWNX_Core: Loading plugins from: . I [23:35:02] NWNX_Core: Loaded plugin 0 (Administration) v1 by Liareth. I [23:35:02] NWNX_Core: Loaded plugin 1 (BehaviourTree) v1 by Liareth. I [23:35:02] NWNX_Core: Loaded plugin 2 (Chat) v1 by Liareth. I [23:35:02] NWNX_Core: Loaded plugin 3 (Creature) v1 by various / sherincall. I [23:35:02] NWNX_Core: Loaded plugin 4 (Data) v1 by Liareth. I [23:35:02] NWNX_Core: Loaded plugin 5 (Events) v1 by Liareth. E [23:35:02] NWNX_Core: Failed to load plugin (NWNX_Metrics_InfluxDB.so) because 'Required config key missing or invalid: NWNX_METRICS_INFLUXDB_HOST'. F [23:35:02] NWNX_Core: The server encountered a fatal error 'Required config key missing or invalid: NWNX_METRICS_INFLUXDB_HOST' during setup and must now terminate. terminate called after throwing an instance of 'std::runtime_error' what(): Required config key missing or invalid: NWNX_METRICS_INFLUXDB_HOST We just crashed hard. :( Sorry about that. But you can help us fix this! Please consider reporting this crash at http://redmine.beamdog.com with the relevant information attached.

    Post edited by Tsais on
  • TsaisTsais Member Posts: 11
    edited December 2017
    Round 11 of my NWNX experiments.

    Tried removing NWNX_Metrics_InfluxDB.so since it seemed to be the source of the error above. Now I get this one:

    E [22:18:29] NWNX_Core: Failed to load plugin (NWNX_SQL.so) because 'Required config key missing or invalid: NWNX_SQL_USERNAME'. F [22:18:29] NWNX_Core: The server encountered a fatal error 'Required config key missing or invalid: NWNX_SQL_USERNAME' during setup and must now terminate. terminate called after throwing an instance of 'std::runtime_error' what(): Required config key missing or invalid: NWNX_SQL_USERNAME We just crashed hard. :( Sorry about that. But you can help us fix this! Please consider reporting this crash at http://redmine.beamdog.com with the relevant information attached.

    So: both of these errors are referring to missing config keys (NWNX_METRICS_INFLUXDB_HOST, NWNX_SQL_USERNAME), but I can't see anywhere to input any keys, unless they're supposed to be environment variables.

    Anyone know?

    Post edited by Tsais on
  • nivniv Member, Moderator, Developer Posts: 390
    The new NWNX uses env vars for configuration, correct.

  • LiarethLiareth Member Posts: 74
    Here's a list of config options. Unfortunately documentation on what they do, when not obvious, is sparse.

    Chat.cpp
    "CHAT_SCRIPT"

    Events.cpp
    "ENABLE_ASSOCIATE_EVENTS"
    "ENABLE_CLIENT_EVENTS"
    "ENABLE_DM_ACTION_EVENTS"
    "ENABLE_EXAMINE_EVENTS"
    "ENABLE_ITEM_EVENTS"
    "ENABLE_STEALTH_EVENTS"

    Profiler.cpp
    "ENABLE_OVERHEAD_COMPENSATION"
    "OVERHEAD_COMPENSTION_FORCE"
    "OVERHEAD_COMPENSATION_RUNS"
    "OVERHEAD_COMPENSATION_RECALIBRATE"
    "OVERHEAD_COMPENSATION_RECALIBRATION_PERIOD"
    "ENABLE_AI_MASTER_UPDATES"
    "AI_MASTER_UPDATES_OVERKILL"
    "ENABLE_MAIN_LOOP"
    "ENABLE_NET_LAYER"
    "ENABLE_NET_MESSAGES"
    "ENABLE_OBJECT_AI_UPDATES"
    "ENABLE_OBJECT_EVENT_HANDLERS"
    "ENABLE_PATHING"
    "ENABLE_SCRIPTS"
    "SCRIPTS_AREA_TIMINGS"
    "SCRIPTS_TYPE_TIMINGS"
    "ENABLE_TICKRATE"

    Ruby.cpp
    "EVALUATE_METRICS"
    "PRELOAD_SCRIPT"

    MySQL.cpp
    "HOST"
    "USERNAME"
    "PASSWORD"
    "DATABASE"

    SQL.cpp
    "QUERY_METRICS"
    "TYPE"
    "MYSQL"

    Tracking.cpp
    "ENABLE_ACTIVITY_TARGET"



    You specify them as environment variables, as such: NWNX_SQL_HOST=127.0.0.1

  • TsaisTsais Member Posts: 11
    Thanks. I'm assuming from this that all environment variables follow the same format: "NWNX_" + (plugin) + "_" + (config key).

    I've managed to get basic SQL queries working and am now trying to convert a pre-'EE' module, which isn't exactly easy. Many gotchas along the way. This really needs better documentation. Willing to help with that, maybe I'll start compiling a 'for dummies' guide to NWNX if anyone's interested.

    For those trying to convert, you're going to have to rewrite most aps_include functions in order to keep using the same basic persistence setup (GetPersistentString, Int, etc.).

    Liareth
  • BalanorBalanor Member Posts: 169
    With the new master server list showing the type of server hosting a PW or multiplayer game, I'd just like to point out that as I post there there is a 2-to-1 ratio of Windows server (13) to Linux servers (6) right now. Although we all know that number may fluctuate from minute-to-minute.

    I just wanted to point this out since here since NWNX is only being ported (by Beamdog) to Linux right now. Perhaps priorities could be revisited since, based off this sampling today, there would seem to be around twice the demand for NWNX on Windows as there is for NWNX on Linux? Or, if nothing else, this sampling I hope just adds more fuel to the fire to get as much NWNX functionality into the base game as possible.

  • LiarethLiareth Member Posts: 74
    edited December 2017
    @Balanor To clarify, Beamdog is not working on NWNX: EE. I am. There is a bit of overlap because I'm consulting for Beamdog on NWN - and adding stuff to the base game when I have the time - but NWNX: EE as a project is driven by me in my spare time, not Beamdog. Windows support will likely end up coming from the community.

  • BalanorBalanor Member Posts: 169
    Thanks for the clarification Liareth. Trent also mentioned something like that today on the stream. I wasn't clear on that before, but I am now. At this point I'm mainly holding out hope for NWNX functions being brought to the base game anyway so any server can use them. Sounds like that could be happening, so I'll keep my fingers crossed...

Sign In or Register to comment.