Jump to content

Recommended Posts

Posted
Version: [42.5.1]
Mode: [Singleplayer]
Server settings: [None]
Mods: [Some mods in the old save, no mods in the new 42.5.1 save]
Save: [Old Save from 42.3, and new save from 42.5.1 to test this again]
Reproduction steps:
	1. Use Wood Axe to chop trees, handle will probably break before head.
	2. When the handle breaks, the Wood Axe will be set as broken, instead of the head falling to the ground.
	3. Can't fix the Axe, can't dismantle the broken Axe to reassemble with a new handle

Going to the recipes_disassembly.txt and adding the tag AllowDestroyedItem to the DismantleLongImplement allows you to dismantle the broken Axe and gives you back the broken handle and the Wood Axe head with the corret condition.

Did not test if the same happens with other implements, I know some tools drop the head when the handle breaks, so you can just assemble again.

 

Posted

The issue here seems to be that Base.WoodAxe & Base.WoodAxeForged do not have an OnBreak function set (this is what makes the head fall off a broken weapon).

 

The function exists (OnBreak.WoodAxe), it just isn't used.

 

OnBreak.WoodAxe is actually declared twice, line 327 & 333 of OnBreak.lua - I assume one was meant to be for the forged variant.

Posted (edited)

For anyone trying to implement the fix that OP mentioned, the AllowDestroyedItems goes in the flags for the recipe input:

 

1. Open steamapps\common\ProjectZomboid\media\scripts\recipes\recipes_disassembly.txt

2. Find the DismantleLongImplement recipe and add the flag so it looks like this:

craftRecipe DismantleLongImplement
    {
        time        = 100,
        tags = AnySurfaceCraft,
        category = Assembly,
        timedAction = ChoppingBlock_Hammer,
        inputs
        {
            item 1 tags[Hammer;ClubHammer;Mallet] mode:keep flags[Prop1;MayDegradeLight],
            item 1 [Base.Axe_Old;Base.LongMace; etc....] ---ADD THE FLAG HERE---> flags[AllowDestroyedItem;InheritHeadCondition;InheritSharpness;Prop2]  mappers[ThingMapper;HandleMapper],
        }
      ...

 

Edited by Portello

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...