Difference between revisions of "How to Add Item Latents"

From DSP Wiki
Jump to: navigation, search
m (GDI media wiki, it looked perfectly fine in the previw window!!)
(Edit the link)
 
Line 1: Line 1:
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 mod.
+
Adding latent effects to items is similar to [[How_to_Add_Item_Mods | adding item modifiers]] except you check conditions before activating that mod.
  
 
== Finding the latent id ==
 
== Finding the latent id ==

Latest revision as of 13:02, 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 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.