CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.26k stars 4.12k forks source link

Recipes that imply using a clay canning pot/canning pot don't work even if you fulfill all requirements #65679

Closed Kordian459 closed 5 months ago

Kordian459 commented 1 year ago

Describe the bug

I was trying to craft a 3L jug tomato sauce. Had all components and tools required but the game doesn't allow me to start crafting. Had the crafting book I needed in my inventory. Tested with "nearby fire" and oven with full powered hotplate. Also tested 0.5 L jug fruit jam, doesn't work. "Byproduct: clean water" stays grey.

Tested similar recipes that use "pressure cooker" and have similar issues.

Attach save file

N/A

Steps to reproduce

  1. get all tools needed for 3L jug tomato sauce
  2. get all components needed for 3L jug tomato sauce
  3. get an heating source (fire or electricity powered tools)
  4. get a crafting book with 3L jug tomato sauce (like You Can Can At Home or Cucina Italiana)
  5. try to craft 3L jug tomato sauce
  6. game will show you that you have all requirements fulfilled (green lighted)
  7. Byproduct line will stay grey
  8. game won't allow you to craft this recipe

Expected behavior

I'd expect to be able to craft my 3L tomato sauce jar

Screenshots

Immagine

Versions and configuration

Additional context

No response

RenechCDDA commented 1 year ago

No idea what is going on here but something that immediately strikes me is that the acid portion of the recipe is missing.

https://github.com/CleverRaven/Cataclysm-DDA/blob/f41fc1cb8e0b71e22ab9914233f7deb70577a489/data/json/recipes/food/canned.json#L767-L793

Karol1223 commented 1 year ago

It looks like the problem that happens when you're trying to use cooking oil as both a tool and an ingredient. If your water is all in the same container it may consider it one item and fail, thinking that since it's just one item it can't be used for both tool and ingredient purposes at the same time. Try splitting it into separate containers.

...or maybe it tries to give back the byproduct water but doesn't register as you having a viable container to put it in?

RenechCDDA commented 1 year ago

Debugging hammerspace gives us an actual error message: image

It does not like that the tools and components (clean water) are the same.

Karol1223 commented 1 year ago

Ah so it IS the same problem as with the cooking oil. Well, and here I was thinking it was just a display error and not an actual problem...

RenechCDDA commented 1 year ago

I've confirmed this issue goes all the way back to the merging commit for the cooking energy cost rebalance (https://github.com/CleverRaven/Cataclysm-DDA/commit/4508944ecc70d5ca3570029cad071a83e0d88403).

So it was not broken by a subsequent change.

RenechCDDA commented 1 year ago

Interestingly, if we remove the canning_acid_large component (which isn't showing up in the GUI for some reason) it actually works.

Doubly interestingly, removing the using canning_low_heat entry does not allow it to work.

Ah and.... canning_acid_large needs to be components not tools. Trying to define a second set of tools silently fails!

https://github.com/CleverRaven/Cataclysm-DDA/blob/7e63a04983ebd969a627898695549ea60f45c6bd/data/json/requirements/cooking_tools.json#L101-L107

So we have two issues.

First, the direct symptom: canning_acid_large needs to be components! Simple json fix.

Second, including a requirements set like that silently fails... this needs fixing on the back-end.

RenechCDDA commented 1 year ago

Second, including a requirements set like that silently fails... this needs fixing on the back-end.

Aaand this part is going to be someone else's problem as I have become thoroughly convinced it's outside my abilities.

GuardianDll commented 10 months ago

what about close this one as fixed by #65761, and make a new, that specify the silent fail issue separately?

I-am-Erk commented 5 months ago

I agree with GuardianDLL, it sounds like this was closed by #65761 but if nobody's done it yet, the silent fail should probably get an issue post.