Choose Your Language

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?).