Choose Your Language

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.