Dispatches From Neverwinter

A journal of my progress as I (attempt to) learn how to build modules for Neverwinter Nights.

Name:
Location: United States

Started playing Neverwinter Nights back in November '05 and got hooked. Tried to write my own module, but I just didn't have the time. Maybe I'll try again someday.

Thursday, January 18, 2007

Complications

When I set out to create this module, I expected to run into problems, most of which I figured would have simple solutions, and that my difficulties would come from a lack of knowledge. While this has been true to some extent, it also seems that I have a knack for stumbling into problems that even expert builders have trouble tackling. In this case, I'm trying to set up the following situation: the PC enters an inn and sees four people arguing, which is represented by the talk_forceful animation. When the PC steps into a trigger, the four NPCs are supposed to stop arguing and turn to face the PC, and one of them is supposed to approach the PC and start a conversation.

I got all of this to work, except for the part where the NPCs stop arguing. They turn to face the PC, but except for the NPC that approaches the PC, the animation doesn't stop. I've sought help and tried out a bunch of different things, and none of them have worked. Apparently, ClearAllActions doesn't work when it comes to animations.

Another problem I had was that, in the course of the conversation, it's likely the PC will end up fighting two of the NPCs (soldiers gone bad). I put them in their own faction so that they would both turn hostile at the appropriate time to the PC. They did, but only one of them attacked, while the other just watched, and wouldn't attack until the first one was killed. Again, I sought advice, and after a couple of attempts, I finally got this to work.

I can already see the next problem with this one situation looming on the horizon. One of the possibilities is that the PC will join those two soldiers and attack the other two NPCs (an innkeeper and his wife). I've got to write a script, so that when the innkeeper and his wife are killed, one of the two soliders will then approach the body of the innkeeper, perform the searching the bodies animation, and then go back to the PC and start a conversation. First, I've got to figure out how to trigger this, which I think I maybe can do, but I'm not sure about. Then I've got to do the animation, which I also think I can do, except I'm not sure you can have an NPC walk to a dead body (which, I believe, is a destroyed object). My other option is to have the one solider tell the PC to search the body, but I'd have to put in some method by which that soldier knows that the PC has searched the body, so that he says something different afterwards. Short of creating a unique item for the PC to find on the body, I'm not sure how this could be done.

There's also a very remote possibility that the Innkeeper could kill the soldier that does the talking after you've taken his side. I should technically write something that will account for that, but it's so unlikely that it may not be worth the effort.

0 Comments:

Post a Comment

<< Home