• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Modding LockPickItem Requirements

EeyoreH

Refugee
Hey everyone,

I am a rank amateur, never done any significant coding or even computery type stuff, but recently got bitten by the modding bug. I've succesfully added a few new weapons and changed some names of items and a few other experiments, but I hit a wall with trying to make something like a Skeleton Key hand armor mod.

The blocks.xml lists the LockPickItem for each of the SecureLoot blocks as resourceLockPick. I tried adding the armor mod to that value but then the game reads that as requiring both. Is there a way to mod that value to require EITHER the item resourceLockPick or something of my choosing?

I am also trying to find the actual function which "breaks" or removes one lock pick on a failed attempt so I can play with that.

Any advice would be really appreciated.
 
Someone has asked this exact question before but I cant find it in the search (which appears to be global, cant narrow the search to 'Discussions and Requests') - it may have been in the old site archives. I am unable answer your question about multiple LockPickItem options.

But lockpick breaking is defined by
<passive_effect name="LockPickBreakChance" operation="perc_add" value="somevalue"/>

So to remove the chance of lockpicks breaking you could set:
<passive_effect name="LockPickBreakChance" operation="perc_add" value="-2" />
This will stop lockpicks from breaking. (-2 to be sure but it probably only needs -1)

You could add a passive effect to your item_modifier that has the above effect, then the player would only ever need one lockpick.
cheers
 
Back
Top