Choose Your Language

Saturday, 25 July 2009

Rewards (POLL: What Reward Gets You Excited?)

I don't have much to report this week, as I have not had much chance to work on the module at all. The little I have done involved a script that attaches to a creature's OnDeath script and has them drop some treasure (of gems and gold) according to their level. I wanted to make sure all gems could potentially be found, as the crafting systems require gems in many cases. However, this also got me to thinking about rewards in general and I decided to flesh out this weeks post with another poll: What Reward Gets You Excited?

I decided to only allow one answer in this poll to try to concentrate the answer, but if you wanted more or had something different in mind, then please add a comment. :) NB: By "Reward", I don't just "treasures", but any kind of "return" for your playing the module.

Friday, 17 July 2009

Moving Along ... With Patch v1.23

Ye Olde Shoppe

With the majority of the costing exercise behind me, I started to make use of the new economical values in my module by starting to work more with some of the shops and trades that will be available in the game. As mentioned in a previous post, each trading place will open with an additional "store" information GUI, giving extra details for the place, such as maximum buying prices, identify costs and limits to the store's gold. In addition to this, I have now created a system that randomly adds new stock items and informs the player of such in the new GUI. New stock may simply be other useful items, or may be a special item that will add more to the game. Note, however, items that don't sell will be removed from stock after a time and new items added, so if there is an item you want and you have the gold, buy it!

The system already works well, and all I have to do now is customize some new stock items for the various shop types and consider adding extra code to the system that decides how to handle items sold to the store from the PC.

Party Maps

Another system that I finished this week was the Party Map system. Readers of the blog may recall that I do still intend to use the map systems from both NWN2/MotB. Each system is used in a different way according to what the PC has discovered. However, I have also adapted the code to allow PCs to acquire map items and view them as a party (including MP mode). The map displays locations discovered and gives some information about them when selected, but the "Travel To" button is disabled to prevent a quick escape from a dungeon environment. The idea is to allow PCs to look at a map together and discuss options similar to old PnP style play.



Dead Weapons

With the release of patch v1.23, I have been able to make use of some of the new functions, including the GetBaseMaterial to determine what material an item (in this case a weapon) is made from. This is useful to me, as it means I can determine what properties may still be available to a weapon that has degraded. i.e. Dead Weapons (*) degrade in my game. However, if a weapon is made from a certain material (e.g. adamantine), then any properties associated with the material in its construction are not lost, as opposed to magic weapons that may have had 2-3 properties on them, but have been lost with weapon degradation and lack of care. This means, of course, that sometimes it may pay to have a weapon made of a certain material, as its properties may last longer than a weapon made from iron that has been enchanted. NB: There are means to keep a weapon in good condition and not lose any properties. Also, Living Weapons, by comparison, do not degrade with use. (*) The term Dead Weapon will become more obvious when playing the game.

Auto-Pause Combat System

With the release of patch v1.23, I also want to make a slight alteration to my optional Auto-Pause Combat System. At the moment, the system works well, but now that instant feats have become available in the latest patch, I would like to make the new "feat" instant in response, as opposed to have an action delay time. However, the new feats.2da supplied with the patch failed to have the new column added, which means although the facility is there, I cannot make use of it until I have managed to edit the 2da file and added a column. I have told it should be possible using Excel, but at the moment I have not had much success. I guess Atari will release the file separately at some point. Even so, I think this new feature of instant feats will be a great blessing to the community.

NWN2Player.ini

After patching to v1.23, I found that when I entered Character Mode in game, that I could no longer look upwards, like I could prior to patching. I was about to reinstall the entire game when I had a thought about allowing NWN2 to rebuild the NWN2player.ini file after I deleted my version. Thankfully, after doing this, the game worked again just fine. I know one of my players was also struggling with one of his playing modes, so maybe this might be a fix worth noting for future reference. NB: I don't think the fault was as a deliberate result of the patch, but in my case, it did occur at the same time.

Saturday, 11 July 2009

A Recipe For More Work

Today, I was hoping to bring news of finishing the "costing" exercise I have been trying to sort out for the last few weeks. Unfortunately, while on the home straight (reworking the costs of creating Wondrous Items using the new SoZ recipes), I came across another "problem": It seems that the minimum caster level stated in the Wondrous Item recipe description actually has no bearing when using the recipe at all!

On checking the 2da file and accompanying crafting scripts, I could not see any check for caster level and, in practice, I was able to create a Cloak of Resistance (+5) with my 1st level cleric (after I gave him all the ingredients), which according to the description requires a 15th level caster. I made a post on the forums asking people about it. For now, I have put this final section on hold awaiting any further information on this, as I do not want to edit all the descriptions only to find it "fixed" in the next patch. I don't mind there being no minimum caster level, but if this is the case, it does affect the costs involved to create the item in the recipe.

Spell Alterations

In the meanwhile, one of my players has been helping me go through spells in the game to work out which ones will require extra code to allow variable level casting and any alterations we want to include. E.g. A Summon Monster lasts 1 hour per level (max 20) or until killed now. We have done the first couple of levels and will hopefully get through the rest in time.

The Greater Essences

After closer study of the greater essences and what properties they instill to items, I have decided to alter the level at which PCs need to be to work with them. I compared the level of giving a basic property to an item between the OC crafting system and the MotB system (like giving armour +2 AC) and then adjusted the level slightly for any "cost differences". By my calculations, the level to work with the greater essences dropped by 4 in every case. So now, the caster level to work with greater essences are as follows:
  • Brilliant Essence (x1) : 8th level.
  • Brilliant Essence (x2) : 11th level.
  • Brilliant Essence (x3) : 14th level.
  • Brilliant Essence (x4) : 17th level.
  • Pristine Essence (x1) : 20th level.
  • Pristine Essence (x2) : 23rd level.
  • Pristine Essence (x3) : 26th level.
This allows the players to start using the greater essences much sooner than normal, which is something I want to encourage. The properties that can be enchanted with these essences are now closer in value to their creature distilled lesser essence types.

The only downside to all this of course, is that I will now need to edit the essences descriptions to reflect this. However, as there will be a single tome explaining all the greater essence recipes, I will simply remove much of the crafting descriptive text and leave something a little more generic. This does, however, prompt me to have to finish the Greater Crafting tome that I started some while back.

Free Game

Lastly, has anybody tried playing this free game from Aeria Games? I have not looked at it yet, but wondered if anybody else had any experience with it?

Saturday, 4 July 2009

The Sum of the Parts ...

… Will not necessarily be exceeded by the value of the whole. This is my conclusion with regards to making items from various ingredients anyway. My initial aim was to balance the cost of making items to their sale value, so that a sensible economy was maintained in the world. However, there are some circumstances where such balance is simply not going to happen. In other words, some items will cost more to make than they would eventually be worth on the open market.

However, after a great deal of item cost rearrangement, the number of items that are worth less than they cost to make are far fewer than before, and those that still are can be justifiably explained (in my opinion). As a general rule, the more powerful the magic, the less you get in return for your input. (Think of the cost of increasing the amount of cache memory in a computer for the return performance it gives.) As an example, a crafter might get a reasonable return for a crafted item up to +5 in power, but thereafter (+6 and above), the cost becomes more than they would get in return for the items used in its creation. This, of course, gives added reason why items above +5 in a world are seen far less than the smaller values. Crafting items of a higher power becomes more of a personal achievement than about money making. And this would also explain why such items would not normally be sold on the open market, unless of course, the seller did not craft the item in the first place and was simply making what they could from the item.

