Friday, March 16, 2012

More NWN2 modding

I decided some time ago that I would make an adventure module for Neverwinter Nights, after my earlier Dragon Age: Origins quest mod experiment. I just can't really start on it until I have a decent-sized block of time I can spend on it, and I expect that will be this summer. In the meantime, I've been tinkering, reading the forums, and browsing the Vault's script repository, to determine what can be done in this toolset. From that, I'll decide what will be done.

For my first venture in NWN2 questmaking, I elected to begin with something relatively limited in scope. Any first work with a new set of tools should be small, in my opinion. As a learning experience, a smaller scope can prevent constant revisionism as one's skill and experience grows, by enabling the project to be completed quickly enough that such desires don't have time to develop.

That said, I intend for this to be the kind of module that I myself enjoy playing, and I'll judge my success or failure by how well I accomplish this.

Trouble In Rainesfere took two weeks to complete, not counting the viewing of the toolset tutorial videos that inspired me to create it in the first place. As with that module, I'll document my experience of learning the toolset and making a module, from my perspective as a beginner, which I hope will serve to inspire other beginners to give it a try if they haven't already. I'll allocate 3 weeks for this one, plus another week's worth of research and contingency time interspersed within.

This should be more than enough time, since, unlike with TiR, I will not be designing all of the areas myself. Having browsed through many of the prefab areas designed by other NWN2 players and modders, I was impressed with all of the fine quality work available, waiting to be used by other builders in modules. I don't know which ones have or haven't yet seen such use, but I can certainly do my part to showcase a few. It will save me some time as well, even though landscape design is one of the parts of modding that I find most enjoyable.

In addition, I've opted to adapt a pen & paper module for this project, which will save me some time in creating a design document. It's rather bare bones, and doesn't even include any sample conversations, or NPC builds aside from the main antagonists, so it'll require a bit of embellishment. My aim is to include everything described within, with encounters that have multiple approaches based on player choice and party skills.

Other mods in the meantime

Before I get into that module, I'm just taking whatever free time I can spare and feeling my way around the toolset and the game files, and making some minor cosmetic mods like some "beautiful people" heads for a few of the races, including humans, elves (including drow), half-elves, and halflings. The drow still needs some work in the eyebrows. I had some trouble with the specular maps, but got them to behave well enough.

I just finished something else, though, which I had been wanting to try for a long time in various games. After playing around with some visual effect mods, I had a basis for understanding how to use the Visual Effect Editor. So, after determining that it should be possible, I hacked together the parts I needed to create a DA:O/WoW-style system of quest indicators for NPCs, to make it easy to see at a glance whether someone has a quest available, and whether the conditions have been satisfied to complete it. Such indicators are especially useful in cases where an NPC may not have anything to say until certain conditions are met, or when an NPC you've spoken to before may have something else to say later, which you might miss if you have no reason to think the NPC has something new to say.

I know some people don't like visual gameplay elements in the 3D world for various reasons, but I intend my module to be an enjoyable game, and not an immersive cinematic experience. My module will contain no voiced dialogue, and what few cutscenes I plan to employ will be brief and for the purpose of calling attention to important events or points of interest during the gameplay. Cutscenes take control away from the player, and thus should be employed as minimally as possible.

In the NWN2 OC, they tended to use triggers to ensure that the player didn't miss some available conversation. If you walked anywhere near the NPC, your main character would be forced into conversation or a cutscene. I didn't like that. It was especially egregious during one time in the courtyard of Crossroad Keep when I was trying to walk over to the boy so he could teleport me out to the world map marker, and I was instead intercepted by the Luskan ambassador, and Sand brushed him off and force-teleported me inside the keep, where I didn't want to go!

I'm also going to try to find a way to make the game allow you to attack enemies before they become hostile. I hate those situations where you spot your mortal enemy from afar, but are unable to make a preemptive strike against him because the game requires you to walk up and talk to him first.

