Choose Your Language

Tuesday, 30 December 2008

Auto-Pause Combat (LB) Released For NWN2 Campaigns

UPDATE (06/01/09): This code has now been updated to work for all NWN2 official campaigns.

A reader to this blog read about my combat auto-pause facility that I have coded for my own module and asked if I could do something similar for SoZ. And so, this evening, I decided to take a look at my scripts and managed to put something together. It is not quite as refined as the one used in my own module, as I did not want to add a tlk file and had to rely on changing only one script within SoZ. However, after testing it, I have found it works fine and so uploaded it to the Vault. It is awaiting approval, but I hope other players (who like my group enjoy turn-based combat), will find it a useful addition. As soon as the Vault has approved its entry, I will add a link to it on my blog sidebar.

Hopefully, my friend and I will be able to make use of the code for our own SoZ gaming experience as well now. ;)

Combat Auto-Pause - SoZ can now be downloaded from here.

Thursday, 25 December 2008


Mass ... Effect

I managed to order this game for under £10.00 a few weeks ago. I did not want to pay more than this because of the DRM software that limits usage. It still has not turned up yet, but I'm in no hurry. There is so much else to do.

Mass ... & Weight For Gold

I finally managed to get my system in place that means gold now weighs something and takes up a slot in the inventory, in the way of money pouches that carry 500 gold coins each and weigh 10 lb. If a PC carries less than 500 gold coins, then no pouches are created. I believe the system is flexible enough to work in a multi player environment as well, and allows a player to divide the weight of the gold among all his or her PCs. Furthermore, the money pouches that are created work dynamically, meaning the player does not need to do anything with regards to handing over gold. The testing is certainly more complicated than I first thought it would be, but I believe I have a working combination now.

Mass ... of Christ ("Christmass")

Readers may be surprised that my wife and I do not celebrate this time, or Easter for that matter. We are Christians, and it is because of this and through various points of study, that we came to the conclusion that these celebrations do not edify God. Furthermore, they have the potential to mislead others about their faith. Therefore, taken in the light of 1 Corinthians Chapter 8 verse 13, my wife and I do not take part in such. There are also some very good sermons to support this, including a sermon (in three parts) by Greg Price, which can be found here: Part 1, Part 2, and Part 3. (These link to multi-media pages.)

Now, even though we do not celebrate these particular times, I would like to make clear that my wife and I do celebrate the birth, death and resurrection of Christ every day of the year, and in this respect, dear reader, you have our warmest welcome and hope you are walking with us along the narrow path that leads to Him in glory. God Bless.

Thursday, 18 December 2008

I Think I've Done It! (DLGPartySwap)

I believe I have done it! (See yesterday's post.) I was struggling with one last issue where the PCs of the party would keep swapping back to the main PC during any conversation. Then I had a sudden thought to check the Campaign Editor and voila! I discovered what DLGPartySwap now does. :) It does exactly what I hoped for and when FALSE, it stops the dialogue returning focus to the main PC. Once this was set, it solved all my remaining problems that I have tested to date. Although, I am quietly confident that by doing this I have resolved all my issues.

And so, the bottom line is, I believe I have managed to allow players to add a party at the start (or not, as is their choice) and still have all my systems work OK. Just to reiterate what I had to do to get this to work, in a basic outline was this:

1) Swap the original created PCs for copies with new Tags. (Unspawn originals.)
2) Edit 2da script and attach companion type scripts to them using SetCreatureScriptsToSet. (See Script below.)
3) Set DLGPartySwap to FALSE in the Campaign Editor section.

Wednesday, 17 December 2008

SoZ Party Function Incompatible (Now Fixed!)

