Difference between revisions of "How to Add Item Mods"

From DSP Wiki
Jump to: navigation, search
m
m (we stopped using hex for this ages ago)
 
(2 intermediate revisions by 2 users not shown)
Line 12: Line 12:
  
 
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.
 
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 <code>scripts/globals/status.lua</code>, the [http://wiki.dspt.info/index.php/Mod_IDs Mod IDs Page], or <code>src/map/modifier.h</code> (ctrl+f for ''MOD_'').  
+
You can then look up the Mod ID in <code>scripts/globals/status.lua</code>, the [[Mod_IDs | Mod IDs]] Page, or <code>src/map/modifier.h</code> (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 [http://www.binaryhexconverter.com/hex-to-decimal-converter online hexadecimal to decimal converter].
 
 
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.
 
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>
-- --------------------------------------------------------
+
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Item name: First mod + value
-- Example Item Name
+
-- --------------------------------------------------------
+
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue);
+
 
</pre>
 
</pre>
 +
 +
If it has more than one mod, just add the others as follows:
 +
 +
<pre>
 +
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Second mod + value
 +
</pre>
 +
 +
Then, it will look like:
 +
 +
<pre>
 +
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- Armor: DEF:1
 +
INSERT INTO `item_mods` VALUES(ItemId, modId, modValue); -- STR+8
 +
</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.
 
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.
  

Latest revision as of 17:49, 17 January 2020

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.