To reflect an area of cost I am talking about, look at the table below that shows the value of using essences to create an item compared to the market value that said crafted item would reach. NB: When I speak of crafting, I also mean it to include the ability to enchant items, as they are closely related. Both speak of creating items using other items as ingredients or catalysts in some way.

Please note that the values above are a guideline only and may not be the exact values acquired in game due to other varying cost factors and bartering. From the above table you can also see that the value of essences has been greatly reduced from the norm. The next table shows all the values of essences available. In the OC, essences costs ran from 150 gp – 100000 gp with no distinction between the types, but now I give a greater value to spirit and power essences, which I believe are used in the more powerful enchantments.

Note also that the lesser essences convert 2 to 1 (unchanged), whereas the greater essences now convert at 5 to 1 (from a previous 8 to 1 conversion rate).

The New Cost Variations

All my modifications to the 2da files have now reduced the costs of items considerably. As it currently stands, it is reasonable to say that adding a single magic property to an item can add somewhere between a few gold (e.g. 40gp for a 20% reduction in weight of an item) to a few hundred gold (e.g. 500gp for a +1 to AC or an enhancement.) Immunity to something currently adds the most cost, running into potential thousands of gold for a single immunity. (This is still an area where I am adjusting ingredients for crafting items to balance the cost of creation.)

Ammunition/Thrown Weapon Costs

Another consequence of these adjustments is that ammunition and thrown weapons will now only be available in quantities of 20 and likewise the same ammo will only be crafted in quantities of 20 at a time. I am using a guideline of around 100 - 250 gp cost for the amount a PC will have to pay for magic ammunition or thrown weapons. I decided to include darts, shuriken and throwing axes in the same relative costs as arrows, bolts and bullets and current testing shows a base cost factor of 0.001 and a multiplier of 0.01 in the baseitems.2da for all of them gives reasonable cost results.

Recipes

The “modern-day” recipes that describe how to craft or enchant items will also be available in Althéa. Their cost is always around 4gp (EDIT: Some enchantments cost slightly more.) as they will be single use items in my world and creation recipes will still require ingredients to use (enchantment recipes will only need gold). (Molds cost more in the first place but can be used repeatedly.) The advantage of using recipes is that they often (not always) aid the crafter to create or enchant an item at a lower level than would otherwise be required. The disadvantage of using recipes, is that there is usually a much higher cost gold involved (reflecting the ease of use) to complete the item.

The Bottom Line

Overall, the cost of items feels more realistic to me and the economy comes across as more achievable to the population where stores and general crafting NPCs are concerned. No longer will an NPC have a multi-million gp-worth store containing many amazing items (no matter what the level of the module is aimed at), but now, the storeowner will have most items running into hundreds at most, with a few exceptional items at higher levels.

In most cases it will benefit the PC to craft any items that they want to use, as it will be cheaper than if they simply paid for them. Some items will not even be available to buy and crafting (or finding) will be the only means of their acquisition. Sometimes, selling crafted items will bring a little gold profit and at other times the cost of the ingredients will outweigh the final worth of the crafted item; the player must make a decision if they want to make such an item or not. However, as the PC grows in wealth, gold will become less important than the items they can craft and so the decision will become less difficult to make.

The D&D Style Poll

The poll about which style of D&D you prefer to play (more action v more reading) ended a couple of weeks ago with a healthy 40 votes. The results are quite interesting and may be skewed slightly by the way I asked for votes (in that you could choose more than one response). However, if I am to take it that everybody did vote on every aspect they wanted, then it certainly looks like an almost 50-50% split!

For me, I believe that means I need to concentrate on a method of play that allows rewards for both styles of play. In all fairness, I believe the “action” player is already rewarded by their keenness to take on more combat: more combat means more experience. However, in the past, players have not quite had the same direct kind of rewards for doing more reading (unless you consider the read a reward in itself). Therefore, I have concluded that I will continue to invest some time in my “reward tests” for players who take the time to read any books they find. Experience will not be rewarded just for picking up a book and reading it (although that could still possible in some circumstances), but PCs will be rewarded according to how much a player remembers (or finds out) through further reading. How this will play in practise, only time will tell. Whatever the case, I hope it will offer an interesting playing opportunity to those that like to read and become involved in a world mythos.

And a happy 4th July to all our American friends!

Friday, 26 June 2009

Roll Up! Roll Up!

What a week! Editing 2da files is a laborious task. Hopefully, however, after my long search and many calculations to try to make the cost of items more “reasonable”, I am nearing the end. It was an encouragement to have Rob McGinnis (McGnome) point out in a comment that even they found this “a pain”. (It’s good to know I struggle with the best.) Besides that, I have taken time to improve my Scalable System a little further, to now include a way to allow crafters to increase the power of an item they craft at an extra cost. Lastly, I have added a new GUI to replace the previously edited official “Store” GUI that gives extra information about a store. Check out each section that may interest you below.

The Cost of Items

First of all, let me share with you all the 2da files I have edited so far (that appear to have an impact on the cost of items), and information I have learned about them. I currently have the following edited 2da files sitting in my override folder:

Armorrulestats: To alter cost of masterwork & mithral items.
Baseitems: To correct shields costs and alter the ItemMultiplier factor where needed.
Iprp_arcspell: To alter arcane failure costs. (5-50%)
Iprp_bonuscost: To alter ability costs. (1-12)
Iprp_chargecost: To alter costs related to number of uses and charges.
Iprp_damagereduction: To alter damage reduction costs. (1-40)
Iprp_damagetype: To alter factors involved with various damage types. (Cold etc.)
Iprp_feats: To alter costs of feats.
Iprp_immuncost: To alter cost of immunity percentage. (5-100%)
Iprp_immunity: To alter cost of a specific immunity. (Poison etc.)
Iprp_meleecost: To alter enhancement value costs, including AC. (1-20)
Iprp_resistcost: To alter damage resistance costs. (Resist 5/- to Resist 50/-)
Iprp_skillcost: To alter costs of skills (ranks). (1-50)
Iprp_spellvcost: To alter costs of spell level related benefits. (0-9)
Iprp_spells: To alter spell costs. (A factor that can vary with other files.)
Iprp_srcost: To alter spell resistance costs. (10-40)
Iprp_weightcost: To alter weight reduction costs. (1-80%)
Itempropdef: Contains a factor used in calculating costs. (*)
Itemprops: To correct (remove) some invalid property entries from the toolset. (*)

(*) My thanks go to Sunjammer for extra information regarding these two files, as they have a number of errors that can confuse the builder. I recommend their download and use. For more information, visit Sunjammer’s website.

I am not sure how many more 2da files there may be left to consider, as I am only part way through checking the effect of my alterations on the costs of items. However, I can say that with these altered files, the costs have dropped considerably and cover most of the items I have checked to date. I did have to revise my original cost values for the Iprp_spells file I reported last week, as I learned they had a large impact on items that could cast spells. However, after a little more alteration, the costs settled down again. I do still have a number of craft items to check costs on, but now that the core costs have settled down, I hope to check these costs some time next week and correct any that don’t make sense.

The Scalable System

