New Content - Implemented KoL's fullness counter in charpane

Veracity

Developer
Staff member
Apparently, we have a couple of issues with this: we submit an item usage or sushi creation request, get a charpane update that shows ithe increased fullness, and then increment it again when the request completes.

Or something.

Both of the following Bug reports touch on this:

Incorrect fullness for sushi
Distention pills confuse Mafia re: fullness

Perhaps we should simply ignore the fullness counter in the charpane and trust to our own fullness tracking.
 

Veracity

Developer
Staff member
I am in favor of detecting when the user has done things outside of KoLmafia and synching our internal state with what we can glean from KoL itself. I think I'd like to look at the fullness counter on the charpane - if enabled - when we login or timein or otherwise refresh state and set our internal variable at that time, and otherwise simply use our own internal idea of what a particular food does to fullness and ignore what the charpane says.

Although, for unknown foods, we could use the KoL visible counter to deduce the fullness.

It's a shame that it's opt-in on KoL because it's "not funny" - as if the always-visible inebriety counter is, somehow, "funny"; they seem equally neutral, to me. If it were always on, we could abandon updating the internal fullness counter when eating, much as we don't update our internal inebrety counter when drinking, but depend on charpane refreshes.
 

StDoodle

Minion
I don't get it either; in real life, I find people are very rarely off by much with their own estimates on how full or hungry they are (hyperbolic, sometimes, but they usually seem to know). However, it's not at all unheard of for a horribly drunk person to insist they're perfectly fine. Yet in KoL, you should always know exactly how drunk you are, but your hunger / fullness is supposed to be mysterious. *shrug*
 

Theraze

Active member
Where parsing the charpane becomes important is when using the quantum taco (and, for that matter, Schrodinger's thermos), since you don't know how much it'll affect you until you see what it becomes. But with normal food, mafia's parser should be accurate...
 

roippi

Developer
As Veracity says, there are a few instances where we get double-charged for fullness hits as fullness gets updated from charpane and then we do something in parseResponse.

Bumping charpane fullness parsing to the last thing we do might be enough to fix this, but I haven't had time to look at it.
 

Rinn

Developer
Honestly I would just force mafia users to have that option enabled, but that may not be realistically possible.
 
Last edited:

Winterbay

Active member
Honestly I would just force mafia users to have that option enabled, but that may not be realistically possible.

I find the setting rather pointless and adds information I don't really need (since I can't overeat and I don't really care that much about where my fullness level is) so I would oppose such a change :)
 

lostcalpolydude

Developer
Staff member
I find the setting rather pointless and adds information I don't really need (since I can't overeat and I don't really care that much about where my fullness level is) so I would oppose such a change :)

Is it so unimportant that you don't care about mafia tracking it properly either? Or is it only pointless in the relay browser because mafia knows it anyway?
 

Theraze

Active member
Well, not exactly true, Winterbay. During Bad Moon runs you can overeat by employing gluttony/pride. During any normal run, even if you personally have decided never to ascend again (since you said that YOU can't overeat), you can overeat using quantum tacos...
 

Winterbay

Active member
Is it so unimportant that you don't care about mafia tracking it properly either? Or is it only pointless in the relay browser because mafia knows it anyway?

Well yes actually. It is nice that mafia tracks it in the side pane and all but not really needed.

Well, not exactly true, Winterbay. During Bad Moon runs you can overeat by employing gluttony/pride. During any normal run, even if you personally have decided never to ascend again (since you said that YOU can't overeat), you can overeat using quantum tacos...

My point is that there are no bad effects from overeating, such as there are if you overdrink. You can still adventure even if you're overeaten and as such not a big deal. You may end up in a situation where you can't eat your wanted fortune cookie, but that's about it.
 

Theraze

Active member
True... if you're trying to carefully manage turns and you know that a few more adventures will guarantee another holiday monster, it would be useful to know exactly how much fullness you have so you can decide if it's worth spending the extra 2k for another 3 adventures or something similar, but hey... missed opportunities may never have really been there in the first place, right? :)
 

matt.chugg

Moderator
I think I'd like to look at the fullness counter on the charpane - if enabled - when we login or timein or otherwise refresh state and set our internal variable at that time, and otherwise simply use our own internal idea of what a particular food does to fullness and ignore what the charpane says.

Fullness is given in the JSON response from api.php, was this always there? or only since this update? looking at the commented sample JSON in the code it wasn't there.

This also appears in the JSON even if I have the fullness setting turned OFF in the account settings.

Code:
full":"0"
 

Veracity

Developer
Staff member
Fullness is given in the JSON response from api.php, was this always there? or only since this update? looking at the commented sample JSON in the code it wasn't there.
I think you answered your own question. The sample specifically says "Here's a sample collected on February 7, 2011". Clearly, fullness was not "always there".

This also appears in the JSON even if I have the fullness setting turned OFF in the account settings.
Excellent. We can do this, then:

At login, when we read api.php, set currentFullness.
As now, track fullness when we consume foods.
IGNORE fullness on the CharPane.

I don't suppose there is a "spleen" counter in api.php? It would be nice to update currentSpleenUse at login, too. Probably not, since that is REALLY "not funny". (Although, in my mind, "spleen" might be the ONLY "funny" organ in KoL.)
 

matt.chugg

Moderator
I think you answered your own question. The sample specifically says "Here's a sample collected on February 7, 2011". Clearly, fullness was not "always there".

I'm a dumbass!



I don't suppose there is a "spleen" counter in api.php? It would be nice to update currentSpleenUse at login, too. Probably not, since that is REALLY "not funny". (Although, in my mind, "spleen" might be the ONLY "funny" organ in KoL.)

Afraid not however at a quick glance other new fields compared to the sample are:

"daysthisrun":"6"
"fakehands":0
"stickers":[0,0,0]

in flagconfig:

"lazyinventory":0
fullnesscounter":0
"recalledskills":0
"freedralph":0
"mcd":0


There may be more i'im still looking
 

Veracity

Developer
Staff member
Revision 10207 does that. Thanks, matt.chugg, for discovering that api.php has fullness on it now.
 

Veracity

Developer
Staff member
"daysthisrun":"6"
"fakehands":0
"stickers":[0,0,0]
"recalledskills":0
"freedralph":0
"mcd":0
CDM added these because I asked him to. We use them. Well, not the first one; KoLmafia doesn't care how many days it's been since you ascended.

"lazyinventory":0
fullnesscounter":0
These control KoL's own GUI. We don't need them and don't use them.

There may be more i'im still looking
Look quickly. I updated the sample in ApiRequest.php to one from today. :)
 

matt.chugg

Moderator
"pathname":"" seems new, but I believe we use the integer value for path so doesn't help a lot

only others I can see are KoL GUI related, so of no interest to us
 

adeyke

Member
I really liked that the KoL counter allowed Mafia to have a correct fullness counter after the consumption of new foods and quantum tacos.
 
Top