No categories assigned

Database:Items

Revision as of 14:37, 31 January 2017 by Cynnar (talk | contribs)

Database - Items

Return to: Database | Tutorials | Portal | Forum | Project Manager | Bug Tracker

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 refer to our Project Status module.

If your making custom items this is the normal database will be using these fields for their items at the moment. So if you want work on custom items for your server as well as keep the standard items, you could use 1-999 or an id above 300,000 for them, then they should not be erased unless development of the server requires critical database structures to change.

EQ2Emulator DB Item id's

  • 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

{{{2}}}

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

Generic Item Fields



  • 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%' Another Example: select * from appearances where name like '%wieldable_items/%sword%'

  • 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

Generic Item Fields



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

Generic Item Fields



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

Item Stats

Item stats allow an item to have effects that increase your player stats, for example strength or attack speed.

  • item_id - the id of the item
  • type - the type (see below)
  • subtype - the subtype (see below)
  • value - how much to raise a stat

Example: Item with + 1 strength

INSERT INTO item_stats (item_id,type,subtype,value) VALUES (1,0,0,1);

Note that stat types work with two fields:

  • subtype - the most significant field, relates to the right two digits
  • type - used for values 100 and above

For example: VS Disease = 208 So: subtype = 8 type = 2

Str = 0 So: subtype = 0 type = 0

Attackspeed = 612 So: subtype = 12 type = 6

Current stat IDs as of 10/10/09

Items in bold are known to work, anything unbolded is pending coding.

ITEM_STAT_STR 0

ITEM_STAT_STA 1

ITEM_STAT_AGI 2

ITEM_STAT_WIS 3

ITEM_STAT_INT 4

ITEM_STAT_VS_SLASH 200

ITEM_STAT_VS_CRUSH 201

ITEM_STAT_VS_PIERCE 202

ITEM_STAT_VS_HEAT 203

ITEM_STAT_VS_COLD 204

ITEM_STAT_VS_MAGIC 205

ITEM_STAT_VS_MENTAL 206

ITEM_STAT_VS_DIVINE 207

ITEM_STAT_VS_DISEASE 208

ITEM_STAT_VS_POISON 209

ITEM_STAT_VS_DROWNING 210

ITEM_STAT_VS_FALLING 211

ITEM_STAT_VS_PAIN 212

ITEM_STAT_VS_MELEE 213

ITEM_STAT_DMG_SLASH 300

ITEM_STAT_DMG_CRUSH 301

ITEM_STAT_DMG_PIERCE 302

ITEM_STAT_DMG_HEAT 303

ITEM_STAT_DMG_COLD 304

ITEM_STAT_DMG_MAGIC 305

ITEM_STAT_DMG_MENTAL 306

ITEM_STAT_DMG_DIVINE 307

ITEM_STAT_DMG_DISEASE 308

ITEM_STAT_DMG_POISON 309

ITEM_STAT_DMG_DROWNING 310

ITEM_STAT_DMG_FALLING 311

ITEM_STAT_DMG_PAIN 312

ITEM_STAT_DMG_MELEE 313

ITEM_STAT_HEALTH 500

ITEM_STAT_POWER 501

ITEM_STAT_CONCENTRATION 502

ITEM_STAT_HPREGEN 600

ITEM_STAT_MANAREGEN 601

ITEM_STAT_HPREGENPPT 602

ITEM_STAT_MPREGENPPT 603

ITEM_STAT_COMBATHPREGENPPT 604

ITEM_STAT_COMBATMPREGENPPT 605

ITEM_STAT_MAXHP 606

ITEM_STAT_MAXHPPERC 607

ITEM_STAT_SPEED 608

ITEM_STAT_SLOW 609

ITEM_STAT_MOUNTSPEED 610

ITEM_STAT_OFFENSIVESPEED 611

ITEM_STAT_ATTACKSPEED 612

ITEM_STAT_MAXMANA 613

ITEM_STAT_MAXMANAPERC 614

ITEM_STAT_MAXATTPERC 615

ITEM_STAT_BLURVISION 616

ITEM_STAT_MAGICLEVELIMMUNITY 617

ITEM_STAT_HATEGAINMOD 618

ITEM_STAT_COMBATEXPMOD 619

ITEM_STAT_TRADESKILLEXPMOD 620

ITEM_STAT_ACHIEVEMENTEXPMOD 621

ITEM_STAT_SIZEMOD 622

