So, I have noticed that once you hit insanity, for mood, you have a certain amount of time before the moodlet text bugs out and you become perma stuck in insanity, giving you a massive movement debuff, is this intentional? or is it a bug?
Insanity is permanent, I think. Donât take hypersensitive if you donât wanna babysit your mood
Itâs a bug; it shouldnât be blank, and unstable supposedly changes so that âyou are unable to recover your sanity if you lose itâ.
therefore normally you should be able to recover your sanity if you lose it.
insanity is a permanent loss of mood, thatâs the point
Then why have the unstable perk? What is it supposed to do, if not that?
Unstable seems like 2 free trait points if everyone already canât recover their sanity.
If itâs meant to be a permanent loss of mood, why is the interface so fucky. Youâd at least think theyâd have a line of text for it.
Okay, I think I found the issue
Sanity Code
///Called on SSmood process
/datum/component/mood/process(delta_time)
var/mob/living/owner = parent
switch(sanity)
if(SANITY_GREAT-1 to INFINITY)
setSanity(sanity+sanity_modifier*delta_time*mood-0.4)
if(SANITY_NEUTRAL-1 to SANITY_GREAT-1)
setSanity(sanity+sanity_modifier*delta_time*mood-0.2)
if(SANITY_DISTURBED-1 to SANITY_NEUTRAL-1)
setSanity(sanity+sanity_modifier*delta_time*mood)
if(SANITY_UNSTABLE-1 to SANITY_DISTURBED-1)
setSanity(sanity+sanity_modifier*delta_time*mood+0.3)
if(SANITY_CRAZY-1 to SANITY_UNSTABLE-1)
setSanity(sanity+sanity_modifier*delta_time*mood+0.6)
if(SANITY_INSANE-1 to SANITY_CRAZY)
setSanity(sanity+sanity_modifier*delta_time*mood+0.9)
HandleNutrition(owner)
In this code, the sanity values all have -1 attached to them for this formula specifically. If you bottom out your mood, this formula can spit out a negative value for your new sanity, which works within itself but doesnât work for any of the other formulas. For instance
Code that controls how the UI prints
/datum/component/mood/proc/print_mood(mob/user)
var/msg = "<span class='info'><EM>Your current mood</EM>\n"
msg += "<span class='notice'>My mental status: </span>" //Long term
switch(sanity)
if(SANITY_GREAT to INFINITY)
msg += "<span class='nicegreen'>My mind feels like a temple!<span>\n"
if(SANITY_NEUTRAL to SANITY_GREAT)
msg += "<span class='nicegreen'>I have been feeling great lately!<span>\n"
if(SANITY_DISTURBED to SANITY_NEUTRAL)
msg += "<span class='nicegreen'>I have felt quite decent lately.<span>\n"
if(SANITY_UNSTABLE to SANITY_DISTURBED)
msg += "<span class='warning'>I'm feeling a little bit unhinged...</span>\n"
if(SANITY_CRAZY to SANITY_UNSTABLE)
msg += "<span class='boldwarning'>I'm freaking out!!!</span>\n"
if(SANITY_INSANE to SANITY_CRAZY)
msg += "<span class='boldwarning'>AHAHAHAHAHAHAHAHAHAH!!!</span>\n"
This doesnât account for negative sanity, which would result in the lack of printed text that we see when the bug occurs.
Assuming all of these moodlets in Maggotâs screenshot add up to about +20 or so, the formula for calculating his sanity every mood tick would look something like this.
sanity+sanity_modifier*delta_time*mood+0.9
(-3+0.05*20+0.9),
which would result in a sanity value of -59, give or take.
I think I know the exact PR that broke it too.
This pull request refactored mood to be multiplied into your sanity change formula, and since you can get negative mood and low sanity, this means you can get negative numbers now, where you couldnâtve before.
OKAY ERRATA IâM STUPID
I think the bug ACTUALLY arises when you get a sanity value of below -1. Then it fails all the checks in the sanity adjustment formula, and can never change again, getting frozen at a negative value. The fix is actually really simple, I think.
https://github.com/BeeStation/BeeStation-Hornet/pull/10574
fixed it maybe???
okay this link works
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.