-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Dynamic smokable inhalation rate and smokable's max volume tweaks #31465
base: master
Are you sure you want to change the base?
Conversation
40u is a looooooot tbh as a unbiased player I believe maybe 20u would be a good max |
20u used to be default on paper but all smokables have a mandatory 10u of nicotine or THC, meaning only 10u of chemicals can be added to them. Soaked smokes allow for up to 40u, matching the max volume of soaked cigarettes to normal cigarettes means players have access to something that can hold a larger abundance of chemicals that will metabolize in larger amounts for later consumption. I intend to make it so if someone makes a healing or damage dealing smoke it will have a much more immediate and noticeable effect, or just load 10 different types of narcotics and have some fun like what ive seen many chemists and botanists do. |
I'm looking forward to the inevitable 30u Puncturace cigarettes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be reading it wrong but does this not only set the InitialVolume on the first update the cigarette is spawned? Does the system appropriately account for injecting more reagents into the cigarette, either before or during smoking?
It should, if I recall correctly it checks every update tick for what’s contained as the volume. It’s been a while since I’ve tested it and I’m not in the position to set up my computer to check at the moment due to moving. I’ll hopefully get back to you on this soon, I’ll probably get a buddy to test it. |
tested and confirmed that the cig lasts for longer/shorter than the intended time of 6 mins if you insert reagents into the cig before smoking it I love droppering in 10us of omni into my cig anyways, you'll have to change it so it does the math every time instead of just that single instance when it's spawned in. I might fuck with it later but not now, im too lazy |
Shit, last I tested it, it worked when adding chems through the admin menu, I’ll change it when I get my computer set up some time in the future. |
There are some minor stuff I've considered with this approach. Let's say a 20u cigarette takes 6 minutes to smoke. According to this PR, adding 20u more reagent won't change the smoke duration, you just consume more reagent each tick. That feels okay; the cigarette is more saturated, makes sense you get more effect. But what happens when you inject an already lit cigarette? If we look at the most extreme case and say I have a cigarette I've smoked for 5 minutes, 55 seconds. If I inject it with 20u reagent, will those 20u be ingested over the last 5 seconds? |
Injecting any reagent will extend the time to smoke, it calculates the amount inhaled from the current volume to match 6 minutes before its lit. There’s no timer governing how long it should last, just "this should last 6 minutes, you have 40u before lighting, every tick you will inhale X amount". This is even an issue outside of this PR since smokes only go unlit when the amount of reagents in them hits 0, you could smoke all the nicotine in a smokable but keep adding new chemicals to smoke it forever. |
I'm gonna draft this since it would take me at least a month before I'm able to fix these issues, I'll notify a maintainer and un-draft it when my work is complete. |
About the PR
In my last PR's #30053 and #30101 I had increased many of the max volumes for smokable entities to align them with the base max volume for Dan's Soaked Smokes. Instead of increasing the base inhalation rate to counter their extended duration, I have set all smokables to last a set amount of time and dynamically change their inhalation rates to match the time to finish smoking. This PR is identical to #30101 except I have fixed (or at least attempted to) the serialization issues brought up by Sloth and Emogarbage. I've made a new PR since I thought I wouldn't have time to fix it and closed #30101 then not 4 hours later was I gas lit into fixing it by friends.
Why / Balance
Many chemicals and narcotics when added to cigarettes are either not abundant enough and/or do not metabolize fast enough to possess a significant threat or achieve a desired effect, allowing more room for chemicals to be added means that a higher amount of said chemicals will enter the blood stream allowing for longer or more potent effects with accumulation. This will expand upon gameplay opportunities for the entrepreneurial Chemist, Syndicate Agent with a chemical kit, or Botanist with a "Green" thumb. Due to these changes, the Syndicate Omnizine Smoke will be significantly buffed, making it last the set 6 minutes to smoke from the 12 minutes it used to take to completely inhale all reagents with a static inhalation amount.
Technical details
The Smoking System now calculates the inhalation amount instead of using the Smokable Component's fixed inhalation amount, it will change depending on the volume of chemicals contained within the smokable making sure that you inhale the correct amount to finish all reagents within the set time frame of 360 seconds as defined by SmokableDuration float. In practice a full cigarette with 40u of chemicals will inhale ~0.33u of the total volume per update/tick in the Smoking System.
Compared to the "vanilla" system, this is an increase from the minimum time to smoke something with a base 10u of chemicals like what you would expect from a normal cigarette of 4 minutes, and a decrease from the maximum time to smoke something with a full 40u of chemicals like the syndicate omnizine smoke of 12 minutes.
In addition to the dynamic inhalation amount, adjusted the max volume of the base cigarette/cigar entity to match the volume of "Dan's Soaked Smokes" or just the normal "Soaked Smoke" entity (40u max), tweaked the max volume of other smokables such as blunts and joints to make more room for any additional chemicals added from plant mutations, and doubled the amount of extra chemicals to "Dan's Soaked Smoke's" smokes (with the exception to the Dan's Omnizine smoke, it remains 30u).
Media
Requirements
Breaking changes
N/A I hope
Changelog
🆑