-
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
Cannabis extract overhaul #59386
Cannabis extract overhaul #59386
Conversation
This PR likely closes #52743 (which was already partially solved) and also affects one recipe in Innawood! |
Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details. Click to expand
This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to |
That's why I've originally made the "butane container" tools a requirement for crafting closed-loop extractors in #56703, assuming that the solvent is stored somewhere within the item. It only makes sense if you could recover all the solvent, which I was thinking is possible. If it's not possible, could add some solvent as a component requirement to extraction recipes themselves, to replace the consumed part of solvent. |
Gotcha, I understand why that was in the recipe now. I kinda get the logic: there's a base amount of butane trapped within the system and recycled every run. Neither solution is true to reality. There's no harm putting it back in the recipe for now, I guess. I also put ethanol solvent byproduct at 1:1 cuz yeah, I suppose there's no reason to lose it. That's the whole point of a closed system, realistically. Butane should only be used at the time of the recipe (a closed loop system is opened up between runs) and you should get butane back. Liquid butane really just needs to be added as a material for "byproducts" to work (along with fixing that other bug affecting byproducts). I just now tried hacking a way to not consume butane into the recipe with no success (["butane_tank", -1] creates a situation where you can use an empty tank to craft). I can look into adding the material in the near future. |
@AtomicFox556 Are there any other changes you would suggest making here (besides the extant stuff like the material issue) before I call this ready to merge? Do any recipes seem off? I think the extraction process is a little complex, so I appreciate feedback from anyone who understands what's going on. Thanks <3 |
I'd change extraction recipes making use of closed-loop systems to not consume butane by just not including butane in recipe, with the assumption being that butane is trapped within the system. Even if it's not how it's usually done IRL, it could be done like that and appears to be the most convenient way to do it as gas storage is a bit awkward at the moment. |
I'm gonna rework this a little, actually, because it wasn't the most well-conceived PR. It could probably be split up as well, because there are typo fixes, item group changes, and (definitely unnecessary) recipe additions all in one. |
Summary
Balance "Add medical CBD extracts, rebalance cannabis extraction recipes and related drop rates"
Purpose of change
Adds medical-grade CBD extracts, disambiguates between extant THC extracts, modifies cannabis extraction recipes to be more consistent and realistic, and modifies drops for related items.
Describe the solution
TL;DR: This is an overhaul of the cannabis extraction system and many of its related items aimed at improving realism (somewhat) and consistency of some recipes. Please check "Additional Context" for research related to this PR and a breakdown of the extract crafting system.
"Medical-grade CBD extracts" have been added as an alternative to THC extracts. They are ~30% more potent as painkillers than their THC variants and do not cause you to get high, but also require the highest-end, closed-loop extraction equipment to produce (this was a gameplay-based decision to urge you to plant cannabis and seek out closed-loop extraction methods for renewable painkillers; realism sticklers, please be kind). They are not made from a different variety of cannabis plant, I'm sorry. (Realism sticklers... try not to think about it.) This could be changed with different varieties of cannabis in the future, but that was a little out of the scope of this PR.
All extract recipes have been changed for improved realism. Solvent usage has been changed to use more in open blasting recipes. Non-solvent-based recipes (rosin presses mainly, I'm thinking) are not in-game at the moment. Tool recipes have been changed to be slightly more realistic. I left the recipes for vacuum pumps and ovens. Even though they are mechanically pretty complex, better-than-improvised DIY solutions have been demonstrated online. Please check "Additional Context" for more information on this.
Filter paper is no longer craftable or deconstructable. Real-world filter paper is created in a factory process by treating not only paper, but fiberglass, plastic, nanocarbons, etc. with special chemicals to specifically define the width of its pores. No survivor should be able to craft it.
Item groups have been slightly changed. Plastic gaskets are now in "supplies_hardware" and filter paper is now a part of "tools_science".
NOTE: This PR still currently suffers from a bug (?) pointed out in #59230 and ethanol-based recipes currently return an entire stack (250) of ethanol per unit rather than 1 unit like they should. I'll edit this section of the code to fix this if required in the future.
This PR should also close #52743.
Describe alternatives you've considered
I'm torn between expanding the system and simplifying the process further by simply making one type of each: "CBD extract" and "THC extract". However, I hope the research here proves that there's enough depth to justify having slightly more options for a needy survivor. In real chemistry, the tools to extract cannabis oils are also used to extract many other essential oils, opening up another avenue for crafting advanced herbal medicines.
Certain item recipes could be changed individually, but this PR addresses numerous issues brought up elsewhere, notably #52743. Perhaps this PR doesn't even go far enough disambiguating THC and CBD cannabis plants for crafting purposes. This could be expanded upon in the future.
Currently there's also no way to collect used butane solvent back into a container from a closed-loop system, since butane is not yet a material in-game. This should probably be changed in the future, and the current way around this is to assume that the butane is trapped within the closed-loop system itself and recycled every time.
Testing
Tested on my own compiled version, confirming recipes appear as expected.
Additional context
Cannabis extraction in C:DDA can currently be performed with two solvents:
Cannabis can currently be extracted into concentrates in C:DDA in two ways:
Cannabis extract is currently refined in C:DDA in two ways, by boiling off and by vacuum oven (this isn't super obvious, but is implied by which recipe and solvent you choose to use)
Therefore:
This system was created by @NastyNate2612 and further improved by @AtomicFox556, and I wanted to collect as much research as I could for anyone who might want to expand on this in the future:
Making BHO with an open-loop extraction method Part 1 (open blasting) (Video)
Making BHO with an open-loop extraction method Part 2 (vacuum pump + glass flask equivalent) (Video)
Making BHO in a small closed-loop extraction system with butane (Video)
Homemade vacuum pump recipe (Video)
Purging both butane and ethanol extracts in a vacuum oven (Video)
More info on vacuum ovens (Article)