Cataclysm-dda: "You could use it to craft" list is empty when it shouldn't

Created on 2 Feb 2020  Â·  13Comments  Â·  Source: CleverRaven/Cataclysm-DDA

Steps To Reproduce

Steps to reproduce the behavior:

  1. Load the game.
  2. &, look at potassium iodide tablet that you can craft that lacks the You could use it to craft hint.
  3. Then look at water purification tablet that you can also craft and that has a potassium iodide tablet in its components.

Expected behavior

potassium iodide tablet showing You could use it to craft: water purification tablet in the description.

Screenshots

Versions and configuration

18:02:05.603 : GAME REPORT:

  • OS: Linux

    • OS Version:

  • Game Version: 0.D-11813-g1eb07c7d21-dirty [64-bit]
  • Graphics Version: Curses
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Alternative Map Key [alt_map_key],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

2020.01.31.zip

<Bug> Info / User Interface Items / Item Actions / Item Qualities

Most helpful comment

Edit: I have confirmed that you will only see this when you have the recipe memorized, which makes good sense. Even if you have cooking level 7 and a nearby chemistry textbook, you won't know off the top of your head looking at potassium iodide tablets exactly what you can craft from them. But as soon as I have crafted "water purification tablet" once, I see it in the "potassium iodide" item info as expected:

Well strangely enough: if I open my mental crafting menu, I see all recipes that I can attempt immediately - whether I have them memorised or not. I can even search for all recipes that use this item as component and that includes those recipes as well. And that takes no in-game time.

This just makes the information in the item description unreliable.

All 13 comments

Does your character have the recipe memorized? I think the "You could use it to craft ..." section only shows recipes your character has learned.

Edit: I have confirmed that you will only see this when you have the recipe memorized, which makes good sense. Even if you have cooking level 7 and a nearby chemistry textbook, you won't know off the top of your head looking at potassium iodide tablets exactly what you can craft from them. But as soon as I have crafted "water purification tablet" once, I see it in the "potassium iodide" item info as expected:

image

Maybe for such items, it would help to show a message like "You don't know anything you could craft with it." - that would give the clue that it's based on your character's own knowledge.

This was an easy change, so I went ahead and submitted PR #37661

Here's how it looks:

image

Edit: I have confirmed that you will only see this when you have the recipe memorized, which makes good sense. Even if you have cooking level 7 and a nearby chemistry textbook, you won't know off the top of your head looking at potassium iodide tablets exactly what you can craft from them. But as soon as I have crafted "water purification tablet" once, I see it in the "potassium iodide" item info as expected:

Well strangely enough: if I open my mental crafting menu, I see all recipes that I can attempt immediately - whether I have them memorised or not. I can even search for all recipes that use this item as component and that includes those recipes as well. And that takes no in-game time.

This just makes the information in the item description unreliable.

Does your character have the recipe memorized? I think the "You could use it to craft ..." section only shows recipes your character has learned.

_Edit_: I have confirmed that you will only see this when you have the recipe memorized, which makes good sense. Even if you have cooking level 7 and a nearby chemistry textbook, you won't know off the top of your head looking at potassium iodide tablets exactly what you can craft from them. But as soon as I have crafted "water purification tablet" once, I see it in the "potassium iodide" item info as expected:

image

Maybe for such items, it would help to show a message like "You don't know anything you could craft with it." - that would give the clue that it's based on your character's own knowledge.

That's somehow realistic, but is terrible from the point of player QoL. Those messages are not for the character, they should work as an in-game manual for the player, aren't they? How player should know that he can craft water purification tablets if he never crafted one?

Edit: I have confirmed that you will only see this when you have the recipe memorized, which makes good sense. Even if you have cooking level 7 and a nearby chemistry textbook, you won't know off the top of your head looking at potassium iodide tablets exactly what you can craft from them. But as soon as I have crafted "water purification tablet" once, I see it in the "potassium iodide" item info as expected:

Well strangely enough: if I open my mental crafting menu, I see _all_ recipes that I can attempt immediately - whether I have them memorised or not. I can even search for all recipes that use this item as component and that includes those recipes as well. And that takes _no_ in-game time.

This just makes the information in the item description unreliable.

@BevapDin I’m confused; my edit above describes how it currently works, which makes sense to me and is realistic. Do you mean my proposed “You don’t know anything you could craft” message would be unreliable?

Those messages are not for the character, they should work as an in-game manual for the player, aren't they? How player should know that he can craft water purification tablets if he never crafted one?

@eilaattwood No, I think those messages are for the character, not the player. To me they are not an in-game manual, so much as a roleplaying/storytelling device. The player, if they are experienced, will know about the possibility of crafting water purification tablets, and what cookbook the recipe can be found in - but I think discovering those recipes is an important part of the gameplay.

I’m confused; my edit above describes how it currently works, which makes sense to me and is realistic. Do you mean my proposed “You don’t know anything you could craft” message would be unreliable?

I believe the unreliability here means that the information you're trying to hide by the vague “You don’t know anything you could craft” is easily obtainable through the crafting menu, which, in turn, means that nobody would use/trust the item description: there's no point.

No, I think those messages are for the character, not the player. To me they are not an in-game manual, so much as a roleplaying/storytelling device. The player, if they are experienced, will know about the possibility of crafting water purification tablets, and what cookbook the recipe can be found in - but I think discovering those recipes is an important part of the gameplay.

The character (as well as the player) who already skimmed through a book, already knows at this point some (if not all) the recipes it contains. They also _can_ try to craft them using said book, while seeing the ingredients in the crafting menu. Why would we try to hide the fact that this particular ingredient can be used in an available (even if not memorized yet) recipie? That's simply inconvenient, but adds nothing to the gameplay.

@codemime My PR does not hide anything whatsoever. It simply adds a message where none existed before.

image

My PR does not hide anything whatsoever

No, but it doesn't reveal anything either. I suppose the expected behavior from the issue (You could use it to craft: water purification tablet) would be quite reasonable here.

It simply adds a message where none existed before.

The message is perfectly fine in case the are no available recipes whatsoever.

I suppose the expected behavior from the issue (You could use it to craft: water purification tablet) would be quite reasonable here.

That may be true; my interpretation is based on reading the code that already exists in that section, which explicitly checks for known recipes, and does not show any if none have been learned. Throwing that behavior away was not among the alternatives I considered for fixing this bug, because that behavior looks totally correct to me.

I don't think it makes any sense for a level 0 character, looking at a random potassium iodide tablet lying on the ground, to intuitively know "hey, I can craft water purifier from that", and I don't think it's appropriate to reveal that to the player either, if their current character has never seen a chemistry textbook.

On the other hand, the recipes available in the crafting menu are quite dependent on the availability of books nearby, for all those recipes the character hasn't memorized yet. Again I think this makes sense - when the character sits down to craft something, they pull out all their books and look in the index and find out which ones have certain qualities, or require certain ingredients - hence the elaborate search interface in the crafting menu.

The message is perfectly fine in case the are no available recipes whatsoever.

Well, in that case the message would be slightly incorrect; instead of "You don't know anything you could craft from it", but rather "Nothing can be crafted from it", and that seems like revealing too much.

With the discrepancy between the crafting UI and the item description, I can see that the "You don't know ..." message would be a little misleading, but I don't know how it could be handled except for doing a nearby-book-search for all available recipes every time you look at an item. Correct me if I'm wrong, but that could introduce an awful lot of lag.

On the other hand, the recipes available in the crafting menu are quite dependent on the availability of books nearby, for all those recipes the character hasn't memorized yet.

Yeah, that's the whole point.

Again I think this makes sense - when the character sits down to craft something, they pull out all their books and look in the index and find out which ones have certain qualities, or require certain ingredients - hence the elaborate search interface in the crafting menu.

As @BevapDin pointed out, this "process" doesn't take any in-game time, which implies that the character simply "knows" their capabilities. The game is already rather harsh in terms of accessibility. I see no point in making another obstacle here.

instead of "You don't know anything you could craft from it", but rather "Nothing can be crafted from it", and that seems like revealing too much.

Agreed about revealing too much. "You don't know anything you could craft from it" may as well mean "Nothing can be crafted from it", but the character simply doesn't know it (and can never really know). So I think the message is fine for both cases.

but I don't know how it could be handled except for doing a nearby-book-search for all available recipes every time you look at an item. Correct me if I'm wrong, but that could introduce an awful lot of lag.

It should be fine if properly implemented. There already exists a cache for all the available stuff: crafting_inventory().

The game is already rather harsh in terms of accessibility. I see no point in making another obstacle here.

Excellent point. Consistency matters, and I'm realizing that the real problem is the item description does not include nearby book recipes, when it really should.

It looks like get_available_recipes might fit the bill in place of get_learned_recipes, since it also returns a recipe_subset:

https://github.com/CleverRaven/Cataclysm-DDA/blob/6017c7ce2548e501f0aa34fc6d3363fdec68a65d/src/player.cpp#L4300-L4305

This would include nearby books in recipes for the item "You could craft ..." description, which should make it consistent with the crafting menu, unless something weird is going on. And when you are away from your recipe books, you'll have to rely on the ones you've learned - and again, both UIs ought to be consistent. Finally, when you have no recipes in memory or nearby books, you'll see "You don't know anything you could craft."

It looks like get_available_recipes might fit the bill in place of get_learned_recipes, since it also returns a recipe_subset:

I had forgotten about it, but I instantly recognized it at a glance. This very code was written by me :) Yes, the function does precisely what we need. Thanks for bringing it up.

And when you are away from your recipe books, you'll have to rely on the ones you've learned - and again, both UIs ought to be consistent. Finally, when you have no recipes in memory or nearby books, you'll see "You don't know anything you could craft."

I'm glad that we came to an agreement. Looking forward for the update of the PR.

I think this is properly fixed in my PR, at long last. Here's the new potassium iodide tablet description, alongside the crafting UI - character with cooking level 7 and a chemistry textbook:

image

But if you leave your chemistry book at home without memorizing the recipe, and come across some potassium iodide tablets on a bruised zombie corpse, neither the crafting UI nor the item description will help you:

image

Was this page helpful?
0 / 5 - 0 ratings