Project Zomboid

Project Zomboid

Dynamic Traits and Expanded Moodles [B41 & B42]
 This topic has been pinned, so it's probably important
PepperCat  [developer] 5 Aug, 2024 @ 3:10pm
Overdose Mechanic explanation
Overdose mechanic

The overdose is an internal value between 0 and 100 that based on the current value will apply different effects.

Drinks Overdose
Alcohol and Pills gives overdose. If Snake's modpack is installed (specifically LeGourmet), Energy Drinks, Maximum Energy Drinks and Tragos also gives overdose.

- The amount of overdose each alcoholic drink, energy drink or tragos gives is equals to:
Current Hunger + Thirst reduction
(Note here: this is the reason why drinking 1/4 - 1/2 or full doesn't matter for the game, because the first time you drink the current hunger and thirst will always BE FULL and will give its full value).

Pills Overdose
  • - 8 overdose for Vitamins.
  • - 12 overdose for all others.

Overdose increase:

The values can be affected by having the traits "Weak Stomach" or "Iron Gut". Increasing / Decreasing by 30%.
Let's see a Bourbon as example. Bourbon has 20 hunger reduction + 20 thirst reduction. If player has "Iron Gut", that value will be decreased by 30%. So as a result the overdose increase would be: (20 + 20) * 0.7

Overdose decrease:
The value of the overdose decreases every hour (like if the body is cleaning itself) by a value of 4. If "Weak Stomach" or "Iron Gut" are present, that value is increased or decreased by 30%. (Iron Gut cleaning the body faster while Weak Stomach doing the opposite).

Moodles:
Overdose has 3 moodles (Lv2, Lv3, Lv4)

  • Moodle Lv2: effects for this level are increasing stress and wetness (this effect keeps playing in Moodle Lv3 and 4) and starts after reaching an Overdose of 50.
  • Moodle Lv3: effect for this level is a fatigue increase (this effect keeps playing in Moodle Lv4) and starts after reaching an Overdose of 70.
  • Moodle Lv4: the effect for this level is an increase in foodSickness value (The green Moodle) which eventuall can lead up to Fever and death (can be reduced as always with Lemongrass) and starts after reaching an Overdose of 85.
Last edited by PepperCat; 5 Aug, 2024 @ 3:15pm
< >
Showing 1-15 of 29 comments
rekreator12e 6 Aug, 2024 @ 3:26am 
Is the full amount of overdose no matter how much you drink an engine limitation?
PepperCat  [developer] 6 Aug, 2024 @ 6:19am 
Originally posted by rekreator12e:
Is the full amount of overdose no matter how much you drink an engine limitation?
The first time, yes. I mean, it could be handled by adding a lot of new code but it is not worth the amount of effort to the benefit it has.
Jayden 24 Aug, 2024 @ 2:19pm 
is there a way to disable this? it is rather bothersome for me
_pizzab0y_ 4 Sep, 2024 @ 12:30pm 
Is there a way to disable the overdose moodle in sandbox settings? Ive been looking for sometime and cant quite figure it out, the main reason im looking to disable it is because a longterm character of mine died from drinking four beers :I , doesnt seem too realistic and im just looking to disable this option for me and my friends.
there needs to be a way to disable overdose. drinking half a bottle of wine at the 50th in game minute on painkillers (where afterward they stop working) and having that character get a fever within twenty minutes and die is extremely unfair. your health at this stage plummets at the rate of a deep wound, and is untreatable. having to keep track of an unrepresented value w/o mods (in this case the painkillers) just to be able to drink alcohol and boost happiness, only to die because you're at the ass end of said value should be something you can avoid through disabling the thing that causes it.
PepperCat  [developer] 5 Sep, 2024 @ 4:33am 
No, there won't be an option to disable it. I haven't added it in two years, what is still not clear about it?
And no, it doesn't work as you mentioned. It is already explained above.
FULL ICE 10 Sep, 2024 @ 7:56pm 
Estuve a punto de borrar este mod por completo de mis partidas porque siempre moría de sobredosis, hasta que vi este hilo y me di cuenta de que tener el rasgo de estómago delicado era el problema. Voy a empezar una nueva partida sin ese rasgo... ¡veremos de qué muero esta vez!
R4gn0r0k 11 Sep, 2024 @ 1:27pm 
wow. Guaranteed death after half a bottle of bourbon spaced throughout the day (for pain, calories, happiness, or even role play reasons). That's tragically retarded & unrealistic. The fact you wont address this is even more tragic. Otherwise a super fun mod. But being limited to a SIP of alcohol a day or literal death isn't very fun.
Last edited by R4gn0r0k; 11 Sep, 2024 @ 1:29pm
PepperCat  [developer] 11 Sep, 2024 @ 5:23pm 
Not sure if you didn't take Math clases or what but you can literally drink several Bourbon bottles per day without any problem. If you want to complain, your problem, not mine.
R4gn0r0k 11 Sep, 2024 @ 5:47pm 
in theory i guess, but in PRACTICE obviously not. Clearly other people are complaining too so apparently its a lot of people's problem. Isolating all stats & drinking an entire bottle of bourbon will give you max Ooverdose moodle -> fever -> death.
PepperCat  [developer] 11 Sep, 2024 @ 7:40pm 
Not sure how 20 + 20 (Thirst and Hungry) which is 40 is enough to kill yourself when the latest overdose level is at 85. Really, you should take math clases because something is not working there
MobileSuitCleb 23 Sep, 2024 @ 3:23pm 
I think the combination of Sensitive Digestion from More Simple Traits, in combination with drinking an entire bottle of Whisky or Red Wine is whats killing people, since the sickness from overeating will (I assume) stack. I can't be 100% sure though, but worth looking into since More Simple Traits is listed as compatible. If it does turn out to be the issue, may be worth adding note to the compatibility list so people know to be careful with that trait
Shizune 16 Dec, 2024 @ 4:55pm 
So from my experience, there is clearly something wrong with the equation or the code. my character, having neither iron gut nor weak stomach, got the first level of overdose after drinking only half a bottle of bourbon. (I haven't drank any alcohol before this point on this character)

if the equation is just adding both hunger and thirst together, then half a bottle should only increase it by 20, which should not give a moodle if it's supposed to appear at 50.

You can call me stupid or tell me I haven't taken math classes all you want, but I'll tell you I have, and am pretty sure I know what I'm saying here. I suggest looking into the code and making sure what you're saying is accurate, instead of telling everyone it's due to their own stupidity.
PepperCat  [developer] 17 Dec, 2024 @ 5:12am 
The code is right, I've checked it for the past 2 years lol
About your specific concern, it has an explanation.
Overdose code runs inside the "OnEat" function from each drinking, the "OnEat" function is called ALWAYS wether you drink it full, half or 1/4 and it comes with the current values the drinking has.
What this means? that the first time you drink from a bottle, no matter if it is 1/4 or 1/2, how the game works, is that the full value will be sent to the function. Drinking 1/2 and drinking 1/4 doesn't have any difference with drinking it fully in terms of overdose.
And no, I don't call people stupid unless they have a stupid attitude first, when people is kind, I'm kind :)
76561199227680499 28 Dec, 2024 @ 4:28pm 
i get a error when i try to study berries...

`function: perform -- file: DTEMStudyPlantAction.lua line # 33 | MOD: Dynamic Traits and Expanded Moodles [B42][UNSTABLE]
java.lang.RuntimeException: __add not defined for operands in perform
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:659)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1760)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:85)
at zombie.characters.CharacterTimedActions.LuaTimedActionNew.perform(LuaTimedActionNew.java:143)
at zombie.characters.IsoGameCharacter.updateInternal(IsoGameCharacter.java:10357)
at zombie.core.profiling.PerformanceProbes$Invokable$Params1$Probe_Cached.invoke(PerformanceProbes.java:144)
at zombie.characters.IsoGameCharacter.update(IsoGameCharacter.java:9995)
at zombie.characters.IsoPlayer.updateInternal1(IsoPlayer.java:2200)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.characters.IsoPlayer.update(IsoPlayer.java:2180)
at zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:71)
at zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:155)
at zombie.iso.IsoCell.ProcessObjects(IsoCell.java:3058)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:195)
at zombie.iso.IsoCell.updateInternal(IsoCell.java:5955)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.iso.IsoCell.update(IsoCell.java:5897)
at zombie.iso.IsoWorld.updateWorld(IsoWorld.java:3893)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3993)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:102)
at zombie.iso.IsoWorld.update(IsoWorld.java:3917)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1750)
at zombie.gameStates.IngameState.update(IngameState.java:1443)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:372)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:76)
at zombie.GameWindow.frameStep(GameWindow.java:917)
at zombie.GameWindow.run_ez(GameWindow.java:810)
at zombie.GameWindow.mainThread(GameWindow.java:610)
at {LINK REMOVED} Source)
< >
Showing 1-15 of 29 comments
Per page: 1530 50