After spending the last couple of hours trying to work out if I can include the new party function from SoZ to allow players to make a party prior playing my latest module, I have had to come to the conclusion that it is not going to be possible. :( UPDATE: See post dated 18/12/08.

It is easy enough to add the function and allow the player to create a party, but many of my scripts that then work with the "party" (which includes companions as the player finds them) do not work with the Althéa PC Menu, which is a critical part of my module and the way it plays. Part of the problem is any additional PCs created are difficult to work with as objects. In particular, if it is not the "main PC" (first created) that I wish to work with, I have used the Tag of the companion in many of the scripts to ascertain which character is being played. Unfortunately, I cannot alter the Tag to what I need for the additional PCs and so many aspects of my module fail because of this.

I had wondered if I can "copy" the additional PCs, retag them and use the copies in the form of "companion" style access rather than PCs, but I don't think this will work. (I don't think I can copy a player's creature objects.) I will look at this angle a little longer, but I have my doubts. UPDATE: I am able to copy the PC and give it a new Tag. I now think I need to work with the SetCreatureScriptsToSet function, as the PCs need to use companion scripts. I will look at this angle for a while longer and give an update if I solve my issues.

On a positive note, I believe I will still be able to use the new party conversation system alongside my own.


In other news, I am now at peace with myself regarding a "logical flow" issue for a side-quest I had in mind and so I hope to go ahead writing this soon. The story hook did not feel right to me at first and so I could not get started until I had it all working properly in my mind.

I have also done some more work to the Real Life System, which now checks if an NPC sees a PC trying to work with a chest that does not belong to them. A PC will not be able to work with any chest while an NPC can see them and they have not had permission to do so. Of course, the same system allows the PCs to "do away" with nearby NPCs if they are that way inclined, but there will be consequences to this kind of action in the form of other NPCs coming to the defence of the first if they do. On the back of this, attempting to pick locks on chests that do not belong to the PC will also now affect alignment for the whole party involved. So, a paladin will not be happy with an out of control thief in the same party.

Sunday, 7 December 2008

100th Post - Winter Slow Down

This is my 100th post since starting this blog. Unfortunately, I do not have a great deal to say as I have been very run down again and not been up to using the toolset or anything really. :( More "coughing and sneezing" than "design and creation".

I did manage to code most of the Enhance Life section of the campaign, and as a consequence, I have decided that this ability will also be usable at any level rather than from 4th upwards. Of course, the player will have to discover how this is achieved first and so it may be they won't know how to make use of this until later levels anyway.

I did also manage to write down my first proper side-quest today. Without going into detail, I can say that it's a small mystery that will hopefully grab the imagination of a few detective type players. If I can write it as I hope, it could make an interesting little story itself.

As a side note, I have decided to sell off one of my 20" monitors and upgrade to a 24" one instead. That should arrive in the week, which may help to boost my enthusiasm to do more with the toolset. I also sold my existing printer and upgraded to an All-In-One. Sometimes, having a couple of new things like that help to give me enthusiasm to carry on through the low times. And even if they don't you can rest-assured that I will continue in the future, even if I take a bit of another break.

Sunday, 30 November 2008

Auto-Pause Combat

This week I have been looking over some of the new things that come with "Storm of Zehir". This includes the new scripting command SetPause, which allowed me to add a simple bit of script that supports auto-pausing combat every 6 seconds - on a module heartbeat. As some may know, my group of players and I have a preference towards turn-based combat - probably because we stem from the "very" old school of PnP playing. And while auto-pausing every 6 seconds is not exactly turn-based combat in the sense we like to play, it is a welcomed compromise that allows the game to accurately pause every 6 seconds somewhere between a combat round. Rest assured though, this feature is fully toggable for those who want to keep their combats free from any such facility.

Sorry Feat - Cooldown

I have finally managed to get the "cooldown" feature to work with feats, many thanks to Kaedrin who helped me to pin down where my problem was. As it turned out, the issue was nothing to do with the actual information I was trying to add to the feat.2da file, but the fact that it was not always saving between my tests - and so settings I was making were simply not there! I required this feature for a "Althéa Feat" that allowed a player to say "Sorry" to a neutral that they may have attacked. It is part of the "Life System" where a player will be permitted to attack any creature they can see. However, on the off-chance an attack was made in error, then I needed a way to allow a player to prevent the neutral remaining hostile with them. This is where the "Sorry" feat comes into play. By clicking this option, any neutrals (now made hostile) will return to being non-hostile. However, I decided to give this feature a 30 second cooldown usage so that players could not exploit the situation by hitting every few seconds between saying sorry.

Party Conversations

My friend and I finished MotB the other day, with the cutscene conversation bug unfortunately, which was introduced with the SoZ add-on. So, we had to play the last section again with me pausing between lines so we could actually read the ending.

With that over, we started to play SoZ, and were pleasantly surprised at the way the new party conversations worked in a multi-player game. The ability to allow both players a chance to speak or ignore and do their own thing was a great joy. It did remind us more of good old traditional PnP style play where anybody in the group of players could join in.

So, coupled with my own party conversation code, this will be a welcome addition to the campaign and future adventures I intend to build.

Storm of Zehir

My first impressions of this game are very good. I already enjoy the facilities introduced as mentioned above, and I look forward to delving more into the "recipe collecting" system, which was an area I felt needed improving. To me, SoZ has been a big step towards actual gameplay with respects to the spirit of the game. While I can see this will compromise some companion interaction (that the players build themselves), I thoroughly welcome all the great advantages that the game brings instead.

So, even though I am not even off the first beach (we only just started the game), I give SoZ a high score already simply because of the feel it has given me and the added benefits I can already see. In fact, I would even go as far to say that SoZ is probably one of the biggest improvements to the NWN franchise since its release. Good stuff!

Actually, there is some bad stuff that I forgot to mention: There appears to be a bug with the AI since the update and I have heard there are one or two other issues with the latest add-on that require fixing. I have encountered the AI bug myself, in that NPCs do not appear to arm themselves properly and they like to run away from a target before they use ranged weapons. This is most annoying, but something I can fix if Obsidian do not fix it first - which I obviously hope will be the case.

Thursday, 20 November 2008

Another Small Step Forward ...

At the end of last year I gave an outline of some of the ideas I had in mind for the Life Essence in this post. At the time I mentioned the following:

  • 1st Level (All PCs) - Soul Protection. (The PC is protected against untimely death.)
  • 2nd Level (Craft Skill PCs) - Maintain Equipment. (The PC with the crafting skills can also maintain their equipment if they are damaged.)
  • 2nd Level (Wizard PCs) - Arcaene Lore. (PC can create "Arcaene Lore Scrolls" enabling powers similar to earlier Colour Magik.)
  • 3rd Level (All PCs) - Empower Attributes. (PC can recover lost or increase attributes. Scaling cost per point.)
  • 4th Level (All PCs) - Enhance Life. (PC can trade Life Essence for real experiences - Increase XP.)

Well, since then I have managed to code nearly all these aspects ... and a few more. In particular, Soul Protection was coded very early on when I coded the Death System. Readers who have been following the blog closely may already have an idea how this will work. If not, you will know all about it by the time it comes to play.

The Maintain Equipment is almost complete. There is one small change here to the original plan, however, and that is to allow PC's of any level maintain their equipment, as long as they have the appropriate crafting skill. More details of this will be given in the game and on the website, which I hope will be ready to upload at some point in the future, even if it has to coincide with the release of the module itself.

The Arcaene Lore code was established quite early on, but continues to be a work in progress. It has grown as an idea since its first conception and will, hopefully, continue to develop further as I get the time. One off-shoot of this system was the announcement at the time that most material components for spells would no longer be required. Well, I can now add that I have decided that the new era will not require any spell components for the standard spells. I will still have the player meet certain requirements for special case spells, but this will be made clear as part of an adventure.

Over the last few days I have been coding the system that handles the ability to Empower Attributes. I won't go into details about how this is done, as the astute player will learn more about this when they get the chance to play. What I can say, however, is the coding was a bit trickier than I first thought it was going to be. (Isn't it always!) My first idea of using XML code to do the job did not work out, and in the end I was left with two alternatives: The first involved allowing the player to increase attributes in a similar fashion to the equivalent Epic Feats that do a similar thing, or, alternatively, have attributes altered that would still be affected by what the PC had in the way of other attribute altering magik. The main difference is that the former would allow attributes to stack with magik items, where the latter would not.

In the end, I went with the latter, as it fitted in better with the idea I had in mind, and left the Epic Feats untouched as another goal for the player at later levels. As my idea was to allow the player a way to have more control over their PC's very soul, then having a system that was still affected in some way by other items made for a more interesting/tactical gaming experience. For example, when this method is discovered, the player will not only be able to raise some attributes, but also have the ability to lower some. If the PC who is doing the altering of their attributes finds and uses a magik item that duplicates the same attribute benefit, then they may chose to drop the said attribute and increase another instead (because the two benefits on the same attribute do not stack). There are costs involved of course, and there are other reasons why the player may chose to play this part of the game differently. After all, this particular method of increasing an attribute will not be tied to an object that could theoretically be lost at some time.

In the coming weeks, I hope to write the code for the last idea in the list: Enhance Life. I already know how to do this, and is fairly straight forward. And once this part has been done, the core ideas for the Life Essence (which should carry between each module) will be finished, leaving me more time to continue with the story itself.


One other aspect I have been looking at today was to do with the range of vision, spells and weapons. I have always preferred to give both the player and monsters a bigger range with respect to all these aspects, as it can allow for some interesting long range combats, as well as help prevent the player's PC creeping forward to cast a spell or use a weapon, just because they are "not in range".

Having altered some of the figures in the ranges.2da, I have managed to improve the distance of vision, and I believe spells work better (I have only tested a couple), but I do not see a great improvement in ranged weapons, like bows.

I even tried altering some of the figures in the baseitems.2da, where it makes reference to minimum and maximum ranges of weapons and ammo, but even this did not appear to make any difference. So, if anybody has any other ideas, then please let me know. :)

Wednesday, 12 November 2008

Updated Games Menu

I just thought I would give an update on some of the additions I have made to the player's in-game options menu. There are two, and they both appear on the front menu option panel: Adding Map Pins and Renaming A Weapon.

Adding Map Pins

Adding Map Pins is as simple as pressing the Add Map Pin button. This will then add a map pin directly in-game, which also updates on the map (in the traditional manner) after the player exits and enters the area again. This can also be updated manually by the player selecting the Update Map Pins button, which becomes available when there are map pins to update. The third button, Edit Map Pin, selects the nearest pin to the player and allows them to edit the comment from another GUI that pops up. Again, this only becomes selectable when there is a map pin to edit. I have also taken care to ensure players can only edit their own map pins.

There is a small chance that Obsidian may add some code in a later patch that will replace the need for this menu option. However, as I have now finished it, I will leave it in place just in case.

Renaming A Weapon

The second new GUI option is the ability for a player to rename a weapon that they carry in their right hand, up to a maximum of 24 characters. I needed this function for the players as some weapons in the new era can deteriorate (Dead Weapons), meaning the player may wish to reflect this in the name of the weapon.

I have currently disabled the ability to write in numbers as part of the name, as this is not in keeping with the spirit of the campaign. In other words, there is no ability to write Longsword +4. Although, I suppose a player could call it Longsword Four if they really wanted to. However, I am trying to help players avoid naming a weapon to something that may mislead them in the future if their weapon deteriorates.

E.g. A weapon that is +4 enhanced and has 2d4 fire damage may have traditionally been called a Flametongue +4. However, if this weapon deteriorates with use, then it may lose the +4 enhancement or the flaming damage, and so it would be wiser to call it something along the lines of Flametongue only ... unless it loses its flaming damage as well over time.

UPDATE: Due to popular demand, I have allowed numbers to be used in the naming process. Just don't forget that the name may not reflect the ability of the weapon if it changes and you fail to notice. ;)

Tuesday, 4 November 2008

Map Pins Have A Future?

In the last post you may recall that I managed to work a system that enabled a player to use my own version of "map pins" within NWN2. As I built this system, I was in contact with Sunjammer via the Bioware forums (website added to the website links), who gave this response when I asked him about the possibility of using existing NWN code for map pins in NWN2:

