Friday, 30 October 2009

New Feats

It has been a slow week for me this week. I am still fiddling with Windows 7 to get it to work how I like and feel. Most of the programs and utilities I normally use when working with the module are now installed and (mostly) work, and I am now back in a position to something similar to when I worked on Windows XP. Here is a screenshot with the Toolset open in Windows 7:

The time I have been working on the module has involved me with editing 2da files and a Tlk table to enable some new feats that will work with Better The Demon. I finally got the process to work (enabling skill bonuses) by applying the bonus to a player skin in a similar fashion to what I have done with other game benefits such as potential attribute adjustments. The feat I added this week also works with "successive" values, meaning the feat can be "upgraded" if certain criteria are met. In this case, I have worked in a feat that gets added subject to how often the PC "accidentally" kills neutral PCs and apologizes for the act as part of the "Real Life" system. They may start as someone who is "Accident Prone", but can eventually end up being labelled a "Homicidal Maniac" and be made an outcast from normal society. (At which point the "Sorry" feat is also removed. Check out this earlier post about the "Sorry" feat.)

While this feat was designed primarily as a means to help encourage a player to take care about who they kill and prevent breaking the game, I also considered it an exercise to help prepare me to work in any other epithet/background feats that might be worth considering. Time will tell how much I will use this facility.

I also managed to do some more work towards the Ambient Life system, with respect to buildings and their residents. This is nearing an end now and I hope to be concentrating on the quests again next week. That's the plan anyway. ;)

Saturday, 24 October 2009

Ambient Life

Every now and then when working on the module, something amusing happens that is worth telling (or so I think). In this case, it was when I was working on some new ambient life code that made the NPCs behave with a little more "intelligence" than I had used before.

This coding has come about because I have given my NPCs a degree of autonomy and "real life" responses where possible. For example, if a PC tries to pick a lock or do some damage when there are witnesses nearby, they will be prevented from doing so. This code appears to work fine, but led to me to realising that in such circumstances a player playing a thief (or any PC) may reasonably suggest to themselves that they may try coming back later (at night say) when there were no witnesses around. This, in turn, led me to considering the night and day time positions of NPCs and so I wrote some code to handle this potential situation.

The funny thing that happened was that during my testing, every NPC (except the head clergyman at the church) ended up going to the local tavern, even if they were not supposed to. Everyone turned up, from the church adept to the guards that should have been on duty! As I say, only the head clergyman did not go, although he should have gone to bed, but did not and remained at the church altar. He must have been praying for all those wayward souls down the pub! ;)

Anyway, it made me chuckle for a short while before I finally resolved the problem. Once again, this new code did raise other issues that I had not foreseen. Unfortunately, I cannot mention them as they are spoilers. Suffice to say, having the NPCs move somewhere else broke some of the logic and so I had to add more code to sort that out too. However, once I have finished this section, the module will behave in yet another way that I hope will add extra depth for the player. I am imagining rogues waiting until nightfall so that they have more chance to do their nefarious tasks than during the daylight hours. Time will tell how well it comes together .... or not! ;)

New Epithet Feats

I have also been investigating the area of new feats: the ones that give skill bonuses (or penalties) when acquired. The type that are acquired through PC actions rather than through class improvement. Adding epithet feats is straight forward enough, but attaching the skill benefits is not as straight forward as it first seemed. At the moment, it looks like I may have to resort to using the PC skin method again, but if anybody knows of any other way of doing this, then please let me know.

Windows 7 (64 bit)

I have also spent some time partitioning my hard drive and adding Windows 7 as a dual boot option. I also tested NWN2 on the new operating system and all appears to be fine. (I played some SoZ with a friend last night with no hitches at all.) I also opened my module in the toolset and all appears well there too. :)

Saturday, 17 October 2009

