Difference between revisions of "Database:Items"

Line 4: Line 4:
  
 
'''NOTE: Due to the current status, some of this information may not be correct in the future. Please be sure to check each item before adding lots of them. For example at the moment due to Feedback testing a slashing weapon may sometimes respond as crushing, this doesn't mean you have got anything wrong. It just means it's not completed coded yet. If you want to keep an eye on the status please [http://www.eq2emulator.net/phpBB3/viewtopic.php?f=6&t=942 see this thread]'''
 
'''NOTE: Due to the current status, some of this information may not be correct in the future. Please be sure to check each item before adding lots of them. For example at the moment due to Feedback testing a slashing weapon may sometimes respond as crushing, this doesn't mean you have got anything wrong. It just means it's not completed coded yet. If you want to keep an eye on the status please [http://www.eq2emulator.net/phpBB3/viewtopic.php?f=6&t=942 see this thread]'''
 +
 +
If your making custom items this is the normal database will be using these fields for their items at the moment. So if you wanna work on custom items for your server I would use 1-999 for them, then they should be erased of course unless they decide to change things. :)
 +
 +
*1000 - 13714 - Normal
 +
*20000 - 58949 - Armor
 +
*75000 - 96520 - Spell
 +
*100000 - 117764 - Weapon
 +
*130000 - 134455 - Shield
 +
*140000 - 143649 - Bauble
 +
*150000 - 153465 - House
 +
*160000 - 162309 - Food
 +
*170000 - 172236 - Ranged
 +
*180000 - 181958 - Recipe
 +
*200000 - 200979 - Adornment
 +
*210000 - 210431 - Book
 +
*220000 - 220312 - Bag
 +
*230000 - 230138 - Pattern
 +
*240000 - 240126 - Thrown
 +
*250000 - 250055 - House Container
 +
*260000 - 260008 - Armor Set
  
 
== Table Breakdown ==
 
== Table Breakdown ==

Revision as of 12:20, 7 October 2009

About

The items tables offer an extremely flexible system for generating new armour, tradeskill items, food and much more!

NOTE: Due to the current status, some of this information may not be correct in the future. Please be sure to check each item before adding lots of them. For example at the moment due to Feedback testing a slashing weapon may sometimes respond as crushing, this doesn't mean you have got anything wrong. It just means it's not completed coded yet. If you want to keep an eye on the status please see this thread

If your making custom items this is the normal database will be using these fields for their items at the moment. So if you wanna work on custom items for your server I would use 1-999 for them, then they should be erased of course unless they decide to change things. emoticon

  • 1000 - 13714 - Normal
  • 20000 - 58949 - Armor
  • 75000 - 96520 - Spell
  • 100000 - 117764 - Weapon
  • 130000 - 134455 - Shield
  • 140000 - 143649 - Bauble
  • 150000 - 153465 - House
  • 160000 - 162309 - Food
  • 170000 - 172236 - Ranged
  • 180000 - 181958 - Recipe
  • 200000 - 200979 - Adornment
  • 210000 - 210431 - Book
  • 220000 - 220312 - Bag
  • 230000 - 230138 - Pattern
  • 240000 - 240126 - Thrown
  • 250000 - 250055 - House Container
  • 260000 - 260008 - Armor Set

Table Breakdown

The following lists how fields function in the database

Generic Item Fields

Generic item information like name, slots, nodrop, broker value etc

  • name = Name of item
  • slots = 32-bit value for slots ie 11 = Primary & Head
  • stack_count = determines how this item will store in inventories (ie may stack 20)
  • description - the description directly under the item name.
  • attuneable - 1 Adds the Attuneable tag to the weapon, but doesnt make the weapon attune when equipped
  • artifact - 1 Adds the Artifact tag to the weapon.
  • lore - 1 Adds the Lore tag to the weapon
  • temporary - 1 adds the Temporary tag to the weapon
  • no_trade - 1 adds the No Trade tag to the weapon
  • no_value - 1 adds the No Value tag and makes merchants unable to buy the item from you
  • no_zone - 1 makes you unable to zone when the weapon is equipped (dont ask me the point of this)
  • no_destroy - 1 Adds No Destroy tag, you are still able to destroy
  • crafted 1 adds Crafted tag
  • good_only - see below
  • evil_only - adds good or evil tag, can still equip with either type of race
  • sell_price - sets the sell price EG: 1 = 1cp, 100 = 1sp, 10000 = 1gp, 1000000 = 1pp
  • stack_count - 2+ Makes the item stackable and determines the maximum number of items per stack.
  • collectable - adds This Item Is Collectable to the description, will probably influence weather or not the item can be added to collections once the functionality is implemented
  • max_charges - sets the maximum number of charges on the item, used for clicky spells
  • adventure_default_level - Sets the level of the item, also the color of the name, for example if the item is level 10 and you are one the name will appear red
  • adventure_classes -
  • tradeskill_classes -
  • soe_id - the soe item id (not necessary)
  • lua_script - a way to attach a script to an item