Anyway, I made the icons and the associated FX files on that first day. I wanted to make a little test quest just to try out and demonstrate the indicators, but of the quest wizard plugins on the Vault, two were database-dependent for persistent worlds, and the other was compiled for a previous version of the toolset. I don't know why plugins broke every time the toolset was updated, but most of them were dutifully recompiled until the final patch. Quest Maker was one of the ones that wasn't. Fortunately enough, the author provided the source code.

I had never touched anything like Visual C# Studio, but if I wanted to compile this plugin so I could try it out, I had to learn. A tutorial informed me that the necessary tools were free, so I installed the software and did everything it said to do, though some bits were harder to follow since the program had different names and locations for commands than the tutorial said.

I had to do some troubleshooting, since I told it to compile the DLL directly into the toolset's plugin folder. This caused the toolset to crash on open, and the reason seemed to be that it had placed a lot of unnecessary files in there. I cleaned them out and recompiled elsewhere, and dropped only the DLL into the plugin folder. It still didn't work!

Finally, my search led me to a forum post, where Marshall of the Legends Plugins had encountered the same problem, and most importantly, where he had reported how he solved the problem. The answer was that it had to be compiled for VB 3.5 instead of the default 4.0. This time it worked. Thanks, Marshall!

Quest indicator success

The next day, I spent maybe 6 hours figuring out how to get the quest indicator system working, and writing a quest to demonstrate it.

I'm still very much working in the dark with this script, and my hacks involve a great deal of trial and error. Getting the exclamation point to appear over the NPC's head was the easier task. Getting it to go away when I wanted to change it to a question mark or remove it entirely was the part that took many hours. I searched through tutorials, reference works, and forum posts, and tried three or four different functions, and changed variables and coding structure, all to no avail.

Additionally, the QuestMaker plugin I compiled yesterday seemed to only work partially. Possibly I did something wrong when I used it. I used it to create an "explore an area" quest so I could easily test the indicator system, but for some reason it didn't actually create the trigger with the code that would advance the quest, so I had to figure out how to script a trigger. I tried using the generic one and applied some variables to the instance, but I apparently did it wrong. I ended up trying out LilacSoul's Script Generator for the first time, and that succeeded. I really wish Marshall's Legends Quest Plugin worked for single-player modules.

Finally, I found a forum post that mentioned a function that I hadn't tried, and that successfully removed the effect from the NPC. Finally, it worked.

The code's not pretty, and it needs a little more work to generalise it, but I can use it in my module as it is now.

A bit more on my choice of quest indicators: It's much like the difference between making every barrel in the city lootable, with most of them empty, or having the barrels with contents stand out from the others somehow (such as by not allowing the empty ones to be opened). This is all about determining who is important to talk to, and who is only there as decoration.

I consulted some friends about their preferences in this regard, and got a reasonable range of responses. One was mildly against them, but thought it would be fine to use them the way I have in mind -- solely to mark the questgiving NPCs, and not to point out anything quest-related on the map. Two were okay with them, as long as they could turn them off, which I should be able to code.

Others were more positive and enthusiastic about them. One brought up how they would have been nice to have in Mass Effect, notably in the between-mission "party camp" on board the Normandy. With the party members being spread out between several decks, and knowing that they would have new things to say on occasions throughout the story, players like them (and me) got tired of running back and forth through the ship and up and down the decks to check each party member, only to get told over and over that they're too busy to chat because they're in the middle of some calibrations.

I've heard other systems proposed, as well. Questgiving NPCs could be distinguished by giving them occasional text barks or gestures to beckon the player to them. I like this idea as well, but I don't think it would work very well in a city environment with a lot of unimportant NPCs walking around, who I also want to have text barks to liven up the place. Of course, I've heard some players don't like text barks at all, and insist it ruins the immersion to see text floating over characters' heads, but all I can say to that is that those players will not enjoy my module.

Questgivers could be the only ones with proper names, with everyone else having names like "Commoner" or "Townsperson". That could work fine, too. I don't prefer it, though, because I don't know of any ways to make NPC names always be visible, rather than having to mouse over them to see the names. I would actually like to have visible names in addition to the quest indicators.

Other, more minor visual indicators are things like having questgivers dress in brighter colours, or wear a special badge or piece of gear, or have them emit a subtle glow, or even have all questgivers share a single appearance!