If you read the blog last week, you may have noticed that I have slightly altered some of my original idea to help form a better overall system. I decided to do this to allow the possibility of being able to buy items (scrolls, potions or wands) that would cast at a higher level if the PC paid a higher price for said item. For example, a PC can now buy a Potion of Cure Light Wounds at any level the store has available and gain the advantages of the more powerful brew after paying more for it. Check out the screen shot below to see a store with two different versions of the Cure Light Wounds potion. NB: Paying extra for such a little difference in benefit may not be worth it in many cases, but in cases where duration is subject to caster level, then paying extra for a longer duration may be worth considering.

However, the real benefit of this system is for when a PC crafts a scroll, potion or wand. Upon completion of the crafting (and if scaling for the spell cast is possible), the player will be offered a new GUI for them to pay extra to ensure the item crafted will cast at a minimum level when used. (See screenshot.) Note that levels offered will be between 1 and 19th level, with levels incapable by the caster and levels below a minimum innate level of the spell being made “unavailable”. This will be very useful for PCs who can craft items such as Wand of Fireballs, and want to ensure the fireball cast from it meets a minimum level. The same holds true for crafted scrolls and potions too. There are two caveats for crafted items, however:

1) A minimum level only applies to damage/cure amounts and/or duration. Spell Resistance and DC rolls are still based on the users spell capabilities or the item’s innate caster level. (The lowest caster level required to cast the spell.)

2) Merchants, if they even entertain buying crafted items, will not normally pay more than it costs to make an item at its lower level costs.


In the last day, I have been editing the spell scripts that require the extra code to handle this, and testing has proven everything works fine. Scrolls still cast at the caster’s highest spell capability, whereas potions and wands now cast at the level they have been crafted. In the case of a scroll having a minimum level higher than the caster’s highest caster level, then the scrolls minimum cast level will be used instead.

Store Information

In a previous blog, I showed you how I had extra store information shown in its title bar. Well, now I have introduced a new GUI that will open at the time of purchase that will allow a player to trade more efficiently. It will show such things as “Store Gold”, “Maximum Buy Price” and “Identify Costs”. Check out the screen shot for a visual.

Friday, 19 June 2009

Counting The Costs!

Here is my problem: Why would a player bother to use an amethyst (normally 100gp value) and some powdered silver (normally 50gp value) to craft some Holy Water worth around 25gp on average? It just does not make any sense. Furthermore, the clerics who tend to supply Holy Water would quickly go out of business at these costs, no matter how charitable they are.

This is why I have to confess at having to sort out another “mechanic’s problem” before I can get back to writing the plot. Furthermore, this is just one example of a complete system rife with cost anomalies that would drive a player to despair if they looked closely enough. But it’s only a fantasy world, I hear you say. I know I could have just gone with the flow, but after having put so much effort into encouraging crafting, why have the whole thing spoiled due to bad game economics?

2DA Nightmares!
Sorting through the tangled web of 2da files that handles cost has not been easy, and I have discovered a number of further “problems” along the way. One file in particular has grabbed my editing attention: iprp_spells.2da. Examining this file, I discovered a large discrepancy between the costs of casting spells of the same level. Some spells even did not have a properly calculated cost element in place, meaning some high level spells could be cast at a cost cheaper than a 1st level spell!

This was not the only 2da file with problems. The baseitems.2da also needed some editing to help bring prices back in line with D&D costs (e.g. shields and everything else halved), and also to help alleviate the cost of preparing potions (multiply factor). To sort out the problem of craft items being worth more than the final product (like the Holy Water above), I ended up reworking some of the costs of the individual crafting items (reducing their worth) and changed one or two of the items required for various items in the crafting.2da file. This also meant I had to update the information in my crafting tome that PCs can find in the game. I will also need to re-evaluate all the costs in the nx2_crafting.2da file as well to reflect a more consistent cost when crafting items using the various materials that have changed price.

Finally, I am also working through the des_crft_spells.2da because there are some spells that can currently be made into potions that should not be able to. I am following the rule that potions only work on the imbiber. E.g. It’s absurd to consider a Light potion can be brewed to allow a PC to cast Light on a fellow PC.

I spent quite some time working out the formulae for calculating costs of items before I found this piece of information in the itempropdef.txt file, which confirmed what I had already figured plus gave me the missing factor that was to be found in the itempropdef.2da.

+-------+---------------
E Cost
+-------+---------------

A factor that determines the final cost of an item. The actual calculation may or may not involve summing all the "cost" values of item properties, squaring this value, multiplying by 1000, adding this to the base value of the item, then squaring the sum of all the negative "cost" values, subtracting this from the positive/beneficial sum, then multiplying this value by the base item multiplier.

With this new knowledge in mind, I started to examine why certain items calculated at certain costs and discovered that some 2da files had errors in them. As one example, notice how the costs for adding the 70% of weight reduction to an item costs more than better values. I have altered the iprp_weightcost.2da file to use the following figures to correct for errors and alter for Althéa costs. (NB: Although I have kept the rows in the same order, this table is not meant to represent the actual 2da file, but a table to show my figures and results. I decided to cost weight reduction at roughly 10gp per 1% reduction.):

Updated With Correct Values November 2014
Consistent Costing
Another issue with the iprp_spells.2da file is that it contains the costs of setting a spell on an item at different levels. The problem with this is (in my opinion) is that it automatically defaults to the highest level (and therefore costs) for the PC. This just serves to add further confusion for the player when using one of these varying level spells, because one time a spell may cost X amount to craft an item, while another time it has increased to Y. To resolve this issue, I calculated what I believed to be the correct cost for each spell level as if cast by the lowest spell caster level possible, so that now, a player knows exactly how much it costs to craft an item with a particular spell. Check the table below for my current set cost figures and the equivalent item values.

Scalable Power

From this, I also developed the “Scaleable Power” system, which has always been a part of the Althéa scroll system: Casting power (for scrolls) scales to the user rather than the original creator. Furthermore, as long as a PC can use an item, it will automatically cast at the user’s highest spell casting level, regardless of magic type. E.g. A 1st level wizard / 15th level cleric would be able to cast a Fireball scroll as if caster level 15, because they have at least one level in wizardry that allows them to be able to read the scroll. However, I have introduced one check that must also be satisfied: The user must have a Wisdom, Intelligence or Charisma score equal to the spell level + 10 to be able to use the magic in the item. E.g. In the above example, the PC must have a Wisdom score (most likely key attribute in this case) of at least 13 (as Fireball is a 3rd level spell).

Both scrolls and wands scale in this way, with one further exception for the wand: The power of a wand will only scale if the PC knows the spell it is casting. (Awaiting new SpellKnown function in patch v1.23) If they do not know the spell, then the wand casts at the lowest level that the spell can be cast, with a minimum of 5th level (the level any crafter has to be to craft the wand in the first place). E.g. A Wand of Ice Storm used by a 17th level cleric would only cast at 7th level. (The lowest level to cast Ice Storm.) However, the same wand in the hands of a 10th level wizard who knows the Fireball spell would cast at 10th level. UPDATE: I have introduced another part to the craft system that means wands will now only cast at the level they are created. I will explain more in my next post.

Potions are always set to work at the lowest level that the spell could be cast, but at a minimum of 3rd level (the level any crafter has to be to brew the potion in the first place). NB: There are some “Special Brew” potions (E.g. Heal) that do work at higher levels, but are outside the ability of the PC to craft. PCs can only brew potions that are 3rd level or lower. UPDATE: Potion crafting has also altered. Again, I will explain more in my next blog.

There is a downside to all this, of course, and that is I have to add a small amount of code to every spell script that requires power scaling. (That is a lot of scripts!) Now, considering this, I may opt to only scale certain spells (even though any spell is potentially possible), simply due to time constraints.