Examples

  • Step 1: Create the item in the items table

INSERT INTO items (name,item_type,icon,skill_id_req,slots) VALUES ('A dagger','Weapon',47,418532101,1); Find a skill_id_req by SELECT id,name FROM skills WHERE name LIKE '%Slashing%';

  • Step 2: Assign an appearance in the appearance table

INSERT INTO item_appearances (item_id,equip_type) VALUES (7,7415); Find an appearance (equip_type) by SELECT appearance_id, name FROM appearances WHERE name LIKE '%dagger%'

  • Step 3: Assign weapon information in the weapons table

INSERT INTO item_details_weapon (item_id, wield_style,damage_type,damage_low1, damage_high1,delay, damage_rating) VALUES (7,2,0,10,30,30,1);

  • Reload your items

/reload items

Damage Types

  • SLASH 0
  • CRUSH 1
  • PIERCE 2
  • HEAT 3
  • COLD 4
  • MAGIC 5
  • MENTAL 6
  • DIVINE 7
  • DISEASE 8
  • POISON 9
  • DROWN 10
  • FALLING 11
  • PAIN 12

Wield Styles

  • Dual 1
  • Single 2
  • Two Handed 3

Slots

  • PRIMARY_SLOT 1
  • SECONDARY_SLOT 2
  • HEAD_SLOT 4
  • CHEST_SLOT 8
  • SHOULDERS_SLOT 16
  • FOREARMS_SLOT 32
  • HANDS_SLOT 64
  • LEGS_SLOT 128
  • FEET_SLOT 256
  • LRING_SLOT 512
  • RRING_SLOT 1024
  • EARS_SLOT_1 2048
  • EARS_SLOT_2 4096
  • NECK_SLOT 8192
  • LWRIST_SLOT 16384
  • RWRIST_SLOT 32768
  • RANGE_SLOT 65536
  • AMMO_SLOT 131072
  • WAIST_SLOT 262144
  • CLOAK_SLOT 524288
  • CHARM_SLOT_1 1048576
  • CHARM_SLOT_2 2097152
  • FOOD_SLOT 4194304
  • DRINK_SLOT 8388608
  • TEXTURES_SLOT 16777216

Damage High/Low:item_details_weapon

The only thing ive come up with so far is to set each of these to the damage range you want.

  • Damage_low1: 10, Damage_low2: 10, Damage_low3: 10
  • Damage_high1: 30, Damage_high2: 30, Damage_high3: 30

This will give you a weapon with 10-30 damage

Delay:item_details_weapon

The delay your weapon will have 1 = 0.01, 10 = 1.0, 100 = 10.0 ect..

Damage Rating:item_details_weapon

The damage rating your weapon will have, I do not believe this has any affect on the actual damage dealt, its just a number to help judge the effectiveness of a weapon vs a weapon of similar damage.

Tier

  • 1, 2 - None
  • 3 - Uncommon
  • 4, 5, 6 - Treasured
  • 7, 8 - Legendary
  • 9, 10, 11 - Fabled
  • 12 - Mythical

Food

Be sure to set the following fields:

  • items.item_type = 'Food'
  • items.slots = 4194304 (food slot)

EG where the item ID is: 11

UPDATE items SET slots = 4194304, item_type = 'Food' WHERE id = 11

You can then attach additional food information using the item_details_food table

item_details_food

  • item_id - the ID of the item (see items table)
  • type - 0 = water, 1 = food
  • level - The level this item is best suited for (usually in 10 increments), effects regen
  • duration - The duration the food will last for
  • satiation - 0 Low, 1 Normal, 2 High, and 3 Superior, effects regen
INSERT INTO item_details_food (item_id,type,level,duration,satiation) VALUES (11,1,1,30,0);