"It isn't possible at this point. In NWN1 when you clicked on the map the client sent the information to the server so the map pin was displayed immediately. In NWN2 all we are doing is creating the underlying variables and there is no message being sent to the server that tells it to create the corresponding map pin ... until the client enters the new area. However I have it on good authority that a) the code still exists in NWN2 and b) it would be very easy to create a UI callback to send the appropriate message to the server. Consequently I'm submitting a feature request to Rob & Rich.Hopefully it can be included in v1.22 (v1.20 is SoZ, v1.21 is the "day 1" patch for SoZ, v1.22 will be the first normal patch after SoZ)."

So, basically, if Obsidian are able to make this UI callback available to us, then I guess the idea of including map pins for area maps will become available to us once again. And if they do, then it would be a great honour to say that it all started here, and thanks to Sunjammer, may become a salvaged system to replace the method I currently have in place. Here's hoping ...

Thursday, 30 October 2008

Show Me The Way

I have been busy sorting out buying a new car this week, which has distracted me somewhat from working with the toolset. However, in the time I have had, I have been trying to work on a system that would enable players to use their own map pins with NWN2. But, after a few hours trial and error, I have failed to produce anything that works. (SEE UPDATE BELOW.)

I thought I might be able to add waypoints at the player's location and use an input GUI to alter the text used for the map pin description. However, you cannot (a) Add map text after a pin has been added, and more importantly (b) You cannot see newly created waypoints (as map pins) that are added dynamically during the game. I had a couple of other ideas, but both fail in a big way: For the first idea I was hoping I might be able to "copy" existing waypoints already placed on a map to the players location, but you can only copy creatures or items. The second idea involved placing a number of waypoints to form a kind of matrix across the map and then use code to locate the closest one when searched for by the player who would then be able to enable it. Unfortunately, both of these ideas also fail to be able to update the map text in any way. I also wondered if it was possible to add a small "pin texture" somehow that could be hovered over and allow a tool tip to be displayed. Unfortunately, I don't believe my knowledge of XML coding is up to the job, nor do I know if it is even possible. And so .... I ask any readers if they have any idea how I might be able to approach this problem, or if they know the problem has already been solved by someone else or can confirm if it is a fruitless task.

The new car ... A Kia Rio 1.4 Chill in Midnight Black.

UPDATE (31/10/08):

I managed to build a system that I believe works well enough! :) After researching earlier work done with map pins back in NWN1, I found this by Mad Andrew and this by Jassper. After trying similar code in my module for NWN2, I was able to create map pins that (a) Showed as small placeables immediately, but also (b) Recorded "proper" map pins that would be updated whenever the player left and re-entered the area. To help with this, I added a button to the PC Options menu that allows the Main PC to quickly exit and re-enter the area if they wish to recall the location of their map pins. As the area I jump the player to is very small, the transition is only as long as it takes to load the area they are currently in, which in most cases is only a few seconds. However, as the player already has immediate "placeable" pins within the area, then this procedure to update the "proper" pins is only required on rare occasions.

Wednesday, 22 October 2008

Stormy Considerations: Zehir Style

I have finally started to get some energy again and back into the mood for using the toolset. It's a bit of a slow return, but at least I have returned! Part of the encouragement came from hearing how many aspects of Storm of Zehir expansion actually reflects quite a few of my own ideas, and may mean I will have less coding (or coding made easier) in the future.

In particular, it seems they may have made customised crafting easier to include, which was going to be one of those headaches that I was not looking forward to. And while they have included a means for different PCs of a party to take part in a conversation, I had already coded that part for my module, and so it will be interesting to see if the two are interchangeable.

I have also been doing more work on the "map system", including designing an item for players to be able to examine the world map without actually being able to travel anywhere. The idea is so a player or players can make reference to the world map if they find something mentioned that might be worth looking up. It is still a work in progress at the moment, and I may adjust it slightly to show "destination icons" rather than not (which it does at the moment), but simply disable the travel function for them. Everything works well, including the ability to switch world maps, which I specifically designed early in the process, and so I am quite pleased with this new map item to date. And then there is, of course, the question of how the new map system will also interact with this one. I think a number of these map ideas may have to wait to see exactly how the new map system works, and whether I wish to adapt a number of the older ones to work in different ways to my first plan.

Another section of the module I have decided to look at now is "ambient life" for things like villages, towns and cities. Originally, I was not going to do as much in this area, and simply place the odd NPC around the place. However, even though I still think this should be something that would be sufficient in principle, when it comes to playing the mod, it just seems lacking. Now, I still don't want to spend too much time with an ambient life system with respect to locals (commoners, nobles and peasants sort of thing), but have decided to spend some time looking at it, but in a way that may work as a generic system for any future settings as well. Then any work I now put into it will be worthwhile for future projects as well.

I have already discovered that, unfortunately, there is no easy way to change the "appearance" between human types (as I thought was possible) because the NWN2 constants don't work; the constants are a leftover from NWN1 code. However, I have managed to find a way to help randomize their clothing. The plan is to make generic waypoints that will logically handle spawn points and then randomly produce appropriate NPCs. This is in the early stages as of yet, but if I can knock something up that will handle the situation to make it look reasonably intelligent, then I will do so.

Finally, another area I want to look at is how players will interact with fallen (killed) companions. At the moment, the fallen companion can be raised, but the part I need to address is whether a surviving PC can pick up their body and/or equipment as well. I need to consider this as a PC may not have the power to raise the PC themselves, and may, therefore, decide to take the companion's dead body (and/or equipment) to the nearest healer who can. I could not find any easy combination of tick boxes in the properties to manage this; therefore it looks like another coding issue to ensure a killed companion can be interacted with in a number of ways. Unless, of course, anybody who is reading this knows any better way to handle it. :)

Monday, 13 October 2008

As Sweet As Honey (Yet Another Family Member!)

I am still going through a rough patch with M.E. at the moment and have been unable to do anything constructive at all for the last few weeks. It's hard to shake anxieties and easy to slip into depression when I am like this, so I have to take it easy and not overdo it.

However, some good things have happened during this time, which have helped me to remain relatively optimistic. For instance, my wife and I have adopted a third rabbit! She is a female lop, named Honey and we took her in when a neighbour admitted that they were not looking after her properly.

Initially, we had intended to simply "foster" her for a short while as we tried to find her a new home, but she has become so attached to us since her "rescue", that it would be too difficult for us to part with her now. Within a day of her coming to stay with us, she became a "new" rabbit, jumping into the air and running circles around us with pure joy. Find more photos of Honey here.

I have told my wife, however, that this really must be the last one we have, as we now have three rabbits, and we had not intended to have any more after we lost Anakin earlier this year. At the moment, Honey appears to have a sneezing issue. It does not appear to be anything serious (she has seen the vet), and she is full of life and eats well. However, to be on the safe side, she stays in our third bedroom away from Bunny and Daisy for the time being, and may well stay that way as bonding three rabbits can be difficult.

As far as any modding, that is having to take a bit of a back seat for the time being as I try to recuperate some energies.

Saturday, 4 October 2008

Building New Website

I have not been too well over the last week or so, and consequently have not been very motivated with the tool set. (It requires all my concentration at the best of times.) Instead, I was able to attend a couple of IRC for the NWCon4, which were fun. And, over the last day or so, I have been putting together the first few pages of my new website to complement the next set of modules for the Althéa Campaign.

Its Home Page will now link to this blog, but there will be a header with various links to different sections explaining various aspects of the campaign, including a History section, a House Rule section and an Adventure section. Each of these sections follow a similar colour format to the Blog page, and each has its own contents bar for easy navigation when trying to find information regarding the campaign. Basically, the web pages will have further information about the campaign as a whole and will help give the player a greater background about the World of Althéa and any modules they eventually play.

