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 support for optional ingredients in Cooking #2

Open
xrtariq2594 opened this issue Oct 8, 2016 · 2 comments
Open

Add support for optional ingredients in Cooking #2

xrtariq2594 opened this issue Oct 8, 2016 · 2 comments
Labels
Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Status: Needs Discussion Requires help discussing a reported issue or provided PR Status: Needs Investigation Requires to be checked for feasibility, reproducability, etc. Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Type: Improvement Request for or addition/enhancement of a feature

Comments

@xrtariq2594
Copy link
Member

Currently, recipes only allow for mandatory ingredients in the input section. A nice upgrade would be allowing for optional ingredients in the recipe. Like, adding extra stuff to guacamole for increased benefits and effects.

@skaldarnar
Copy link
Contributor

I guess this could potentially be modelled using different recipes, right? Maybe we can discuss here a bit how you would like to specify optional ingredients and their effects. You would need to specify the optional ingredient along with the desired effect (modifier) I suppose, like

"optionalIngredients" : [
    { "component" : "2*Cooking:salt", "effect" : "..." }
]

This would directly link the recipe to the properties of the resulting item. Can you think of a general way this could be defined?

@xrtariq2594
Copy link
Member Author

xrtariq2594 commented Oct 11, 2016

Hmm, it could be modeled using different recipe prefabs. But, that causes issues when we have several minor variants and combinations of the same base food. For example, according to Wikipedia, Guacamole can have "tomato, onion, garlic, lemon or lime juice, chili or cayenne pepper, coriander (also known as cilantro) or basil, jalapeño, and/or additional seasonings." It gets more complex with things like bread, cookies, and cakes.

I suppose a mix of individual recipes per "base" food and optional ingredients is a good compromise. The above syntax was what I was thinking about for optionalIngredients. Technically, we could apply the same principle of optional ingredients/items to other things like potion, equipment, etc.

We at the very least need the name of the optional item and what effects it should have on the altered base product. We'll have an optionalIngredients list which stores elements of the type OptionalIngredient, a custom class containing the aforementioned two fields (name and effect). Though, we'll need some way to parse the effect.

@xrtariq2594 xrtariq2594 added Type: Improvement Request for or addition/enhancement of a feature Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content labels Oct 25, 2016
@jdrueckert jdrueckert added Status: Needs Discussion Requires help discussing a reported issue or provided PR Status: Needs Investigation Requires to be checked for feasibility, reproducability, etc. Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. labels Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Status: Needs Discussion Requires help discussing a reported issue or provided PR Status: Needs Investigation Requires to be checked for feasibility, reproducability, etc. Topic: Architecture Requests, Issues and Changes related to software architecture, programming patterns, etc. Type: Improvement Request for or addition/enhancement of a feature
Projects
None yet
Development

No branches or pull requests

3 participants