-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Display item variant's base type (if relevant) #78442
base: master
Are you sure you want to change the base?
Conversation
Hold on, that apron crafting screenshot does not look right... |
I would probably rephrase the description to be more akin to "This is classified as a(n) ..." or "This item falls into the ... category" to make it clearer that it's a classification description rather than a description of the item itself. Anyway, making the classification explicit is useful, especially since the classifications themselves have to be short so they don't bloat out crafting recipes. |
Personally I'm not a huge fan of displaying the variant's base type anywhere in the UI (why should the player need that info? this failing in the crafting UI should be solved in the crafting UI etc). I'm also not 100% sure we send those names out for translation... I think one possible better approach would be to identify tools/components that have variants and silently replace them with a fake requirements group consisting of each possible variant on load. (There may need to be some adjustment to the crafting UI logic for this) So instead of saying that it needs a This could be done in addition to your PR, and I'm not trying to say this is what you should/must do. I am simply offering an approach that I think would be better. |
I have considered that approach, but it doesn't work too well either, since you kinda really don't want to list 20 different types of blanket patterns and colors when looking at the crafting UI. (I actually do want to do something similar, but instead to collapse requirements in the crafting view and present it as "meat sandwich requires: 2 any bread (cornbread/white bread/...) + 1 any meat(bologna/cooked meat/cooked fish filet/..)". But that's a topic for another PR altogether, when and if I'm able to handle that)
If we don't then we already have a problem with Perhaps the real issue here is that kitchen knives specifically are implemented as I haven't actually had any issues whatsoever with other variants, since they are mostly cosmetic and their name reflects their base type well enough. Chesterton's fence: Knives were originally moved to variant system in #73993 with the justification of "@I-am-Erk wanted this". Relevant discord quotes from him:
Which... I agree in principle actually! The problem we meet here is that the knife variants are no longer cosmetic and have noticeable gameplay impact. If bread knife and chef knife are both cosmetic variations of the same, then i would expect chef knife and vegetable cleaver to also be cosmetic variations of the same, but they aren't. Yet another option here is to change butchering kit recipe itself to make it more readable, but I'm struggling to come up with a good practical solution. At this point outright removing it doesn't sound too bad... I'm at a loss here, honestly, all the options feel bad. So I'll probably let this PR sit and collect dust until either I end up liking one of the options more than the others, or someone with Strong Opinions would nudge me in the right direction. |
I think this PR is useful, because the player will have trouble guessing whether something is a VARIANT of some intuitive common concept or another IMPLEMENTATION of one. Take blankets, for example, where there now is a bazillion variants (floral, etc.), but also implementations (weighted, etc.), and there is no way to determine which is which when it comes to requirements fulfillment (both in crafting and in quests), except to either list all accepted variants of all accepted implementations, unless you actually define base versions of everything. |
With some more thinking on it, I think reverting #73993/splitting the knives back into distinct items with copy-from is a possible valid solution, no offense to anyone involved. |
I tried a couple of ways: info.emplace_back( "DESCRIPTION", string_format( _( "It is a kind of a %s, %s, %s, %s." ),
type->nname( 1 ), item::nname( type->get_id() ), item( type ).tname( 1 ),
item( type ).display_name( 1 ), 1 ) ); But none of them give me what I want:
The documentation needs to be improved. |
const std::string var_name = itype_variant().id; | ||
if( var_name != "" && typ_name != var_name ) { | ||
insert_separation_line( info ); | ||
info.emplace_back( "DESCRIPTION", string_format( _( "It is a kind of a %s." ), type->nname( 1 ) ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: if anyone nows how to generate the correct article a/an.
Example: It is a kind of a apron.
is not right.
Quick update I thought about this more, and I agree with @PatrikLundell here. Variants are neat, but they are a bit of a leaky abstraction, and the player has no way to know whether "green socks" are a valid substitute for "socks", since that depends on the implementation details which are hidden. A great example (that is not implemented right now, but can be) is giving "chunk of meat" variants of "pork"/"beef"/"veal"/"poultry"/etc. They all act absolutely the same and there's no reason to implement them as separate items, yet the player can't guess that from the UI alone. So we do need a way to display this somehow. It is not only for crafting UI, it is neccessary to give player the correct intuition about the game world.
I like the "This is a kind of" wording, so I'll try to stick to that one. I can differentiate it from fluff description and make it more "official" looking by sprinking in some color, i.e.
I still don't have as strong of an opinion on that one. It can be done in addition to this PR. I don't know.
This is not technically a blocker, but it bothers me a bit too much. |
Summary
Interface "Display item variant's base type (if relevant)"
Purpose of change
The motivation for this change is a confusion stemming from the crafting recipe of butchering kit.
The recipe calls for a "huge kitchen knife", a "large kitchen knife", and a "cleaver", but I have never encountered any of those items in my playthrough. I thought that I was simply unlucky until one day I noticed one of those components colored green as available. Then I spent the next 10 minutes trying to figure out which of the multiple knives around me is the "large knife" (and which is a "huge knife"), to middling success.
This whole experience was not something I would like to revisit, hence the PR. This adds a short note about the "base type" of the variant item, i.e. it tells you that, say, a "chef knife" is actually "a kind of a large kitchen knife".
Describe the solution
Add an extra line (and a separator) to the item info block, right under description.
Describe alternatives you've considered
N/A
Testing
Variant items:
Nonvariant item:
crafting view:
admittedly, sometimes it looks silly ("yes, i know that it's a type of cotton apron - that's what i want to craft!"), but probably not too bad? (the preview says that a blue apron is getting crafted, so maybe this extra line still helps?)
Additional context