And this is where I ask the readers to give me feedback on “MUST HAVE” spells to scale with use. Please leave any comment you think will be helpful. Thanks!

Friday, 12 June 2009

Fixing The World's Economy

By the title, I mean the World of Althéa of course and not ours, unfortunately. ;) How did I get into this and end up avoiding plot writing again you may ask? It was as I was working on the first conversations where a player can try to start to get different equipment for their PCs when I was reminded of the horrible economic values placed on items in NWN universe. Some may not mind seeing figures run into the hundreds and thousands of gold pieces, but I find the figures somewhat distasteful. For those who may have played PnP (pen and paper) D&D, the idea of having a shop full of magic items was never heard of, and the best the player could hope for was the chance of buying scrolls and potions, or possibly a few very low magic items like arrows and bolts if they happened to be in the right place at the right time.

In NWN, however, it is not uncommon to see in a store a plethora of magic items starting from a few hundred and run into the many hundreds of thousands of gold. Wheel in my cart-load of gold as I want the set of plus five swords third row from the left please. ;) Now, I know this has been done to simply help the running of a world where a certain balance must be maintained while still offering the player choices, but I sill cannot swallow the idea for my own world, and is why I have been altering many of the cost elements within the game. And even then, limiting the stores to minor magic items only.

From experimentation, I have found that altering the baseitems, iprp_meleecost, iprp_skillcost (and yet to be tested iprp_feats) 2da files appears to do what I hoped for by reducing the costs of items considerably. Of course, this then adds the problem of ensuring balance is maintained for players who wish to craft items (hopefully a little cheaper) and potentially even selling them to make a little gold. To this end, I have had to go through nearly every item that can be crafted to see if its final base price is not too high compared to other items and manually edit every item where needed. It is a very boring job and I still have a way to go. :( But, at the end of things, I hope the economy structure will look a lot less "unrealistic" and more in line with old PnP style gaming than the amazing rich world of the CRPG.

On the back of this, I altered some of the XML code that displays the store GUI to show the store's name (if added) and any limit to their gold (so that players can see how much the store has in gold left to buy items from them). The code is dynamic, meaning it updates as the store buys or sells items reflecting their current gold remaining. (See image to the left.) In the same image you can see how the prices of some of those items will be a lot lower than you may be used to paying. Note, however, the world economy reflects this in that treasures found will be more reasonable to the same scale. This is important because gold does weigh something in Althéa! Therefore, if you are playing a weak character, you may even consider a strong companion simply to help carry the treasure found. :)

Another aspect of this is that I want the player to be encouraged to craft (and enchant) their own items as much as possible. As I have said before, items will be available to purchase, but part of becoming a successful adventurer in the world will be to acquire rarer materials and craft items for themselves.

Friday, 5 June 2009

A Beginning ... (Part Two)

I feel like I am back to the point I was when I wrote A Beginning ... last March. Once again I have just finished doing some decorating this week and feel like I can finally get back to the module ... and again, at the point of actually writing the plot! To this end, I have made a design decision to stop working on other ideas (i.e. Holy Books) and get back to the side-quests themselves. After all, it's all well and good having an "interactive" world, but no good if there is not much to actually do in it in the way of a story. And considering the results of the poll are starting to shift in the direction of "action" over "reading", then I thought I would go with the flow. ;) Don't worry, I intend to keep the conversations and reading material in place, but simply decided to start coding for the quests for now rather than any more books that can be found.

Basically, the campaign journal and conversations are starting to get more attention, and I have currently picked out one path that the player will be playing at the start of the game that helps determine the background to which they approach the module (which is also why the plot progress has increased to 3%). As regular readers may recall, the player has a choice of backgrounds at the start of the game: Do they start as if familiar with the story so far (if they played Soul Shaker) or are they starting completely afresh? Each path requires careful attention in the early conversations to ensure the player is made familiar with the story without implying the wrong background. Hopefully, once the start of the game has been done, the conversation paths should get a little easier as the choice of path becomes less intrusive to the new plot.

The Current Poll

The poll still has 17 days to run and I am still interested in any outstanding results and comments. The "action" choice currently leads roughly 58% to 42% (in one translation), and even this result has helped me to reconsider not spending too much time on creating "books" that take quite some time to do if they are not going to serve much purpose in game. I am trying to be careful what I say here, because I do not want to suggest that those who like books will be disappointed, because I hope they won't be. I have simply decided that I will concentrate on placing reading material that may be of benefit to everyone rather than one or two players, and will instead be designed to appeal in other ways.

Real Life Interaction

On a final note, I have finished the code that handles "bashing" of doors when there are witnesses around. Witnesses can be those NPCs in earshot as well as visual range. Of course, if players have the ability to cast silence on the area and are out of sight of witnesses, then they can still bash the door. :) Some doors bashed this way will move the party one point towards chaotic, and so those who prefer to stay within the law will prefer to find alternative ways to get past a door, even if it is as simple as getting permission. ;)

Friday, 29 May 2009

Deities & Holy Books

I have been involved with some decorating this week, which has tired me out somewhat and caused me to have little to do with the toolset. However, the little I have done has had me involved with looking again at the deities and creation of their Holy Books for my world. This was one of those areas I was not going to go into so much detail, but as the results of the current poll (at the moment) suggest around 50% quite like reading and background, then I thought adding a little more depth about the deities in the form of Holy Books might be worthwhile. Furthermore, as these are the same books that clerics use to study for their prayers, then players can determine for themselves just how much they want to pay attention to them.

(POLL: 24 days to go. Please keep your votes and comments coming!)

I have also added a new dimension to the current method of displaying pictures in my Readable Books by making the background texture have pictures already embedded, which means players will be able to see the deity icons inside the books. The picture below shows what I mean, although I have not added any text beyond the god name at this stage. I have also been editing the nwn2_deities.2da to ensure only the correct gods and/or alignment choices are available that match my world's ethos. For instance, clerics must follow a path of good or evil. Only non-clerics (or druids in particular) can choose one of the neutral aligned deities available.

You may also see in the picture above that a player can have their PC start to follow the faith of a new book they find. Taking up a faith (or possibly changing in rare circumstances) means more to a cleric than any other class and is governed by their alignment and so players of clerics should make sure they find a faith and stick to it if they want to keep their cleric's prayers being answered. However, I am also considering what following a certain faith means to classes other than clerics. And this is where you, the reader, can have some input if you like: If you can think of any benefits that a PC could have when following a faith, then let me know. It cannot be anything too extravagant, but something that may add a small benefit of some kind that would make you want to consider taking up a faith. Please comment.

Hey You!

I have also been working more on some of the Real Life responses that will come in the game. Regular readers will know that this system is my attempt to try to make the world feel as though a PCs actions bring about real responses from surrounding NPCs. Not every action is easily coded for, but my latest idea was to ensure PCs cannot simply bash down doors if other NPCs are nearby and act as witnesses to the PCs chaotic actions. And yes, bashing down a door does move a PC 1 point towards chaotic. :) Like trying to open a chest without permission of the owner, the PC will now have to consider the responses of nearby locals before they simply try to knock down the door to "Ye Old Curiosity Shoppe of Magick". Of course, if there are no witnesses nearby that can see or hear the PC's actions, then they can continue to bash away at the door to their heart's content.

My wife goes back to work next week and I should be able to get back to more coding then, and hopefully back to some of the conversations of NPCs that I have been trying to get down for the last month or so. ;)

Friday, 22 May 2009

POLL: What Gaming Style Do You Like?

Now and then I come to a point in design when I question what would be the best way to go for players' enjoyment. I know that ultimately the module will mainly be governed by what I want it to play like, but, at the same time I still want to appeal to gamers as I guess most builders want to. Having started to prepare the conversations for the main quest, I found I was writing quite a lot of text to help fill in the background of the story, which may be tedious for some gamers? I know there is always the option to allow players to skip past the "verbose" path, but at the same time, it got me thinking what the current feel is from other players out there.

For this reason, I thought I would offer another poll to readers who may be able to help me focus on the style of game they might like to play with respect to the quantity of text to read as background to the story. Once again, I am not saying that anything will fundamentally be changed, but feedback may have an impact on options and gaming styles available. So, please take a look at the poll and let me know what you feel about NWN1/2 modules.

In the meanwhile, I have also been helping to play test ZORK by Ampraphael. This is an amazing adaptation of the original Zork text adventure, and for those players with a fondness for the old generation text adventures, I don't think you will be disappointed with what he has done. Amraphael (a.k.a. Ronnie) has done some great custom content for his version and his area designs are second to none, really bringing to life the text of the old game. While ZORK is not a D&D adventure, it certainly has enough challenges and interesting design to keep an avid explorer interested and should be approached as such. I am sure that when released, it should attract a number of fans of the old game who (I would have thought) will be delighted at the chance to revisit this fantasy world.

Saturday, 16 May 2009

Scripting Nitty-Gritty (Party AI)

I have been busy looking at the finer details of some scripting aspects for Better The Demon and NWN2 in general. I don't know about the rest of you builders out there, but I have found a few of the functions a bit confusing as to what they actually do at times. It may be because I am trying to code from a multi-player aspect that causes some of the confusion, but here are a few I am referring to (with their descriptions rewritten by me to help explain them better for those who may also benefit from the rewording):-

GetIsOwnedByPlayer() - This returns TRUE for a player's Main PC (*) object regardless of whether the player is currently possessing it or not.
GetIsPC() - This returns TRUE on a PC or creature object if the player is possessing it at the time.
GetOwnedCharacter() - This will return the Main PC (*) of a player who is controlling the tested creature at the time. (Returns OBJECT_INVALID if creature is not being controlled.)
GetControlledCharacter() - If this is used on a PC or creature that the player can control, then it will return the object that the player is currently controlling. (Returns OBJECT_INVALID if creature is not one that can be controlled.) After more testing with this function, I am not sure I have this right even now.

(*) For those that don't know, the term Main PC (or Owned) is used to differentiate the PC that the player joins the module with as opposed to any others they may add either through party creation or as companions.

Multi-Player PC Control In A Single Party

Even with all these functions available, the confusion arose because there was a time when I needed to GET the Main PC of a creature whether it was currently possessed or not. At the time, I thought that GetOwnedCharacter() would do the trick, but this function is limited to checking when the object tested is possessed. I considered a couple of options to get around this problem, but as I also wanted to differentiate between the possibility of more than one player playing in the same party (in Single Party Mode), each one representing a Main PC, then I also needed to be able to determine which Main PC was allocated to each PC in the same party: My idea being that each player could bring along their own PCs and control them by the standard commands that can be given without affecting each others PCs. (E.g. Using the Follow Me command would make only those PCs a player currently controlled follow them and not attract another player's PCs/companions at the same time.)

In the end I wrote my own function GetMainPC(), which I now share for those who may find it of any use. For this function to work, however, it does require some extra work by the coder to ensure a variable is correctly kept up to date whenever a PC or companion joins or leaves a player's "team" within the single party. Hopefully, the following script will help explain its reason:




All this function revision was a prelude to ensuring I could give players the most flexibility when playing their PCs in a party. Whether playing SP or MP, I like to be able to give the player as much versatility with their PCs and how to control them as possible. In a MP game, however, where more than one player controls the same party (even if each player controls their own "team" within that party), extra coding is required to ensure everything plays as it should. And what if the players want to rearrange the teams?

To give players more autonomy over their selected PCs I had to edit my own companion conversation script and include within it an edited version of the #include "hench_i0_hensho" script to ensure the correct "team leader" was listened to with respect to shouted commands. It was as I was testing this and began swapping between the different PCs when I discovered the problem that companions would revert to following the original party leader rather than the team leader whenever a player changed the PC they were possessing. This problem is what led me to learn more about the possession/unpossession hooks of which I will explain in more detail next.

Possession & Unpossession

By default, the companions and the player's Main PC are assigned the same scripts. You can check this out by examining the nwn2_scriptsets.2da. Note though, the scripts do not fire for the Main PC until the player possesses another creature, so no player HB shortcut there. ;) However, this is useful information to know, and editing the nwn2_scriptsets.2da can be a very powerful tool. Add to this knowledge that you can also assign a new set of scripts to a creature using the SetCreatureScriptsToSet function and you have started along a path of interesting AI possibilities.

I mentioned all this to draw attention to the nwn2_scriptsets.2da. If you look at it closely, you will notice two scripts in particular in the ScriptUserDefine column for when a player is possessing a companion (gb_player_ud) or not (gb_comp_usrdef). And when these two scripts are used correctly, we can tell when a player has possessed or unpossessed a PC. By experimentation, I found the gb_comp_usrdef fires when a player unpossesses a PC and the gb_player_ud fires when a player possesses a PC. If you remember this, you can use OBJECT_SELF in each script for the creature it refers to.

E.g. If a player changes possession from their Main PC to a companion called Fred, then gb_comp_usrdef fires on the Main PC and any reference to OBJECT_SELF within it is to the Main PC and gb_player_ud fires on Fred, and OBJECT_SELF within this script will refer to Fred. (NB: I have found that you can refer to both possessed and unpossessed PCs just from the gb_comp_usrdef at the time of unpossession by using GetFirstPC(FALSE) to get the newly controlled PC within the gb_comp_usrdef script. However, I am not sure how reliable this will be, as it may be affected by timing. I tried the same thing by using GetControlledCharacter(OBJECT_SELF), which you would have thought did a similar thing and it only worked sometimes.)

Practical Uses

For me, this newly discovered knowledge will serve me in a couple of ways. (I say will, as I still have to make use of it in some of the things I mention next.) Firstly, it will allow me to quickly change the player who is controlling a PC. For instance, I can now easily change the object variable representing the player who now possesses a PC. i.e. The moment a player switches to another PC, this player will now be the one whose commands the PC will respond to. Currently, the player controls this by a conversation with the PC. Secondly, and for me a performance saver, I can use these scripts to determine if the Main PC Menu (GUI) requires its data updating for viewing a different PC. Previously, I was relying on a function's internal heartbeat to keep checking the PC state while the GUI was open. Now, the same function no longer has to loop through itself making the check, as the hook is now intercepted with this new possession/unpossession function discovery.

Auto-Pause Added Toggle

On a final note related to nwn2_scriptsets.2da, I updated the Main PC Menu to have a toggle switch that allowes the game to auto-pause when a PC is attacked. This works in tandem with the Auto-Pause (Turn-Based Combat Simulator) facility, in that when it is triggered it turns the Auto-Pause facility on at the same time. NB: If players don't want this facility, then it need never be toggled on and is off by default. If, however, they turn it on and then decide they do not want the Auto-Pause facility turned on for the remaining combat, then they can simply switch it off with the new feat that every PC acquires. Below is a screenshot showing the location of the switch:

Sunday, 10 May 2009

Multi-Player Considerations (Cutscenes)

Coding for multi-player is definitely a pain. You may recall my experiences in my last post on the matter. It has been a while since then, but once again its complications have returned in the form of interactive cutscenes. Hopefully, my own testings will be if use to others who may be considering MP coding.

I started to write a cutscene conversation for a side-quest (at last!) and wondered what would happen if one player should activate a cutscene in one area, while another player was in a different area (and the conversation was set to multi-player cutscene in its properties). Thankfully, (and it may have been obvious to some), testing showed the cutscene does not fire for those in a different area to where the cutscene takes place. This means it is possible for one player to see a cutscene that other players will have to learn about afterwards. Thankfully (at least for my purposes), the journal does update for all players. The point is, I like the idea that one player may witness something another may not, simply because the were elsewhere at the time. E.g. One player is buying equipment at a store, while another player stumbles into a cutscene as they were making their way to another location.

In fact, there were only a couple of minor difficulties that I have encountered when coding for multi-player gaming at the moment:

Don't 'Follow My Leader' Question

First, any companions (or extra PCs added to the game at party creation time) always follow the leader of the party between area changes even if it was a non-leader player who had originally asked the companion to join the party. In other words, if Player A had asked companion Janice to join the party, and Player B had asked Frank to join the party, then both Janice and Frank would leave the area with the leader (Player A in this case), if Player A moved to a different area to Player B.

As I say, it is a minor issue, and I have already written some code that prevents this when jumping players within the same area. So, maybe I can adapt this code to do the same thing for between areas. I mention it, just in case anybody knows a quick and easy way around the problem. I can tell you that it is not as simple as removing the tick from the Party Transition box, as this simply prevents any other players from jumping at the same time as the exiting player, but does not prevent all companions following them.

At the moment, the simplest workaround is for the players to change leadership between the players involved if one of them wanted to take the group to a different area. However, this still operates as an all or nothing affair at the moment and I would be interested if this can be coded for, without resorting to allowing more than one party in the module. I know the situation where the likelihood of such splits in the group is highly unlikely, but I would like to know if it is even possible. If it not possible, then I will simply ensure the situation where a split is required does not rely on an area change over. ;)

