Closed cake-pie closed 5 years ago
So you search for foot_crank, and get: ergometer: disassemble high, smash medium folding bicycle: disassemble high heavy crossbow: disassemble high can sealer: disassemble high installed as foot pedals on bicycles, electric bicycles, and unicycles part of the recycle_steel, road, home_hw, hardware, mischw, sports, and allsporting can be found at recycling centers, on the side of the road, etc. (home hw is on 50+ separate mapgen entries)
Calculating the odds on some of these might be tricky: mischw has a 40% chance of spawning 1-3 times on 4 tiles in a hardware store, and foot cranks have a 1% chance of spawning in mischw. I think that works out to about a 3% chance per hardware store but I'm not sure.
Anyway, is that basically what you're looking for?
Rather than throwing odds and "common knowledge" into the mix, how about just recording where the player has seen various items? Not perfect map memory, but something like a list of location types where the player has seen a given item, potentially including as disassembly products.
Well, back the foot crank example: if you've passed a fitness gym but not a hardware store, does the list of locations say "ergometers at the fitness gym have foot cranks?" How does it handle the bicycle on the side of the road?
Thinking about it more, just having an option to search crafting recipes for sources (or maybe 'C'omes from?), which the search result is all the items/terrain/furniture that can be disassembled to produce the desired item might be enough to resolve the issue. Search C: foot crank, and get ergometer (terrain), folding bicycle (item), can sealer (item), heavy crossbow (item), foot pedals (vehicle part), and let the player figure out where those terrains, items, and vehicle parts are likely to spawn.
So you search for foot_crank, and get: \<stuff> is that basically what you're looking for?
Yes, that sort of information. It can get lengthy, so some thought may need to be put into organization and presentation.
part of the recycle_steel, road, home_hw, hardware, mischw, sports, and allsporting can be found at recycling centers, on the side of the road, etc. (home hw is on 50+ separate mapgen entries)
Hmm. Perhaps give item groups a human-readable display name, and indicate number of mapgen entries:
Foot crank is considered part of:
- steel recyclables (N places)
- roadside litter (M places)
- household hardware (50+ places)
...
This keeps the display clean, and an expanded list of locations can be obtained by selecting the item group.
Calculating the odds on some of these might be tricky \<snip>
Showing the odds would be "nice-to-have", but not absolutely crucial; even without it, a basic implementation of this would already be a step up from where we're currently at.
Also, I don't think we necessarily have to crunch the odds in a mathematically rigorous way. It just needs to be somewhat informative -- hence I suggested crude odds descriptors rather than numerical probabilities.
Rather than throwing odds and "common knowledge" into the mix, how about just recording where the player has seen various items? Not perfect map memory, but something like a list of location types where the player has seen a given item, potentially including as disassembly products.
Limiting information to what the player has previously encountered may not be as helpful: if the player is trying to figure out how to obtain a hard-to-find item, it is also less likely that they have actually come across it previously.
It also puts new characters at somewhat of a disadvantage until they get out there and see more of the world. That's a reasonable stance to take re: spoilery stuff. But it makes more sense for things that characters would know from pre-cataclysm experiences -- e.g. "you can find eyeglasses and sunglasses in a church" (not necessarily obvious from IRL) -- to be in-character/flavor "common knowledge" that does not need to be "rediscovered".
Comparing implementation: Keeping track of what items the player has seen, and where, calls for a dynamic (item -> location) index, to be tracked on a per-character basis. By contrast, "common knowledge" is static, and can be built from the game content jsons on a per-world basis, so can be shared between characters. It can also be organized as separate (item -> item group) and (item group -> mapgen entry) indices, thereby avoiding full expansion of all (item -> location).
Limiting information to what the player has previously encountered may not be as helpful:
Yes, thats a feature. If you go from "providing hints" to "provide an exhaustive list of locations where the item might appear", you're definitely crossing a line into reducing the incentives to explore
You hand waved away spoilers, but that's a major problem with making raw mapgen data available to the player, there is no mechanism preventing it from exposing way more data than you intend, and I can't think of one that we could add other than manually white listing chunks of mapgen as common enough to expose this data, which is labor intensive and error-prone.
By contrast, "common knowledge" is static
It's not static, it has to be rebuilt at game load time because we regularly change mapgen and support people upgrading to new versions. This also means it will get out of sync with reality because the mapgen used to generate a location can change without already generated locations changing.
What's worse is it closely couples player data and mapgen data, which is terrible for code organization because the player object has no business interacting with item groups.
I think this is two related problems:
If you haven't played the game much, you may not realize that heavy sticks come from curtains or long sticks, and long sticks come from smashing small trees. We already show some of this information: if you have a flashlight, you see what it disassembles into. We just need a reverse lookup, so if you're looking for amplifier circuits, you'll know you can disassemble a flashlight to get one.
Separately, if you're looking for sunglasses, they don't disassemble from anything. So you need previous encounter checks to tell the player where the character has seen stuff.
The way I see this working:
re: spoilers, whitelisting is indeed what I had in mind, actually.
the mapgen used to generate a location can change without already generated locations changing.
Ah, failed to consider that; is indeed a fly in the ointment.
@mlangsdorf's outline sounds pretty good :+1:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it
Is your feature request related to a problem? Please describe.
The game does not offer much information about where/how items can be obtained, so when players encounter a recipe that requires an uncommon/unfamiliar component, the common question arises "where/how can I get \<X> so that I can make \<Y>?"
A common first step is to search the crafting UI to see if the item is craftable, but that is not reliable, since the character may not know the recipe yet, or the item may not be craftable at all.
The item browser includes npc/companion recipes, and also offers info on "can be obtained when disassembling", but this does not cover other means of obtaining items, which includes:
So even with the help of an external tool, the available information may not be adequate when it comes to more obscure items.
Examples:
reddit:
Generic "can I find \<X> in location \<Y>" question. Trying to apply "common sense" knowledge doesn't always work well; what we know about the real world doesn't necessarily correspond to what kinds of map locations are in the game, what items spawn there, and with what frequency.
25505:
None of the items in the crafting chain are obtainable from disassembly, so in the absence of information about where these items spawn it leads to the misunderstanding that a chicken-egg problem exists.
https://github.com/CleverRaven/Cataclysm-DDA/pull/25920#issuecomment-426116960:
Leaf spring removed as component in compound bow recipe because it is not evident how to obtain them
https://github.com/CleverRaven/Cataclysm-DDA/pull/25661#issuecomment-425984588:
Not clear that removing vehicle parts (i.e. quarterpanel) yields the item they were made from (sheet metal); resort to smashing -- lossy process that yields lumps, chunks and scrap instead of the desired sheets.
reddit:
Lack of information about where to get long stick (easily: smash young tree) leads player to choose a more convoluted crafting path as their "meta" strategy.
Describe the solution you'd like
Provide an in-game means to look up ways to obtain items.
Would be nice to indicate crude probability in the case of natural spawns / monster drops, e.g.
Chance: low/medium/high/certain
May be desirable to avoid spoilery free-for all "search any item to find out how to get it". Perhaps the search can be limited to only components required in recipes / constructions / vehicle part install that the character knows of, or it can be integrated into crafting UI to look up only components for the current recipe.
Describe alternatives you've considered
Players need to "use common sense"
Inadequate: what we know about the real world doesn't necessarily correspond to available game content
Players left to "figure it out"
The status quo. Players may use item browser or other tools. Savvier users may be able to search the jsons to find answers. Some may resort to asking around the community. Others might just give up on making \<Y> if they can't find \<X>, or fall back on more inconvenient or less optimal crafting paths to get to the desired end result.