• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Lockpicks

Belgeranrg

Refugee
So I have an idea. I'm sure it's been done but I got the idea when, in another post, someone told me to have a block downgrade into itself in order to make an infinite source. That aside it got me thinking... What if I made a lockpick tool that would "upgrade" a locked container into an unlocked one. So what I tried was:

Code:
<item name="toolLockPick">
<property name="CustomIcon" value="toolLockpick"/>
<property name="Meshfile" value="Items/Misc/sackPrefab"/>
<property name="Material" value="MresourceCoal"/>
<property name="EconomicValue" value="0"/>
<property name="SellableToTrader" value="false"/>
<property name="HoldType" value="21"/>
<property name="Degradation" value="250" param1="true"/>
<property name="Stacknumber" value="25"/> <!-- STK resource -->
<property class="Action1">
	<property name="Class" value="Repair"/>
	<property name="Delay" value="0.5"/>
	<property name="Repair_amount" value="350"/>
	<property name="Allowed_upgrade_items" value="toolLockpick"/>
</property>
</item>
and then I added lines to a couple of items like this:

Code:
<property class="UpgradeBlock">
	<property name="ToBlock" value="cntDeskSafeInsecure"/>
	<property name="Item" value="toolLockpick"/>
	<property name="ItemCount" value="1"/>
	<property name="UpgradeHitCount" value="10"/>
</property>
Then I made a crappy icon and tried it in game. What I'm running into now is that it constantly says it needs repair when attempting to open something... did I miss something or did I approach this the wrong way altogether?

Edit:I figured out what I was doing wrong. Well, sort of. Instead of treating the lockpick as a consumable I instead treated it like a tool and reworked the entire thing... Still have some bugs to work out but otherwise I think it might just work. Now to figure out how to do meshes, textures, and other visual things from my Mac.

 
Last edited by a moderator:
Alright, now I've got it working but no matter what I do I can't seem to get the resulting "insecure" container to maintain it's loot... Any ideas?

 
Usually it's downgrading from secure to insecure, not upgrading. Not entirely sure that's your problem, but maybe try changing that?

 
Well, I wanted to make sure that beating the hell out of a safe still worked. So I figured if I could get the tool to 'Upgrade' the safe to the same thing it 'Downgrades' to it could still work. I did in fact get it to work by using a copy of the wrench for the most part. Problem is 2 fold: 1. I can't figure out how to make it not break with every use, and when I say it breaks I mean disappears. But I still want it to lose durability too. 2. When I open a safe with it, the resulting safe is empty despite no changes to the insecure loot list or block... Any ideas?

 
The reason you lose the lockpick is because <property name="Item" value="toolLockpick"/> under the Upgrade section means it uses that as the material to upgrade the safe. So it consumes it.

The safe being empty I think is just because you spawned it in. Pretty sure you can throw down a regular secure one from the CM menu, break it open and it will be empty too.

 
Can't say 100%, but it should not consume it then. Not entirely sure it will work correctly though.

Only one way to find out. :)

 
Back
Top