Cutscene Camera Question

The second minor issue occurred when I ended a multi-player cutscene conversation for all players. After choosing "Goodbye" and ending the cutscene, the player making the conversation choices has a "clean ending" and the camera returns to a pleasant viewing angle. However, (in my own testing), as the conversation comes to an end for the second player who is viewing the conversation, the camera suddenly jumps above their head looking down. Again, it is a minor nuisance, but is one that I hoped someone else may have encountered and know how to "fix".

Friday, 1 May 2009

Fixing The Small Things

Not too much to report this week. I managed to get through most of the outstanding crafting points I wanted to get done this week (all but completing the second tome) and managed to fix a couple of other things along the way: (1) Alignment issues of companions when the player might perform an act opposite to their own ideology; (2) Stolen Goods text colour when the player had the chance to rename their items.

I know I have said it before, but I really am closer to getting into writing the plot now, and I hope I can start doing so with more frequency in the coming weeks. In fact, I can only foresee one more mechanics issue that may take some of my time, and that relates to the mapping system.

A Trip To Queensdown Warren

On a personal note, my wife and I took a trip out last Sunday to a local warren close to where we live, called Queensdown Warren. The weather was definitely on the plus side for the time of year and the bluebells were in full bloom, allowing me the chance to take some photos with the new digital camera we bought last year. The photo to the left is of a tree I thought was quite interesting, as it appeared to have a face in it that reminded me of the classic Treants of fantasy.

If you like to see some of the other shots I took (and even get to see what my wife and I look like), then feel free to check out the slide show at this link, which also shows off the bluebells. Unfortunately, a few of the shots are more blurry than I would have liked, but at least I am getting the practice now. :)

Thursday, 23 April 2009

Stolen Goods!

Crafting Tome Screenshots

As requested by Frank Perez, I am including a few more screenshots of the crafting tomes this week. The first couple of shots show the original tome, complete with contents guide. This shot is different from before, as I have altered the contents guide slightly. The second shot shows where I have used the contents guide to jump to the Armour section, which then shows the first few formulae that a crafter can use at lower levels. After that is another page showing the Boots section. This tome is now complete.



Screenshots:



This last screenshot shows the beginning pages for the second (and final?) crafting tome that gives details of formulae used with the greater essences: Brilliant and Pristine. Like the previous tome, the beginning gives some basic information and the later pages contain the formulae (which I still have to do for this tome). Note that the contents guide in the screenshot is not finalised as it is using the previous tomes contents guide as a template. For instance, the second guide will not contain the same appendices.






Looting Chests (Real Life System)

Readers of this blog may recall that I am working at trying to allow players to interact with the module in such a way that will induce a reasonable "real life" response where applicable. Complementing this idea, I have made any form of stealing (i.e. acquiring goods without permission of the owner) more difficult than it may be in previous games and such actions will have an affect on alignment of the party. Should a player play their PC this way, however, then they will most likely get to see the items they steal being written in red text. The text will (in most circumstances) remain red throughout the rest of the game as a clear indication of the fact that it is a stolen item. Such items may or may not be recognised by NPCs in the game, but almost certainly, only black market merchants will consider entertaining such items for purchase.





Weapons In Crafting


During my coding of the crafting system, I had to consider the affect of Dead Weapons: Weapons that can deteriorate over time if not maintained and Exotic Weapons: Weapons made from a material other than iron. Both have an impact on crafting and I have finished working the code for Dead Weapons, but I have to wait for a new function in patch v1.23 before I can finish the task for the Exotic ones. However, what I can say, even from what I have done to date, is that I am finding the crafting features I have implemented (especially for weapons) do now appear to be having an impact on how the game plays, which I hope players will find an interesting difference when playing this module.

Crafting Remains

I only have a few things left to implement before I can turn aside form crafting and return to quest writing again:

1) Write new code to determine how and when volatile essences will drop to allow players to craft with the greater essences. NB: I have decided that players will have to create all the brilliant and pristine essences from volatile ones. i.e. Creatures will not automatically drop brilliant or pristine essences, thereby making their acquisition much more of an achievement and advancement towards enchanting items than the norm.

2) Add the new SoZ creature parts to the monster drop possibilities. In this campaign, monster parts can be acquired directly from the creature itself rather than being bought at a shop. Whether I choose to have such ingredients accessible at a shop or not yet, I have not fully decided, but even if I do, their quantities will not be limitless.

3) Finish writing the second tome with all the formulae for creating items using the greater essences. This is a more laborious task and requires concentration to ensure the tome layout is comfortable on the eye. I expect at least another week's work here.

On the quest writing front, I have been inspired since sorting the crafting system out with a couple of quests that revolve around recipes, molds or general formulae. In this way, I hope the player will be gently, but decidedly involved with the system from an early stage of the game. As I have said before, it would pay the player to become involved if possible, but is not essential if they really want to bypass it altogether.

By the way, I fixed my second computer and can test multiplayer code once more. :)

Thursday, 16 April 2009

Carry On Crafting!

