Item Types

by Dale M.A. Johnson

 

created Nov 8, '07

 

An item is one of the basic elements that makes up the gameplay of Tactics Heroes. Weapons, armor, healing balms, trinkets; these are all items that are stored in a unit's inventory for eventual use or plot points. There is one overriding guideline that should affect every single point of items in Tactics Heroes:

 

Item systems are, by nature, a relatively complex gameplay element. The engine should work to keep this complexity to a minimum for both the player and the campaign/rule set creator.

 

Item Catagories

There are also a few basic types of items (not to be confused with item types) which can be referred to as "item catagories" for ease. What catagory an item falls into determains how the engine handles it, and how the player can interact with it.

 

 

Item Properties

This is a basic list of the most crucial variables that make up items. This list is by no means exhaustive!

 

string tName
The name of the item. For example, "Sword" or "Tin Can".
string tIcon
The name of the image file for this item's icon.
int iType
What item type this is.
int iCatagory
What catagory of item this is. 1 = Prop, 2 = Consumable, 3 = Weapon, 4 = Accessory, 5 = Persistant. It is recommended that const variables be used in the code for ease of use.
int iCost
The cost of this item to buy. Selling this item yields half the buy value by default. (Individual shops can buy and sell items at different values than this, but they will sell it at this value unless specifically told otherwise.)
int iMaxUses
The total number of times this item can be uses. Values lower than 0 denote unbreakable items with infinate uses.
bool bRepairable
Whether or not this item can be repaired and have its uses restores. If false, then the item will break when used up and will be lost forever. false by default.
int iRepairCost
Cost (per use to be restored) to repair this item. Actual in-game cost is set per shop as a percentage (100% per use is the default).
int iUsesType
Weapons and consumables can be set to require an accessory item be present in a unit's inventory. If this is the case, the engine will burn one use from BOTH items when they are used. The variable denotes the ID of the item type that this item uses. For example, you can require that a bow use arrows, and then have different kinds of arrows that can be used. (The unit will use the highest active accessory.) Note that the unit can make use of this even if they don't have access to the given accessory item type!
int iAtkWith
What stat to use to determain attack power. 1 = strength, 2 = magic, 3 = dexterity.
int iDefWith
What enemy stat to use to determain their defense. 1 = constitution, 2 = resistance.
int iPow
Used by weapons to determain their attack power. For weapons that require an accessory be used, the power of the weapon and the accessory are added together!
int iAcc
The accuracy of a weapon. 100 means 100%. For weapons that use accessories, the accuracy is added together (accessory accuracy would be displayed as "+10%" to the player, for example).
int iWeight
How heavy an item is. If a unit's inventory is too heavy, it will begin to slow them down in combat!
int iRestoreHP
For consumables, how many HP to restore when used. For everything else (except props), how many HP this item will restore per turn.
int iRestoreMP
Same as the above, but for MP.
int iBoostMaxHP, int iBoostSTR, etc.
For consumable items, how much this will permanently raise a unit's given stat. For everything else (except props), how much this will add to a unit's given stat so long as it is active (or, in persistant items' case, present).