Choose Your Language

Friday 24 July 2015

Alpha Testing #2

Latest testing reached the point where I decided to restart my alpha-testing ... and so I am now on Alpha-Testing #2. Basically, I had a number of fixes to creature AI, journal updates, feats and general maintenance that made me decide a restart was required to ensure I had sorted these first issues. It also gave me the opportunity to start with a different class PC to try a few other ways of approaching the module.

Script Handling & AI

The main changes I made this time around were to do with the scripts that are attached to companions and creatures, especially as dictated by the NWN2_ScriptSets.2da. In the early days of my coding, I relied more on existing scripts and OC protocols, using variable holders to fire my "custom" scripts associated with creature event hooks, like OnSpawn and OnHeartbeat. However, as my scripts have grown, these two "older" systems have become more of a confusion and hindrance than simply rewriting my own and directly associating them using the SetCreatureScriptsToSet function pointing to the NWN2_ScriptSets.2da. After the issues I experienced in Alpha-Testing #1, I decided this change was sorely needed to allow me to sort through both companion and creature scripts more easily. This change helped a lot when it came to working with henchmen and other associate types that shared scriptsets in common, or I had manually edited to try to workaround the differences between them. This separation has helped streamline the code and tidy many of the discrepancies.

Journal Entries On Creature Death

Another change that determined a restart for me was after I encountered a failure with a "trigger" event to do with a journal entry update after I killed all creatures spawned from an encounter. In this case, a single trigger for an encounter would be simple enough. However, I had a series of encounter triggers that spawned creatures, which was only meant to update a journal entry when all creatures from all these spawned encounters (from shared triggers) were killed. My existing system relied upon another trigger involved in the setup, which simply did not work reliably. Therefore, it was a case of rewriting the scripts surrounding this journal update event for those quests that relied on such.

Other Fixes

There were some other issues that revealed themselves in the latest lot of testing, but they were straightforward to fix by comparison. There was a situation where two "Hunger" icons were displayed in certain circumstances, due to me not doing a correct condition check.

There was the reappearance of some erroneous "faith" related information, which pointed towards an error I had in setting a variable at the time of "losing faith". This also had an impact on clerics "resting" and the prayers they gained, which meant it was important to track down and fix.

"Out with the old and in with the new" is probably the saying I mostly used regarding script changes recently made, as I rewrote some of the oldest scripts I had previously written ... even amalgamating similar event scripts to reduce overhead. I believe I have addressed most of these older scripts now, and, hopefully, I will be able to make progress again.

Hopefully, I will have a bit more to say in a few weeks time. If you don't hear anything in the meanwhile, just assume I am focussing on another set of issues, and will update you when I have more to report.

No comments: