Difference between revisions of "How to Add Item Latents"

From DSP Wiki
Jump to: navigation, search
(Created page with "Adding latent effects to items is similar to [http://wiki.dspt.info/index.php/How_to_Add_Item_Mods adding item modifiers] except you check conditions before activating that mo...")
 
(that should be an internal link, not external link)
Line 5: Line 5:
  
 
== Adding the latent effect to the item ==
 
== Adding the latent effect to the item ==
Similar to [http://wiki.dspt.info/index.php/How_to_Add_Item_Mods adding item mods].  
+
Similar to [[How_to_Add_Item_Mods (adding item mods)]].  
 
Navigate to the <code>sql</code> folder and open <code>item_latents.sql</code>, add a new SQL statement with the item's id, mod to activate if condition is met, value of the mod, latent check, latent param e.g.
 
Navigate to the <code>sql</code> folder and open <code>item_latents.sql</code>, add a new SQL statement with the item's id, mod to activate if condition is met, value of the mod, latent check, latent param e.g.
 
<pre>
 
<pre>

Revision as of 06:30, 25 May 2019

Adding latent effects to items is similar to adding item modifiers except you check conditions before activating that mod.

Finding the latent id

You can find the latent id by navigating to src/map/latent_effect.h. As well as finding the latent id, you'll also see a description of each latent commented in with the parameters it takes/checks in order for the latent to activate.

Adding the latent effect to the item

Similar to How_to_Add_Item_Mods (adding item mods). Navigate to the sql folder and open item_latents.sql, add a new SQL statement with the item's id, mod to activate if condition is met, value of the mod, latent check, latent param e.g.

-- -------------------------------------------------------
-- Example Item
-- -------------------------------------------------------
INSERT INTO `item_latents` VALUES(ItemId, modId, modValue, latentId, latentParam);

If you can't find the latent id in latent_effect.h, it probably isn't coded. Feel free to bug me (demolish) about it in our irc channel and i'll probably code them eventually.