I felt this was the best time for a face lift to the website, as all new modules are being written in NWN2 (as opposed to NWN1) and they start in a new era from 1st level. Therefore, players can choose to research some background from the History and/or Adventure sections if they wish to enhance their gaming experience. Or, they may find the House Rules section beneficial to help explain some of the unique aspects of the campaign.

There is still quite a bit to transfer from pages that go back many years (from PnP), as well as information from old and recent posts alike. Hopefully, however, it will be something that I can continue to work on in between designing modules. As soon as there is sufficient material to make the website worth uploading, I will do so. I will announce it when done.

Monday, 22 September 2008

Keeping A Date

Talking of dates: First I would like to apologise to the AME group for missing the IRC that was scheduled last Saturday (20th September), to which I had been invited to attend. Somehow, I got so engrossed with a scripting problem I was trying to resolve, that by the time I remembered the chat, it was too late. I did still go along and joined the AME channel to see if anybody was still around, and I was pleased to find a few of the guys still there: Skunkeen, Starlight, Axe Murderer. We all chatted for a while, and later that evening, I also had the chance to chat with a few from the CTP (Community Tileset Project) crew. So, my apologies once again to Tyler, and a thanks to those who shared a good evening of unexpected chat.

With respect to "Keeping A Date" in the campaign itself, I can announce that I finally managed to work in Edward Beck's (aka 0100010) Custom Calendar GUI into my campaign. I say "finally" as there was a problem with the original scripts not keeping track of a year properly when it crossed into a new one. I did request extra information from Edward, but I think he must be busy (or not around anymore) as I did not receive any replies to my contact attempts.

In the end, I had to write my own code to accurately keep track of passed time and re-apply it in a different way. I used campaign variables as the main synchronisation method, which actually works out well, as it also allows additional modules to refer to these records. As it happens, I also had to alter the XML code, as I needed a larger "window" to show special notes for my world. I also altered the code to show just "moon phases" rather than "sun movements", as the sun movement is already handled by the OC anyway.

Finally, I did away with the leap year section, as it does not serve any purpose in my campaign and adds a level of complication I did not think was worth the effort to keep. However, I am still intrigued as to why my module did not work like the example module, and am still in the process of trying to discover why. If I do learn why, then this may change slightly.

If you take a closer look at the image, you can see that I have enabled both the OC clock, which shows sun/night and time only on the left hand side of the screen. And on the right hand of the screen is the small clock that acts as a button that opens and closes the date window from its left hand side. (The image shows the date window currently open giving details of the date and current moon-cycle.)

This shot (and information given above) actually gives away a little of the New Era changes that have taken place. For those that would not know, Althéa (prior to the New Era) had four moons! Since the Darkening, however, this is no longer the case, and Althéa has had its three colour moons taken from it. I won't go into any more details now, but for those interested, they will learn more when they play the module.

More On The Life System

The Life System met with some favourable comments the last time I posted on it, and so I thought I would give an update on some of its final stages of development. I have now added a new condition that checks if a player continues to attack innocent NPCs within the same area. In my last blog entry, I explained that onlooking NPCs would stop their attack if the player did not continue to attack an innocent NPC. Now, the onlookers will remember if a PC has already attacked and killed an NPC in the area already, and if they see them kill another, then they will no longer view the death as an "accident", and all will turn hostile to the PC.

However, if the PC manages to escape the area, then the NPCs will return to a non-hostile state, but will remain wary with the returning PC, ready to turn hostile again if the PC should kill another NPC. If the PC remains good and no longer attacks the NPCs, then leaving and returning to the area a second time resets their status.

Furthermore, I have made it that guard and defender types actually improve in status as the PCs develop. Therefore, they should remain relatively strong enough to deal with any potentially growing antagonists.

Tuesday, 16 September 2008

The Life System & The Notice Board

I have managed to get a couple of things out of the way in the last week that I needed in place before I could continue with the main story. The main one was to finish development on what I call, The Life System. This is, effectively, a combination of a faction and influence system that helps govern how the NPC's react to the party of PCs subject to how the PCs treat them.

As I have allowed a player to choose to attack an NPC at any time, then I needed to design a system that would have other NPCs come to the aid of the one attacked if need be, and at the same time, not make it so the player could inadvertently cause a problem with turning everybody hostile to them, whether by deliberate aggression or by accident. I wanted to allow the player the opportunity to attack anybody at any time, so that it could be left to play a more evil role if they wanted to. Note, I don't actively encourage this sort of activity, but I also wanted to allow the player the freedom to try to play the game the way they want to. Of course, this does open a number of issues to ensure the game can still be completed, but I do have a solution in mind.

The Life System In Action

Suppose a player attacks a local male soldier. Immediately, the attacked soldier NPC will turn hostile to the party of PC's, and at the same time, any nearby allies (or defenders) of the soldier will come to the soldier's aid and attack the party as well. Note, however, the soldier's allies do not show as hostile, and the player must right-click select any of the allies to attack them. However, this has the added benefit that if the player chooses to ignore the soldier's allies and run away, then the allies will stop their attack. (They were simply trying to break up the fight.)

The original soldier (if still alive) will, however, remain hostile for a few more rounds and try to continue the fight. If, however, the party escape the soldier, he will eventually return to non-hostile within a few more rounds. The next time they see him, they can approach him as a non-hostile NPC. However, if they approach too soon after he has "cooled down" from being hostile, he will still not speak with them, as he will now be scorning them.

Scorning is part of the influence section of the Life System, and is one of a number of levels that determines how an NPC reacts to the party of PCs. Eventually (over a short period of time), the soldier will even have this level of his opinion of the PCs reduce to simply disliking the PCs, at which point, the PCs may be able to work in an apology (if they so desire) and re-establish some sort of communication with the NPC, even if the soldier's new opinion of the party still treats them frostily.

I hope to have this Life System in place for all NPCs and not just for companions. While companions can have a bit more flexibility with the Influence Section, the fact that other NPCs can use the same system saves me a great deal of time and worry when it comes to a player who may like to try attacking for the sake of it. So far, in testing, the system works well, and I hope it will make the environment of NPCs appear more realistic and alive. Hence its name: The Life System.

Party Conversation Interaction

On the back of this system, and with some other code, I have now also included the multi-PC interactive party conversation. Basically, even prior to SoZ, I had wanted to include a conversation system that allowed the player's best skilled PC's to be able to be involved with any conversation the party may have, so that the best skills can be used. (E.g. Diplomacy, Intimidate or Bluff.) Now, if a player has a conversation where these skills are required, the player will be able to let the PC in the party with the best skill speak the line. And although it does not show the actual PC in the cutscene, it does, however, allow the best stats for the PC used when a skill role has to be made. I have also taken into account whether the PC is capable and within range before allowing the PC to be able to comment.

Notice Board

I have also finally managed to make my Notice Board, along with pinned scrolls for the PCs to be able to read.

This was something that I wanted to add, and was stumped at how to get the individual scrolls in place. Eventually, even after struggling to build the board itself, I got the final tips I needed from BGP Hughes Effects Editor Tutorial and looking at Merecraft's Wanted Poster.

The whole task was more complicated that I thought it was going to be, and I still think there is room for better tutorials in this area in general.

Tuesday, 9 September 2008

Multi-Player Considerations

Finally, I have my new computer set up enough to start testing some code for multi-player gaming. Although I am still waiting for the new graphics card, I have been able to use it and have already discovered some scripts that needed changing. Here are some of my findings, along with some general comments:

1) Testing multi-player can be a pain because you have to wait for the game to check the version before it lets you continue to load the game. It can sit up to 20 seconds or more just waiting for an answer before it finally drops through and lets me test the module. It does not always do this, but it does it enough to really hamper testing. Ironically, one of the other aspects of getting a new computer was to speed up testing. If anybody knows how to bypass this check, or decrease the check time, then please let me know in the comments.

