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

Incorporate human meat and fat into existing recipes, remove dedicated recipes #35630

Merged
merged 21 commits into from
Dec 9, 2019

Conversation

Davi-DeGanne
Copy link
Contributor

@Davi-DeGanne Davi-DeGanne commented Nov 20, 2019

Summary

SUMMARY: Balance "Incorporate human meat and fat into existing recipes, remove dedicated recipes"

Note for reviewers

Only these commits are relevant, the rest of the commits are from #35711 and should disappear when it is merged.

Purpose of change

The goal is to eliminate the need for duplicated recipes that use human meat, using the new inheritable flags and conditional names capabilities.

Fixes #35621
Requires #35711

Describe the solution

  1. Make CANNIBALISM flag inheritable, meaning anything crafted from items made of hflesh will also trigger effects of eating human. (9a6517b)
  2. Refactor meat-related cooking components lists to reduce duplication, allowing for future commits to make fewer changes. (aca21e3 shuffles entries around, 9f0ec00 adds a few new entries)
  3. Add human meat, fat, lard, and tallow to every single recipe that uses normal meat, fat, lard, or tallow, with two exceptions: Dog/cat food, and mutagen. (dc34863)
  4. Fixed a conflict where dry meat and jerky would not inherit CANNIBALISM due to having NO_CRAFT_INHERIT. This flag was added to prohibit them from getting the BAD_TASTE flag when made with mutant meat. This was an addition made by myself, with pretty arbitrary justification, so I elected to just remove NO_CRAFT_INHERIT from these two items. (63cfb06)
  5. Obsolete human-meat-only dishes and recipes, adding migration entries for them for save compatibility. (a6a8ddf)
  6. Added conditional names (see Partially JSONize dynamic item naming; Give meat dishes new names that display when made with mutant meat #35711) to cannibal dishes so that the existing alliterative and punny names are preserved. (bf56b13)

Describe alternatives you've considered

Testing

All items were double checked in-game, and I crafted a few items using human flesh/fat to ensure nothing odd was happening to stop the CANNIBALISM flag from being inherited properly.

Additional context

Screenshot to show that the old names were preserved under the new system (singular and plural shown):
image

Screenshot showing how the old names combine with the mutant-meat-dish names added in #35711 (again, singular and plural both shown):
image

@I-am-Erk
Copy link
Member

I-am-Erk commented Nov 21, 2019

Contextual names would actually be a wonderful idea. That would allow a lot of variable names, particularly if you allow flags or item IDs in the contextual bit. Then, for example, the PB&M sandwich could just be a peanut butter and honey sandwich using maple syrup as a substitute ingredient. Many recipes could be consolidated with that mechanic.

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Game: Balance Balancing of (existing) in-game features. Items: Food / Vitamins Comestibles and drinks labels Nov 22, 2019
@Davi-DeGanne
Copy link
Contributor Author

While your idea about accepting item IDs is great, after looking at peanut butter sandwiches, I don't think they're a great candidate, because they each have different material entries which can't really be consolidated in any way I can think of.

That said, I have coded it, and have a few ideas of my own for applications.

@Kodiologist
Copy link
Contributor

Clearly what's needed is a fully general sandwich subsystem where arbitrary food items can be combined into a new food item and the enjoyability of the result is determined by a neural network trained on Yelp reviews.

@Davi-DeGanne Davi-DeGanne changed the title [CR] Incorporate human meat and fat into existing recipes Incorporate human meat and fat into existing recipes, remove dedicated recipes Dec 2, 2019
@ZhilkinSerg
Copy link
Contributor

Can you resolve conflicts please?

Davi-DeGanne and others added 16 commits December 6, 2019 01:34
To allow for items to be given different names depending on the context,
done via a JSON property, reducing the need for both highly similar item
definitions, and some hardcoded dynamic naming systems.
Proof of concept for FLAG-based contextual names.
Makes "skinned", "field-dressed", and "quartered" qualifiers defined by
a contextual_names property on the corpse JSON definition.
Proof of concept for COMPONENT_ID-based contextual names.
Anothersimulacrum correctly pointed out that a JSON array of JSON
objects would be a lot clearer than a JSON array of JSON arrays.

Travis (clang tidy) pointed out that I was using the translation class
in a dumb way.

While fixing these, I noticed that I was using a 3-tuple rather than a
struct, because apparently I coded this during a bout of insanity.

I also rebranded "contextual" as "conditional" as it seems a slightly
more accurate descriptor.
Before, they were long and cumbersome. I was able to reorganize the code
to output far more concise names.
Made condition type an enum, removed redundant check for array, and
replaced `item->type.getID() with item.typeId()`.
Clarified clam chowder description.
"nagual nachos" -> "nachos con chupacabra"
Mostly to make them more friendly for cannibalism conditional names.
Also, "mutant meat temaki" -> "troubling meat temaki"
Most conditional names didn't have a plural form specified, resulting in
a lot of erroneous S's.
The example was a bit contrived, this one is more applicable while still
covering all the bases.
Additionally, I added a short paragraph warning about automatic
pluralization, to hopefully help others avoid the pitfall I fell into.
perturbing pelmeni -> perilous pelmeni
To free up perturbing for:
unpalatable protein powder -> perturbing protein powder
Because unpalatable sounded weird and wasn't alliterative enough.
Also, gave protein drink/shakes the same names, they had none before.
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
The CANNIBALISM flag is already automatically added to food with the
"hflesh" material. This makes it inheritable, paving the way for use in
recipes as an alternative to normal meat while correctly passing on its
negative effects.
Groundwork to reorganize meat- and fat-related component lists for
reduced redundancy.
Reorganize meat- and fat-related component lists for reduced redundancy.
This adds human flesh, fat, lard, and tallow to almost all recipes as a
substitute for their normal counterparts.
They aren't needed now that human meat can be used in normal recipes.
@Davi-DeGanne Davi-DeGanne force-pushed the inheritable-cannibalism branch from fd9640a to 4f5fbe6 Compare December 6, 2019 06:37
@Davi-DeGanne
Copy link
Contributor Author

Ok, done.

@kevingranade kevingranade merged commit 489b861 into CleverRaven:master Dec 9, 2019
@Davi-DeGanne Davi-DeGanne deleted the inheritable-cannibalism branch December 9, 2019 01:38
@adamkad1
Copy link
Contributor

adamkad1 commented Dec 19, 2019

i wonder if it would be possible to make variations need special books, like you needing 'to serve man' to use human meat where meat is needed

@Kodiologist
Copy link
Contributor

I can't speak from experience, but I imagine that cannibalistic cooking doesn't require any skills above and beyond that of using ordinary meats, except perhaps an absence of shame.

@adamkad1
Copy link
Contributor

I can't speak from experience, but I imagine that cannibalistic cooking doesn't require any skills above and beyond that of using ordinary meats, except perhaps an absence of shame.

Pretty sure different meats got different properties. maybe the book could atleast give bonus fun value to food for being prepared 'properly'

Coolthulhu referenced this pull request in cataclysmbnteam/Cataclysm-BN Oct 4, 2020
…d recipes (#35630)

* JSONize dynamic naming
To allow for items to be given different names depending on the context,
done via a JSON property, reducing the need for both highly similar item
definitions, and some hardcoded dynamic naming systems.

* Partially dehardcode corpse naming
Proof of concept for FLAG-based contextual names.
Makes "skinned", "field-dressed", and "quartered" qualifiers defined by
a contextual_names property on the corpse JSON definition.

* Change meat dishes' names when mutant meat is used
Proof of concept for COMPONENT_ID-based contextual names.

* Add string extraction for conditional names

* Rewrite corpse naming
Before, they were long and cumbersome. I was able to reorganize the code
to output far more concise names.

* Revise conditional naming documentation
The example was a bit contrived, this one is more applicable while still
covering all the bases.
Additionally, I added a short paragraph warning about automatic
pluralization, to hopefully help others avoid the pitfall I fell into.

* Touch-up protein drink/powder conditional names
perturbing pelmeni -> perilous pelmeni
To free up perturbing for:
unpalatable protein powder -> perturbing protein powder
Because unpalatable sounded weird and wasn't alliterative enough.
Also, gave protein drink/shakes the same names, they had none before.

* Make CANNIBALISM flag inheritable
The CANNIBALISM flag is already automatically added to food with the
"hflesh" material. This makes it inheritable, paving the way for use in
recipes as an alternative to normal meat while correctly passing on its
negative effects.
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: Balance Balancing of (existing) in-game features. Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Human lard not usable in other recipes
6 participants