Wander was my first attempt at using the Neverwinter Nights editor. I played the game many years ago, but never touched the toolset. When I started this I didn't know what I could do with the engine and editor. The scripting language was easy enough to pick up and understand, but it was hard to know which things would and would not work. The most difficult thing to create in the module was a skill based mini-game called Chicken Slaughter Hero. The following video is a complete walkthrough of the first two zones in the module.
I knew I wanted to do something interesting with my module, but I didn't know what that would be when I started using the tools. After a few days messing with the engine and toolset and getting an understanding of the control I had, I decided to make a mini-game. Almost as a joke I commented to a friend that I should make a Guitar Hero clone where you slaughter chickens. I have nothing against chickens, I swear. After a few days I had chickens ready for the slaughter, marching down colored rows to their doom.
The hardest part was figuring out how to have the player interact with the mini-game. I knew I didn't want the player walking around to set off triggers. My original idea was to create custom items that would interact with a row and could be used off of the hot bar. This would allow the player a quick response time, by using keystrokes as input. I got this working right away and discovered that items that ran scripts worked as spells, and were held to the constraints of the DnD system, meaning they went into a action que. This made items too slow to use, and put a long pause after each interaction. I scrapped the item and hotkey idea, and reconsidered triggers. The solution came from a combination of mouse input and triggers. When the game starts, the player is moved and made invisible. An invisible wall is spawned around the player so they cannot move. The triggers are extended under the wall to the players feet. Now when a player clicks the "button" the trigger activates without making the player walk to the clicked location.
Chicken Slaughter Hero Mini-Game
Every time the game runs, a new series of sets of chickens are created. A set can have one to three chickens spawn at any of the three possible positions. There are percentages to determine how many chickens spawn, and what positions they are in. The sets then run through a function that determines the delay between chicken spawns. The DelayCommand() function can not be cleared, so I had to also track the instance of the game. If you start a game and then exit early, chickens will still spawn. Chickens not part of the current game are moved and then deleted so the player does not see them fade out.
Scoring in the game is based on streaks. Each of the "hot plates" has 5 zones worth different points. The center zone is worth the most, and is the hardest to hit. For each successful chicken fry, the combo is increased to a maximum of ten, and then applied to the score for the chicken killed. If you miss a chicken, then the combo is reset.