Dealing With The Details. (The Writer's Plight.)

So, another week goes past and the module advancement counter hardly moves. What's going on you may ask? Well, the answer is that I am working on the module (when my health permits), and I am still making progress. However, with every step I make, I am also making sure it does not break something I have already done ... or ... I am making sure there are no errors in what I have already done. Therefore, while it may appear I am taking some time over this project, the good news is that the degree of testing required in the end, should hopefully be minimal. :) Here is an example of the kind of thing I am talking about:

A Simple Conversation?

While working on a conversation the player will have with an NPC, I had the need to check into a crafting option they might need to make. This led to finding an error in a 2da table where the same item could be crafted with a choice of two spells. This led me to discover I had not updated a second version of a 2da line when a choice of spells was involved. Now fixed! Then, when checking a crafting recipe, I discover extra considerations are required to work with the new stolen item & laundry system I have developed, which in turn, also meant adding the game rule to the in game Campaign Rules system for player's easy access.

Working on this conversation reminded me that I still had to finish one of the large crafting tomes that a player can find and must acquire if they want to craft with the greater essences. So, I spent some time adding more recipes/pages to that tome. (Still requires about another 13 pages.) Getting the layout correct for a Readable Book is important to me. This also reminded me to consider what creatures needed to be available to the player to acquire the distillable creature items to, in turn, gain access to critical recipe components. I had to carefully consider the ecology of when and where such creatures could be encountered. (Work in progress.)

Furthermore, this conversation also had an opening change in description according to the state of play that altered a custom token. So, more checks and token definitions had to be made, as well as the normal journal entries and checks.

That was just the thinking and work process behind one conversation, which I am still writing! Hopefully, this was one of the more complex ones, meaning other conversations won't require as much work. However, I can think of about a dozen that may still require as much work, unless I have a design change.

World Map Encounters

I also spent a little time ironing out the last of the overland map issues dealing with encounters. The system now works as I originally planned with one alteration: I have decided to not have limited encounters, due to discovering another aspect of the original system, which I have now altered to work in a way that complements the original idea. Let me explain ...

After examining the original encounter code and conversations, I discovered there was code already in place that allowed for a morale check for monsters and had them run away from the PCs if the fight was going to be too tough for them. However, due to the way the CR ratings are set on the original encounter, the creatures do not run away as often as I thought they would. So, I decided to amend the setting to one that seemed to me more appropriate for the encounter, which now means there is more chance of the creature avoiding the PCs if they consider the PCs too challenging. Couple this to my overland Party Skill Check system, and it means that while there are "unlimited" encounters, there comes a time when the PCs will simply be able to easily avoid them, or the creatures will choose to ignore the PCs altogether. (Player's who want to have the encounter can obviously still do so if they can catch them.)

The new overland map system works well, but I am now left with the more laborious task of creating the 2da tables that provide the creature encounters and the goodies that can be found. The former will definitely be needed to be done from scratch due to obviously different encounters for my world, but the latter may only require minor alterations due to the material being fairly generic. However, this could all change on closer inspection and when I once again start .... dealing with the details.

Friday, 9 October 2009

Give Me Power!

And by "power", I mean it literally - in the form of electricity. For this week we had two days without electricity due to "essential" repair work in our area. This caused me to do very little work on the module as well as have very little else to do except make a few notes of what needed doing and read a book. For those interested I am reading Robin Hobb's Farseer series: A fantasy novel about an assassin to a king, written in the first person. I recommend it as a good read.

Final Overland Map Work

In the time I was able to work on the module, I finished the overland map code and made an attempt at creating the actual map area. I say 'attempt', as my skills in this area are not good. Furthermore, I worked from an old existing PnP paper map, which as anybody who has played PnP will know, tends to be rather bland in detail compared to a NWN2 SoZ version. Consequently, my own area map does not contain as much detail as I would like to have had due to restrictions of current exisiting campaign design. Hopefully, as the story moves into areas not currently written for the campaign, I will be able to create more interesting overland maps.

All overland maps will now include:

  1. Correct scale maps with movement reflecting actual miles and time travelled.
  2. New overland map GUI to reflect terrain type, time taken and other info.
  3. Discoverable 'goodies' based on best in party skills. (Resources given as items.)
  4. Discoverable 'locations' based on best in party skills.
  5. Limited random encounters so as not to swamp other play. (*)

(*) There will also be an option for players who find a map to ignore overland map travel altogether if they wish to. It will be up to the player if they prefer to use quicker transfer between locations rather than explore a map. A combination of travel types is recommended so the player does not miss out on finding goodies and winning XP for their PCs that overland map exploration can bring.

For those interested, here is a snippet of the old PnP map I worked from with its CRPG conversion images in the toolset.

The Reward Poll

The 'Reward Poll' first polled on this site, continues at the Vault and now has over 1100 votes! (Scroll down the page from the link and it is in the right-hand pane.)

Saturday, 3 October 2009

Close Encounters Of The SoZ Kind

On the back of last week when I worked on map encounter “goodies”, I have continued my work on the overland map by looking at how the encounters work. It was a tangled web of code I had to work through, and by the end of it I was convinced that either I did not use “const” variables enough, or the official way seems to use too many. ;) I often found myself having to work my way back through include files to work out exactly what was going on with each variable. Furthermore, as my own maps had their own unique code for travel, I had to pick my way through those functions that needed to stay, be altered or could be ignored altogether.

In the end, here is a rough outline of what I did, and what others may want to consider doing as well if they want to get overland encounters to work:

1) Bring over a lot of material from the SoZ campaign just to get the template code in place, including: A) Encounter areas. B) Random Encounter Creatures (both overland map ones and normal encounter versions). C) Encounter table 2da files, including the one that awards XP for an encounter “victory”. D) All conversation and script files associated with areas and creatures.