ITEM_STAT_UNKNOWN 623

ITEM_STAT_STEALTH 624

ITEM_STAT_INVIS 625

ITEM_STAT_SEESTEALTH 626

ITEM_STAT_SEEINVIS 627

ITEM_STAT_EFFECTIVELEVELMOD 628

ITEM_STAT_RIPOSTECHANCE 629

ITEM_STAT_PARRYCHANCE 630

ITEM_STAT_DODGECHANCE 631

ITEM_STAT_AEAUTOATTACKCHANCE 632

ITEM_STAT_DOUBLEATTACKCHANCE 633

ITEM_STAT_RANGEDDOUBLEATTACKCHANCE 634

ITEM_STAT_SPELLDOUBLEATTACKCHANCE 635

ITEM_STAT_FLURRY 636

ITEM_STAT_EXTRAHARVESTCHANCE 637

ITEM_STAT_EXTRASHIELDBLOCKCHANCE 638

ITEM_STAT_DEFLECTIONCHANCE 639

ITEM_STAT_ITEMHPREGENPPT 640

ITEM_STAT_ITEMPPREGENPPT 641

ITEM_STAT_MELEECRITCHANCE 642

ITEM_STAT_RANGEDCRITCHANCE 643

ITEM_STAT_DMGSPELLCRITCHANCE 644

ITEM_STAT_HEALSPELLCRITCHANCE 645

ITEM_STAT_MELEECRITBONUS 646

ITEM_STAT_RANGEDCRITBONUS 647

ITEM_STAT_DMGSPELLCRITBONUS 648

ITEM_STAT_HEALSPELLCRITBONUS 649

ITEM_STAT_UNCONSCIOUSHPMOD 650

ITEM_STAT_SPELLTIMEREUSEPCT 651

ITEM_STAT_SPELLTIMERECOVERYPCT 652

ITEM_STAT_SPELLTIMECASTPCT 653

ITEM_STAT_MELEEWEAPONRANGE 654

ITEM_STAT_RANGEDWEAPONRANGE 655

ITEM_STAT_FALLINGDAMAGEREDUCTION 656

ITEM_STAT_SHIELDEFFECTIVENESS 657

ITEM_STAT_RIPOSTEDAMAGE 658

ITEM_STAT_MINIMUMDEFLECTIONCHANCE 659

ITEM_STAT_MOVEMENTWEAVE 660

ITEM_STAT_COMBATHPREGEN 661

ITEM_STAT_COMBATMANAREGEN 662

ITEM_STAT_CONTESTSPEEDBOOST 663

ITEM_STAT_TRACKINGAVOIDANCE 664

ITEM_STAT_STEALTHINVISSPEEDMOD 665

ITEM_STAT_LOOT_COIN 666

ITEM_STAT_ARMORMITIGATIONINCREASE 667

ITEM_STAT_AMMOCONSERVATION 668

ITEM_STAT_STRIKETHROUGH 669

ITEM_STAT_STATUSBONUS 670

ITEM_STAT_ACCURACY 671

ITEM_STAT_COUNTERSTRIKE 672

ITEM_STAT_SHIELDBASH 673

ITEM_STAT_WEAPONDAMAGEBONUS 674

ITEM_STAT_ADDITIONALRIPOSTECHANCE 675

ITEM_STAT_CRITICALMITIGATION 676

ITEM_STAT_COMBATARTDAMAGE 677

ITEM_STAT_SPELLDAMAGE 678

ITEM_STAT_HEALAMOUNT 679

ITEM_STAT_TAUNTAMOUNT 680

ITEM_STAT_SPELL_DAMAGE 700

ITEM_STAT_HEAL_AMOUNT 701

ITEM_STAT_SPELL_AND_HEAL 702

Usable Items

If you set the usable field to 1 (on) in the database as well as setting a lua_script for the item in question you can create nearly any type of item you can imagine.

When the item is used the script function used() gets called and the commands executed.


Example: Runspeed boots

function used(Item, Player)
	SendPopUpMessage(Player, "You feel taken by enormous energy")
	SetSpeed(Player, 100)
end

Example: Item with clicky spell effect

function used(Item, Player)
	CastSpell(Player, 11);
end

Scribe a spell to spellbook

function used(Item, Player)
	SendPopUpMessage(Player, "You memorise the Ability: 360 Kick")
	AddSpellBookEntry(Player, 16, 1)
	RemoveItem(Player, 140, 1)
end

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);