In any case, I like the exclamation point solution best. Personally, it delights me to walk into a new area and see lots of new quests for me to accept, and I think nothing does that better than the exclamation point!

This of course opens the door to a wider range of visual indicators, such as for merchants, healers, or innkeepers, but I don't know if I want to take it further than just questgivers. Those NPCs tend to be easy enough to recognise as long as they're located in logical locations (such as in a shop, in a temple, or behind a bar), and it would probably be enough just to have their names indicate their role.

Tuesday, March 13, 2012

Kickstarter: This is the way.

Another lost, lamented genre of classic gaming is now primed to rise from the ashes, as we saw a few days ago in the realm of point & click adventure games, from Double Fine Adventure's funding success.

Now, we can have Wasteland 2, a turn-based, top-down, party-based RPG made by Interplay veterans.

Fund this! This is the harbinger of the new golden age of good games being made by people who care, without the meddling of publishers!

Saturday, March 10, 2012

Neverwinter Nights 2 interface mod

Installing user interface mods is one of the first things I did for this game, but it was tricky to balance the different things I wanted. These mods work by replacing the XML files for each piece of the interface, and sometimes I liked the changes made by two different mods that affected the same UI panel. For instance, I play at a high resolution, so I want big panels that take advantage of the large screen size, and also large fonts so it'll be readable.

Usually, portraits are vertically rectangular, somewhere around a 1:2 aspect ratio, including painted portraits of real people from history and modern photographic equivalents. It's simply more aesthetic to have the head and the shoulders in the picture. The ones in NWN2 are square, which not only looks cramped, but since it shows only their heads, and the characters are made from the same 3D models and are all facing the same direction with the same expression, it's rather difficult to tell any of them apart, especially at the tiny size those portraits appear as in the dialogues.

