Difference between revisions of "Items"

From DSP Wiki
Jump to: navigation, search
(item_basic: Update to add subid, which is still not clearly defined...)
(item_armor: Still need to do something with rslot since it isn't treated like this...)
Line 211: Line 211:
  
 
'''level''' is what level the item can be equipped at.
 
'''level''' is what level the item can be equipped at.
 +
 +
'''ilevel''' The item ilevel.
  
 
'''jobs''' determines what jobs can equip the item, stored as a bitmask.  Simply add the values together to set the jobs.  WAR (1) + PLD (64) + DRK (128) = 193
 
'''jobs''' determines what jobs can equip the item, stored as a bitmask.  Simply add the values together to set the jobs.  WAR (1) + PLD (64) + DRK (128) = 193
Line 267: Line 269:
 
'''shieldSize''' is only used by shields, and determines how much damage they block, and how much damage they'll deal with Shield Bash.
 
'''shieldSize''' is only used by shields, and determines how much damage they block, and how much damage they'll deal with Shield Bash.
  
'''scriptType''' needs to be investigated.
+
'''scriptType''' From [https://github.com/DarkstarProject/darkstar/blob/459685fa63386640ffaa8759f61b76dae3973d29/src/map/items/item_armor.h], it appears to be a flag for when the script can run:
 +
{|class="wikitable sortable zebra"
 +
!Value!!ScriptType
 +
|-
 +
|0||SCRIPT_NONE
 +
|-
 +
|1||SCRIPT_EQUIP
 +
|-
 +
|2||SCRIPT_CHANGESJOB
 +
|-
 +
|4||SCRIPT_CHANGEZONE
 +
|-
 +
|8||SCRIPT_TIME_DAWN
 +
|-
 +
|10||SCRIPT_TIME_DAY
 +
|-
 +
|20||SCRIPT_TIME_DUSK
 +
|-
 +
|40||SCRIPT_TIME_EVENING
 +
|-
 +
|}
  
 
'''slot''' determines which slot(s) the item can be worn in, in a bitmask.  main hand (1) + off hand (2) = 3.
 
'''slot''' determines which slot(s) the item can be worn in, in a bitmask.  main hand (1) + off hand (2) = 3.

Revision as of 07:17, 30 May 2018

item_basic

Stores basic item information that is common to all items. For an item to exist, it must have an entry in this table.

item_id should match what is found in POLUtils or on ffxiah.com

subid Only used to display which item was sold on the AH

name is the long name of an item, such as flask_of_echo_drops. If you're scripting a file, this is the file name you should use - from Log Name (Singular) field.

sortname is the shortened name, such as echo_drops - from Name field.

stackSize determines if an item should stack, and how many should stack. The client acts a bit odd if you stack items that aren't supposed to be stacked, but generally will let you stack things like Frozen Giant Skulls if you want to improve the Dynamis experience, for example.

flags stored as a bitmask. Add values together. (Example, an ex scroll that could not be delivered would use 16384(ex flag) + 8192(no delivery flag) + 128 (scroll flag) = 24704). You can also remove flags (Turn an into a non-ex) by deleting the flag you want to get rid of from the current value (example: want to wield x2 mandau? flag="63552", and if you want 2, you need to remove the "ex" flag (ex flag = 16384). So, 63552 - 16384 = 47168. The flags set for this example are: Rare, Ex, No delivery, No sale, Can equip, No auction

Value Flag
1 wall hanging
2 obtainable from goblin box
4 usable inside mog garden
8 unknown
16 delivery inner
32 inscribable
64 no auction
128 scroll
256 linkshell
512 can use
1024 can trade npc
2048 can equip
4096 no sale
8192 no delivery
16384 ex
32768 rare

aH is the auction house category for the item.

Weapons
Value Category
1 Hand to Hand
2 Daggers
3 Swords
4 Great Swords
5 Axes
6 Great Axes
7 Scythes
8 Polearms
9 Katana
10 Great Katana
11 Clubs
12 Staves
13 Ranged
14 Instruments
Ammo&Misc
48 Pet Items
47 Fishing Gear
15 Ammunition
62 Grips
Armor
16 Shields
17 Head
22 Neck
18 Body
19 Hands
23 Waist
20 Legs
21 Feet
26 Back
24 Earrings
25 Rings
Scrolls
28 White Magic
29 Black Magic
32 Songs
31 Ninjutsu
30 Summoning
60 Dice
33 Medicines
34 Furnishings
Materials
44 Alchemy 1
63 Alchemy 2
43 Woodworking
42 Bonecraft
41 Leathercraft
40 Clothcraft
39 Goldsmithing
38 Smithing
Food
52 Meat & Eggs
53 Seafood
54 Vegetables
55 Soups
56 Breads & Rice
57 Sweets
58 Drinks
59 Ingredients
51 Fish
35 Crystals
Others
46 Misc. 1
64 Misc. 2
65 Misc. 3
50 Beast-Made
36 Cards
49 Ninja Tools
37 Cursed Items
61 Automatons

NoSale determines if the item can be sold.

BaseSell is the value of the item when selling to an NPC, before fame modifier.

item_armor

Stores information regarding anything that can be worn; armor, accessory, and weapons, too.

itemId matches what is found in item_basic.

name is just for readability. Scripts are called from item_basic.

level is what level the item can be equipped at.

ilevel The item ilevel.

jobs determines what jobs can equip the item, stored as a bitmask. Simply add the values together to set the jobs. WAR (1) + PLD (64) + DRK (128) = 193

Value Job
1 warrior
2 monk
4 white mage
8 black mage
16 red mage
32 thief
64 paladin
128 dark knight
256 beastmaster
512 bard
1024 ranger
2048 samurai
4096 ninja
8192 dragoon
16384 summoner
32768 blue mage
65536 corsair
131072 puppetmaster
262144 dancer
524288 scholar
1048576 geomancer
2097152 rune fencer

MId determines the appearance for the item. Also see How_to_Add_an_Item.

shieldSize is only used by shields, and determines how much damage they block, and how much damage they'll deal with Shield Bash.

scriptType From [1], it appears to be a flag for when the script can run:

Value ScriptType
0 SCRIPT_NONE
1 SCRIPT_EQUIP
2 SCRIPT_CHANGESJOB
4 SCRIPT_CHANGEZONE
8 SCRIPT_TIME_DAWN
10 SCRIPT_TIME_DAY
20 SCRIPT_TIME_DUSK
40 SCRIPT_TIME_EVENING

slot determines which slot(s) the item can be worn in, in a bitmask. main hand (1) + off hand (2) = 3.

Value Valid Slot
1 main
2 sub
4 range
8 ammo
16 head
32 body
64 hands
128 legs
256 feet
512 neck
1024 waist
2048 ear1
4096 ear2
8192 ring1
16384 ring2
32768 back

rslot determines which single slot cannot be used while the item is equipped. For example, Vermillion Cloak would reserve the head slot, since head equipment cannot be used with it. This is not a bitmask, and only one value can be specified.

Value Reserved Slot
1 main
2 range
3 ammo
4 head
5 body
6 hands
7 legs
8 feet
9 neck
10 waist
11 ear1
12 ear2
13 ring1
14 ring2
15 back
16 "SLOT_LINK" Linkshell?

item_weapon

Stores common information for all weapons.

itemId links the table to item_basic and item_armor, and should match those tables.

name is for readability's sake and the name of any script associated with the weapon.

skill determines which weapon proficiency should be used with the weapon.

Value Weapon Skill Type
1 Hand-to-hand
2 Dagger
3 Sword
4 Greatsword
5 Axe
6 Great Axe
7 Scythe
8 Polearm
9 Katana
10 Great Katana
11 Club
12 Staff
25 Archery
26 Marksmanship
27 Throwing

subskill determines exclusivity between marksmanship-type weapons.

Value Weapon Subskill Type
0 bolt
1 gun
2 cannon

dmgType determines the type of damage dealt by the weapon. Note that only Hand-to-hand damage will use both hands for jobs such as Monk as of r3200.

Value Damage Type
0 Damage type "none"
1 Piercing
2 Slashing
3 Blunt
4 Hand-to-hand

hit is only used for multihit weapons such as Joyeuse or Kraken Club, and represents the maximum number of hits per round.

delay determines the delay of the weapon. Ranged Weapons and Ammunition always have -240 their displayed delay. For example, Expunger (Delay 360) is stored as 120 delay in the database.

dmg is the DMG stat for the equipment. Hand-to-hand weapons are always stored with their DMG stat +3. For example, Lizard Cesti has 5 instead of 2.

unlock_index refers to the id of the weapon in item_weapon_unlocked.

item_mods

Stores uncommon information, from Defense to "Enhances Dual Wield Effect."

item_mods is an unindexed table. As such, always keep in mind that it's possible to have unexpected values, which darkstar will cheerfully use without questioning them.

itemId links the table back to the item via item_basic, and should always match.

modId is what is being modified. A list of these values can be found in /scripts/globals/status.lua (listed in hexadecimal,) or in /src/map/modifier.h (listed in hexadecimal.) Remember to convert them to decimal for use in this table.

value is how much of the modifier to grant, and can be positive or negative. It's best to research any modifier you're unsure of, as some are stored and applied in unexpected ways, such as Magic Damage Taken being stored as amount/256, while Physical Damage Taken is stored as amount%.

item_mods_pet

Stores mods for pets.

itemId links the table back to the item via item_basic, and should always match.

modId is what is being modified. A list of these values can be found in /scripts/globals/status.lua (listed in hexadecimal,) or in /src/map/modifier.h (listed in hexadecimal.) Remember to convert them to decimal for use in this table.

value is how much of the modifier to grant, and can be positive or negative. It's best to research any modifier you're unsure of, as some are stored and applied in unexpected ways, such as Magic Damage Taken being stored as amount/256, while Physical Damage Taken is stored as amount%.

petType is what pet the mod will apply to. Pet type can be found in /src/map/modifier.h

Value Damage Type
0 All
1 Avatar
2 Wyvern
3 Automaton

item_furniture

Stores information regarding moghouse furniture.

itemId links back to item_basic, and should always match.

name may just be for readability's sake, and is the long name for the item.

storage is how much storage to grant for each item placed. The core will cap the total at 80.

moghancement needs to be researched.

element is the elemental alignment of the furniture.

aura needs to be researched (strength of effect?)

item_usable

Stores information regarding items that can be used. An item cannot be used unless it is in this table.

itemid links this table back to item_basic, and should match.

subid seems to primarily be used with spell scrolls, and probably just stores the spellid to be unlocked.

name may just be for readability's sake.

validTargets is a bitmask storing what the item can be used on. Being a bitmask, the values should be added for each valid target type. Self (1) + party (2) = 3.

Value Valid target
1 Self
2 Player in user's party
4 Enemy
8 Player in user's alliance
16 Players outside of user's party/alliance
32 Dead players
64 NPCs

activation needs to be researched

animation determines which animation should be used with the item.

animation time needs to be researched, but probably determines how long the player can't move for the item usage to succeed.

maxCharges is the maximum number of usages.

useDelay is likely how long the item must be equipped before it can be used.

reuseDelay is likely how long must pass between item uses.

aoe is a simple binary on whether the item is AoE or not (0 = false, 1 = true.)

item_latents

Stores information regarding latent effects on items.

itemId links back to item_basic, and should always match.

modId is the number that represents the stat boost when active

value is the value to add to the stat when active

latentId is the ID of the latent effect conditions (see src/latent_effect.h)

latentParam is an additional parameter depending on the latentId (see src/latent_effect.h)

item_weapon_unlocked

Stores information related to weaponskill broken weapons.

Id the ID of the weapon. This only corresponds with a BLOB in the chars table (unlocked weapons) and the entries in the char_weapon_skill_points table.

itemId is the matching itemId of the weapon from item_basic.

name is the same name used in item_basic, only useful for reading what the weapon is (and the filename of the script if it has a script)

skill is the combat skill associated with the weapon (battleentity.h). Note that guns and cannons are different from crossbows.

dmgType is the type of damage the weapon inflicts (piercing, blunt, handtohand, slashing).

hit is the number of hits of the weapon.

point is the amount of weaponskill points needed to "break" the weapon and unlock its associated latent effects.

item_puppet

The itemId, name, slot, and "element" of each automaton piece. As PUP isn't in use, this table may change substantially in the future.