How to Add Item Latents

From DSP Wiki
Revision as of 06:30, 25 May 2019 by Teo (Talk | contribs) (that should be an internal link, not external link)

Jump to: navigation, search

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.