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

Lockpicking Modlet

I have also been getting the same NullReferenceException error when moving the cross hair over a wall safe in the default map while having a lock pick selected on my hot bar. This is probably way more info than you need but here is a copy of the log file where I attempted to use a lock pick three different times with the first error starting on line 604 of the log file (Filename: Line: 1352) and repeating until line 13373 when I managed to quit the the main menu and then started the file up once more and had the same error starting at line 13654 of the log file and repeating once again util line 20082 where I quit to the main menu and loaded the save file a third time and had the error starting again at line 21461 and repeating the same message until line 42015 when I finally gave up on trying to use the lock pick and dropped them from my inventory and went on about the game.

output_log__2018-11-25__13-45-01.zip

 

Attachments

Ok, that's actually handy...

Code:
NullReferenceException: Object reference not set to an instance of an object
 at XUiC_HUDStatBar.SetupActiveItemEntry () [0x00000] in <filename unknown>:0
So I'm gonna guess it's because I changed the method used for the lockpick so it's stackable.

Can you do me a favour and see if it still happens on a new save? It's been working fine for me on new saves so I'm wondering if it's keeping the old item data and that's the issue.

 
I sort-of see the problem.

Code:
NullReferenceException: Object reference not set to an instance of an object
 at XUiC_HUDStatBar.SetupActiveItemEntry () [0x00000] in <filename unknown>:0 
 at XUiC_HUDStatBar.Update (Single _dt) [0x00000] in <filename unknown>:0
Your log file says you're using a mod for the left HUD bars. I'm gonna have to see about getting that mod and trying it out with this one.

But I do know it's working fine with a 100% vanilla UI.

 
I searched my modlets and only one affect UI and it is HBB that hoarder modlet

EDIT: And when modlets loading in menu after i press F1 everything runs without error

EDIT2: Solved for me ! After trying without one or the other mod, found out that mod that caused problems was : TSBX_RangedHeadshot , dont know why but i´ll have rather lockpick than better headshots :D

 
Last edited by a moderator:
I searched my modlets and only one affect UI and it is HBB that hoarder modlet
EDIT: And when modlets loading in menu after i press F1 everything runs without error

EDIT2: Solved for me ! After trying without one or the other mod, found out that mod that caused problems was : TSBX_RangedHeadshot , dont know why but i´ll have rather lockpick than better headshots :D
Okay, thank you very much for being a guinea pig and going through the modlets to see what causes the problem.

I'm gonna go download that one and compare code to see if there's any way I can make sure it works with that. :)

- - - Updated - - -

Here's an idea for folks having NRE issues.

Change the folder name of THIS mod. Right now it's KHLockpicks. Modlets load in alphabetical order.

What I'm thinking is, changing the name to ZKHLockpicks (so it's at the bottom of the load order) may help to alleviate some of the issues.

 
Here's an idea for folks having NRE issues.

Change the folder name of THIS mod. Right now it's KHLockpicks. Modlets load in alphabetical order.

What I'm thinking is, changing the name to ZKHLockpicks (so it's at the bottom of the load order) may help to alleviate some of the issues.

I'm having the NRE issue as well. My log shows a lot of this, not that different than the other two logs submitted:

NullReferenceException: Object reference not set to an instance of an object

at XUiC_HUDStatBar.SetupActiveItemEntry () [0x00000] in <filename unknown>:0

at XUiC_HUDStatBar.Update (Single _dt) [0x00000] in <filename unknown>:0

at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0

at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0

at XUiController.Update (Single _dt) [0x00000] in <filename unknown>:0

at XUi.OnUpdateDeltaTime (Single updateDeltaTime) [0x00000] in <filename unknown>:0

at XUiUpdater.Update () [0x00000] in <filename unknown>:0

at GameManager.gmUpdate () [0x00000] in <filename unknown>:0

at GameManager.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

I have the following mods:

SurvivalUK's Better Balance Mod (Link)

(AnsonThe)Toad's Biome Fix (Link)

S420-SimpleUI-LeftHUD (1.0) (Link)

PickUpWildPlants (from your other modlet)

One thing I can say is that when I use the mouse-scroll-wheel to switch to the Lockpicks, that's when I get the NREs

Oddly enough, I don't get NREs when I press the number for the inventory slot

(I have mine on slots 6/7/8 sometimes, and pressing 6/7/or 8 doesn't show the NREs)

 
Last edited by a moderator:
Tried it, and also the error is still there, and its replicated only by using mouse scroll wheel from lower number in quickbar to higher, if i use scroll from position 4 to 3 where lockpick is , it works fine, when i try from 2 go to 3 error pops up :)

 
Ok, doing testing. Things confirmed so far.

(Testing done with a TOTALLY clean game. Uninstalled on steam, went to steam DIR, deleted what was left, redownloaded... already did this last night so it was just there)

Lockpick mod + simpleUI = fine (including mouse wheel scroll from low numbers to high, and high numbers to low)

Pick up wild plants + log spikes also fine with the above...

Lockpicks + SimpleUI + Better Balance = fine...

 
Last edited by a moderator:
Ended up passing out and not doing any more testing.

Then the new A17 build came out. So this mod is tested and working with the latest build + the backpack/log spike/wild plants modlets I did. I haven't tested it with anything else, but I'm still not getting any NRE's at this point.

 
Okay... the NRE is finally fixed! So the patch has been pushed to github and is now available to download. Fixes as follows.

1) NRE was caused by the "repair" action being on Action0... the left mouse button. As such, I have disabled this functionality so you can only use a lockpick with the RIGHT mouse button. Annoying... but it fixed the NRE. So I'll take it.

