Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch crafting error causing excess materials to disappear from inventory #62112

Open
Acru opened this issue Nov 6, 2022 · 2 comments
Open
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Acru
Copy link

Acru commented Nov 6, 2022

Describe the bug

I ran into this in a game, where a batch craft that should have used 25 of a material caused all 112 of the material to disappear. Reloading a backup save and retracing my steps, I managed to narrow down and relyably reproduce the problem with just two sequential batch craft operations, with a given inventory state. Attached is the save file and below are the steps to reproduce, so hopefully someone else can verify?

SpillertownG-crafting_error.zip

Steps to reproduce

1> Load provided save file
2> Batch craft 2x+ starch from rhizome (required to trigger below issue)
3> Note 112 cattail stalk available in dive bag in inventory, as piles of (6) and (106)
4> Batch craft either 6x+ cattail seeds or 6x+ fiber from cattail stalks
5> Note all remaining cattail stalk have disappeared, and are no longer available for crafting with

Expected behavior

Of course the second batch craft should only consume the requested amount of material. Perhaps the error has something to do with the two piles in the same bag having slightly different spoilage timers? If the game is saved and reloaded between the two batch crafting operations the error does not occur, and thus is a required step to reproduce. Also, it isn't obvious why the first batch craft operation is required to trigger the error in the second, but may have something to do with one of the rhizome stacks being used up? I just checked and the issue also occurs if the starch is crafted as two separate 1x operations.

Versions and configuration

Currently using version windows-tiles-sounds-x64-2022-11-04-0831

@Acru Acru added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Nov 6, 2022
@BrettDong BrettDong added the Crafting / Construction / Recipes Includes: Uncrafting / Disassembling label Nov 6, 2022
@RenechCDDA
Copy link
Member

RenechCDDA commented Nov 9, 2022

/confirmed on 66f52ce

When crafting the starch, only selecting 2 Put it down and start working. causes the stalks to disappear in step 4. All other options leave you with 106 cattail stalks, the correct amount.

Note that the player character is wielding plant fiber(100) on save load, and that plant fiber is a byproduct of the starch making recipe used. If the wielded fiber is dropped, the bug also does not occur. I am assuming this is related. edit: Wielding any item causes the bug to occur. The fact a byproduct was wielded is coincidental.

One further note: Crafting less than 6 cattail stalks does not trigger the disappearance of the remainder, but 6 or more does (6 is the minimum, and the size of the smaller stack). However, crafting 5 leaves you with one stack... of 107! The game re-stacks them. This may also be related.

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Nov 9, 2022
@Acru
Copy link
Author

Acru commented Nov 9, 2022

However, crafting 5 leaves you with one stack... of 107! The game re-stacks them. This may also be related.

This could be the crux of the issue~ If the stacks are combined in the bag by a separate bit of code, before the crafting code removes the (6) stack, it may actually remove the combined (112) stack by mistake? Perhaps as part of the emptying hands code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

No branches or pull requests

3 participants