Jump to content

Help "Junk Wrench Mod" which extends Wrench not working as expected.


usHallgrim

Recommended Posts

So I'm trying to inherit/extend the base wrench to an inferior junk wrench made of scrap iron instead of forged iron and eventually make the junk wrench about 1/4 as effective as its parent. But it's not picking up the tier/quality level from the parent plus at this un-tiered level it only tears down 1 hit point per turn of the wrench as shown in the pictures below.

 

<append xpath="/items">
    <item name="meleeToolSalvageJunkWrench">
        <property name="Extends" value="meleeToolSalvageT1Wrench"/>
        <property name="TintColor" value="128, 64, 32"/>
        <property name="DescriptionKey" value="meleeToolSalvageJunkWrenchDesc"/>
        <property name="CustomIcon" value="meleeToolSalvageT1Wrench"/>
        <property name="CustomIconTint" value="128, 64, 32"/>
    </item>
</append>

 

spacer.png

 

 

Here you can see it tears down the car at the rate of 1 point per turn of the wrench.

 

spacer.png

 

Why do I want such a mod you ask? Well I like doing runs without traders or at most 1 of each trader. As you can see its day 5 and I have completely looted the small town I am in. About 50 POIs here and I have looted every one of them and not a single wrench in an entire town, a town by the way that has a gas station, a salvage yard, etc. not to mention all the single family residences with garages and the backyard mechanics unliving in trailers. And again, not a single wrench and only 5 forged iron found. Now if you go to any single family residence in my part of the world the odds of you not finding a wrench set, a ratchet set, and an assortment of hammers is a heck of a lot closet to 0% than 100%. So, I don't want to break the game progression by putting in good wrenches, ratchets, and hammers at the start but I thought adding a junk tier in then adding those to the loot tables for tool chests, then you'd have at least the ability to do a bit of scrapping for mechanical and electrical parts on your first day rather than not being able to scrap anything whatsoever?

Link to comment
Share on other sites

Update I ended up copying all of the properties off the base xml wrench, and pasting those into my junkwrench, the mod works as expected. I even have it unlocked by craftingElectrician rather than craftingSalvageTools. The progression is working in terms of unlock by reading electrician books. The progression of increased recipe cost for better quality junkwrench is working. I even have severely nerfed the junkwrench so it is agonizingly slow and painful to use so that the player will still be praying to his deity just to get a T1 vanilla wrench. But at least you can scrap so that you can make some progress.

 

That being said, I'd still like to know why the inheritance approach didn't work?

 

Also here's how how much I nerfed the junk wrench:

 

<!--	Vanilla Tier 1 Wrench Settings -->
		<passive_effect name="AttacksPerMinute" operation="base_set" value="50"/>
		<passive_effect name="StaminaLoss" operation="base_set" value="18.3" tags="primary"/>
		<passive_effect name="DegradationMax" operation="base_set" value="200,700" tier="1,6" tags="perkSalvageOperations"/>

<!--	My Tier 0 Junk Wrench Settings-->
		<passive_effect name="AttacksPerMinute" operation="base_set" value="25"/>
		<passive_effect name="StaminaLoss" operation="base_set" value="25" tags="primary"/>
		<passive_effect name="DegradationMax" operation="base_set" value="100,350" tier="1,6" tags="perkSalvageOperations"/>

 

Man, it is painfully slow to use but I think it reflects how hard and annoying scrapping would be with inferior tools.

Link to comment
Share on other sites

3 hours ago, usHallgrim said:

That being said, I'd still like to know why the inheritance approach didn't work?

 

Certain properties can't be inherited.  Look at the Stone / Iron spear for example.  The iron spear extends from the stone spear, but to setup the various values on how it works in game, it has to have that code for the item.

 

I have created new items and use the inherit property to extend from another item in game, but limit it to just properties.  Passive effects in the effect group nodes, I copy and input the values I want into those.

Link to comment
Share on other sites

1 hour ago, BFT2020 said:

 

Certain properties can't be inherited.  Look at the Stone / Iron spear for example.  The iron spear extends from the stone spear, but to setup the various values on how it works in game, it has to have that code for the item.

 

I have created new items and use the inherit property to extend from another item in game, but limit it to just properties.  Passive effects in the effect group nodes, I copy and input the values I want into those.

 

Will compare the spears, thanks. I wonder why it's like that? But regardless -- it is what it is and I can live with it. 😁 Thanks for the explanation/advice, much appreciated!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...