What a week! I have finally finished the tome entitled, Enchanting Recipes of the Past and am at last seeing the light at the end of the tunnel of this quite long stage. This 70 page tome is clearly laid out and has a quick access contents guide to help every player manage their crafting needs. No longer will they have to rummage through many tomes just to find the one recipe to check if they meet the requirements. Set out by both category and level, the player will know if they are able to craft a given item in seconds, and easily spot what else they may be able to do as they increase in level.

What has slowed me down a bit has been the number of alterations (and some corrections) I have had to make to the 2da's along the way. It was simple enough to do, but just a bit boring. Along with adding all the TIMBERS and INGOTS to the COST column, I also did the following:

NX2_CRAFTING.2DA ALTERATIONS:

Recipe 11 - Capitalised Gold Necklace tag in 2da and added DIAMOND to recipe description.
Recipe 94 - Corrected Craft Alchemy to 3 to match description.
Recipe 100 - Corrected tag of item made to match 2da: nx2_r_w_bolt_poison
Recipe 110 - Still needs silver weapon adding. (Work In Progress.)
Recipe 116 - Added Silver Battleaxe recipe.
Recipe 122 - Still needs silver weapon adding. (Work In Progress.)
Recipe 128 - Still needs silver weapon adding. (Work In Progress.)
Recipe 146 - Added Silver Dagger recipe.

NX2_ENCHANTING.2DA ALTERATIONS:

Added sfx_conj_magic to sound for all Incantations.

Incantation 10 appears to be Profane Weapon. (Recipe Removed)
Incantation 11 appears to be Sacred Weapon. (Recipe Removed)
Incantation 24 - Made level required 6 as per recipe description.

CRAFTING.2DA LEVEL REQUIREMENT ALTERATIONS:

811 - Leather Armour 2
812 - Leather Armour Salamander 14
813 - Studded Leather 3
814 - Studded Leather Salamander 15
826 - Hide Armour 3
827 - Hide Armour Salamander 15
828 - Padded Armour 1

NB: Let me know of any other "errors" that would be worth knowing about!

Renaming Equipment

I have also been working with the code around the crafting of these items, including reworking the renaming facility that I originally had in place for just the weapon held in the right hand. Now, I have extended a fourth tab on the Main Menu that allows the player to rename any equipment that they can equip. One of the reasons for this, is because it is easy to make a mistake when finishing the crafting process and name the finished product with an error in it. This system allows the player to rename the item at any time. (See the screenshots.) UPDATE: I just discovered that there is a variable that can be set on the module that allows the smith hammer to be used on items to rename them. Checking the smith hammer script, you will see:

int bSmithHammerRenameItem = GetGlobalInt(CAMPAIGN_SWITCH_SMITH_HAMMER_RENAME_ITEM);


If this variable is set to true, then the hammer can be used to touch an item and the rename GUI text box appears. I am in two minds as to whether to include this option or not though, as it could be dangerous if a player was to rename an item that I have set script to check. It's ability to rename items is indiscriminate at the moment, but I may change it to check for items worn, like my own script currently does. This would then allow a player to rename items a couple of ways.

Enchanter's Satchel

As most players will probably know, the Enchanter's Satchel allows the PC to craft items in the field without the need to have access to a workbench. However, in the Althéa Campaign, this item requires the PC to use one more item in the process: Life Essences. Regular readers of this blog will know that the Life Essence will play a prominent part in the campaign and is an item that can be used in many ways and so it will be up to the player if they want to take advantage of crafting in the field using the Enchanter's Satchel and expending Life Essences. Alternatively, they can just wait until they have access to a magician's workbench where they can craft without any Life Essence requirements.


Mold Information

On the back of a previous post, I also took the trouble to rename all the molds to show at a glance what the minimum Craft Armour or Craft Weapon skill had to be to use them. E.g. Mold(CA1): Light Shield and Mold(CW2): Club, require a Craft Armour skill of 1 and a Craft Weapon skill of 2 respectively to create these items with the most basic of materials.

(*) ADDITION: I will also be adding a level indication for all newer (SoZ) recipes as an indicator of what minimum level is required to craft an item. The figure will either represent the lowest rank in the appropriate skill or the lowest caster level for the catalyst spell used in the recipe description. E.g. Recipe(8): Amulet of Health +2 means the lowest caster level is 8th level as a catalyst spell is used here. Recipe(8): Acid Flask means the lowest Craft Alchemy skill rank required is 8 points.

Another Craft Tome

I am now looking at writing at least one more book for crafting. This book will contain all the recipes that use the greater essences (brilliant and pristine) at a glance. Again, the idea is to take away the need for the player to rifle through various collected essences to find a recipe they wish to follow. Essence description will be made much simpler, and the prospective crafter will refer to the tome instead when wanting to see what is required for crafting with these essences. I had considered a possibility of a third tome that covered the new style recipes that come with the SoZ expansion, but due to the way they are gathered already (as if in their own tome), I decided against it. ADDITION: See the comment above regarding SoZ recipes under "Mold Information".

I am also going to make the usage of Enchantment Recipes single use only. Therefore, finding and collecting more than one of the same recipe (which can be done) will be beneficial rather than sit inside a tome alongside a duplicate that does nothing more than duplicate the same information. Making these recipes single use only feels more appropriate to me, especially as there are other ways to craft items available. UPDATE: I have decided to make the Creation Recipes single use only as well. As these recipes greatly reduce the requirements to create certain items at the cost of only a small amount of gold, I considered that these should be "consumable" during item creation as well.

Specialist Bags

Another section of items I have been setting up are specialist bags. Those who have played SoZ will probably be familiar with the concept already: Bags that are designed to hold certain items only and reject others. To this end, I have created two to date:

1) Treasures Bag: Gems and jewellery automatically go into this bag.
2) Crafting Satchel: Some may know this as the Bounty Bag, but I have renamed it as it will accept a number of other crafting ingredients as well now, like molds.

There may be times when an item is not automatically placed in the bags, such as when a piece of magic jewellery is made. Furthermore, I have made it so items can be removed from the bag again if need be. This may be obvious, but was not the case in practice.

Second Computer Dies

On a personal note, I had the frustrating experience of having my second computer fail on me yesterday. This is a pain, as I test all my multi-player code with this computer on the LAN. After checking around the prices (and discovering everything has gone up due to the exchange rate being so bad), I have decided to just to patch the computer up as cheaply as possible. Therefore, I ordered the following at a total price of just under £185 from ebuyer:

1) Intel Core 2 Duo E7400 2.8GHz Socket 775 1066MHz FSB 3MB L2 Cache Retail Boxed Processor
2) ASROCK P45DE P45 Socket 775 8 Channel Audio ATX Motherboard
3) Crucial 2GB Kit (2x1GB) DDR2 800MHz/PC2-6400 Memory Non-ECC Unbuffered CL6 Lifetime Warranty

Hopefully, I will have the energy to fix it when the parts turn up next week.

Saturday, 11 April 2009

SoZ Crafting - Avoiding Trade Items

UPDATED (13th April): In the light of this forum post, I did some further experimentation with kinc_crafting (which I eventually found) and can now recommend the following structure for basic crafting. i.e. When not requiring TRADE ITEMS.

First of all locate kinc_crafting.NSS in the SoZ expansion campaign folder. Open this with a basic text editor (like notepad) and copy the script into the toolset as a new script and name it the same. i.e. kinc_crafting (without the NSS suffix). The only other file you require (to make this script compile correctly) is kinc_trade_constants, which can be located in the same way as described above for the previous script. Again, copy and paste the script into your own module, keeping the same name.

