Choose Your Language

Friday, 5 June 2020

Episode 32: Shaken To The Core Files!

Today's blog is a bit different this week, as my attention has been taken by a revamp project regarding my NWN module, Soul Shaker. This came about for two reasons: 1) A player showed some interest in the Soul Shaker module and 2) I wanted to give the code in The Scroll a break from any changes I am making as I write module two. However, all this still helps towards the second module for The Scroll, as I hope to explain ...

Soul Shaker Revamped

Anyone familiar with my projects will know that I have also released a NWN module called Soul Shaker, which received some acclaim back in its day for its innovative ideas. (Podcast.) However, I have now come to believe that there were some coding differences I implemented at the time, which hampered its accessibility and ease of play for players. The current revamp addresses these issues. The gameplay itself, which could raise another argument about its accessibility, is not being changed. The gameplay differences are deliberate plot and mechanic ideas that were implemented to reflect a gaming style similar to System Shock 2 (to which the module pays homage), but within a D&D mythos.

Hak Patch v Databases

Way back when I first started to write Soul Shaker, there was no reliable system in place to patch a custom module so that a player who had already started the module could fix their game if a problem occurred without having to restart the module. Sometimes one could make use of the override folder, but this could become awkward and could not be relied upon. So, at the time, as not having to force my players to start again was a priority for me (as my own group of players would not welcome such), I ended up using databases to track data, which could then be used to replace data and return a player back to the correct point in the game should the module ever need to be updated and replaced. Indeed, the system worked well, and is the only means I know of to date, which would still (to this day), allow a builder to release a module where a player could replace an entire module (not just scripts) and not have to restart their game.

When I first wrote, my coding skills were not as good as they are today, and there were one or two cumbersome operations required of a player to ensure the game updated correctly. At the time, they seemed fine to me, but latest experiences with player feedback have shown me that what may appear straightforward to one person may not be for the next. Therefore, recognising these issues from the past, I decided to look at making the whole process more streamlined for the player by revamping the module and making the whole process more straightforward and intuitive.

As I started this latest revamp, however, it occurred to me that the module components (area designs and objects within them) were now pretty much as stable as they could ever be. Therefore, module updates were not really an issue any more, and that the only real points that needed consideration were potential buggy scripts or dialogues. For these types of issues, I could address them using my own devised "Hak Patch" system, which I had figured out how to implement towards the end of writing Soul Shaker, around early 2007. Indeed, if I had discovered this idea earlier, then I may never have relied so heavily on databases, or even used them at all. However, by the time I discovered the idea, the core database files were integral to the module design and not so easily removed. Rather than do this, I released it and the rest is history, as they say.

Fast forward to today, and after a new interest from players, and my own improved knowledge of scripting, I cannot bring myself to leave the module in its current state. Yes, it works, but the code is still weighed down with inefficient scripting and (now) pointless reliance on databases that require extra unwarranted attention of the player. Therefore, with renewed skills, I decided to remove all the database storage code (that relied upon extra implementation of the player) and, instead, rely solely on the "Hak Patch" system for any future updates that may be required for this re-release of the classic.

Soul Shaker (v2.00)

So what do these changes do for the player? Basically, the revamped version of Soul Shaker will now load and save like any other NWN module. Should the module require any patching (due to a bug), it will be handled by a one hak file download, which replaces the current one being used. The player would then simply reload their current game and continue to play from where they left off with any previous problems resolved. i.e. The Hak Patch system works in a similar fashion as changing the entire campaign folder in The Scroll. (That is how The Scroll is patched.)

The new version will no longer have any "unintuitive" reloading for players, and there will no longer be any databases to deal with at all. Not one! Furthermore, I have now amalgamated all supporting third party haks (of which there were about 13) into one larger hak, making it easier to install in the first place.

All these changes also mean I have to rewrite the Soul Shaker gaming manual that explains how to install or save games as these no longer apply. As an aside, this has been complicated by the fact that I cannot find the original source file for the manual, and so am having to make changes using what I can salvage from the release manual. It is coming along slowly though.

As I have made gradual progress, I have also discovered remnants of older code from a previous system I was using with my own group of players that is simply not used, and requires removing. There is also poor usage of some official functions and a lack of custom functions, which I am now addressing as part of the revamp. I am also trying to add comments to every file that I find to help with any future patching or queries. Currently, as I look at one script, I find it points towards a dozen others, each in turn requiring attention to check the code. I often find inexperienced coding, which requires a rewrite, which in turn requires testing of its own. All this means that it is taking me some time, but I do aim to release it as soon as possible, in the hope that the revamp may encourage new players who may be looking for something a bit different.

The Scroll

Meanwhile, this means I have been able to leave The Scroll alone as play testers test some final changes to its core files that needed to be updated after discovering one or two rare issues to do with Animal Companions, stackable items, auto-storage containers and gold. Note, some of these latest issues have come about after feedback from players who may try to use "console" commands (or "cheats") to aid in their gameplay. I discovered using such can break some aspects of play. Unfortunately, adding code to help circumvent these issues in the event of players who use them without recognising the dangers added one or two teething problems in the new code. These have been the reason for the latest flurry of updates. These and also the discovery that local objects cannot always be relied upon when stored on other objects, especially when recalled at a later time. Such stored objects can become "invalid" due to the way they are tracked by the engine, and so code reliant upon such can break if the objects are no longer valid.

Yet all this is beneficial and to the improvement of the second module of The Scroll. i.e. Problems discovered now will not be present in module two. And as I have currently stopped adding new material for module two (as I revamp Soul shaker), the latest problems I am fixing with The Scroll will now be the final updates required. The v1.32E should be the last version I need to fix anything with for module one.

Soul Shaker: How It All Began!






No comments: