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

[Proposal] Allow mods to declare special recipes #410

Open
DaleStan opened this issue Feb 10, 2025 · 3 comments
Open

[Proposal] Allow mods to declare special recipes #410

DaleStan opened this issue Feb 10, 2025 · 3 comments

Comments

@DaleStan
Copy link
Collaborator

If it would be useful (for example, with py's voiding recipes, or mods with lossy barreling recipes) we could read an extra property on all prototypes, and use that to treat the object (typically recipe or item) the same way as if it been automatically detected based on the recipe information.

For maximum compatibility with other tools, which may categorize items and recipes differently, the new property should be an array of arbitrary values, and tools should use the first one they recognize. Yafc would recognize the (case-insensitive?) strings Voiding, Barreling, Stacking, etc., as well as the same strings prefixed by "yafc:". It will probably ignore the value if it contained no recognized strings. Tools that only care about presence/absence could accept any table value for the property, including an empty table.

My initial proposal for the property name is "x:special_type", but I'd like to have a better name, especially since it's effectively being added to PrototypeBase.

@shpaass
Copy link
Owner

shpaass commented Feb 10, 2025

For more context, could you please describe what problem this feature solves?

@DaleStan
Copy link
Collaborator Author

DaleStan commented Feb 10, 2025

The problem (albeit relatively minor) in a pY project is that the voiding recipes aren't sent to the end of the lists:

Image

In my opinion, recipes like ash-bone, soot-separation, and syngas should appear in that dropdown before the voiding recipes. I don't see a good way of adjusting the detection logic to ignore ash in the output of most recipes1, but pY could tell Yafc and Helmod (I'm pretending Helmod supports this and calls voiding recipes "destroying" recipes instead) which recipes are voiding recipes with data.raw.recipe["ceramic-pyvoid"]["x:special_type"] = { "yafc:Voiding", "helmod:Destroying" }. The yafc or helmod prefixes are probably unnecessary, but it prevents conflicts if two tools use the same word for different types of recipes.

Exotic Industries has a similar problem with recipes that produce liquid oxygen or liquid nitrogen. You can put 1000 fluid into a cryogenic container (fancy barrel), but emptying the container only produces 950 fluid, preventing those recipes from being detected as barreling recipes. As previously, I don't see a good way of automatically detecting this, but they could be tagged so Yafc (and any other interested tools) can treat them correctly.

Footnotes

  1. Most recipes, but not all. I would treat bone-ash (2 bones to 4 ash) as a normal recipe, but bones-pyvoid (1 bones to 20% ash) as a voiding recipe.

@veger
Copy link
Collaborator

veger commented Feb 10, 2025

Do you have evidence that mod authors are willing to include this information into their mods? It is an extra burden for them, which does not help them or their mods in any way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants