Thursday, 28 February 2008

A Soul Shaking Moment!

Today, for some unknown reason (call it suspicion), I decided to do just one last double check on the current module's ability to transfer the PCs data into Soul Shaker, which I hope we will start playing next week - and I am glad that I did, as I found some errors! As you can imagine, I was not too pleased as it meant having to redo some code for Soul Shaker as well as the current module, just to be sure everything synchronised alright.

As it happens, I could do most of the fixes from the current module, but there were two aspects that required me having to update Soul Shaker:
  1. The opening journal entry was incorrect for players joining from Althéa.
  2. I had missed two racial checks for setting a camera on the player.

These fixes have now been added to Soul Shaker and the module has been updated on the Vault.

I first considered a problem might be present when I had a vague recollection of updating an important script a few months ago that handled the data transfer from one module to the other. At the time, the update was straightforward enough and worked fine for normal play. However, because in the Althéa campaign the players play their PCs via a player mannequin (PM), the incorrect details were being recorded from the PM rather than recording the details from the PC being played/controlled with the PM.

I have now updated both the Soul Shaker module (v0.18) and the current module (0.04) to allow a successful entry into the Soul Shaker module whether playing a normal PC or when playing a PC via a PM (as with the Althéa campaign). Let us now hope for a smooth transition when the time comes.

Wednesday, 27 February 2008

Tombs of the Dead (ADV)

The sixth week of this adventure saw the heroes venture into the fourth and part way into the fifth level of the tower of Torén Norus. While there were no major glitches this week, I did notice a small problem that required a fix ready for next week, and there was a minor problem with an object being missed (which has now been fixed and I will ask the players to retrace their steps for next week to discover it). All these fixes have been added to the TNPatch 0.04, ready for next week's play. Read all about this week's adventure in the synopsis, now available at the website. There is a snippet below as usual:

SYNOPSIS: (SESSION XP: 141 + 100 bonus for Karasten and Myara) 17/09/1197

"There were a number of open crypts around the large chamber in which they found themselves, but everyone was drawn towards the huge obelisk towards the centre of the tower. It stood firm and tall and had fiery glyphs drawn on every one of its sides. When approached they revealed their message for all, "Here lie the Elf Lord founders. Their memories will never be forgotten all the while the towers of Torén Norus and Torné Norus stand."

Tuesday, 26 February 2008

Companion Development

I have been off work for the last week due to ME, a chronic illness I have that stops me from doing regular activities more often than I would like. When I get a few minutes respite from the symptoms, playing around with NWN and writing this blog are one of the few things I can do that help me to relax by removing me from the stresses that make my illness worse. And while I may not even be as active with this as much as I would like, at least I can still contribute something.

I have been continuing to look at the resting system that the campaign will use, and I hope to be able to make another post about that when I have finished ironing out some of the last items and scripts that it will use. In the meanwhile, I made a couple of discoveries regarding companions and their development when it comes to some of the properties set on them.

Where Have All My Spell Slots Gone?

The first thing I learned was that if you add spell using classes to a companion in the toolset and then try to use them in game, then their empty spell slots would be missing and there would be no way to learn spells with them. (Interestingly, I can see this being quite useful as a way of developing characters in a way that excluded them from spell learning in a world where such may not be possible ... but that's another story.) The solution turned out to be to use the Set To Package Defaults button under the "Spells" properties tab for the PC, which would then allocate all the spells for you. NB: If you add the spells manually (a few at a time), you are able to alter the amount of spells that the PC has access to from the start, but they will still be unable to learn more, even if their level would imply otherwise. Of course, in normal game play, this would not be an issue, as the player would have allocated spells as they progressed in levels within the game. I simply mention it here as it confused me for a while.

Learning A New Trade

The second thing I learned was how to remove the class restriction for companions when they had acquired enough XP to be able to learn a new class. In the OC, each companion is restricted in which class they can progress. However, by removing the Starting Package under their properties allows the player to select any class for them to progress in. (See image to the left.)

I Want To Talk!

There was one other handy tip that I learned from Nasherzor on the forums, and that was how to enable any PC to speak with another NPC. By default, the Main PC will switch back to being played if a player speaks to an NPC. However, there may be circumstances when a player may wish a specific PC they are controlling to speak with the NPC in question. To enable this, I have learned that the Can Talk To Non Player Owned Creatures button on the NPC being spoken to needs to be set to TRUE.

Thursday, 21 February 2008

Tomes of Times Past (ADV)

This week, the fifth, was another great week without any problems or issues and everybody was around to appreciate the game. The session started at the beginning of the third level of the tower and ended up with the players about to go to the fourth level. Read all about this week's adventure in the synopsis, now available at the website. There is a snippet below as usual:

SYNOPSIS: (SESSION XP: 288) 17/09/1197

"In this room, however, there was also a strange floating automaton that eyed the newcomers without any signs of concern. Grimbold and Wanda slowly approached the mechanism, and as they did so, it spoke with a metallic voice, "How may I assist?"

In fact, the only issues I had this week was trying to locate extra web space to upload a copy of the book the players found: "Ado Ia Dom". I normally have tons of web space with Microsoft Office Live, but their server appears down at the moment and I cannot upload anything. In the meanwhile, I have used the last part of my own ISP server space to store the PDF file, but will move it when the MS server is back up. I have also uploaded the pages as JPG files to be viewed online from the website, although they may not be as clear to read as the PDF file. (Check out the synopsis from the link above.) UPDATE: The file has now been moved to the Microsoft site.

Sunday, 17 February 2008

Resting & The Passage of Time

For the last two weeks I have been writing code to handle resting and the passing of time. Like all things to do with scripting and creating new mechanics however, the exercise has taken longer than I first thought it would do. This is mainly to do with the fact that determining who the main PC is when possessing a companion can be quite difficult, especially when using the in-game "rest" command.

There are also other conditions to consider that can affect the rest and recovery of HPs, spells, prayers and general recovery, such as lack of food, nearby monsters, or simply not being allowed. Lastly, of course, is the fact that in a multi-player game, one player may initiate a rest period, but you will not want every player to then add more time just because they choose to rest straight afterwards. It all gets very confusing as you can imagine, but I believe I have finally come to a conclusion with all this and have just a few minor details to finish coding before it is done. Throughout this time, I have been in touch with people on the NWN2 forums, and I can thank Jassper for his explanation of such things as to what constitutes a party or a faction or just a single person. This has an impact on which characters are treated when a player presses the rest button.

Waiting or Resting

When a player presses the rest button within the game, they will be requesting one of two things: Either to Wait or to Rest. Both of these options are displayed within a GUI (Graphical User Interface), allowing the player to choose which option they prefer. However, there are a few conditions that will prevent the REST GUI from being displayed, such as nearby enemies or being within a "No Rest Allowed" zone, such as city streets or active dungeons. In these cases, the player will have to continue with their adventures or find another place to rest/wait.

If the player is able to initiate the REST GUI so that the options are displayed, then they may still be restricted to being able to wait only. This will be the case if the PCs do not have any food (and therefore cannot gain the benefits of resting) or they have already rested within the last eight hours (not tired enough). The player will receive both an audio (gong sound) and a visual feedback if they are too hungry to rest (first image above), but the GUI will still open within half a second of this warning (second image) allowing the PCs to wait if they so desire.

WAITING: Depending upon the time of the day that the player chooses to wait, then they will be offered to wait until dusk or wait until dawn. As long as the GUI has displayed (meaning the PC is outside of any current restrictions), then they will always be able to choose the wait option. The current time of day the option is selected will also determine how many hours pass until the dawn or dusk, and will also count as time towards their PC's next available time before they can rest. In other words, if there are six hours until dawn and they choose to wait, then six hours will be removed from their eight hours wait time between resting. With waiting, the PC does not recover any HPs, spells or general health - only time passes and costs a food ration. If the PCs do not carry any food, then they may suffer from some hunger damage (in which case there would be no good reason to wait to try to rest, as resting cannot be done on an empty stomach anyway). NB: Having the Survival skill will help prevent some hunger damage if none of the players characters carry any rations.

The image to the left shows the player having chosen to wait until dusk without having any food to eat first. The screen has now turned darker (dusk), the result of a hunger check is displayed because they did not have any food, and the number of hours passed has been shown along with the new current time and date.

RESTING: As long as all the right conditions are met, then a player may choose to rest his characters instead of waiting. The conditions to allow resting are: (a) Not to have already rested within the last eight hours and (b) To carry food (normally rations), one of which is used up on resting. There are also audio and visual warnings to help warn players if any of their characters do not carry items that may be required to help study for prayers (Holy Book) or learn spells (Spell Book). Resting will always give some HPs back (according to the place of rest), and may help towards recovering from an ailment (poison or disease), but will not allow PCs to recover their prayer or spell abilities if they are missing vital objects required for the task. Resting is always considered eight hours. (However, see the note on Amorphous & Personal Times next.)

Amorphous & Personal Times

To help keep time flow reasonably standard and in the control of the players, I have currently opted for 15 minutes real time = 1 hour game time. This would mean a player would have to play for two hours real time before the eight hours restriction has passed by in game time before the PCs can learn either their prayers or spells again. Note, however, that if the wait option can be selected, then they will be able to overcome even this real time restriction. However, to be able to rest after this wait time, it would still mean the PCs are effectively camped outside in an open area, do not have any enemies nearby, can feed themselves and have access to their objects of study. This also precludes any other restrictions the DM may place upon the PCs, such as other environmental (severe weather) or personal restrictions (cursed?). The bottom line is, resting will not be readily available, unless the players are in a safe area and well prepared.

When it comes to calculating the eight hour delay before further prayer or spell recovery, each PC will have a personal eight hour window of time, starting from the moment that they last rested. Most of the time, (if players choose to rest at the same time), it also means all PCs in the game will be ready to recover spells at the same time. However, having personal time may allow players to plan certain usage of spells more tactically.

Note, however, actual time will only move forward in chunks for all PCs within the world when the wait option is selected. Actual time for rest is otherwise "swallowed up" by the time scale differential between real time and game time and balanced by each individual PCs own eight hour time window.

E.g. One player may choose to rest his or her characters at 9.00 a.m. game time. (No time is moved forward using this option.) Another player chooses to do the same. All PCs controlled by these two players have a personal time stamp placed upon them, from which they must wait another eight hours (5.00 p.m. game time) before they can learn their prayers or spells again. A third player does not need to rest because they have a full complement of spells, but does need to do so after another real time hour of game play (which would equate to about 2.00 p.m in game time). He or she may choose to rest at this time, whereas the previous players could not. (Again, no time is moved forward when selected.) However, the players now decide that the other PCs belonging to the other two players do need to recover their spells (again) and therefore try to find a place where they can wait until dusk (6.00 p.m in four hours time). Any player can choose to select this option from the GUI and the actual time for the game will move forward for all PCs. If successful, then the time will move forward enough for the players to allow their PCs to learn their prayers or spells again. (6.00 p.m. is after 5.0 p.m.) Alternatively, the players could have opted to continue playing without choosing the wait option (or may have been forced to keep playing because of circumstances) and would have been able to rest again when the game time reached 5.00 p.m. after about another 45 minutes real time.

I still have a little more coding left to do, and will give another update on this when I have finished it, and include any more details as I think of them. In the meanwhile, if you have any questions, please add them as a comment below.

Thursday, 14 February 2008

Ancient Mysteries (ADV)

Week four of play went very smoothly and without any glitches. The only downside was that one of the players could not make it this week. His playing style and contribution was missed, and we hope to see him along next week. In the meanwhile, the synopsis is up for grabs at the website, both for him to catch up with events and for any others who may be following. Here is a snippet as usual:

SYNOPSIS: (SESSION XP: 701) 17/09/1197

"After the combat, the heroes checked out the chamber with the crystal and found a headstone at the back, which read "Let Kyrianda Lathellian's blessing be available for all." None of the heroes could determine what this meant, and so left the ancient mystery alone for the time being."

Tuesday, 5 February 2008

A Blast From The Past!

Having the week off has allowed me to work with the NWN2 toolset more closely, and to start to understand the more nitty-gritty of its engine, as well as start to make more posts in the forums. Today, I decided to take a break from learning about crafting and its functions, but not before I made a post in the Bioware forums asking for more details on how distillable objects are set to be dropped from the various monsters. At first, I tracked down what I thought would be the answer from within the des_crft_drop.2da file, but having played the official campaign and collected such things as fire giant heads, I still cannot see how such things are determined, as this 2da file does not contain such information where I thought it would be. To date, I have not had an answer as to what actually does determine such drops. In the worse case scenario, I will write my own scripts to handle such matters. It would just have been nice to understand this a bit more first.

The Rift On The Borantan Plains:

Instead, I decided to turn my hand to designing another area. The images included show my results, and I don't mind showing them as the players would have already "seen" this area from their time playing in pen and paper. (So many years ago now!)

These images show the rift that opened upon the Borantan Plains near to the start of the game: The same rift that the heroes later descended and found their way to the Underdark, where they are still today.

I was pleased with the results again, and I am beginning to see that some quite good results are possible, even with the minimal amount of skill.

(In case it is not obvious, you can click on any picture in this blog to get a larger view.)


During my drawing of the new area, I had the urge to dabble with some campfires and to add some script that automatically changed their state (fire effect) according to the time of day. This highlighted a couple of issues itself. First off, I learned that Placed Effects (e.g. flames) are harder to work with (manipulate) than I first thought, and secondly, the SetTime function works very differently to how I first thought when the module Game Time has been altered.

As you know, I intend to alter the flow of time from the previous 1 minute = 1 minute style of play to something that allows for real time waiting before spells can recovered from a rest. Originally, I proposed using 4 minutes = 1 Game hour, which equated to meaning resting would only be possible every 24 real time minutes (if within an area where you can rest). However, I am also considering higher values like 15 minutes = 1 Game Hour, as this would mean players would only be able to rest their PCs about once per gaming session (two hours real time), unless overridden by the DM for any reason. This would give more meaning to careful spell use and disposable magik items such as potions and scrolls, and even such items as wands, staves and rods.

Anyway, during my use of the SetTime function, I discovered that setting the minutes higher than the module "minutes per hour" would alter the hour setting as if the minutes lapped the hour. i.e. Setting the module minutes per hour does NOT alter the flow of time to make 60 minutes now fit within the hour, but actually makes the hour comprise of the lower number of minutes. Therefore, in the module where the time was set to 15 minutes = 1 Game Hour, if I used the SetTime function to set 3 hours 59 minutes, this would actually set the game time to 6 hours 14 minutes (6.14 am) and not 3.59 am as you might expect. In other words, the 59 minutes are 3 x 15 minutes (hours) plus another 14 minutes. And when the clock that now says 6.14 am moves on one minute, the time would be 7.00 am and not 6.15 am.

Sunday, 3 February 2008

Crafting In The New Era

Yesterday, I introduced the Art of Crafting and touched upon how crafting will play a bigger role within the new era upon Althéa. Players could choose to let their PCs get by on the items they manage to find or purchase, but due to the change in magic and skills upon Althéa, it would pay them to invest some time and knowledge into constructing their own items, including weapons and armour. Eventually, they may even gain enough knowledge to enchant their items and bring about a new range of magikal weapons for the new era!

Basic Crafting Skills

CRAFT WEAPON: There will still be access to some simple weapons in the new era, but weapons requiring greater skill than the most basic type will be reserved for those in power or to those few gifted artisans who the PCs may be able to talk into selling their wares. Therefore, any adventurer who anticipates the chance of combat may want to learn more about basic weapon crafting, or at least team up with someone who has the skill.

CRAFT ARMOUR: The same holds true for armour as it does weapons. While basic armour may still be bought from merchants, the sensible adventurer will either learn more about crafting armour for themselves, or at least team up with someone who can keep them supplied.

  • Access to blacksmith's workbench and smith hammer.
  • Metal Ingots, wooden planks, creature hides and a weapon or armour mold.
  • The quality of the ingots, planks or hides determines the skill required to work with them, but also offer a better type of weapon or armour with added benefits as a result.

CRAFT ALCHEMY: To begin with, most items built within the new era will not be magikal in any way. However, those PCs with the alchemy craft learn the secrets of extracting essences from the remains of creatures required for enchanting. This process of extracting essences from the remains of creatures is called alchemy, and it is through this craft that PCs are able to make such things as poisons and grenades, as well as collect the essences required for making magikal weapons.
  • Access to an alchemical workbench and a mortar and pestle.
  • Essences from distilled body parts using the mortar and pestle. Alchemy recipes and secrets.
  • Further feats are required to make use of the essences collected via the alchemy skill.

Basic Enchanting Procedures

Eventually, every PC will want to improve the items they have, and this normally means turning basic items into enchanted ones, or what is more traditionally known as a magikal item! Turning a mundane item into a magikal one is normally within the realm of the wizard or sorcerer, but basically can be done by anyone who has the right feat: Create Magical Arms and Armor Feat and/or the Create Wondrous Items Feat. There are three other magikal item creation feats, but they are for specific objects only: Craft Wand, Scribe Scroll and Brew Potion. While these feats are useful for such basic items, it is the function of the more powerful feats highlighted above (that can enchant ordinary items) of which we are interested in for now.
In both instances, the magician's workbench is often required to combine magic essences, special ingredients (e.g. gems) and a casting of a spell along with the item to be enchanted. If successful, the object that was being worked is returned with a new enchantment of some kind, varying from improved defences for armour or improved damage for weapons for example. The combination of ingredients required for such an enchanting is often a closely guarded secret, and the PC must first try to find or learn of the procedure required before carrying out the task if they wish to be sure of success.

Advanced Enchanting Procedures

As the PC learns more about enchanting, so they will discover improved and easier ways to turn a mundane item into a magikal one. They will eventually acquire such items as the Shaper's Alembic and an Enchanter's Satchel, which allow for working with items in the field with other special essences rather than being forced to find a work bench.

Essentially, depending upon the PCs commitment to their art will help determine how much they will be able to craft in the new era. If they choose to ignore these skills and feats, then the more they will have to rely on others to locate and supply more useful items. If they can master the skills and feats themselves, however, then they will only be limited by their own determination and ability.

Saturday, 2 February 2008

The Art of Crafting

The official NWN2 campaign and its add-on, "Mask of the Betrayer" (MotB), come with some very well coded crafting systems that expand on those that came with NWN1. Furthermore, they make use of essences in such a way that fits in well with the Althéa campaign mythos. In the world of NWN (Toril), some of the essences are referred to by their elemental name, which fits in well with the Althéa Colour scheme that also reflects the elemental equivalents: White = Air; Green = Earth; Blue = Water and Red = Fire. Furthermore, MotB also introduces the new Spirit Essence, which again complements the system to be used in the new era upon Althéa.

Avoiding A Recipe For Trouble

After taking a closer look at the code behind crafting and the recipes involved, I can see that trying to alter the existing code may be more trouble than its worth. The reason being, whenever there are official updates and fixes, I would need to keep amending scripts I have also altered when making crafting changes. However, because the system is already quite extensive and stands on its own merit, I don't actually see the need to add to or alter this current system. Instead, I will create a system specific for my campaign over and above any official ones.

New Era Life Creations

Along with the official system, I hope to introduce a new bench that will allow for a new craft to be implemented that will involve the Life Essence. Basically, in much the same way there are already three different benches available to work with the current existing essences, I will introduce a new object at which the PC can work. It will most likely take the form of another workbench of some kind, but does not have to take this form exclusively. However, by doing this, I can add script to any existing items used in creation (e.g. the smith hammer) that will intercept the object being worked with and redirect the script to use my own craft creation code. Basically, in this example, the smith hammer would check the item upon which it was just used and if it detects new Life Essence apparatus, the code would then check my own item creation code instead of any normal code that would be run. This would be much easier to manage than trying to keep track of very large official crafting scripts and 2da files.

Normal Althéa Crafting

Just like the official campaign, the smith hammer will be required to craft certain items, especially weapons and armour. However, I will add extra code that will allow the smith hammer to work with other objects within the world of Althéa.

Here is an example of a heavy crossbow mold. Again, it will be the same as you would have expected from the official campaign, including information of what you would require to make the item.

NB: In this example, the mold says 2 wooden planks. Note, however, that wooden planks can come in different forms and qualities. The weapon may have special abilities according to the quality of the wooden planks you use. The same theory exists if the mold may says metal ingots or some other object instead.

As an example of how I can alter existing items to help give the system a unique feel for the Althéa campaign, notice the wording in the following items for making a heavy crossbow from Shederran wood.

NB: I have currently not changed the name of the specific wood, so as not to confuse players who may be used to the naming convention from the official campaign. However, if players would prefer to have the name changed to something unique to Althéa, then please leave comments with your suggestions.

Useful Links

OFFICIAL CRAFTING INFO: For those players who would like to get a good background in the art of crafting as it currently stands, take a look at this website: Thieves Guild (Link now added to the Useful Links section to the left.). This site gives good recipe information for all known builds within the official crafting lists. However, if you would rather learn of all builds possible through playing, then do not refer to the lists given here.

CRAFTING 2DA INFO: For builders who would like more information about the 2da's involved in altering the crafting system, check out this NWN2 Forum Link. Beware though, this thread goes into quite a bit of detail about the 2da's files involved and I did notice one or two minor errors that may confuse the issue. E.g. The author refers to line 5 instead of line 10 in one of the more informative posts.

CRAFTING MOD: There is a mod that can be downloaded from the Vault, which was written by someone from Obsidian. It is called Crafting.mod. It is supposed to help create 2da lines that can be used to help write correct 2da structure for the crafting system. If you do want to try to add your own recipes within the current official crafting system, then I imagine this module would be an invaluable tool.