Replaces micro dosing with volumetric dosing (#94621)

## About The Pull Request
To understand the PR we should first define what is micro dosing &
volumetric dosing

- **Micro dosing:** The reagent effects are **independent** of the
volume of reagent metabolized and are constant every tick, so the effect
you get from metabolizing 0.01u of a reagent is the same as metabolizing
1u of a reagent
- **Volumetric dosing:** The reagent effects are **dependent** on the
volume of reagent metabolized per tick, so the effect you get from
metabolizing 0.01u is much lower compared to metabolizing 1u of a
reagent which is much higher

This PR replaces **micro dosing** with **volumetric dosing** so if you
increase metabolization rates and absorb more reagents you get higher
effects from that reagent & vice versa for lower metabolization rates.

With that lets ask the core questions

**How does this affect present reagent values?**

_This PR scales all reagent effects such that even if it has a lower
metabolization rate the value is the same as before but will still scale
with reagent volumes & mob metabolization levels_

Under normal circumstances most reagents metabolize at 0.4u of reagent
per tick so as long as this value isn't changed by cybernetic body parts
or other reagents you will get the same values as before and won't
notice anything different in normal gameplay.

However, if you do get enhanced body parts like a cybernetic
liver/stomach or use reagents with metabolization rates different from
0.4u you will now get more/less affects depending on how much reagent is
consumed. Here is an example

Consider Syriniver this is how the formulae look like.

```dm
adjust_tox_loss(-1 * metabolization_ratio * seconds_per_tick, updating_health = FALSE, required_biotype = affected_biotype)
``` 

as long as 0.4u of it is metabolized every tick you get 2 tox loss
healing which is the same as before. However, this time if you
metabolize 0.01u of the reagent you get only 0.1 tox loss healing. If
you metabolize 1u reagent per tick, then you get 5 tox loss healing

**What about cigarettes?**
Unaffected. The amount of reagents injected into a mob per tick **does
not** affect the rate at which it is metabolized. Even if you have like
10u of cigarette reagents within you, if you are metabolizing just 0.4u
of it every tick then nothing changes

## Why It's Good For The Game
- Volumetric dosing is realistic. If you metabolize more reagent you
should be getting more benefits and lesser volumes should yield lesser
affects
- Microdosing is an exploit that should have been patched a long of time
ago because it encourages people to put in minimal effort to produce
just 0.01u of reagent to get maximum affects. This coupled with slower
metabolization rates leads to unbalanced higher reagent effects for
longer periods of time.
- This PR address the core issue in #93991 which is heal all patches.
Plumbing was gutted in an unnatural way by making the plumbing iv
drip/output gate/pill press behave essentially as mini reaction chambers
by filtering just 5 reagents. With this heal all patches are nerfed
based on the number & now volume of reagents you can put in a patch, so
its concern is addressed. If this does get merged, we can hopefully
revert it and make plumbing great and behave like large factories again
<img width="914" height="230" alt="Screenshot (532)"
src="https://github.com/user-attachments/assets/96467fad-b32f-409a-a1e8-2a92b8ff6565"
/>


## Changelog
🆑
fix: probability reagent affects scale correctly
balance: reagent affects now scale with the volume of reagent
metabolized meaning lower metabolization rates (from like cybernetic
organs) yield lower effects & higher rates yield higher effects
/🆑
This commit is contained in:
SyncIt21
2026-01-07 00:14:54 -05:00
committed by GitHub
parent dc22c4c630
commit 2618cffef3
30 changed files with 1396 additions and 1389 deletions
@@ -62,11 +62,11 @@
taste_description = "french cuisine"
taste_mult = 1.3
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/poisoned_mob, seconds_per_tick)
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/poisoned_mob, seconds_per_tick, metabolization_ratio)
. = ..()
if(volume <= 5)
return
if(poisoned_mob.adjust_tox_loss(2.5 * REM * seconds_per_tick, updating_health = FALSE))
if(poisoned_mob.adjust_tox_loss(1.25 * metabolization_ratio * seconds_per_tick, updating_health = FALSE))
return UPDATE_MOB_HEALTH
// bubble ability structure
@@ -172,7 +172,7 @@
return
to_chat(affected_mob, span_notice("This food has a funny taste!"))
/datum/reagent/rat_spit/overdose_start(mob/living/affected_mob)
/datum/reagent/rat_spit/overdose_start(mob/living/affected_mob, metabolization_ratio)
. = ..()
var/mob/living/carbon/victim = affected_mob
if (istype(victim) && !(FACTION_RAT in victim.faction))
@@ -181,7 +181,7 @@
victim.vomit(VOMIT_CATEGORY_DEFAULT)
metabolization_rate = 10 * REAGENTS_METABOLISM
/datum/reagent/rat_spit/on_mob_life(mob/living/carbon/affected_mob)
/datum/reagent/rat_spit/on_mob_life(mob/living/carbon/affected_mob, metabolization_ratio)
. = ..()
if(prob(15))
to_chat(affected_mob, span_notice("You feel queasy!"))