2) Much of my "faction" coding needed updating because I have now seen that setting the server to "Allow One Party" treats every player (and their companions) in the same game as one faction. This may sound obvious, but until I had tested it, I was not sure how it would work. In fact, if you remove the tick from the "Allow One Party" box, it works as if each player (and accompanying companions) were in their own faction. The problem is, I need the function of the "Allow One Party" for some other functions and design (like cutscenes), but was hoping for separate factions for each player in the party. Suffice to say, I left the tick in the box, and added some extra code to the faction checks to help distinguish between different players and their companions. (*)

3) As a side-effect of the above, it was interesting to discover that (just like MotB), when a companion joins a party, it is "for the whole party" and not just the player who requested they join. And so, in other words, a companion can (in theory) be controlled by any player in the party. While this still happens in my own module, my extra code (in 2 above), however, ensures that the companion does, in fact, stay in the "control" of the player who asked them to join in the first place, unless a second player asks them to join them instead. (*)

(*) All these differences are coded to enable a player to have more direct control over specific companions of their choosing; much like playing more than one PC. However, I have been able to make use of the default workings to ensure the companions act as a member of a party as well as specific companions in the control of one player.

During some of my testing, I took a screenshot as the PC looked across the Borantan Plains. I thought it looked quite good, considering area design is definitely my weak spot.

I can also report now that I have managed to script my first cutscene. Geoff Cordery (a.k.a. Quillmaster) came up with one of the voices for me, and I have managed to get the scene in place. Thanks for the voice-acting Geoff; there will be more to come. ;) By the way, if anybody else fancies a part of voice-acting, then please let me know via a comment.

After recognising how much work is involved with voice acting and lip-synching, I have decided that I will probably only keep voice-acting to cutscenes and (perhaps) the odd conversation that may add some drama.

I also started to look at the Influence System that came with MotB, in the hopes I may be able to use that system instead of my own idea. However, after trying to trace back how the figures were sent to the GUI, I had to give up. I still don't know enough about some GUI code and the influence code that Obsidian used was buried too deep for me to keep trying to uncover.

Just before I decided to buy and build a new computer, I had started to try some work with Gmax. Even installing the program and adding the NWN plug-in was not best explained and required careful attention. Thankfully, by the time I was actually able to go through a tutorial, I think I can begin to see how making certain placeables may be achieved. However, I have put that project on hold for the time being, as I believe I need to start doing more NPC and conversations ... and other basic building first.

Friday, 5 September 2008

NWN Podcast: Golden Dragon Award

Trey and Tyler interviewed me for my Golden Dragon Award at the NWN Podcast. We all had a great time and you can hear the most skilled and edited version by following the link above. I enjoyed the interview and found both Trey and Tyler did a great job of making me feel most welcome. Thanks guys! It was great fun!

For those who listened to the podcast and want to download my story, "Deep Within", you can download it here.

On another note, I am in the process of adding a new computer to my network that is capable of playing NWN2. I need this so that I can test multi-player gaming as I write the module. I have found on occasion that there are certain functions that I am not sure how they will work in a multi-player environment, and so I hope that once the new computer in place, their testing and use will become much clearer.

Unfortunately, at the moment, the ASUS P5Q motherboard I bought appears that it may have a fault, as neither the LAN (speed) nor the sound card (microphone) work properly. I thought it was simply due to bad drivers, but the assistant at ASUS has asked me to get the board changed. I will have to see how that pans out. I don't like doing this though, as it means I have to remove the CPU, memory and other hardware and leave it waiting around until the new motherboard comes along. When I build a PC, the less fitting and removing of hardware the better in my opinion.

The building and subsequent problems with the new computer does mean I have not had the chance to do much module building lately. I look forward to getting settled back into this again.

Saturday, 30 August 2008

Inventory Item Quantity Fix

I was over at the Seahaven Blog where Merecraft had started the ball rolling (after a tip from Amraphael) to fix the limit of items placed within an inventory. I posted a new script to his blog and repeat it below (because there was a slight bug in his) and I also updated the script so that it would give feedback of the items to quantity limit in the Container GUI. It meant updating the container.xml slightly more as well, and as I could not post it in a comment to him, I will try to post it here instead (as an image). NB: The quantity figure does not show until after the PC has interacted with the inventory in some way. One could script it to show the figure OnUsed, but I am not sure if the extra coding is necessary.

Note, this alters an official XML file, and so it should be placed in a hak to be used with a specific module only. It only fixes the issue for modders and their scripted modules and does not fix modules that have not used the scripting initially.

First, here is the script that goes on the container's OnInventory Disturbed:


Note: I have not altered the original code that determines how many slots the object has, which is currently set as a variable on the object. This can, of course, be made more accessible by tying the quantity figure to one of the less used (but more accessible variables from properties) such as Reflex Save or Will Save. (I have tested the Will Save property and this works fine.)

And then here are the XML alterations to the Container.xml file:


I have highlighted the additions in yellow. NB: There is also a commented line in the XML code above the last yellow line to ensure it is not used instead. (Marked with an exclamation mark.)

My thanks go to Merecraft & Amraphael for the inspiration.

Tuesday, 26 August 2008

New Era Mechanics - New GUI

The new era for the campaign comes with some new "house rules", which I hope will add a depth to the game, over and above the norm. Accessing these rules, options or basic information was originally planned to be via a conversation menu. However, as I have been getting to grips with coding GUIs more and more, I decided to create a GUI with tabs to give the player a more user-friendly interface to set options for their PC's. Then, I got a little excited about a concept I considered of being able to change this information (live) if the player swapped between their main PC and companions. That was when I introduced myself to a massive coding headache! However, the good news is, after a couple of days of coding, I believe I have the GUI working as I originally hoped.

Here is a screenshot of the first (opening) tab of the GUI. Note, there are two other tabs along the top of the GUI. The first tab (shown) shows the PC's basic information, the second tab gives access to "House Rules" information, and the third tab is the area that allows a player to have their PC with the highest Craft Weapon skill make an improvement to a dead weapon. As you can see, there is potentially room for more tabs if I need them.

The problem where I had coding, was mostly to do with the information available in the first (opening) tab that shows the current PC's Vigour Level, Life Essence Respawn State and Current Test switch. My idea was that a player could open the GUI with one PC, and then switch PCs with the GUI still open and the information would change for the new PC. Keeping track of the Main PC and the companions that were activating or viewing the script was a nightmare, but after many attempts, and debugging, I finally achieved it.

One thing I did learn in the process, is that the GetFirstName function appears to return the first name of the original blueprint used to create a companion and not the new name given it in the toolset. This had me confused for quite a while, and I ended up changing all my uses of GetFirstName to simply GetName.

UPDATE: Loudent2 (Thanks!) helped me to understand that the GetFirstName function actually recalls the original string ref and gave this information in a response in this post:

"Actually, the problem is probably that the string ref name is still set. While this may seem like a benign problem (certain functions returning the str ref name) it's actually more serious than that. I've had items in our world spontaneous reset to the original name and the dm client will also list it by it's original name.

Fortunately it's easy to change, you just have to remember to do it whenever you create an object based of an existing blueprint.To clear, go to the blue print and in localized name (for items and placeables, first and last names for creatures etc) and click the down arrow at the right edge of the field (bringing up the naming dialog).

There will be one line with a pair of edit boxes listing language and gender. Below that will be a line that reads:String Ref: If a number follows that text then click on the "Edit String Ref" button below that line, then in the "Edit String Ref" dialog, click the "clear" button on the right side of the first line and then click "ok"This sounds a lot more complicated than it really is. Anyway, that should solve your issues."

