New Encounter System

Posted on January 15, 2009

Today I would like to talk a little about a new encounter system that I’ve started working on. I call it… the PnP Encounter System (no, I’m not very good at coming up with names) and it’s a faithful remake of the encounter system from Pen and Paper.

It all began a couple days ago when I was looking to alternatives to the default encounter system in NWN for Tir-Nimphel. I checked the vault for a good system that would allow me to easily create encounter tables, would be easy to implement, easy to maintain and wouldn’t cause any unnecessary lag due to heartbeats or similar calls but I couldn’t find anything I liked, so I went ahead and made my own system.

The encounter table is a 2DA, which makes it very easy to add new creatures to it, and it works similar to the original NWN system in that it runs from triggers. Absolutely no scripting knowledge is required to use it – all you need to do is alter the 2DA using a text editor and change a few variables on your triggers. I can hear you ask “But Bel, aren’t 2DA’s supposed to be slow?”, well that may have been true once, but now we’ve got 1.69 which updated the 2DA caching so you can keep as many as you’d like in memory at once by just changing a setting in nwnplayer.ini. This means that the 2DA should be kept in memory most of the time so there’s almost no search time.

So what does this mean? Well, it means that non-scripters and even novice builders can easily create encounters similar to those in Pen and Paper where you fight a group of dire badgers on the road to the dungeon and a batch of goblins when you head back to town to sell your loot.

Now, this system is still very much in beta and requires a few fixes, optimizations and added features before I upload it anywhere, but even after 6 hours of development time it is already shaping up to be a nice alternative to other encounter systems.

Filed Under Neverwinter Nights, Scripts, Tir-Nimphel | Comments Off on New Encounter System