2) Next, I decided how I wanted my own encounters to work. To this end I removed all code that was specific to SoZ “special” encounters to leave just the random generated code to work with. I also reduced the amount of 2da cross-reference required by naming the encounter table as a variable on the terrain trigger rather than use the 2da that lists all tables and then cross-reference that with more code.

3) I then reworked the terrain heartbeat script (the script that checks for encounters) with edited versions of my own functions that are normally called from the ginc_overland include file. In particular, the InitializeEncounter function and others that are called from that, so that they checked the whole party skill set rather than just the leader used at the time. I am still working on slight alterations here, but some calls use the best party PC skill, whereas others will use an average party skill check. I am also considering adding these values to the Travel Info GUI for the player to see their current skill check levels.

It is not probably relevant to post any of the scripts, as my own specific code may only serve to confuse. However, the points I made above are good basic points that could work in general map building.

To remind readers, these maps will be more like “movie maps” in that the player can move across the region at a constant speed (unlike the official map) and time taken will be calculated and fed back in the GUI instead. For the same reason, I have decided not to reflect “night” and “day”, although this could be turned back on if there was much call for it. However, the time only updates when the PC stops moving on the map or moves to another area. Therefore, the night/day shift would (or could) suddenly change from day to night (or vice-versa) if the player did not stop moving for a period of time.

I have added a couple of screenshots (not too exciting) that show the work in progress. The first shot demonstrates that while one PC (the male PC) is doing the leading through the map, that it is the second PC (the female called Threska) who heard the creature for the party. These onscreen text feedbacks are likely to change or be removed before the final version. The second screenshot shows the ogre encounter in place.

There are a couple of other small details that I worked on along the way: a) I reworked the colour of the CR text on creatures, as sometimes I could hardly read them. b) I reworked other areas of lead PC skill checks to party wide skill checks, such as using the best PC intimidate or bluff in encounters where available (if more than one PC had the skill on offer to help save the player from having to remember the highest member).

Having reached this far, I do now realise that to do this specifically for my own campaign, I will need to write some of my own 2da encounter tables and accompanying creatures and conversations. However, it seems a shame not to make use of the many resources already available and intermingle them with some of my own. By the way, making the terrain trigger take the encounter table 2da directly involves one less 2da edit.

While I have not completed my research and coding just yet, I would say that I am 90% there. There are still one or two decisions I am considering, one in particular is whether to allow a player to switch PCs while on the overland map. It is currently disabled and works more as a “movie map” this way as intended. And as all checks are made as if from the party of PCs rather than just the leader, then the ability to change PCs is probably moot. However, if I can enable it without messing up any coding I have done, then I may do so, but I don’t think the feature is necessary more than just included because it can be. UPDATE: This option to switch PCs while on the map will NOT be enabled as it causes one or two other issues. The option to switch between PCs while on the map should never be needed anyway.

If you have any questions about this, or concerns for play, then please do add a comment.