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.

No comments:

Post a Comment