Difference between revisions of "How to Add Item Mods"

From DSP Wiki
Jump to: navigation, search
(Created page with "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 ...")
 
m
Line 15: Line 15:
  
 
You will then need to convert the Mod ID from hexadecimal to decimal. You can do this if you use Windows Calculator (on Windows 7) and switch it to Programmer Mode (View > Programmer) to convert between hex and dec or you can use an [http://www.binaryhexconverter.com/hex-to-decimal-converter online hexadecimal to decimal converter].
 
You will then need to convert the Mod ID from hexadecimal to decimal. You can do this if you use Windows Calculator (on Windows 7) and switch it to Programmer Mode (View > Programmer) to convert between hex and dec or you can use an [http://www.binaryhexconverter.com/hex-to-decimal-converter online hexadecimal to decimal converter].
Then you navigate to <code>sql/item_mods.sql</code>, add a new SQL statement with the Item ID, Mod ID and Mod Value e.g.
+
Then you navigate to the <code>sql</code> folder, open <code>item_mods.sql</code> 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.
 
<pre>
 
<pre>
 +
-- --------------------------------------------------------
 +
-- Example Item Name
 +
-- --------------------------------------------------------
 
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue);
 
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue);
 
</pre>
 
</pre>
 +
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.
 
- 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 [http://wiki.dspt.info/index.php/How_to_Add_Item_Latents How to Add Item Latents] page.
 
- If the item has mods which are activated on certain conditions, it's a latent. Please refer to the [http://wiki.dspt.info/index.php/How_to_Add_Item_Latents How to Add Item Latents] page.

Revision as of 22:31, 1 February 2014

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_).

You will then need to convert the Mod ID from hexadecimal to decimal. You can do this if you use Windows Calculator (on Windows 7) and switch it to Programmer Mode (View > Programmer) to convert between hex and dec or you can use an online hexadecimal to decimal converter. 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.

-- --------------------------------------------------------
-- Example Item Name
-- --------------------------------------------------------
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue);

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.