Anyway, here is a brief outline of some of the section of this GUI that the player will use in the game. First, it is accessed by a icon that can be placed in the quickslots. When presented, the initial screen tells the player the date, the current PC's vigour level (combined hunger and tiredness system), the PC's role (either Channeler or Harvester - not shown on the screenshot). From the top screen, the player can also decide if they are going to allow carried Life Essences to allow an auto-respawn upon an untimely death or not. (Don't forget that a death means death in this campaign.) A player might chose to not allow an auto-respawn if they have a PC who can raise them from the dead in some way and they wanted to save the Life Essences.

The second tab brings up the House Rules section, where the player can recall rules for the game as required. New rules will be added to the list as the player explores the world, so they can always have a place to refer to them in game.

The current third and final tab brings up a screen that allows a player to have their PC with the highest Craft Weapon skill (and who must also be in a fit state) improve the quality of the weapon they carry in their right hand at the cost of a Life Essence.

I won't say any more at this stage, but hopefully, you can see how the many unique gaming systems I have been working on for the campaign have now come together in one neat user interface. And with that now done, I can start working in some of the other ideas I have that also work around these systems.

It was interesting to see the new Storm of Zehir video at Gamespot and it looks like Obsidian have also programmed a few of the things along the lines that I have tried to do for my own campaign. They also now have "death means death" and have also made it so individual PC's can have an input (with their own skill usage) in things like conversations in much the same I too am programming a "best PC skill use" in many of my own interactions. One thing that I do like the look of (and is something I will wait until I have seen the expansion) is the new 3d map system. I imagine it is possible to do this with clever use of an area with miniaturised objects, but to have it "officially" available as an editor would be great, and hopefully, easier to use.

Saturday, 23 August 2008

The End of the Beginning (ADV)

Yesterday's 20th gaming session marked the end of Soul Shaker for my group of players after nearly 40 hours of play, possibly longer if allowing for WAN traffic lag. I believe it went well, apart from one really annoying last minute bug that prevented the heroes from being able to use the portal that led them to the final area. It was easily fixed with me at the helm as DM, but it frustrated me and concerned me that other players may have encountered the same bug, and I wanted to make sure I had the fix up as soon as possible. To this end, patch v1.10 is already up along with the v1.10 module. I also updated the module version number in the module to read correctly, as I had not updated the number through versions 1.06-1.09, even though the module was updated correctly. Finally, I also ensured all players in a MP game would enter cutscene in the final encounter.
The end of Soul Shaker will also mark the end of me writing synopses in this way, as they are quite time consuming, and I am not sure if their use warrants the time spent on them. In future, and when we actually get back to playing, I will probably reserve my time to writing much briefer synopses (with far less detail) that will be no more than a single paragraph or two that is written directly on the blog rather than be directed to my web pages.
With Soul Shaker finished, there is little reason left for me to keep NWN1 installed on my computer now, except that I will leave it there so I can continue bug-fixing it if anybody should still find a bug I have missed. That is probably the only reason I will leave it installed though, unless a new module does grab my attention and I find I want to play it. This is unlikely though, as writing for the new module will take priority now, and if I was going to look at a new module, it would more than likely be one written for NWN2.

I thought now might be a good time to announce the working title of my next module (written in NWN2) for the new era of the Althéa Campaign: "Better The Demon You Know". As readers of this blog will know, I have been writing material for the new era since around Summer 2007, and that while it has been a slow start, I may be able to concentrate more on the new module now that Soul Shaker is officially completed for our group.

This afternoon (4.00 p.m. B.S.T.), I have an interview with the podcast crew, and so I hope to be able to give a link to that in the near future. For now though, here is the snippet and link to the last synopsis for quite some time ....


"Slowly, the heroes approached the seated figures, the screams from the soul prison getting louder as they approached. Yet, the humanoids did not move. Were they dead? Karasten approached one of them even closer and tried to speak with it. Immediately, as if disturbed from its own wretched nightmare, the emaciated being rose and attacked the Influencer."  

Download the full synopsis here.

Tuesday, 19 August 2008

The Campaign Editor & Other Things

I have been quite busy over the last few days ... doing a lot of things and feeling as though I am getting nowhere fast. In all fairness though, I have probably been going through another learning curve and fighting with scripts quite a bit. Some of you may know about these discoveries I made already, but as they were new to me, I thought I would share them just in case they help others.

Campaign Editor

First, I took a closer look at the Campaign Editor. I have been into it before, but this time I took a closer look and found a couple of useful points:

1) KeepJournalSynchedToLeader: This solved my problem when companions joining after a journal entry was given, were missing entries. It also solved entries that companions would sometimes ignore for no apparent reason.

2) PlayersCanAttackNeutrals: I was overjoyed when I discovered this one. One of the let downs for me when I first saw NWN2 was the players inability to attack anybody at any time by right clicking and choosing attack. It was something that was always allowed in NWN1, but for NWN2, you need this switch. I now have it on, and a player can now attack whoever they like, with the added advantage of another switch UsesPersonalReputations set to FALSE stopping the factions getting too out of control.

I would still like to know what PartyCreation does, and so if anybody knows, please leave me a comment. Thanks.


I have also been spending time looking at how factions react with each other. I had written a script to take care of combat between some factions, but discovering the Campaign Editor switch (mentioned above) took care of my requirements and meant one less script to worry about. I still need to work on a script that handles alignment changing when someone kills for evil reasons, but that is almost completed now. Suffice to say, I have a number of groups set up now that react as they should do, in that they help each other out in combat if they are friendly to one another.

The one major thing to remember about factions, however, is that factions appear to affect NPC's and that it is reputation with these factions that affects the PCs. Bear this in mind when reading about the new functions below.

Death Issue

One of my main problems today was related to an old set of scripts that I thought were fine until I checked them again today. Some of the options I had were not quite as I liked them. The player will have an option they can turn on or off for each character that will help govern how death is handled in each case. Then there is also a difference if the player is controlling a companion or the main PC, as well as taking into account if the game is multi-player or single-player. I believe I finally have all the options working as they should now, although I had to rewrite a script that altered the stack of an item because it would disappear from the inventory when the stack quantity was altered. This appears to be a NWN2 bug and not my coding, as debug code confirmed the items were still being carried, but simply did not show any icon!

PC Options

I finally worked out how to make an icon draggable this week as well. I have a "feat"that every player gets when they join the game. However, I wanted this feat icon to be able to be dragged to the quickslots if they wanted to. It turned out that I needed to set the TOOLSCATEGORIES to 2 within the feat.2da for the feat. This is worth remembering if I make any more feats.

New Functions

I have also spent quite some time trying to understand more functions. Here is a list of some I have looked at closer, with an explanation of what I think they do:

1) ChangeFaction: Use this to make an NPC change to a faction of another NPC.
2) ChangeToStandardFaction: Use this to make an NPC change to one of the standard factions.
3) GetStandardFactionReputation: Use this to see how a standard faction feels about an object (PC or another NPC).
4) SetStandardFactionReputation: Use this to alter how a standard faction feels about an object (PC or another NPC).

5) AdjustReputation: Use this to adjust how a whole faction feels towards an object (PC or NPC).
6) ClearPersonalReputation: Use this to clear a reputation between two objects (PC or NPC).
7) GetReputation: Used to determine how object A feels about object B.

8) SetClockOnForPlayer: Turns on a clock for the player. I also found there was a way to show only the time (and not the date), which was useful because the names of the months do not match the names in my campaign. Requires UpdateClockForAllPlayers in module heartbeat.
9) SetNoticeText: I think this one allows text messages to be shown in a cutscene conversation, which the normal text message functions cannot do. (Untested.)
10) MakeConversable: Ensures a PC is put in a state where a conversation will work.

I also learned more about how alignment functions work and revised the roster functions, which can get exceedingly complicated when trying to work around the death system I have in place.

So, as you can see, I have been quite busy with refreshing my knowledge of the toolset. Much of what I have looked at should help me start to work with it more effectively. I never got my intro cutscene written yet, but I did work on the Life Essence drop script, which is why I needed to look into alignment changing scripts, which led to the faction work. As you can see (and probably know if a fellow builder), one thing led to another. Hopefully now though, I am in a position to get back to the cutscene and give that a go. I learned a few more things about the conversation editor as well, which may help me in that department too.

Saturday, 16 August 2008

The Deep Lair (ADV)