I have a large collection of good looking portraits at a 1:2 aspect ratio (like Baldur's Gate and NWN1 used), and I wanted to use that aspect ratio for the portraits rather than the square ones. I found a good mod that added support for 256x400 pixel portraits, as in Neverwinter Nights 1, called Character Sheet NWN1 Portrait support, and that worked very nicely, though it was made for resolutions a bit lower than what I'm running.

I also wanted all my inventory slots showing as one big bag, instead of them being broken up into multiple bags that I have to flip through to find things. I know some people prefer to organise their items by putting them in different sections, but I prefer to have as much visible at once as possible. Again, I found a mod for that, though again, it was made for slightly smaller resolutions.

I would also prefer the inventory icons to be large, like in NWN1 (though perhaps not quite so large as that), so I can more easily distinguish items at this resolution. I haven't found a mod for that, and I may make one at some point.

I tried using a UI creator program from the Vault, but on starting it up, it claimed there was a newer version available and insisted that I download it, and refused to run this allegedly "out of date" version. I checked, and the version number on the web site was exactly the same. I redownloaded it anyway, but this freshly downloaded version made the exact same claim, and refused to run. This raised my suspicions about scams and malware, but whatever the reasons, the effect is that the program is non-functional.

Eventually, I got around to examining the XML files myself to see what I could do with them by hand. I downloaded and skimmed through Lance Botelle's NWN2 XML & GUI Coding For Beginners, mostly looking at his examples of what different formatting codes looked like. Then I examined the code of two of the mods I was using. One of them had some comments telling what the original values were and what the mod was trying to accomplish, which was useful.

My dialogue box mod

Before adding frame

In this case I was working on a mod for the conversation panel (what the game files call the "quick chat" panel). I prefer the dialogue to be presented in this manner, rather than the "cinematic" style that's the default in the toolset.

But I wanted the box to be much bigger, since I consider the dialogue to be an important part of the game. You can't do anything else while you're in a conversation, why not make it the main focus of the screen while you're in it? Putting it in a little box in the corner is no good, especially at this resolution, where the font is rather squintworthy.

While I was working on this, largely through trial-and-error, I found that I could just keep the game running, make my changes to the code, and then switch back to the game and start conversation again with a handy nearby NPC to immediately see how the changes looked. I was glad I didn't have to reload a save, or restart the game, which would have made progress painfully slow for this kind of trial-and-error work.

The code on which I based this had already changed the background image and font colours to a black-on-parchment style instead of the white-on-charcoal. I actually thought the original colour scheme was fine, but I do indeed find that black-on-parchment is easier on the eyes, so I just made tweaks to that -- I changed which of the parchment textures it used to better fit the larger box I coded, and changed the dark green of the response text to a deep burgundy colour to better go with the parchment colour.

I made the conversation portrait twice as large as it was, to put more focus on the subject of the conversation (though still only half the height I set for the character's dialogue), and with the portrait aspect ratio change I was able to just put it in a kind of "column" on the left, with both the NPC name and the dialogue in a second column to the right of it. One note about the altered aspect ratio, though...I couldn't find any parameters to adjust the camera placement for the default "rendered" portraits made out of snapshots of the character model, so it basically looks like a slightly off-centre closeup. The custom portraits at the intended aspect ratio look perfect, though.


Final version

The portrait frame didn't look good when stretched to the new dimensions, so I commented it out and left the portraits unframed for a while, until I found a more suitable replacement. Now it looks good, and I think it's a pretty good size for both the NPC's dialogue and the list of your responses. Now you can have up to 10 response options visible at once without the scrollbars appearing, if they're all of a typical length. How much empty space you see is, of course, dependent on the amount of dialogue written for any given part of the conversation.

After using and enjoying this new conversation panel size and style, I did find one reason the parchment background isn't the best of ideas. The OC has a couple of places where descriptive text is delivered in this panel using near-white text, which is nearly illegible against the light parchment background. Additionally, user-made modules sometimes use bright colours for special text as well. So, I think it'll have to go back to the white-on-charcoal, even though it's not as optimal for readability. I'll offer the first version I made as an option with that caveat.

Next, I expanded the portrait selection window to show much larger portraits, to make it easier to choose one. I tried to make it more than four columns, but I couldn't get the portraits to appear correctly in the additional columns, so I just left it at four.

Finally, I expanded the column of portraits for your party members to use the full height of the screen at 1920x1080. Even in the vanilla game, there are times when you can have 5 full companions and enough animal companions/familiars/summoned creatures to make you have to scroll through the portrait column to check your companions' health or status effects. Now there's less unnecessary scrolling at 1920x1080.


Some of the male and female portraits from the NWN1 art, in my expanded selection panel

Since my conversation panel mod depends on the portraits being in the NWN1 aspect ratio, and other code based on the work and examples of Ragnorak, Shin-Anubis, Thanatos2001, Fire&Ice, and WhatIsSol, I'll have to include that code in my distribution, as well as the other panels that would affect, though some time later I can design another version that keeps the square ones, even though I don't like them.

Although the mod is functional and ready, I need to figure out how to handle its packaging before I upload it.

Edit: It's online.

Thursday, March 8, 2012

Neverwinter Nexus

It's not officially open yet, but it's a new place on the Nexus mods site to upload and download Neverwinter Nights 1 and 2 mods. (For builders who haven't used this system, I think it has all the features you may have wished the Vault would have.)

Neverwinter Nexus

The categories aren't yet final, and the tags are yet to be decided, but it's open to uploads and downloads now. The official opening will be once it has enough mods uploaded to show.

This would be a good time for me to pretty up my NWN2 UI mods and package them for others.

Tuesday, March 6, 2012

Neverwinter Nights 1: Witch's Wake

A short review for the shortest of the premium modules I've played as yet -- Witch's Wake.

When I first tried playing NWN years ago, I tried this module along with the OC, but I didn't get very far. I didn't know what I was doing at the time, and I didn't understand what I was supposed to do with all the crafting materials I scavenged at the beginning. I stopped playing when I died to enemies in the graveyard.

Yesterday, having had some experience under my belt in the meantime, and an understanding of Neverwinter Nights gameplay, I picked it up again. I finished it the next day. I have mixed feelings about that.

In general, I'm going to say I enjoyed this module, with some reservations. Following are some of the module's pros and cons.

The bad

Just so I can end on a positive note, I'll start with the complaints. I only have two of note: I didn't like this module's cliffhanger ending or its respawning trash mobs.

I think I can see a possible reason for the infinite trash mobs, who swarm you as a low-level character and only give a single experience point if you kill them. The module has a special event for when you die (sending you to a plane of death over which the Night Hag has some power), so I would guess the designers restricted resting and loaded up the module with combat to ensure that players die several times before the module is over. It took a bit of exploring before I realised that the trash mobs would never end, and that there was actually no point in exploring certain locations, because there was nothing in there except for this pointless and unrewarding combat. By the end, I was cursing the constant swarm of rats, who even spawned in to interrupt my dialogue with the final NPC -- several times!

The module ends abruptly -- even more abruptly than Kingmaker, which at least had a little cutscene and a dialogue box wrapping things up. This one stops in the middle of a conversation to show a cryptic message, and then the credits roll. In the end, nothing is accomplished, and more questions are raised. I plowed through all those rats for this?

I know that this, as are all of the premium modules included with NWN Diamond, was originally intended to be a series, and I knew from the outset that there was no continuation of them, but this one left me extremely unsatisfied at its lack of any kind of resolution. A good cliffhanger should end the first plotline, while starting another to get you wanting more before it lowers the curtain.

One extra thing I didn't like about it was that it was another solo adventure. I thought I was going to get a companion at one point, due to an option to invite a character to come along with me, but it was a false hope. The character refuses.

The good

Amongst the module's good points are the characters, themes, and setting.

The setting was not the Forgotten Realms or any of the other D&D world settings, but something original to this module, as was Kingmaker. As such, I can't know anything about the races, magic, and history of this place other than what was exposited in the game itself. The titular "witch" is a night hag, but I don't know if that means her race came from the Grey Wastes or not. I had read in one of the developer accounts that at this time in the Premium Module program, developers were told by whomever was in charge that the settings should be original, and that some time afterward the exact opposite was decided, and that they all had to be set in the Forgotten Realms. I wonder if that has anything to do with why certain premium modules are no longer available for purchase.

I liked the German names for the dwarves. I think it fit them well.

The characters were well-realised and interesting. The Night Hag was described as fey, so it was appropriate that her motives and inclinations were inscrutable. She treated me nicely, and often made gestures of assistance, but some of them seemed to have possible negative consequences. She also once confessed to using me for her own purposes, and said we could never be friends. This seems fitting for a mercurial fey creature, and I liked her, even if I couldn't really trust her.

There were numerous opportunities in the dialogues to use character skills to attempt to open up certain avenues of conversation or to obtain favours or gain rewards. I always appreciate that kind of dialogue in games.

The ambivalent

As mentioned at the beginning, this is an extremely short module, which is unusual for a Premium Module. I think some of the Grimms' Fairy Tale contest modules had more content than this one. This isn't necessarily a bad thing, though. The only reason I played it when I did is because I knew it was short, and I wanted to play something short at that time. If it had had a proper ending, its short length might even have been a good thing.

The plot was rather common and familiar -- you've lost your memory, and there's something important about your past that you need to remember. At least in this game you're not the only one suffering from amnesia.

The beginning segment on the battlefield, where you scavenge from the dead, which confused me in my first play attempt, seems to have been intended mostly as an opportunity to scrounge up enough gold from the various crafting supplies to be able to buy some basic gear to start out. There's not much else gear to be found in the game, though, and even less gold, but the game is so short it hardly matters. There are two other opportunities to buy supplies -- from the blacksmith and the magic dealer in the dwarven village and from the Night Hag herself. There's also an "infernal contraption" in the magic shop which functions as a slot machine, which I suppose was included to offset the lack of opportunity to accumulate money in the usual fashion.

Conclusion

You wouldn't lose much time if you decided to try this one out, and if you use a higher level character (I started at level 1) you can breeze through the combat and experience all the unique things about this module on their own merits. As long as you understand that it has no resolution, and that there will never be a sequel, you might find it a worthwhile experience.