Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Field Researcher
Original Poster
#1 Old 22nd Mar 2021 at 1:33 AM
Default Buff replacement causing sims to reset
I've got a buff problem I can't seem to debug - I'm replacing the Starving buff with a version that runs some extra code, but something about the edited buff causes sims to start glitching, so that they freeze and jump around the lot in a bunch of little resets, and interactions added to their queue immediately disappear. I can prevent this from happening by commenting out the lines where the addition of the buff triggers the sim receiving it to do the hunger distress animation, but it seems like that just masks the problem rather than eliminating it: sims seem fine until they start to starve to death, but then (usually, but not always) reset mid-death. The timing of the mid-death reset varies, but it always happens sometime between when the sim does the death animation and becomes unselectable and when the Reaper sends their spirit into the grave. When any sim finishes the death sequence without resetting, it's usually the one that died first on the lot, with the others then resetting all at once.

Are there any additional tests anyone could suggest that might narrow down the problem? I've added an entry to for this buff to the Idles XML and confirmed that there's idle animation data associated with it, and none of the code in the buff class itself seems to be throwing any errors - all the buff's methods run all the way through according to my debugging messages. The freezing made me think there's a while loop somewhere that's become inescapable, but I haven't been able to find one, and I'm not sure what to make of the resets during the death sequence.
Advertisement
Inventor
#2 Old 22nd Mar 2021 at 5:02 AM
So, what does the additional code do?

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
Original Poster
#3 Old 22nd Mar 2021 at 1:49 PM
At the moment there is none anymore I removed it all trying to see if that could get the buff to work (nope). It's supposed to force starvation deaths for sims that are normally immune to that, though; I've also tried running the starvation code through an interaction instead of a buff and it works fine, so I'm pretty confident the issue is with the buff itself.
Scholar
#4 Old 23rd Mar 2021 at 11:32 AM
Can the motives.xml be used to replace the buff instead?

Buffs related to motives or transformation(werewolf, tragic clown, zombie) work a bit differently from normal buffs. Replacing them is not as easy.

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Field Researcher
Original Poster
#5 Old 25th Mar 2021 at 1:58 AM
Quote: Originally posted by PuddingFace
Buffs related to motives or transformation(werewolf, tragic clown, zombie) work a bit differently from normal buffs. Replacing them is not as easy.

Oh, interesting! I'll check out the Motives XML and see if anything there looks promising, thanks!
Field Researcher
Original Poster
#6 Old 27th Mar 2021 at 1:02 AM
I wasn't able to trigger my custom buff through the Motives XML, but I've been able to temporarily work around whatever the problem here is by just editing the Buffs XML so the class for the Starving buff is my custom class instead of the normal one. Not as robust a solution as I'd like, but it'll do for now!
Back to top