-
Notifications
You must be signed in to change notification settings - Fork 2
Hosting a Server
Overview
This guide will walk you through installing Docker, creating a folder for your server, modifying the configurations, and running it.
Prerequisites
SQL Server 2017 (Install Guide)
Windows 10 Pro (The "Home" edition will not work!)
or a Linux (Debian-based) OS
Note: You might be able to use other OS's but they aren't officially supported.
Install Docker
Windows users should follow this guide (use the "Stable" release)
Linux users should follow this guide
Create a folder for the server
Next you need to make a folder specifically for your server. I generally use C:/nwn-ee on Windows and the desktop on Linux but you should be able to put it anywhere you've got permissions.
Inside that directory create folders with the following names:
- database
- hak
- jvm
- modules
- nwnx
- override
- portraits
- saves
- servervault
- tlk
Copy the start up script
You can find sample start up scripts here: https://github.com/zunath/Freescape_JVM/tree/master/nwn/server-files
Copy the appropriate file to your nwn-ee directory you just created.
If you're on Windows, you want "docker-windows-freescapeStart.cmd" If you're on Linux, you want "docker-linux-startFreescape.sh"
Edit the configuration
Once you've copied the file you need to open it up in an editor like Notepad (Windows) or gedit (Linux). Any editor will do.
You can change your server's settings here. Configure them however you want. In particular, you will want to change the player password and DM password.
At the bottom of the script are settings for connecting to the SQL Server instance. If you haven't installed SQL Server yet, follow this guide to do that now.
Make sure your settings are configured correctly!
Copy the JAR files
You will find a bunch of libraries used by Freescape in the "lib" folder of the repository. You need to copy these to the "jvm" folder you created earlier.
Additionally, you need to compile the code from source. By default, building the code will generate a Freescape.jar file in the C:/nwn-ee/jvm directory. If you're on Linux, this could end up in a different place. Make sure you check the Project Structure settings in IntelliJ if you can't find where the file is going.
Once Freescape.jar has been compiled you simply need to copy it to your "jvm" folder as well.
Run the server
The final step is to run the server using the script you copied and configured earlier. If all goes well, you should see something like this in the cmd (Windows) or terminal (Linux) window:
I [04:43:19] [Internal.cpp:121] NWNX_JVM: We're up.
I [04:43:19] [NWNXCore.cpp:222] NWNX_Core: Loaded plugin 4 (JVM) v1 by niv.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Metrics_InfluxDB due to configuration.
I [04:43:19] [NWNXCore.cpp:222] NWNX_Core: Loaded plugin 5 (Object) v1 by various / sherincall.
I [04:43:19] [NWNXCore.cpp:222] NWNX_Core: Loaded plugin 6 (Player) v1 by various / sherincall.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Profiler due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Redis due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Ruby due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_SQL due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_ServerLogRedirector due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_ThreadWatchdog due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Time due to configuration.
I [04:43:19] [NWNXCore.cpp:213] NWNX_Core: Skipping plugin NWNX_Tracking due to configuration.
I [04:43:19] [NWNXCore.cpp:222] NWNX_Core: Loaded plugin 7 (Weapon) v1 by Bhaal.
Working Directory For Game Install Is: /nwn/data
Working Directory For Your Resources Is: /nwn/run
Server: Running...
Server: Loading module "Freescape v2 CEP265".....................................................................................................
Server: Module loaded
I [04:43:27] [Events.cpp:161] NWNX_Events: Script 'mod_on_attack' subscribed to event 'NWNX_ON_START_COMBAT_ROUND_BEFORE'.
I [04:43:27] [Events.cpp:161] NWNX_Events: Script 'mod_on_examine' subscribed to event 'NWNX_ON_EXAMINE_OBJECT_BEFORE'.
I [04:43:27] [Events.cpp:161] NWNX_Events: Script 'mod_on_usefeat' subscribed to event 'NWNX_ON_USE_FEAT_BEFORE'.
I [04:43:27] [Events.cpp:161] NWNX_Events: Script 'mod_on_useitem' subscribed to event 'NWNX_ON_USE_ITEM_BEFORE'.
If you see errors in the log instead or the window appears and quickly closes, then something has gone wrong in your set up. Review the steps above and make sure you didn't miss anything. If you still have problems then come ask for help on our Discord.