Player Resource Consortium

 

Author Topic: NWN dedicated server  (Read 10440 times)

0 Members and 1 Guest are viewing this topic.

February 25, 2011, 08:45:02 AM
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

I've been working on setting up a dedicated Linux NWN server on Amazon EC2, and have it nearly ready. It has NWN + PRC 3.4 + NWNX with all plugins. For anyone not familiar with EC2, it lets you set up virtual servers on the Internet: the storage costs only a few cents per gigabyte per month, and the server costs a few cents an hour to run (and nothing when it's not running). Upgrading to a faster server looks like a matter of changing the configuration a little and paying a few cents extra per hour when it's running. It seems like it would be great for setting up a server to run a game with a few friends without having to buy or set up any extra hardware. Anyone with an Amazon account can sign up for it.

Is anyone interested in instructions how to set up something like this for yourself?


February 25, 2011, 10:29:12 PM
Reply #1

I for one would be highly interested in any help in setting this up.


February 26, 2011, 11:54:15 AM
Reply #2
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: clansunstar

I for one would be highly interested in any help in setting this up.


Here's my first attempt at instructions: http://s3.amazonaws.com/NWN/tutorials/ec2_nwserver.html

They're still pretty rough:
a) Some of the instructions (specifically the SSH stuff) probably assumes you're working on a Mac (like me) or Linux computer. At some point, I'll add some Windows-specific instructions as well.
b) They're probably still too technical for a lot of people.
c) I don't actually have NWNX working yet on the server yet, even though it appears to be running correctly. Everything else works, though.

After I get everything working, I should be able to save a snapshot on Amazon that anyone can use, which will allow skipping a lot of the middle steps.

I'll be glad to help with any problems if I can.


February 28, 2011, 11:05:27 AM
Reply #3
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: CapnQ

Quote from: clansunstar

...b) They're probably still too technical for a lot of people...

After I get everything working, I should be able to save a snapshot on Amazon that anyone can use, which will allow skipping a lot of the middle steps.


Amazon just released a new feature that should allow me to automate most of the first part also, after I learn how to use it. I hope that in a few days I will have it set up so that it will take only a couple of easy steps to get a NWN server up and running, so that almost the only thing you'll have to do yourself is install the game modules. Maybe I could even make some scripts that would do that for certain modules.


February 28, 2011, 01:25:36 PM
Reply #4

That's pretty damn neat & you probably can't beat the bandwidth that you'd get via Amazon.
HEATSTROKE


March 10, 2011, 11:01:06 AM
Reply #5
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: CapnQ

Quote from: CapnQ

Quote from: clansunstar

...b) They're probably still too technical for a lot of people...

After I get everything working, I should be able to save a snapshot on Amazon that anyone can use, which will allow skipping a lot of the middle steps.


Amazon just released a new feature that should allow me to automate most of the first part also, after I learn how to use it. I hope that in a few days I will have it set up so that it will take only a couple of easy steps to get a NWN server up and running, so that almost the only thing you'll have to do yourself is install the game modules. Maybe I could even make some scripts that would do that for certain modules.


Well, because of work I haven't had time to work on the simplification much. I still plan to do it when I can, though.

Does anyone who runs a linux server have any ideas why NWNX funcs might not be working for me? NWNX says it installs, including all its plugins, but PRC doesn't seem to see it. I haven't spent much time trying to figure it out yet, but thought I'd ask to save myself the trouble if someone has an idea.


March 10, 2011, 12:12:24 PM
Reply #6
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Quote from: CapnQ

Does anyone who runs a linux server have any ideas why NWNX funcs might not be working for me? NWNX says it installs, including all its plugins, but PRC doesn't seem to see it. I haven't spent much time trying to figure it out yet, but thought I'd ask to save myself the trouble if someone has an idea.


PRC uses NWNX_Funcs for windows. AFAIK there is similar plugin for Linux, but you'll have to edit all nwnx scripts.


