This is about the Test Area function in the toolset, and some alternative ways to more safely test your module.
Do not use the F9 test area option since it can cause stability and errors in the game including module corruption. |
The Test Module option (F9, or Tools → Test Module) will start the game and run the given module you have, usually after asking to save.
It is not recommended to use this, but if you do want to quickly load an area for visual inspection only it is a quick and dirty way to do so. Don't say we didn't warn you however that it can crash the toolset, game or both and may therefore corrupt the module you are working on.
The game when it loads via. F9 will choose the first available local vault character to load in with, and go straight to the start position. To make it easier to test an areas visuals or the like, simply move the start location to where you want to be.
There are several other ways to test things - Neverwinter Nights: EE runs very well separately in windowed mode so the recommended way is to load the module in the background in-game and restart it in-game as well.
If you use the DM client it allows you to quickly traverse areas and are ignored by all monsters you might be placing too.
The in-game script editor also allows you to quickly restart a running module as long as the file name matches the module name; using this code when you open it with Ctrl + Shift + F12.
StartNewModule(GetName(GetModule())); |
The game can load a module immediately in single player with the first local vault character to mimic F9. This is a recommended way if you don't want to keep the client open for some reason (resources or the like). The syntax is:
nwmain.exe +TestNewModule "module name" |
To load the a specific character with a module you can use a different command which loads up to the point of selecting or creating a character, useful for testing modifications to classes, feats and the like:
nwmain.exe +LoadNewModule "module name" |
You can of course also run a server, which you could connect to locally. This might be beneficial when testing with NWNX or for MP things. You can use the Windows GUI, command line (Windows, Linux, Mac) which can restart the module when players leave automatically, or when you choose to, or as per above do it via. a script.
To enter a locally hosted MP server a relevant shortcut would be:
nwmain.exe +connect {Server IP Address:Port}
eg for the default port and "localhost":
nwmain.exe +connect 127.0.0.1:5124 |
The benefits apart from running NWNX with the server approach would be being able to load the module independently of the first joining player. This means some slight differences in how scripts may operate and also means the module usually has time to "breath" at startup instead of potentially lagging or hanging as large scripts or a large module loads. Especially useful for very large modules.