Choose Your Language

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." Read 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." Read 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. " Read 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.

Saturday, 2 August 2008

AME Interview Now Available

The AME group interviewed me about my work and Soul Shaker. The interview has now been posted at the AME forums and is available for viewing from here: AME Interview.

Feel free to leave comments or other questions at the forum if you want to and I will answer where I can.