Open your kinc_crafting script and add the include line for the kinc_trade_constants file. i.e. Add the line #include "kinc_trade_constants" just below the other include files mentioned in the kinc_crafting script. Lastly, add the #include "kinc_crafting" include line inside your own On Module Activate script, which will also contain the modified script as mentioned in this blog post.

Using the kinc_crafting include file instead of the kinc_trade bypasses the check for TRADE GOODS. However, you may still like to replace these goods (as described in the original post below) so that the player still has to acquire ingredients similar to the original TRADE GOODS. If you do, simply carry out the instructions below, but now without the need to delete the COST_GOODS and COST_RARERES columns first.

ORIGINAL POST

I thought I would share a couple more things with fellow builders with respect to crafting using SoZ code. First of all, if you have tried opening the nx2_crafting.2da file, you will have probably found that it has errors that prevent it from opening in some 2da editing programs. For those interested, here is a FIXED FILE that you can download. This file is required for those who may wish to edit it to either add or change those recipes that are available in the game.

In particular, you may wish to remove any references to TRADE ITEMS required to craft items. These items appear under the COST_GOODS and COST_RARERES columns and refer to TIMBERS and INGOTS. For basic crafting, you will NOT want these columns to contain references to any items, but want to add items (replacing these trade goods) with specific ingredients to the COST_ITEMS column instead.

E.g. In rows 97 and 98, I have removed the GOOD_TIMBER reference from the COST_GOODS column and added specific tags representing the planks instead. (See screenshot.) Now, when the code checks for the items required to make the different types of poisonous arrows, it will not fail when checking for TRADE ITEMS (which we don't want in a basic crafting system), because they are no longer listed, but will require specific planks of wood instead. In our example, I have made the requirements a Zalantar Plank for mild poisonous arrows and a Shedderan Plank for poisonous arrows.

Continue to remove unwanted TRADE ITEMS from their respective columns and add appropriate planks of wood or ingots as required. In this way, you can keep all the recipes that can be found and make use of basic crafting items rather than have to rely on the TRADE system.

Just for your information, I have also discovered a number of errors with respect to items required for the crafting (in the 2da file), descriptions of such (in the recipe description), and even in the resulting item itself (item object). As an example, these two lines that supposedly make two different types of arrows, actually make an arrow with the same qualities! Of course, it is easy enough to add or alter the properties on the arrows and make a new campaign item (that will be created instead), which is what I have done. Just remember to ensure you have the name, resref and/or tag set exactly as the 2da file requires or the item will not be made.

Thursday, 9 April 2009

In-Game Information

I am glad to say that I am nearing the end of creating the tome called, Enchanting Recipes Of The Past (see last blog entry). The tome contains over 50 pages of information, but thanks to the easy to use "Contents" system that works with my ReadBooks add-on, every crafting recipe is easy to locate and follow. I only have three sections left to do: Grenades, Venoms & Special. I also took the opportunity to update the ReadBook code to now close the "Contents" section automatically after closing the book. Therefore, this line in the conversation will be removed for all books contents displays now.

During its writing, I also worked at the modern SoZ system of crafting and checked out some of the code I had already altered. At first, I thought I had located a bug in my code, but after some debug tests worked out that I had just happened to come across a recipe (among the hundreds) that had two errors in it! What are the chances of that? The errors in question (for recipe 11) were:
  1. The recipe neglected to tell me that a gem was involved. (I have now edited that in.)
  2. The tag in the 2da file was lower case instead of uppercase. (Now corrected.)
The problem was that when the code went to check for the necklace required (written in the wrong case in the 2da file), it did not find it in my inventory and ended up giving me another necklace in its place! This went on every time I tried the recipe, which also means it is an exploit in the game itself.

Before finishing the tome, I also started to check the code behind the Molds that PCs can use to build weapons and armour. Again, I have tried to simplify the usage of these items by explaining the mechanics behind their use and giving extra information in the exotic materials descriptions where applicable to make the crafting easier for the player. To accompany this, I also added more in-game information for the player to help them recognise what they need to have in the way of skills to be able to craft items from molds in the first place. Check out the screenshot to see how the information is easily found from the player's unique Main Menu.

Like all things I am trying to set out for in this module, I am hoping to make the more specialised areas of game-play more accessible to the average player. From my own experience, I have found certain aspects of crafting rather complicated to use, and that it often took more time and trouble to do than it was worth. However, by making the value of crafted items more valuable to the PC (and player) and at the same time easier to understand, then I hope that crafting will take a more enjoyable and prominent place in the campaign than it would have done otherwise.

Thursday, 2 April 2009

Crafting Revisited

After doing some work on a new area, I was once again inspired to return to sorting out the crafting system for the new era. I first looked at the system in February last year with these posts: The Art of Crafting and Crafting In The New Era. Then recently I took a closer look at the SoZ additions in the Custom Crafting With NWNX2 post. I know this means I have diverted from plot writing again, but the crafting system is an involved part of the mechanics that I need to get done so I can then use some of its concepts to start adding items to the world and thereby give added reason for PCs to explore.

Enchanting Recipes Of The Past

The Althéa Campaign makes use of all the current crafting systems available in the OC and expansions. However, I have tried to make the more awkward system (the OC for some people) easier to understand and use. To this end, a new tome (currently entitled "Enchanting Recipes Of The Past") has been added to help explain the differences between all the systems that are available to those players who will want to take up crafting. I hope that the rewritten combined system will encourage players to try it out, especially as crafting will be the sure-fast way of acquiring more useful items for the adventurer within the world of Althéa.


Over A Hundred Recipes!

The tome is more than a book simply explaining more about crafting. It will also contain every formula from every one of the 27 recipe books from the original NWN2 campaign! Their inclusion into one tome is explained in the tome itself and forms part of the back-story. As a consequence, however, the PC must have the tome carried somewhere in their party to be able to craft an item in its pages.

The above image shows only the start of the book, as I still need to write the many chapters that cover the formulas. However, the structure of the tome and its added contents guide will make locating an item formula (that a PC can actually do) much easier! Chapters still to be added include: Armour, Weapons, Bracers, Belts, Boots, Cloaks, Amulets, Rings, Grenades, Venoms & Special. Then, within each category, it will be clear what level the PC needs to be before any further requirements (ingredients) will be listed separately for the individual items. Note, however, each chapter begins with a brief explanation of basic requirements that will not be repeated in each item description, thereby removing much superfluous text that can often confuse the reader.

Quick Reference Appendices

The tome will also include appendices that will help the player know how to acquire the different essences (by naming which monster parts yield which essences) and a brief list of spells and gems, etc. that are needed to craft all the items in the tome. Hopefully, the tome will act as a one-stop quick reference guide to make crafting a lot more accessible to players than it is at the moment. As I said at the start, Althéa will also include the two crafting systems that come with the expansion packs. My hope is that this revamped version of the original will complement them well and help to make a complete and comprehensive system for Althéa.

Campaign Specific

As the economy and ecology of Althéa differs from the standards in the toolset (presumably set for Toril), I need to make campaign copies of every crafting item reflecting these aspects. I.e. Prices are a lot cheaper because gold is rarer and some descriptions mention locations that are not within the world of Althéa and therefore need updating. Furthermore, I have found that the original official craft dropping scripts don't work as I first expected, which means I am having to add code to ensure monster drops are working. Doing this and adding the text to the tome is a fair amount of work, but is something I hope to get done over the coming days (or weeks?).