How to Add Item Mods

From DSP Wiki
Revision as of 17:49, 17 January 2020 by Teo (Talk | contribs) (we stopped using hex for this ages ago)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In this page you will learn how to add modifiers to items. These are for items that add mods to the player/weapon once equipped.


Finding the Item ID

To find the Item ID, you can either search through the item_ tables or find the Item ID from it's url on ffxiah e.g.

http://www.ffxiah.com/item/18072/rk-lance-1

With 18072 being the item's id.

Adding mods to the item

First, you'll need to find which mods the item adds. You can go about doing this by finding the item's wiki page on ffxiclopedia or checking the item on ffxiah. You can then look up the Mod ID in scripts/globals/status.lua, the Mod IDs Page, or src/map/modifier.h (ctrl+f for MOD_).

Then you navigate to the sql folder, open item_mods.sql and add a new SQL statement at the end of the file (or if the item already has an entry for a mod but is missing others, add the statement under the existing one for that item) with the Item ID, Mod ID and Mod Value e.g.

INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Item name: First mod + value

If it has more than one mod, just add the others as follows:

INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Second mod + value

Then, it will look like:

INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Armor: DEF:1
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- STR+8

Please remember to comment (as shown above) the item name into the item_mods.sql file to make it easier for others to easily see which items require mods/don't have mods.


- Items also have MOD_DEF for DEF+ on items so remember to add that too if the item doesn't already have it.

- If the item has mods which are activated on certain conditions, it's a latent. Please refer to the How to Add Item Latents page.