Periodically NWN2 drives me to the brink of i...

February 17, 2008 by Adam in NWN2

Periodically NWN2 drives me to the brink of insanity and then gives me a little shove.

I had gotten reports of the left-most card in the Pirate Card game vanishing at the beginning of every new turn. Sure enough, if that card hadn't been played, it would disappear as if it wasn't in your hand. I spent hours pouring through the logic of the code and couldn't make any sense of it. I made an odd discovery this morning where if I stand to the left of my cards, it works fine, otherwise it doesn't.

Pulling my hair out, I rewrote the code that finds the cards in your hand. I changed the GetNearestObject function to a GetFirstObjectInArea function. It works fine now, other than the order of the cards not being the same between draws. The only thing I can imagine is that some NWN2 patch introduced a subtle bug with GetNearestObject, as previous versions of the PirateCard game seem to work fine. Very frustrating.

I might see if there's a more elegant solution that retains the card order. There's also some visual effects that should probably be cleaned up. I'm also hoping that a hunch I had yesterday fixes some of our crash issues. I turned off the Environmental Audio Effects for all the areas in Port Brighton. It's a complete hunch, based on EAX not being the most stable thing on every system. We'll see how it turns out.

permalink| comment

Older Posts

Links

Dragon Age
Dragon Age Central

Interviews, etc.

Why We Fight

About Me

I've won multiple awards for my Neverwinter Nights modules, which I've been working on since the year 2000. In the real world, I'm a web developer for a healthcare organization. If you have any questions, feel free to contact me.