-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Cannibalism checks as a vitamin #72224
Cannibalism checks as a vitamin #72224
Conversation
|
I've cleared the hurdles I consider blockers, but there is still some unintended changes from this switch. First, the secret cannibal stash(???) in one version of the hunting lodge no longer has food made out of people, because CANNIBALISM just isn't a flag anymore. Second, the orc villages in Magiclysm have had the same fate, their "smoked suckers" being replaced with regular smoked meat. I don't see any reasonable way to keep those while making the change to vitamins, but I'm open to ideas. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Keep the |
Keeping the cannibalism flag around and applying it would be easy enough, but it would not be able to confer the vitamin without some hackery that strikes me as a bad idea. Food basically has two ways of having vitamins: The default vitamins, or the inherited vitamins when it's made of components. A similar not-in-scope solution is "Just allow mapgen to arbitrarily insert components", so you could have an item group which has |
Is it possible to define item variants with differing "vitamin" (or other parameter) content and then specify the variant at placement? |
No, and variants should not have this capacity (they are cosmetic-only). |
80b35fe
to
313a872
Compare
Well I made this, which is absolutely terrible with no safety checks whatsoever. But it does work. master...RenechCDDA:Cataclysm-DDA:mapgen_components It'd still require remaking the preserved_food and dry_goods groups because you need to define components per-item. So really all it does is preserve the meat entries in the orc camp. ...but it's something. Unknown if I'm going to work on this further or what. It's definitely not going into this PR. |
313a872
to
d5394f8
Compare
c61d9b9
to
334f12b
Compare
334f12b
to
0a2fb45
Compare
Summary
Infrastructure "Cannibalism checks converted to vitamin, accessible by mods and other content"
Purpose of change
Flag inheritance is difficult to expand, item flags disappear along with the item, and there's no JSON-side way to track if cannibalism has occurred.
Describe the solution
Convert the flag into a (very long-lasting) vitamin. From there it can be queried by mods, so e.g. @Standing-Storm can have MoM detect if a Homullus has consumed human flesh.
Added a new conditional to conditional names,
VITAMIN
. True if item has of the supplied vitamin_id, including from inheritance. This is used to replace the previous flag-based condition.As a vitamin, json can also muck with the decay rate and otherwise do EOC math to add effects as appropriate.
The maximum 'stored'
human_flesh_vitamin
and its 'rate' are arbitrary numbers, just meant as a very persistent tracker. But again, because they are in json they can be easily modified by other contributors if need be.Describe alternatives you've considered
All allergies as vitamins :)
Maybe soon, needs some more infrastructure work first.
Testing
2024-03-07.07-31-14.mp4
Additional context
Note: This removes cannibalism from the "mutant_human_blood" item. mutant_human_blood was previously flagged cannibal due to having the
hblood
material type. But this ONLY applied to mutant human blood, not mutant human flesh.Instead of adding cannibal vitamin to the blood (which copies from mutant_human_flesh), I chose to just nix this discrepancy.
Presumably people were not in the habit of bleeding slain mutant humans, an already rare encounter, which is why this was not discovered before.