Monday, January 28, 2013

Neverwinter Nights 2 module update

Although I've been rather quiet on this blog, I've been steadily posting updates on my progress on my adventure module for Neverwinter Nights 2 on the forums of the Neverwinter Nexus and the Bioware Social Network, where by now I've posted somewhere around 150 updates about it.  I don't think I said much about it here, actually, although I've posted several videos from it on my Youtube channel.

The summary of it is that it's approaching completion, and it's large.

After this module's completion, I can get back to more frequent updates here -- which is certainly not to say there won't be anything here until then.

What I've learned

I've learned an unbelieveable amount about modding and making games from this experience, far beyond my previous modding in other games.  My module for Dragon Age: Origins was a dipping of my toe, and this has turned out to be swimming in a vast ocean.

I've become comfortable with fairly complicated programming/scripting, which turned out to be not only a basic necessity, but a creative opening of the doors that allow me to make any kind of quest I can imagine.  I've also learned the value of writing detailed comments in my scripts, to document what I'm doing and why, and how it affects other scripts, or is affected by them, and where I'm storing variables and other information.

I've recently expanded my asset-creation knowledge from my existing forte of texturing, to learning how to make custom models, and creating new UV/UVW maps for them, using Gmax (a sort of "lite" version of 3DS Max, if I understand correctly).  I've created a number of new placeables for this project, first by simply retexturing existing models and by texturing the models supplied by others, and later by making the meshes in Gmax.

I also learned how to use other tools to import custom music and sound effects, and performed mass extraction and conversion of the game's sound assets so that I can more conveniently browse through them and pick appropriate sounds for my module's situations.  The built in "sound objects" that can be placed in the game are convenient for many purposes, but they don't include anywhere near the entirety of the assets available in the game files.

Before that, of course, I had also learned about how to made the graphic user interface elements in XML, and I used my graphic design experience to make them look nice at HD resolution.

I'll have to make a post to showcase the new placeables at some point, and ultimately I'll be releasing them as a pack separately from the module that I made them for.  I'd like to showcase the scripting systems, too, but code doesn't lend itself well to showcasing in that manner, despite being very interesting in other ways.

Lighting in this engine is another thing I've been learning about.  I can see that there were some mistakes in how the original campaigns were lit, and unfortunately those mistakes are what prompted me (and no doubt many others) to disable point light shadows.  And the poor engine optimisation caused many others to eschew even medium-level shadows.  A great shame, since with full shadows enabled, and a module with properly adjusted lights, the lighting can be very beautiful in this game.

I don't use these cinematic cutscenes, preferring the text box for its much longer capacity for each line (and perhaps more importantly, how it gives the user the ability to absolutely control the pace of the dialogue), but if I were to use the cinematic cutscenes, I would certainly use a classic studio 3-point lighting setup, and specifically chosen camera angles (rather than the default random angles) to create an appealing and dramatic scene.  Lighting is often not given the attention it should be, though it plays a very important role.  Some conversations I've experienced in some modules have taken place entirely in the dark, and not for any artistic reason that I could tell!

Likewise, I have come to believe that the washed-out look that I'd noted in some areas and objects in my original playthrough of the original NWN2 campaign is due to the fact that those assets were intentionally designed with a low colour saturation so that they could be tinted as needed.  And some level artists apparently didn't tint them.

One of the first things I learned was how to handle the game's two-dimensional array files (2DA).  Understanding those is really the first step in using almost any custom content.  I can clearly recall how foreign and mystifying they were when I first attempted to use one, which was the restsys_wm_tables.2da file used to select random wandering monster encounters for the resting system that was added in Mask of the Betrayer.

For that matter, learning to create a campaign and to import systems added by the expansions was a very valuable experience.  Creating a campaign was thankfully simple enough, since there is a very good tutorial for it by Kaldor Silverwand.  Importing the other systems, on the other hand, involved a lot of reading through scripts and examining settings in the official campaigns.

And of course, several mishaps underscored the importance of backing up your work often.  Fortunately, my backups have been frequent enough as to prevent the loss of more than a day's work.  If you're reading this, and you haven't backed up your current work in more than a day, take a break from reading and do it now, just in case.

Ways of learning more

Since there are no intermediate-to-advanced tutorials for creating modules that I could find, I think there's nothing better that you can do than to open up the default scripts and read them.  Especially the include files, and the scripts for special events and encounters in the campaigns.  Many of them have decent documentation that teaches you a great deal, and since these scripts were written over a period of years, and also by different people, there are a lot of different approaches shown in them.  In the few months I've been working on this, I myself have used multiple approaches for the same tasks, based on different factors, such as directness, extensibility, reusability, elegance, brevity, ease for other people to understand it, and others, so it's no surprise to see so many methods on display in the core scripts, especially those left over from NWN1.

In addition to just reading the scripts, it's extremely helpful to just play through the official campaigns, and take note of when the game has you performing a particular task that's similar to something you want to have in your module as well.  You can open up that file and see how they did it, and then use that knowledge to make your own version.

Anyway, I've really been enjoying this process of learning and discovery (aside from a few annoying things like working with the walkmesh).  So back to work for me!


  1. Hey there! I'd like to mention that NW2 is now sold by for those that might be trying to find it on a download version:

    I remember that when I last spoke to you about the game it had stopped being sold on Steam, which was a concern to find other players. Hopefully GOG will keep theirs for a long time.

    1. Good to hear from you again, and thank you for posting that link. :) I hope others see it and get this great game. I'll just copy the link and make it clickable here:

      Yes, it was very much a concern to find new players, and it got even worse when Gamespy was bought out and their new owners decided to stop supporting multiplayer connections for older games, including NWN2. The community created replacements for that system, though, so multiplayer is alive and well, thanks to the client extension.

      If we can try to do a co-op game in it again, I think this system, or the custom launcher makes it easier to get around those firewall or port-related problems we were having.