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

Crafting mechanics overhaul #29210

Open
14 of 20 tasks
ifreund opened this issue Apr 1, 2019 · 21 comments
Open
14 of 20 tasks

Crafting mechanics overhaul #29210

ifreund opened this issue Apr 1, 2019 · 21 comments
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Game: Mechanics Change Code that changes how major features work (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing

Comments

@ifreund
Copy link
Contributor

ifreund commented Apr 1, 2019

The crafting system could use a lot of work to make things more realistic and sensible. The first step of this has been implementing a craft entity in #28937.

Moving forward, a lot of stuff that is currently only checked for at the beginning/end of crafting should be checked every turn of crafting.

Note:

  • I don't intend to touch craft times yet, those can be extended in follow up prs.
  • This should make enabling npc crafting fairly trivial.

Todo in rough order of priority:


At this point craft times can be drastically extended.


  • Include ease of access to tools/materials in crafting speed calculations ([RDY] Workbenches #29434 (comment))
  • Revise assistant bonus to batch time crafting to take tools/batchsize into account instead of hard cap to bonus at 2 assistants. (Maybe this is better solved with NPC crafting)
  • Crafting menu enhancements (The "amount made" number should be more visible while in the crafting menu. #29546)
  • Decide if rot needs to be slowed down depending on recipe and how to do that
  • Disable checks for being able to craft before creation of item. (and allow aborting crafts at 0%) Closes Allow picking up recipe components from crafting screen #27285
  • At least warn about using rotten components, maybe add a prompt to blacklist? (Rotten Ingredient Check #28250)
  • Craft item cosmetics. More detailed Rot info? Make the item look like the product? Suggestions?
  • Figure out if something similar can be done for construction as well, probably in the form of a placeholder "in progress" terrain. (needs to be expanded into a separate issue but leaving it here for now)
@ifreund ifreund added Game: Mechanics Change Code that changes how major features work <Suggestion / Discussion> Talk it out before implementing (P5 - Long-term) Long-term WIP, may stay on the list for a while. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Apr 1, 2019
@ifreund ifreund added this to Voted Off the Island (can still be personal projects obvs) in 0.E Release via automation Apr 1, 2019
@Vasyan2006
Copy link
Contributor

Move failure check out of complete_craft, make chance much lower, and check from activity.
Implement a sensible way to handle destruction of components caused by "failure." Maybe destroy a couple components and require new ones to continue the craft?

Failure can be replaced with crafting damaged item instead. Character will get the item, but it will be mostly unusable. It can work for cloth, weapons and tools, but ..cooking meat is as good as reinforced.

Such crafting can be availabled at any skill level with a recipe from the book, but at low skill it will require more materials due to particular fails and much more time, because particular craft will restart after any fail.

@Phenomphear
Copy link
Contributor

It would be really amazing if you could make this so that when batch crafting something that takes a long time like starch from cattails that each crafted portion of starch is actually completed or marked completed so that when you lose light or are interrupted, at least you have some already completed. I know we have the resume task, but, having to fix the issue and finish crafting before you can get anything is really annoying.

@ifreund
Copy link
Contributor Author

ifreund commented Apr 3, 2019

Pretty sure that's not what batch crafting is supposed to simulate. It's not do a craft 10x one after the other, it's do one craft with 10x the components to save time (e.g. a massive pot of soup instead of cooking 10 consecutive small pots)

I think what you want to do is use the - key to repeat the last craft.

@Phenomphear
Copy link
Contributor

Oh, I never knew thats why it was like that. I know about -. Thanks!

@Poldraunic-zz
Copy link

Regardless of - function, batch crafting should actually work like the guy suggested. It doesn't make any sense (except for cooking, maybe) to work otherwise.

@ifreund ifreund moved this from Voted Off the Island (can still be personal projects obvs) to Non-vote Candidate (Maintainer's Choice) in 0.E Release Apr 4, 2019
@Yunatan
Copy link
Contributor

Yunatan commented Apr 4, 2019

Figure out what to do with rot. Current plan: let the components rot normally and display the craft item itself as rotten based on the most rotten component. Then at the end just copy the rot from the craft item to the product.

I think this is not true for most cooking recipes, from realism perspective. I also think this is a major issue because shelf life management is a huge part of survival. I would suggest either implementing a flexible rot derivation based on recipe or at least replacing current solution with using average rot of components.

There are IRL examples when slight rot of one or more components is negated by the cooking process or can be even desirable (e.g. spoiled milk for pancakes).

@ifreund
Copy link
Contributor Author

ifreund commented Apr 4, 2019

That bullet point is a little out of date after recent changes to #28937. My goal there was to keep the current behavior and to reimplement it in the new system. Edited that bullet to reflect that better.

Farther down the list I have another bullet saying.

Decide if rot needs to be slowed down depending on recipe and how to do that

I haven't looked into this and the realism of rot transfer aspect of it too much yet, seems like there will probably be edge cases no matter what the calculation if there is not some field added to recipies. It may be that using the average of the components would be a better approximation, but I'd need some sources to back up that change.

@Yunatan
Copy link
Contributor

Yunatan commented Apr 4, 2019

Also, I think #29153 might be related to that bullet point. The first comment puts it nicely:

Sometimes you want to craft with aging food before it rots completely, sometimes you want the freshest stuff available.

Resolution of that issue would be dependent on the final rot transfer solution.

@kevingranade
Copy link
Member

I think this is not true for most cooking recipes, from realism perspective.

Need some sourcing for this. Specifically, we need a source that outlines how partial food spoilage transfers to products after cooking, or if it doesn't, we need a clear statement of that principle from a reputable source. If it sometimes matters and other times does not, we need an outline of when.

The status quo of applying component age to products is based on 1. A lack of good information about how it should work, and 2. A fallback to something that makes sense in the context of a game and seems to intuitively make sense.

@Chryseus
Copy link

Chryseus commented Apr 5, 2019

I think this is not true for most cooking recipes, from realism perspective.

Need some sourcing for this. Specifically, we need a source that outlines how partial food spoilage transfers to products after cooking, or if it doesn't, we need a clear statement of that principle from a reputable source. If it sometimes matters and other times does not, we need an outline of when.

The status quo of applying component age to products is based on 1. A lack of good information about how it should work, and 2. A fallback to something that makes sense in the context of a game and seems to intuitively make sense.

Not sure if I count as a reputable source but I've done a fair amount of research in to food spoilage over the years.
Food spoilage is pretty complicated, whether spoiled food can be safely eaten depends on the source of the spoilage and other factors.

  • Mouldy food can be either completely safe to eat or make you extremely ill, or even be beneficial depending on the type of mould, whether cooking it or not makes it edible depends on the toxins produced by he mould or moulds.
  • Bacteria can be either harmful, neutral or beneficial, most bacteria is killed by proper cooking or exposure to halogens, strong acids or radiation but not all, some bacteria like Clostridium Botulinum produce toxins which are not destroyed by cooking.
  • Rancid food is safe to eat if produced by oxidization or hydrolysis, but it can also be caused by bacteria, a fine example of this is potato crisps (chips for you Americans) which turn rancid within hours once opened but are still edible.
  • Parasites, not technically rotting but should be considered anyway, food left exposed can become contaminated with various parasites, or even contain them from the start (I.E pork), these are typically destroyed by cooking.

Certain foods are more susceptible to specific forms of spoilage, at least in the early stages, bread and fruit for example are very susceptible to mould which is often present in small quantities even when fresh, bacteria is usually present in or on meat and dairy products, products high in fat can turn rancid extremely fast once exposed to air, eventually once food has really started to rot all of these are present to a lesser or greater degree.

As to wether or not these can make you ill in small quantities the general answer is yes, harmful bacteria can make you ill even with relatively low counts of bacterium present, toxins produced by bacteria or mould tend to be more forgiving with some exceptions, but will still typically make you feel unwell.

The question is to what degree do we simulate the rotting process, for it's current state mixing can be handled as:

  • Old - Unpleasant smell or taste resulting in a morale penalty, overall effect on the finished item should depend on the percentage used or the food item itself, I.E using stale bread for toast is very common practice.
  • Rotten - Spoils the food completely, this is realistic as far as the current rotting system allows.

A more advanced rotting system may not be worth investing time in since there are so many variables to consider, and even if you take those in to account it's very much random as to wether or not spoiled food is safe, unless you want to simulate bacteria and fungal spores moving around it's pretty much impossible to do with any degree of realism.

@ifreund
Copy link
Contributor Author

ifreund commented Apr 5, 2019

Ok, so as far as implementation is concerned I could take the relative mass of components into account and calculate a weighted average for rot transfer. If something is rotten then that causes the product to be rotten no matter what.

@eliotcougar
Copy link

eliotcougar commented Apr 20, 2019

Maybe I don't understand how workbenches are supposed to work, but I had a really hard time crafting a minifreezer today... To be able to use a workbench for a craft in progress you need to put it into the workbench, but the storage space is not enough for most of the large/heavy crafts... I thought it was supposed to make it possible to craft items without the need to hold them in your hands/inventory...
If there is a workbench - skip the holding/weight/space check... Or simply make it so that crafts in progress size doesn't count when you put them onto workbenches...

In short: if craft in progress is too big to fit in the workbench inventory space, you can't use workbench to craft that item...

@ifreund
Copy link
Contributor Author

ifreund commented Apr 24, 2019

Maybe I don't understand how workbenches are supposed to work, but I had a really hard time crafting a minifreezer today... To be able to use a workbench for a craft in progress you need to put it into the workbench, but the storage space is not enough for most of the large/heavy crafts... I thought it was supposed to make it possible to craft items without the need to hold them in your hands/inventory...
If there is a workbench - skip the holding/weight/space check... Or simply make it so that crafts in progress size doesn't count when you put them onto workbenches...

In short: if craft in progress is too big to fit in the workbench inventory space, you can't use workbench to craft that item...

Not quite sure what you mean. Considering that there is 1000L of available space on a workbench, there should be plenty for crafting pretty much anything. An in progress minifreezer is certainly well below that threshold. Not 100% sure that there is no craft in game right now which could reach 1000L, but If there is I'm not aware of it.

@eliotcougar
Copy link

1000L of available space on a workbench

On a vehicle-mounted workbench it's only about 5L...

@kevingranade
Copy link
Member

The smallest one is 80L.

@eliotcougar
Copy link

image
Not according to the game...

@ifreund
Copy link
Contributor Author

ifreund commented Apr 25, 2019

Just made an issue for this discussion #29925

@I-am-Erk I-am-Erk moved this from Non-vote Candidate (Maintainer's Choice) to In Progress in 0.E Release May 13, 2019
@kevingranade kevingranade added this to the 0.E milestone Jun 7, 2019
@glenmack
Copy link
Contributor

glenmack commented Jul 3, 2019

A big issue I have with this system is incomplete crafts for which you fail and destroy components but don't have spare components of that type OR of other ingredients.

You can be left with a craft that you can't finish, but "holds" components that prevent you from building another with some different components. It always requires the ingredients you started the craft on, even when the recipe offers variation in what can be used for that part. Which means the moment you "create" the work piece ALL the components are in, even though the work piece is 0% complete.

I see two solutions:

  1. Allow disassembly of work pieces, return all non-failed components.
  2. % progress on work piece relates to progress through component addition, for example; knife spear
    0% check for success adding broom/stick/cue, 25% check for success adding spike, 50% check for success adding felt/fur/leather/rag, 75% check for success adding string/straw/plants/duct tape. At least with this option, the check would allow for changing components where there is variety in recipe.

@moxian
Copy link
Contributor

moxian commented Sep 26, 2019

The last point is made worse by batch-crafting.

If you have, say, 10 chunks of meat on hand, and try to cook them all at once, and mess up, losing the ingredient - you now have an item which is 10-almost-completed-cooked meats which you can't do anything about.

I had this happen to me when extracting seeds from some vegetables, and it's especially annoying there as batch-crafting doesn't even give crafting speedup there, only convenience.

@eliotcougar
Copy link

If you have, say, 10 chunks of meat on hand, and try to cook them all at once, and mess up, losing the ingredient - you now have an item which is 10-almost-completed-cooked meats which you can't do anything about.
That's realistic, actually... That has happened to me IRL more than once when I screwed up cooking something and had to throw the whole batch (a full oven) in the trash...

@moxian
Copy link
Contributor

moxian commented Sep 27, 2019

That's realistic, actually... That has happened to me IRL more than once when I screwed up cooking something and had to throw the whole batch (a full oven) in the trash...

This analogy works for recipes that have batch craft time savings, yes.
It fails for things like crafting seeds from vegetables, where crafting a batch of 10 is exactly as time-consuming as crafting a recipe individually 10 times. In effect the "optimal" play is to never batch-craft those, but that gameplay is simply annoying for no good reason.

Also, unlike the oven analogy, if I find another chunk of meat several days later somewhere, I'd be able to add it to 9 partially-cooked ones, and finally finish the craft resulting in 10 perfectly fine cooked meats...

@kevingranade kevingranade modified the milestones: 0.E, 0.F Nov 23, 2019
@I-am-Erk I-am-Erk added this to Proposed blockers in 0.F Release Planning Jan 9, 2020
@kevingranade kevingranade removed this from the 0.F milestone Dec 14, 2020
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 Game: Mechanics Change Code that changes how major features work (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects
No open projects
0.F Release Planning
  
Delayed blockers (for 0.G)
Development

No branches or pull requests

10 participants