Bug - Fixed Two spotted source of familiar weight discrepancies

I watched garbo run through some turns, and paid attention to the recent diagnostic message about familiar weight differences between KoL and Mafia. Upon encountering, I'd abort out and go look at modtraces and whatnot. I spotted two main causes of this coming up:

The first was an incorrect tracking of the familiar's experience. It seems Mafia currently does not always register the starting experience gained from the cook. This manifests in a 8-9lb difference (depending on whether the blue plate had a chance to be equipped) that shrinks as Mafia starts "levelling up" the familiar internally. However, there may be more to this that I don't fully get - in another scenario Mafia thought my God Lobster was 132lb while in fact it was 129lb (with a correct buff modtrace of +120lb). In all of these cases, hitting up the terrarium and having Mafia see the actual experience fixes things.

The second was occasional hiccups in Snow Suit tracking. I didn't do proper diagnostics on this, as in whether it failed to register on some combats or what, but every now and then it would slide out of sync by a pound for a few fights.

There may be more, but those are the two I have managed to identify.
 

Veracity

Developer
Staff member
I noticed the cook, myself, and fixed it in 26539.

I tested with taking a new familiar out of the Terrarium both in the Relay Browser and from the compact side pane of the GUI; in both cases the familiar jumped to 10 pound base weight and showed as 35-pound modified weight.

Although I own one, I don't understand what you mean by "Snow Suit tracking". Oh, wait: the Wiki says:

Weight bonus starts the day at +20, and over the course of the day drops all the way down to +5. It goes down by 1 pound every 5 completed combats (does not deflate on runaways).

Is there a message for this? This is not actually affecting familiar experience/base weight; it is a degradation of the Familiar Weight modifier over the course of the day.

Code:
Item    Snow Suit    Familiar Weight: [max(5,20-floor(pref(_snowSuitCount)/5))], Softcore Only, Generic

Huh. I bet we simply need to recalculate adjustments (to make the change to the Familiar Weight modifier get picked up) each time we increment that counter. Or every 5 times we increment it. I can try this.

The one open issue I've personally noticed is a message right when I log in when it says something like "Familiar weight: KoL = 40 KoLmafia = 35" which happens because api.php is the very first thing called when refreshing the session, and if we are currently logging in, we have not yet looked at the char sheet and noticed that I have Amphibian Sympathy. I have a fix to suppress the message if we are currently logging in, but will wait to submit it until I have additional fixes, if needed. :)

Edit: Yeah, that is the needed fix for the Snow Suit. I tested it by automating 5 turns at a time and the displayed familiar weight now goes down after 5 combats (and up by one if the familiar gained a pound). No messages, and accurate display.

I'll submit these fixes.
 
Last edited:
Top