March 11, 2011, 09:25:31 AM
Reply #7
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: xwarren

Quote from: CapnQ

Does anyone who runs a linux server have any ideas why NWNX funcs might not be working for me? NWNX says it installs, including all its plugins, but PRC doesn't seem to see it. I haven't spent much time trying to figure it out yet, but thought I'd ask to save myself the trouble if someone has an idea.


PRC uses NWNX_Funcs for windows. AFAIK there is similar plugin for Linux, but you'll have to edit all nwnx scripts.


There is a similar plugin for Linux, and I assumed it would work the same way, intercepting they same calls to the NWN functions that get and set variables and looking for the same strings to do it's special magic. Apparently there is some difference that's making it not work, however; I was hoping someone who had set up both kinds of servers and knew what the difference was might chime in so I didn't have to figure it out. Looks like I'll have to work on it, though.


May 07, 2011, 12:47:11 PM
Reply #8
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

FYI, in a couple of days I should have a patch that makes PRC use NWNX funcs for win32 or Linux, whichever it's running on. It will also fix some PnP Shifter hit point issues when using NWNX funcs.


May 08, 2011, 08:43:02 AM
Reply #9
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Quote from: CapnQ

FYI, in a couple of days I should have a patch that makes PRC use NWNX funcs for win32 or Linux, whichever it's running on. It will also fix some PnP Shifter hit point issues when using NWNX funcs.


Sweet, thanks :D


May 10, 2011, 03:46:04 PM
Reply #10
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Here's the patch: http://s3.amazonaws.com/NWN/nwnprc3.patch.

What it does:
1) NWNX Funcs: Removes unused nwnx functions. Makes the ones that remain work on both win32 and linux.
2) PnP Shifter: Correctly adjust HP when shifting using NWNX funcs.
3) Chat debug commands: ability to get and set module variables.


May 11, 2011, 10:26:04 AM
Reply #11
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Quote from: CapnQ

Here's the patch: http://s3.amazonaws.com/NWN/nwnprc3.patch.

What it does:
1) NWNX Funcs: Removes unused nwnx functions. Makes the ones that remain work on both win32 and linux.
2) PnP Shifter: Correctly adjust HP when shifting using NWNX funcs.
3) Chat debug commands: ability to get and set module variables.


Thank you CapnQ :)

I've merged your patch with my copy of SVN repository. I won't commit it now though. I've made some serious editing in core PRC scripts and haven't finished yet - at this stage PRC will almost certainly not compile.

Good job with nwnx plugins :). Btw the number returned by GetLocalVariableCount() in linux version is probably correct - we set a lot of local variables in OnModuleLoad event (some operations are delayed so the result may not be the same every time).

Thanks again.


May 11, 2011, 02:32:16 PM
Reply #12
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: xwarren

Btw the number returned by GetLocalVariableCount() in linux version is probably correct - we set a lot of local variables in OnModuleLoad event (some operations are delayed so the result may not be the same every time).


I doubt it's correct. According to Windows, there about 1700 local variables, which seems like a reasonable interpretation of "a lot of local variables". According to Linux, there are about 300 million, which doesn't seem reasonable at all.


May 11, 2011, 02:35:51 PM
Reply #13
  • Developer
  • ***
  • Posts: 220
  • Karma: +0/-0
    • View Profile

Quote from: xwarren

I've made some serious editing in core PRC scripts and haven't finished yet - at this stage PRC will almost certainly not compile.


Forgot to mention: the version in Subversion doesn't compile either. The file scripts/prc_craft.nss uses PRC_CRAFT_POISON_USE_INGREDIENST, which isn't defined anywhere.


May 12, 2011, 02:11:43 PM
Reply #14
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Quote from: CapnQ

Forgot to mention: the version in Subversion doesn't compile either. The file scripts/prc_craft.nss uses PRC_CRAFT_POISON_USE_INGREDIENST, which isn't defined anywhere.


Sorry, always forgetting about something  :(

Hope it's fixed now.