My group's gaming session was postponed from last Wednesday to Friday due to the problem introduced to my computer system after patching NWN2. However, when we did get to play on Friday, all went well. We managed to get in over two hours of play, and apart from one network dead link for the WAN player, all went well.

In the process of writing up this week's synopsis, I did realise there was a typo in the journal, but more importantly, I also realised there was a possible exploit with Lord Reginold's combination code. I won't go into details of this exploit, but suffice to say, I have now uploaded v1.09 of the module to correct this and the typos I have found over the last few weeks.

I have been working on my NWN2 module today, but I will save any updates about that for a later post. One thing I will say now, however, is that Factions appear to work in the opposite way to how I thought when you look at them in the faction editor. I thought that if group A were friendly to group B, then A would defend group B. However, in practice, it turns out it works the other way around, in that group B defends group A, even if group B are "less friendly" to group A, than A were to group B.


"The group walked up to the man to speak with him, and soon learned that he was none other than Lord Reginold himself. Unfortunately, the force field that held the leader of the refugees captive was made secure by a combination lock that not even Myara could work. It appeared the heroes would need to find the exact combination before the lord would be freed." 

Download the full synopsis here.

Thursday, 14 August 2008

Almost There

After the pain of having to reinstall my operating system, every application and put back all data onto my computer, I am almost finished. For those following this blog, you will know that the v1.13 patch caused the initial problem, but, unfortunately, I learned of the solution after I had taken the decision to reinstall everything to resolve the problem instead.

I have not had the chance to do much in between the installs except some web surfing and visit the odd blog. Consequently, I have nothing more to report on my campaign build. I still have about ten small applications left to install, mostly to do with NWN tools, but after that I should be back in the position to start looking at the cutscene or Life Essence drop code as I planned a few days ago. Hopefully, this is the last I will write of this and the next post will be more interesting to read.

Wednesday, 13 August 2008

I Loathe SecuROM