2) Lockpick wasn't tagged as.... a lockpick... so the perk didn't reduce noise. It is now tagged.

 
This wasn't a quick one. This took most of the night for me to get working. :)
This modlet adds a lockpick (using bone shiv model for now) to the game. It can be found (Nightstands, Medicine Cabinets, Kitchen Cabinets, Backpacks, Suitcases, Lockers, Filing Cabinets, Purses, Cash Registers) or crafted after purchasing level 2 of the Lockpicking perk.

The perk reduces the amount of noise you make while lockpicking. Haven't found a way to increase speed yet, but I will continue to look into it. Lockpicks only work on NON-PLAYER CRAFTED doors (house doors and the blue commercial doors) and the 5 safes in the game. The lockpick is consumed on use, as that's currently the only way I can do it. Also, it doesn't stack because A17 apparently doesn't let us have items without durability that the player can actually use on Mouse1 or Mouse2 (wasn't an issue in A16).

Download the zip file and unzip the KHLockpicks folder into your 7 Days to Die\Mods folder.

That's it! Have fun. :)

Have the icons for you http://mega.nz/#F!o4Z0TQxD!5uDxn_7gu0KKxJRUzzU88w?xsAgjQbS

 
Last edited by a moderator:
Thank you very much :)

I'll look at adding those after sleep... I hate my insomnia, but at least it let me fix that NRE.

 
think ya have typos, look into your github.

Code:
<configs>    <append xpath="/items">
       <!-- Adding the lockpick item -->
       <item name="toolLockpick">    
           <property name="CustomIcon" value="Lockpick" />
           <property name="Tags" value="knife,melee,light,tool,lockpick"/>
           <property name="DisplayType" value="adminRanged"/>
           <property name="HoldType" value="36"/>
           <property name="Meshfile" value="Items/Weapons/Melee/Knives/boneShivPrefab"/>
           <property name="Material" value="Mmetal"/>
           <property name="RepairTools" value="resourceScrapIron"/>
           <property name="Stacknumber" value="20"/>
           <property name="DegradationBreaksAfter" value="true"/>
           <property name="SoundJammed" value="weapon_jam"/>
           <property name="CrosshairUpAfterShot" value="true"/>
           <property name="CrosshairOnAim" value="true"/>
           [color=#ff0000]<!-- [/color]<property class="Action0">
               <property name="Class" value="Repair"/>
               <property name="Delay" value="1"/> 
               <property name="Repair_amount" value="100"/>
               <property name="Upgrade_hit_offset" value="0"/>
               <property name="Sound_start" value="repair_block"/>
               <property name="Allowed_upgrade_items" value="toolLockpick"/>
               <property name="UsePowerAttackAnimation" value="false"/>
           </property>[color=#ff0000] -->[/color]
           <property class="Action1"> 
               <property name="Class" value="Repair"/>
               <property name="Delay" value="1"/> 
               <property name="Repair_amount" value="100"/>
               <property name="Upgrade_hit_offset" value="0"/>
               <property name="Sound_start" value="repair_block"/>
               <property name="Allowed_upgrade_items" value="toolLockpick"/>
               <property name="UsePowerAttackAnimation" value="false"/>
           </property>
           <effect_group name="Base Effects" tiered="false">
               <passive_effect name="ModSlots" operation="base_set" value="0"/>
               <passive_effect name="MaxRange" operation="base_set" value="200"/>
               <passive_effect name="DegradationMax" operation="base_set" value="6000"/>
               <passive_effect name="DegradationPerUse" operation="base_set" value="0"/>
           </effect_group>
           <property name="Group" value="Tools/Traps,Basics"/>
           <property name="ActionSkillGroup" value="Construction Tools"/>
           <property name="CraftingSkillGroup" value="craftSkillTools"/>
           <property name="RepairExpMultiplier" value="5.5"/>
       </item>[color=#ff0000]    -->[/color]
   </append>
</configs>
 
Bottom one was definitely a typo, so thank you. Fixed and updated.

The ones around Action0 are not. That's what was causing the NRE so I've left it in otherwise I'll forget. ;)

 
I changed a few things around for the mod, have it working 100%.

Changed item type to a Tier'd item so that it could have a range of durability amounts, allowed it to be used as a cheap cheap dagger that breaks fast and hits as hard as a thumbtack.

Cleaned up the item name, added localization fixes for it and using Jereth_Khan's appender batchfile to add the localization additions straight from the mod folder. (I ended up removing the lockpick icon - for mp servers its easier to keep mods server side only)

Hope you approve KHaineGB, and for anyone else interested please give this a try, it really is a great mod.

https://github.com/Sixxgunz/7d2d_Modlets/raw/master/Community%20Mods/KHLockpicks.rar

 
I changed a few things around for the mod, have it working 100%. Changed item type to a Tier'd item so that it could have a range of durability amounts, allowed it to be used as a cheap cheap dagger that breaks fast and hits as hard as a thumbtack.

Cleaned up the item name, added localization fixes for it and using Jereth_Khan's appender batchfile to add the localization additions straight from the mod folder. (I ended up removing the lockpick icon - for mp servers its easier to keep mods server side only)

Hope you approve KHaineGB, and for anyone else interested please give this a try, it really is a great mod.

https://github.com/Sixxgunz/7d2d_Modlets/raw/master/Community%20Mods/KHLockpicks.rar
The Lockpick has a big delay, so it is not effective. It is more profitable to use a pickaxe.

 
Back
Top