Post by Acaos on Jul 9, 2010 0:45:55 GMT
NWN in a Box (NWNIAB) is a community contribution from Higher Ground:
You can download NWNIAB here:
You'll also need the following software (all free except NWN itself):
To install and start the VM:
Here's the description/instructions from the actual VM (version 20100708):
Current issues (both bugs and documentation issues):
Acaos
- NWNIAB is a complete NWN Linux Server (Ubuntu 8.04 IA32) framework in a virtual machine you can run on a Windows (or Mac) desktop computer. All required software (except NWN itself) is free (both gratis and libre).
- NWNIAB uses your NWN install to provide all the actual NWN files and haks, so you'll need to have NWN installed on that PC, as well as any haks you intend to use.
- NWNIAB can run concurrently with your NWN client or the toolset, so you can use it for testing and development, or even use it to host a server.
- NWNIAB comes with NWNX (including NWNeXalt) already installed; it also includes a MySQL database which is already configured to be usable by the NWN server. It also includes all the development tools necessary to build NWNX modules.
- NWNIAB is still in beta and has many rough edges. Suggestions, feedback, and contributions are very appreciated.
You can download NWNIAB here:
- NWNIAB-20100708.7z (398 MiB) (md5sum: d8315eb0e1768eb9d31a946c197afe9c)
You'll also need the following software (all free except NWN itself):
- NWN 1.69 with SoU+HotU (Platinum or Diamond will also work)
- VirtualBox (3.2.6 or later)
- 7-zip (to extract the archive)
To install and start the VM:
- Install VirtualBox. Make sure that during installation, the Bridged and Host-Only networking adapters are enabled (they are by default). You may receive a warning that networking will be interrupted during installation; this is normal and not a cause for concern.
- Extract the archive to a folder, then start up VirtualBox.
- From the File menu, select Import Appliance, then Choose the OVF file you extracted from the archive. Select Next, then Finish.
- After following the setup instructions in the VM description (also replicated below), select the VM in the list and press Start.
- The first time the VM boots, you'll be given the option to select your keyboard (in case you have a non-US keyboard).
Here's the description/instructions from the actual VM (version 20100708):
NWN in a Box - Sponsored by Higher Ground (bb.hgweb.org/)
To set up your NWN in a Box:
- Click Settings, then System. Go to the Processor tab and ensure 'Enable PAE/NX' is checked.
- Go to the Shared Folders section.
- Click the folder with a + sign to add a shared folder.
- Scroll down in the Folder Path field to Other, then browse to your Neverwinter Nights folder (generally C:\Neverwinter Nights\NWN).
- Make sure the Folder Name field is 'NWN' in all capital letters, then click OK.
Basic usage of your NWN in a Box:
- The login name and password are both 'nwn' in all lower-case.
- The 'nwn' user has full sudo access. The sudo password is also 'nwn'.
- There is a MySQL database named 'nwn' which can be accessed by the user 'nwn' with password 'nwn'.
- The MySQL root password (should you need it) is 'mysql'.
- You can find the private address of your NWNIAB after logging in by looking in the lower left corner after logging in, next to the purple NWN. The address is typically 192.168.56.101.
- You can log in via PuTTY or other SSH client if you know the private address of your NWNIAB.
- The NWN user starts in 'screen' by default. The 'nano' and 'vi' editors are included.
System operations:
- Most of these operations are also available from the menu shown after system startup.
- To shut down NWNIAB when done, use the shutdown option in the module selector menu, or type 'sudo shutdown -P now' in a bash window.
- If you need to reconfigure your keyboard, type 'sudo dpkg-reconfigure console-data' in a bash window.
Using screen:
- You will see a list of seven windows near the bottom. Screens 0 through 3 are 'bash', screen 4 is 'nwserver', screen 5 is 'devlog', and screen 6 is 'top'. To switch to a screen, press LEFTCTRL+A #, where # is the screen you wish to switch to.
- The 'bash' screens are shell windows.
- The 'nwserver' screen will start and run the Neverwinter Nights server automatically.
- The 'devlog' screen shows the logfile from the NWN server.
- The 'top' screen shows system status.
Logging in to NWN:
- You can use Direct Connect to connect to NWNIAB. Use the private IP address and port 5121, e.g. '192.168.56.101:5121'.
- The player password is 'testpc'. The DM password is 'testdm'.
- You may need to adjust your firewall to allow connections over the VM ethernet adapter.
Hosting a public server:
- You will need to edit the settings in your nwnplayer.ini. To do so, press LEFTCTRL+A 0, then type 'nano ~/nwn/nwnplayer.ini' and edit the settings to the ones you wish.
- With the VM shut down, go to Settings, then Network, and select the Adapter 1 tab. Change 'Attached to' from 'NAT' to 'Bridged'.
- You may need to adjust your firewall or your router's packet forwarding to allow incoming connections from the Internet.
- If you have not changed the MySQL database password or NWN user password, you should ensure that only packets destined for UDP port 5121 are forwarded to your computer.
To set up your NWN in a Box:
- Click Settings, then System. Go to the Processor tab and ensure 'Enable PAE/NX' is checked.
- Go to the Shared Folders section.
- Click the folder with a + sign to add a shared folder.
- Scroll down in the Folder Path field to Other, then browse to your Neverwinter Nights folder (generally C:\Neverwinter Nights\NWN).
- Make sure the Folder Name field is 'NWN' in all capital letters, then click OK.
Basic usage of your NWN in a Box:
- The login name and password are both 'nwn' in all lower-case.
- The 'nwn' user has full sudo access. The sudo password is also 'nwn'.
- There is a MySQL database named 'nwn' which can be accessed by the user 'nwn' with password 'nwn'.
- The MySQL root password (should you need it) is 'mysql'.
- You can find the private address of your NWNIAB after logging in by looking in the lower left corner after logging in, next to the purple NWN. The address is typically 192.168.56.101.
- You can log in via PuTTY or other SSH client if you know the private address of your NWNIAB.
- The NWN user starts in 'screen' by default. The 'nano' and 'vi' editors are included.
System operations:
- Most of these operations are also available from the menu shown after system startup.
- To shut down NWNIAB when done, use the shutdown option in the module selector menu, or type 'sudo shutdown -P now' in a bash window.
- If you need to reconfigure your keyboard, type 'sudo dpkg-reconfigure console-data' in a bash window.
Using screen:
- You will see a list of seven windows near the bottom. Screens 0 through 3 are 'bash', screen 4 is 'nwserver', screen 5 is 'devlog', and screen 6 is 'top'. To switch to a screen, press LEFTCTRL+A #, where # is the screen you wish to switch to.
- The 'bash' screens are shell windows.
- The 'nwserver' screen will start and run the Neverwinter Nights server automatically.
- The 'devlog' screen shows the logfile from the NWN server.
- The 'top' screen shows system status.
Logging in to NWN:
- You can use Direct Connect to connect to NWNIAB. Use the private IP address and port 5121, e.g. '192.168.56.101:5121'.
- The player password is 'testpc'. The DM password is 'testdm'.
- You may need to adjust your firewall to allow connections over the VM ethernet adapter.
Hosting a public server:
- You will need to edit the settings in your nwnplayer.ini. To do so, press LEFTCTRL+A 0, then type 'nano ~/nwn/nwnplayer.ini' and edit the settings to the ones you wish.
- With the VM shut down, go to Settings, then Network, and select the Adapter 1 tab. Change 'Attached to' from 'NAT' to 'Bridged'.
- You may need to adjust your firewall or your router's packet forwarding to allow incoming connections from the Internet.
- If you have not changed the MySQL database password or NWN user password, you should ensure that only packets destined for UDP port 5121 are forwarded to your computer.
Current issues (both bugs and documentation issues):
- NWNIAB is case-sensitive for file extensions; all file extensions (such as .mod, .hak, .tlk, .bic, .uti, and so on) must be lower-case.
- When you press LEFTCTRL+C to shut down the running module, it may appear nothing is happening. NWN can often take a minute or more to shut down completely after it receives the shutdown signal. It does not harm things to press LEFTCTRL+C again if the module does not shut down the first time, but be aware of the potential wait.
- NWNIAB checks to see if you have set your VirtualBox shared folder as writable or read-only. If you've set it read-only, NWNIAB stores the servervault internally; if you set it writable, the servervault will be stored on your PC in the main servervault folder under your NWN install.
- There's often a module named '+NWNIAB' at the top of the list in the module selector. This module is the last module which was run; selecting it will run the same module again. NWNIAB comes with a basic starter module when installed (which I need to make available externally as part of the 7-zip, so you can easily use it).
- You can create an empty text file called 'nwniab_auto.txt' in your development modules folder; as long as this file exists, NWNIAB will automatically restart the running module when it shuts down or exits. Deleting the file will cause NWNIAB to return to the module selector after the module exits. (this will be changing in the future to create an 'nwniab' folder under your Neverwinter Nights folder, where you can place various text files which will then change your configuration, such as nwniab_name.txt to set your server name)
- NWNIAB's performance is, of course, directly dependent on the host machine. You should have at least 1GB of RAM to run NWNIAB, and more is always helpful. By default, NWNIAB is configured to use 448MB of RAM, but you can increase this in the VirtualBox settings if you wish (the provided amount should be sufficient to run almost any module in development mode and most small or medium modules for actual play; HG-sized modules may require more guest memory if you wish to actually host them).
- It's possible to do direct port-forwarding within VirtualBox NAT, which obviates need for bridged networking and improves security substantially. Directions can be found in this post.
Acaos