I found out today (thanks for the head's up Frank Perez) that v1.13 patch has a serious SecuROM problem that gives the exact problems I have been encountering over the last few days. Check out this post.

This is an absolute outrage, as it has caused me to waste many hours trying to resolve an issue that I thought was elsewhere on my computer, as I could see no reason why a patch to a game should have caused this degree of an OS issue. Now that I think about it, I can see how all the problems I had started a day or so after I did the patch. And the subsequent video issues were due to my reinstalling over the top to try to resolve the right-click issues.

Consequently, there was no time for our usual gaming session tonight as I did not have my computer ready in time, and it probably won't be now until tomorrow at the earliest. My fear now, of course, is that I have installed patch v1.13 again, and now I am worried that it will fail again soon.

I am too tired and angry at SecuROM to say anything more at the moment. And so I sign off feeling really frustrated that a company can get away with what amounts to placing legal viruses on someone's computer. Someone must be made responsible.

UPDATE: For those who have not yet gone through many hours of Windows reinstalls and have found this post, you can have an easy fix by running this official repair:

UPDATE: It sounds like Obsidian have also released a HotFix patch that resolves the problem now, as another Update. (Talk about bad timing for me.)

Tuesday, 12 August 2008

Dr Watson & A Sick PC

And by 'PC', I do mean my computer and not a player character. A couple of days ago, I started having problems when right-clicking on an icon to make a shortcut. Dr Watson (drwtsn32.exe) would suddenly fire up and crash my computer. After bringing up the control panel and killing off Dr Watson, I noticed my AVG scan process had started. I checked out the AVG forums and it pointed me towards what I already guessed, that it was Explorer that had the fault and that AVG was reacting to that.

Anyway, after trying many other things to try to solve the problem I decided to reinstall Windows over the top of my existing copy (I don't like doing this as I know it can cause some other issues), only to find out it made no difference. Eventually, after I was about to give up and bite the bullet to do a complete reinstall, I decided to give the system one more going over, and I found another system TEMP folder (C:\Documents and Settings\User Name\Local Settings\Temp) where I decided to delete everything in it. (You have to change folder settings to "Show Hidden Files & Folders" to be able to navigate to this temp folder.) As soon as I did that, the system stabilised and I was able to correct the faulty shortcut.

This morning, however, the results of my installing Windows over the previous version have come back to haunt me, and now I am unable to do certain Window Updates, and I am also having problems running certain videos. The short of it is, I may have to do a full backup and system restore after all, which means another day wasted. If only I had found the TEMP folder earlier. Mind you, to top all this, I think my VGA card is also starting to play up now, as I had graphics corruption on startup (at BIOS level) today until I rebooted. I guess I am going to have to check its fan in case it's sticking and overheating.

The new dual processor computer is looking as though it will be coming along sooner than later at this rate.

UPDATE: I may have found my solution to the first problem here.
UPDATE 2: I fixed some of my video issues by reinstalling a DivX codec. (May still have a hardware issue though.)
UPDATE 3: I take it all back ... It still has the same problems. :( I'm going to test hardware now.

Invisible PC For Screenshots

I was just reading through AmstradHero's Fate Of A City blog and saw his comment about making a PC invisible onscreen for help taking screenshots. Well, the script below allows the builder to toggle between being invisble (and back to visible again) by running the same script again.

To run this script while in game, you have to have debugmode on: Go into console mode (press the button to the left of the '1' key along the top row) and then enter debugmode=1, which will turn on debugmode. Then type rs nameofscript, where the 'rs' part stands for run script and 'nameofscript' is whatever name you have given the script. I currently have the script called 'SS' so all I have to type is rs ss to toggle the PC between being invisible or visible on screen or not. Anyway, here is the script:

void main()
object oPC = GetFirstPC();
int iStoredAppear = GetLocalInt(oPC, "APPEAR");
int iAppear = GetAppearanceType(oPC);

if(iStoredAppear == 0){SetLocalInt(oPC, "APPEAR", iAppear);}


if(GetAppearanceType(oPC) == APPEARANCE_TYPE_INVISIBLE_HUMAN_MALE){SetCreatureAppearanceType(oPC, iStoredAppear);}


Saturday, 9 August 2008

So Much To See & Do

I have been trying to expand my knowledge of NWN2 over the last few days, from scripting another GUI, to examining the conversation tool more, and even looking at custom content tools. The latter, however, is still evading me at the moment, as I am finding it hard to find any tools that may be "easy" to use or learn. I have downloaded Gmax, but have yet to try that, and from what I have seen and read, it may well be beyond me without a helpful tutorial. I have spoken to Amraphael of Zork fame (who is obviously someone most competent when it comes to custom content creation) and he said he would see what he could do if he got the time. (Thanks Amraphael.) By the way, if you have not done so already, check his site out, it really is an interesting read and the game he is developing (his own variation on Zork) looks like it will be a fascinating module to play.

The New 'Role-Play Test' GUI

This new GUI is part of an idea I had of trying to help players remember certain aspects of the campaign by giving a small test at the end of an "act" of play that rewards the player's PCs according to how many questions they answer correctly. It is only meant to be a bit of extra fun, and the player can choose to ignore the test altogether if they want to. However, if a player has been paying close attention to the game and is able to answer a number of the questions, then they will be rewarded with game XP for the PCs. I have also added the option to "save" the current test for a short while so that they can do extra research before submitting their answers. There are a maximum of ten questions per test, but some may be less. The current reward is 10 xp per character level (main PC) for each question answered correctly.

Combination Chest GUI Update

Geoff Cordery (a.k.a Quillmaster) has also been helping me with a few designs of other background images for the combination chests. Rather than give any screenshots now, I will leave them as a surprise when in-game. In return, I have been helping him with some scripting of his PC death code. It's great when you can return the favour for something like this.


Until recently, I have neglected looking more closely at the way NWN2 handles conversations, and I have to say, much to my own loss. Having spent more time looking at them, I can see how many of the more common requirements for a conversation can be handled a lot simpler than the way you had to do it in NWN1: Quest logs have a direct input, nodes have camera selections for easier cutscene development and there are a number of 'common' condition and action scripts already written for a builder to access for each node. Now that I have studied them more, I will try to take advantage of them and have already started to outline one of my 'cutscene conversations' to use as an introduction to the module.

NWN2 Expansion: Storm of Zehir

There was more news about the new expansion due out later this year (so I have heard rumoured), called "Storm of Zehir" posted on the Obsidian Blog. It reads that they have added quite a few interesting differences, including changes to the world map and concentrated more on a party than an individual with companions. From a scripting pointing of view, I hope this does not alter things at all, otherwise it could mean a nasty 'fly in the ointment' for some of the coding I have already done for the next module. There is a Pre-release Forum for the expansion at the Bioware Forums that has some interesting posts about the expansion: The overland map and battle. I also found this Official Website for the expansion.

UPDATE: Here is a direct video link .

Moving Forward - 'Soul Surges'

Many of the main 'mechanics' I wanted in place: death system, vigour & rest system, crafting system, weapon system and Arcaene Lore system are mostly incorporated now, even if only at the outline stage. That is, they work, even if I need to flesh them out a little more. The Life Essence system fits in around many of the mechanics, but also expands on many other elements of the game, including such things as Combination Chests for example, and is something that I am continuing to incorporate and expand as I build.

Another system that I want to add, which I have yet to even start, is the Soul Surges system. Without giving too much away, the new era has some elements of a different magic system breaking through. These breakthroughs take the form of Soul Surges, and allow spell casters to produce spell-like effects by use of their soul rather than other energies.

I have had some preliminary ideas for some time, but have yet to expand on it. However, I can say they are powers that are over and above normal spell use and are powered by something akin to mana (and may still be mana at the end of the design) and can be used alongside the normal spells each day. They are not unlike At Will Powers in the 4e D&D manuals, but at this stage, I only intended them to be for spell casters and I still say they will need a power source of some kind.

As you can see, I have made some progress over the last few days, although not as much as I would have liked due to being distracted with bigger ideas for greater development that have drawn me back to the internet to try to improve my own building skills. It always feels like there is so much to do, and it's difficult deciding what to get stuck into first. I think my next move will be to either to write the code that determines how and where Life Essences can be found, or to try to sort out the first major cutscene.

I almost forgot: I also wrote a couple more books for the module. One was simply designed to give more depth to the current area, and the other was an in-game device (once read) to help the player determine what role they intend to take when playing the game: A Channeler or a Harvester. I will explain a bit more about these two 'roles' in a later post, but maybe the titles give the reader a clue as to what the role may be about.

Thursday, 7 August 2008

The Diaries of a Madman? (ADV)

Eighteen weeks later and the group is still playing after nearly 33 hours in total! Game play went smoothly again, considering I have recently had hardware problems with one of my computers (the one my wife's character is stored on). After being switched on, it now wants to reboot a couple of times before settling down, which suggests to me that I have a heat-related problem and may turn out to be the same as it was before when the memory needed reseating. Anyway, that aside, the game went smoothly apart from one small hiccough when Myara's hitpoints suddenly appeared to drop a significant chunk for no apparent reason. I was unable to give any explanation for this, but a simple reload of a slightly earlier position restored her to the correct amount.

Reloading like this is not something I usually recommend with Soul Shaker, due to its use of campaign variables, but if you know what you are doing and needs must, then it can be done. Doing so, did mean I had to live edit the database so that we could all use the latest Soul Orb Prison again, but it was easily done.

Fellow NWN Bloggers

As an aside, I decided to look for fellow NWN bloggers yesterday, and in particular, NWN2 bloggers to see how other are getting along with their projects. After a couple of hours surfing, I found a great bunch of sites that appear to have regular correspondence between each other and have added all of them to my own blog selections. It was good to see many names that I already recognised there as well, and hopefully, I might be able to start getting a little more interactive with them all myself. After all, I know what it's like trying to build a module ... it's always nice to get feedback and encouragement from fellow builders.


"The group found at least six tomes: One read as a Project Diary, another as a book on Denizens, and the final four made a set of volumes that spoke about the planes of existence, entitled, Myria Planus. Each of these larger tomes gave a great deal of insight about the Realm in which they now found themselves, and the Project Diary even revealed one or two plans of the lich and how it hoped to accomplish them. Whether it spoke in truth or madness, it was hard to tell. "  Download the full synopsis here.

Tuesday, 5 August 2008

It's For You!

I can now show you some of those scroll images that Geoff Cordery (Quillmaster) managed to put together for me. (Thanks Geoff.) He did half a dozen images for me (one special one just for the campaign), but I will only show a few of them here (and especially not the special one) to give you an idea of how they look. The good thing about these scroll images is that they are around 700 x 700 pixels, which means they are already a good size to display on screen, without the need to blow up and cause them to pixelate.

Scroll images are now available at the Vault.

The screenshots show the whole screen so that you get an idea of how big the scroll GUIs are. In the end I had to slightly alter the XML that displayed these GUIs because the close button and text displayed would not quite match up for each type. I think the differences and slightly extra work were worth it though. Of course, I could leave the close button off altogether and just let the player hit the escape key, but I have currently left it in just in case the player has more than one GUI open at the time.

These scrolls, like my Readable Books, allow for a journal entry to be updated after being read, and so they are quite useful to put across plot points for the players. I decided not to attach a number of other events to these for the time being, but there is no reason why they could not have all the events as used in the Readable Books.

PC Background

I have also managed to put together some of the PC background section that is set by players at the start of the module to help set the scene for both them as a player and for their PC. I wanted to allow both players of Soul Shaker and those who come along new to be able to start in this new era of the campaign, and so devised a "Background" GUI that requires one answer from a player that sets the game up for them. Depending on their answer, the player will have their PC know more or less about events at the start of the game. Furthermore, the same answer will steer the player into learning more about the story before they get underway.

Toolset Tip (Companion Compatibility)

During my time putting together some scripts this week (especially to do with Readable Books), I discovered quite a major point when it comes to programming events when the player may be using a companion instead of their Main PC. In particular, GUI responses only ever assume to work through the Main PC, even if the player is using a companion. This meant I had to figure a way to store the companion on the Main PC in the event that I needed to recall the companion object under such circumstances. I got around the issue with a couple of lines of code:

object oMainPC = GetOwnedCharacter(oPC);
SetLocalObject(oMainPC, "PCReader", oPC);
These two lines placed under the line that gets the PC store the PC being played (including a companion) onto the Main PC. Then, in the situation when only the Main PC is returned, I can retrieve the correct PC by using this example code in the script:

object oMainPC = OBJECT_SELF;
object oPC = GetLocalObject(oMainPC, "PCReader");
This is something that I had to do in my released Readable Books and Captured SpellBooks. The Vault versions have now been updated to v1.02 to reflect this new code that makes them companion compatible. And now that I know this, of course, it is something I will keep an eye out for.

As a further side to this, I now recognise the important distinction when coding between the Main PC and a Companion in other ways too. For instance, journal entries activated by a companion do not show in the companions journal - at least not in the settings I have tried. This is not a problem of course, as long as the player is aware of this and checks their Main PC's journal for updates instead. It is possible to iterate between all the companions to update their journals with extra code as well, but I decided to simply add one entry to the companion journal effectively saying check the leader's journal instead.

There is a point of note for the player here as well, in that while they may play more than one character (via using companions), it is still their Main PC (acting as a sort of leader for the small group) who determines many of the major points for the small group. This is obvious in hindsight, but is still worth mentioning so that players are aware. E.g. If the leader does something to affect their alignment, then the player should note that supporting companions are also said to be "going along" with their leaders choices and have their alignments shifted at the same time. In other words, some actions played by the leader affect the whole group. Furthermore, even acts committed by a companion count as if they had been "ordered" to do so by the leader (Main PC) and so the whole group are affected together. In fact, in this sense, while the PCs may be individuals, some of their actions count as if they affect the group as a one whole.