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

Add Conditional Names for many comestibles, name to object, and small recipe fixes #38297

Closed
wants to merge 74 commits into from

Conversation

CSHague
Copy link
Contributor

@CSHague CSHague commented Feb 24, 2020

Summary

SUMMARY: Content "Add conditional names to comestibles with modernize and small tweaks"

Purpose of change

To add conditional names to multiple comestible-types based on ingredients. This includes aspic, canned fruits and vegetables; dehydrated fruits and veggies; fruit jams, various egg dishes, and frozen goods (milkshakes, ice cream, gelato) Egg recipes now read by egg-type or meat additions. Soup recipes describe main ingredient. Broth types based on filler. Varieties of sandwich based on vegetables and meats (lunchmeat sandwich, lettuce sandwich, marinara sandwich) Vegetable oil based on seed pressed (grapeseed oil, hempseed oil, and so on)

Name to object modernization for entire comestible folder

Alter ice cream recipe to produce regular ice cream supplemented by fruit and candy recipe.

Add calories to some seed types to allow them to be pressed for relevant oil with right calories (120 calories per serving of oil) Added unhealthiness and negative fun to appropriately bitter or toxic oil-pressable seeds. Removed Nutrient override on vegetable cooking oil.

Describe the solution

Add the various conditionals to each file. Add calories and remove nutrient overrides from appropriate recipes. Had to re-add some file corrections that were overwritten by accident.

Describe alternatives you've considered

I wanted to do more complicated stuff but since the system relies on COMPONENT_ID, I couldn't do chained recipes "blueberries -> dried blueberry -> blueberry cookies is lost after the dried blueberries are used in the cookies making just "cookies" from the "dry_fruit" id.

Testing

image

Additional context

Some of the names might need adjusting. I'm open to changes.

Adds ingredient-based conditional names to kompot and fruit juice.
Adds conditional names for boiled and scrambled eggs
Various frozen dairy items have fruit and candy-based conditional names.
Adds ingredient-based conditionals to almost all fruit objects: dehydrated fruit, jam, pies, cooked fruit, canned fruit, fruit leather and bag-sealed fruit.
Adds fruit and candy conditional names to cookies: ie strawberry cookies, jam cookies etc.
Adds names to deluxe eggs, sashimi, aspic, macaroni helper, meat pizza, and tacos
Adds conditional name to dried mushrooms
Gives fruit-based conditional names to protein shakes
Conditional names for meat, veggy, and boring sandwiches based on meat, vegetable, and sauce respectively.
Seeds that can be made into oil need nutritional info so they produce calories  in the resulting oil. Nutritional data on oil suggests seed oils are 120 kcal per tbsp and oil seeds have been adjusted in light of this to be proportional to the oil recipe giving a result of 120 calories per serving.
Adds conditional names to broth, vegetable soup, and curry
Adds conditional names to: vegetable aspic, vegetarian baked beans, vegetable pizza, canned vegetables, salted vegetable chunks, pickled vegetables, dehydrated vegetables, onigiri, and hosomaki, each based on primary vegetable chosen.
Adds conditional names for pancakes, waffles, pie, granola, sponge cake, and space cake, each based on fruit, candy or sweetener used to make it.
CSHague and others added 4 commits February 24, 2020 14:59
Several offal dishes didn't have pluralization for stew-like consistency: fried tripe, stewed tripe, fried brains, etc. Used preferred nomenclature for brains as a singular of brains in brain dishes. Corrected grammar on canned liver entry.
Royal jelly has a disparate plural when it's functionally a liquid and so it's plural should also be jelly, not jellies. Mycrus fruit had an extraneous plural
Many sandwiches were missing proper plurals for the conditional name, resulting in "sandwichs" Not proper. Not proper at all 🎩
3 broth conditional names were missing pluralization. Also, vegetable soup had inappropriate conditionals that were copied from broth recipe.
@@ -192,18 +258,24 @@
"charges": 16,
"phase": "liquid",
"fun": -25,
"flags": [ "NUTRIENT_OVERRIDE" ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked the nutrition value of crafted vegetable oil with this change? Last time I checked it caused vegetable oil to have no nutrition value at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I added calories and health data to the appropriate seed types. I did the math in reverse starting from a serving of cooking oil (all types I researched from the recipes have FDA values of 120 calories so I added calorie values to each seed type to give 120 calorie oil. Some seed types are bitter and unenjoyable, like grape seeds, but aren't toxic. Cotton seeds are toxic so eating them raw is quite unhealthy (not immediately deadly, but it's a toxic buildup) so I added a negative health value to eating them. Canola seeds also have a toxic property.

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items / Item Actions / Item Qualities Items and how they work and interact labels Feb 24, 2020
Apparently, I forgot all about adding this data. This should help fix the comestible_test failure.
"name": { "str": "sponge cake" },
"conditional_names": [
{ "type": "COMPONENT_ID", "condition": "honey", "name": { "str": "honey sponge cake" } },
{ "type": "COMPONENT_ID", "condition": "owlbear", "name": { "str": "owlbear sponge cake" } },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not throw an error when Magiclysm isn't loaded?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if it doesn't, it possibly should. This stuff shouldn't be specified in the base game, it should be specified in mods.

Copy link
Contributor Author

@CSHague CSHague Feb 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It doesn't cause any errors. The game isn't actually checking for ids, it's parsing the ids of ingredients of an item for a matching string but doesn't need to find the whole id so if I had it parsing for "foo" it would find "foofas" or "fafoos" Even if "foo" doesn't exist as an id, nothing happens and the item gets its default name. This just lets it be compatible with modded content without making another entry for literally every egg recipe. Seems intentional. Edit: This is basically a word filter over the item's name. If the filter matches, it replaces the name, if it doesn't it repeats, parsing for a different component id until it gets a match or defaults to the base name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put it another way: I could dedicate several extra lines of json and files for every comestible that might included a conditional name for a modded ingredient or I can have 1 line in a main file with zero conflicts the player won't see or be affected by in any way.

I cause more chaos with this PR by altering the recipe of ice cream than by adding a dead-end conditional name.

Removed the duplicated entry for corn sandwich conditional name.
@CSHague CSHague changed the title Add Condtional Names for many comestibles, name to object, and small recipe fixes Add Conditional Names for many comestibles, name to object, and small recipe fixes Feb 26, 2020
@kevingranade
Copy link
Member

Closing as it's heavily conflicted and stale, but we'd love to have the variant names.

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 Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants