Bug - Fixed Distention pills confuse Mafia re: fullness

Orbrisa

Member
I am using build 9520. I start with an empty stomach, use a distention pill with a chat command, and then eat 8 philosopher's scones (2 fullness each), also with a chat command.

Mafia says "Incrementing fullness by 13 instead of 14 because your stomach was distended." The fullness counter then says 13/15. I have confirmed that I did eat 8 scones (by counting 8 "You gain n adventures messages"). Also, attempting to eat a fortune cookie fails.

If I can supply any more info, let me know. (I looked at the SVN changes and a quick skim suggests nothing has changed that would affect this. If I am wrong please let me know where I can find a tissue to wipe the egg off my face. :)
 

roippi

Developer
I'll try to reproduce, but in general for stuff like this it's really helpful if you copy/paste all relevant CLI output. I guarantee there was something in there that would help me tell you what went wrong.
 

roippi

Developer
I was unable to reproduce your results (starting at 10 fullness and eating three 2-full items, but that shouldn't make a difference). There is some undesirable behavior but it's different from what you reported.

Code:
> use distention pill

Using 1 distention pill...
Finished using 1 distention pill.

> eat 3 igloo pie

(usable quantity of igloo pie (3) is limited to 2 by fullness)
Eating 2 igloo pie...
You gain 9 Adventures
You gain 18 Muscleboundness
You gain 18 Wizardliness
You gain 11 Chutzpah
You lose some of an effect: Got Milk
You gain 10 Adventures
You gain 19 Strongness
You gain 16 Mysteriousness
You gain 10 Cheek
You lose some of an effect: Got Milk
Incrementing fullness by 3 instead of 4 because your stomach was distended.
Finished eating 2 igloo pie.

> eat igloo pie

Eating 1 igloo pie...
You gain 11 Adventures
You gain 20 Fortitude
You gain 15 Wizardliness
You gain 10 Cheek
You lose some of an effect: Got Milk
Finished eating 1 igloo pie.

Edit: this bug is particularly difficult to avoid, because of the way UseItemRequest works. And because there's currently no way for mafia to know that a distention pill is active, though that's trivial to add.

Edit2: oh. you used chat commands. I've literally never used those before. Well, I'll try to reproduce after rollover. Again, copy/pasting your CLI output is key.
 
Last edited:

Orbrisa

Member
You appear to have figured out the issue, but here's what you can see from my session log. (I've closed Mafia and restarted my computer since making the original post.)

Code:
use 1 distention pill

eat 7 philosopher's scone
You gain 4 Adventures
You gain 8 Strongness
You gain 9 Magicalness
You gain 10 Sarcasm
You gain 5 Adventures
You gain 8 Muscleboundness
You gain 11 Enchantedness
You gain 10 Cheek
You gain 5 Adventures
You gain 9 Strengthliness
You gain 8 Magicalness
You gain 10 Sarcasm
You gain 5 Adventures
You gain 9 Beefiness
You gain 11 Mysteriousness
You gain 8 Roguishness
You gain 4 Adventures
You gain 8 Fortitude
You gain 8 Magicalness
You gain 9 Roguishness
You gain 4 Adventures
You gain 9 Fortitude
You gain 8 Magicalness
You gain 9 Sarcasm
You gain 4 Adventures
You gain 9 Fortitude
You gain 9 Magicalness
You gain 9 Sarcasm
You gain 5 Adventures
You gain 9 Fortitude
You gain 8 Mysteriousness
You gain 9 Chutzpah
Incrementing fullness by 13 instead of 14 because your stomach was distended.

I know the output says "eat 7," but I promise, I typed "/eat 8" and consumed 8. (As you can verify by counting the "You gain n adventures" lines.)
 
Last edited:

roippi

Developer
The gCLI probably had the (usable quantity of n (x) is limited to y by fullness) line. I don't know, I use mafia's eat, not chat /eat.

I'm not sure whether to consider this a bug with /eat, or with multi-use fullness limiters under distention pills, or both. Fixing the limiter will stop this from happening, but it's bad that mafia did not parse that last item that you ate.

This goes back to what Veracity said in another thread - UseItemRequest really needs to be refactored so that fullness is set not when you send the request, but when you receive the response.
 

Orbrisa

Member
I replicated this today in 9532. CLI output is pretty much the same, except that it says "Ingesting some philosopher's scones" rather than "eat 7 philosopher's scone". I also have a debug log if that would be helpful.

Code:
Using 1 distention pill.
Ingesting some philosopher's scones.
You gain 5 Adventures
You gain 9 Fortitude
You gain 9 Wizardliness
You gain 10 Roguishness
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 8 Strongness
You gain 9 Enchantedness
You gain 8 Chutzpah
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 9 Fortitude
You gain 10 Mysteriousness
You gain 10 Sarcasm
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 8 Beefiness
You gain 10 Enchantedness
You gain 10 Roguishness
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 10 Strengthliness
You gain 8 Enchantedness
You gain 10 Cheek
You lose some of an effect: Got Milk
You gain 7 Adventures
You gain 8 Beefiness
You gain 9 Mysteriousness
You gain 8 Cheek
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 10 Strengthliness
You gain 8 Enchantedness
You gain 8 Sarcasm
You gain a Moxie point!
You lose some of an effect: Got Milk
You gain 6 Adventures
You gain 9 Beefiness
You gain 9 Magicalness
You gain 9 Chutzpah
You lose an effect: Got Milk
Incrementing fullness by 13 instead of 14 because your stomach was distended.

It listed my fullness as 13/15. I used the chat command to try to eat a fortune to confirm that I didn't have any fullness left, and got the following in the CLI:

Code:
Ingesting a fortune cookie.
[COLOR="red"]Consumption limit reached.[/COLOR]

And on a completely OT note, <3 Math Man. Your avatar makes me so nostalgic.
 

Orbrisa

Member
I figured I'd try this in Mafia to see what happened, using build 9577. First I tried with the item manager; I enqueued a distention pill and then 8 scones, and clicked the consume button.

Code:
Using 1 distention pill...
Finished using 1 distention pill.
(usable quantity of philosopher's scone (8) is limited to 7 by fullness)

Verified in the relay browser that a distention pill had already been used, by attempting to use another one with a chat command. Got an error message from KoL indicating that it had. ("Your stomach can't take any more abuse today.")

Typed "eat 8 scone" in the CLI.

Code:
(usable quantity of philosopher's scone (8) is limited to 7 by fullness)
Eating 7 philosopher's scone...
[yields snipped]
Incrementing fullness by 13 instead of 14 because your stomach was distended.
Finished eating 7 philosopher's scone.

Fullness listed as 13/15. I typed "eat scone" and consumed the eighth scone without any errors.

I'll probably be ascending today and not be able to do any more poking at this until I next break the prism, but thanks for taking a look at this. (I realize that there are relatively few people who will be affected by this, and that it's hardly critical or OMGbroken. So thanks for your time.)
 

nworbetan

Member
I just ran into a situation similar enough to this that it might not even be worth bumping this thread, but maybe a slightly different situation may help narrow down what could be done?

Using chat commands, I filled my stomach up, then used a distention pill, then used a fortune cookie. Now mafia says I have 14/15 fullness used. Here's the entire cli output:

Code:
Using 1 milk of magnesium.
You acquire an effect: Got Milk (duration:     20 Adventures)
Ingesting a queen cookie.
You gain 7 Adventures
You     gain 27 Muscleboundness
You gain 31 Magicalness
You gain 40 Smarm
You     acquire an effect: Towering Strength (duration: 30 Adventures)
You     acquire an effect: Mitre Cut (duration: 30 Adventures)
You acquire an     effect: Knightlife (duration: 30 Adventures)
You acquire an effect: The     Royal We (duration: 30 Adventures)
You lose some of an effect: Got Milk
Using     1 distention pill.
Purchasing 1 fortune cookie.
You acquire an item:     fortune cookie
You spent 40 Meat
You gain 1 Adventure
Incrementing     fullness by -1 instead of 0 because your stomach was distended.
Lucky     numbers: 185, 188, 43
Lucky number 43 ignored - too soon to be a     semirare.

I actually noticed this yesterday when I used a distention pill to squeeze a 4 fullness food into my last 3 stomach capacity. I didn't get the cli output, but copy/paste from the log file may be better than nothing:

Code:
use 1 milk of magnesium
You acquire an effect: Got Milk (duration: 20 Adventures)


buy 1 fortune cookie for 40 each from Market Demon
You acquire an item: fortune cookie
You spent 40 Meat


eat 1 fortune cookie
You gain 2 Adventures
You lose some of an effect: Got Milk
Lucky numbers: 184, 222, 93


use 1 distention pill


eat 0 spectral pickle
You gain 24 Adventures
You gain 54 Beefiness
You gain 74 Enchantedness
You gain 51 Roguishness
You gain a Moxie point!
You lose some of an effect: Got Milk
Incrementing fullness by -1 instead of 0 because your stomach was distended.

Edit: Forgot to mention that I'm using r9832.
 

roippi

Developer
Definitely some sort of problem with chat /eat. "Incrementing fullness by -1 instead of 0 because your stomach was distended."

That "eat 0 spectral pickle" line is interesting.
 

slyz

Developer
Here is another strange occurrence. I'm leaving the gCLI output here for further reference:

At 0 fullness. I enqueued a distention pill and 3 spectral pickles (4 fullness) in the Item Manager, then ate:
Code:
Using 1 distention pill...
Finished using 1 distention pill.
Eating 3 spectral pickle...
You gain 25 Adventures
You gain 67 Beefiness
You gain 68 Mysteriousness
You gain 67 Cheek
You gain 3 Fullness
You lose some of an effect: Got Milk
You gain 25 Adventures
You gain 66 Strongness
You gain 62 Enchantedness
You gain a Mysticality point!
You gain 75 Cheek
You gain 4 Fullness
You lose some of an effect: Got Milk
You gain 29 Adventures
You gain 70 Beefiness
You gain 53 Mysteriousness
You gain 65 Sarcasm
You gain 4 Fullness
You lose some of an effect: Got Milk
Incrementing fullness by 11 instead of 12 because your stomach was distended.
Finished eating 3 spectral pickle.

> get currentFullness

10
After refreshing the charpane, mafia correctly showed 11 fullness.

EDIT: maybe there was a charpane refresh before UseItemRequest removed one fullness?
 
Last edited:

roippi

Developer
I really have no idea how to get to 10 from that combination of consumptions. Maybe some new interaction with updating fullness from the charpane?
 

Orbrisa

Member
Another data point in case it helps ... I've been eating spectral pickles (4 fullness). I eat 3 from the CLI, then I use a distention pill from the CLI, then I eat another pickle from the CLI.

Today I happened to notice that in the Mafia window, it showed my fullness as 16 for a second. Then the CLI output was:

Incrementing fullness by 3 instead of 4 because your stomach was distended.

Now my fullness is showing as 14/15.

I then refreshed the charpane, and Mafia automatically corrected its fullness to 15/15.

Not sure if it's worthwhile to note this here, but while we're talking about distention pills ... I believe that if the fullness of the next thing you eat is reduced by 1 due to distention pill use, then you lose turns of Got Milk based on the reduced value, not the normal value. Mafia goes based on the normal value, not the reduced one, and warns you that Got Milk will run out before you're done eating even if it won't. (This is unlikely to really hurt anything, I suppose, but I figured I'd throw it out there.)
 

roippi

Developer
Hmm. I may need to refactor some things, not really happy with the way that's working.

I'll look at it when I get some free time this weekend.
 

PsyMar

Member
I had this happen, and I was not using chat /eat -- it started happening to me right after I enabled the fullness display in KoL; prior to that it was not happening. Also, if I adventured after this happened, the fullness counter would be fixed in mafia.
 

roippi

Developer
Ah, I know what's going on. RegisterRequest always increments fullness normally, and parseResponse rolls it back one if we detect the distention effect. However, there is a charpane refresh that happens before parseResponse gets to roll it back. So the charpane gets parsed, which "fixes" the fullness, and then parseResponse "fixes" it again.

I welcome suggestions how to deal with this. Should we change order of operations so that parseResponse operates before charpane parsing? Or is there a better way.
 

slyz

Developer
I guess there are a number of cases where Mafia can be fooled this way (each occurrence of "currentFullness" in parseConsumption() ).
 

Veracity

Developer
Staff member
Ah, I know what's going on. RegisterRequest always increments fullness normally, and parseResponse rolls it back one if we detect the distention effect. However, there is a charpane refresh that happens before parseResponse gets to roll it back. So the charpane gets parsed, which "fixes" the fullness, and then parseResponse "fixes" it again.

I welcome suggestions how to deal with this. Should we change order of operations so that parseResponse operates before charpane parsing? Or is there a better way.
This is probably the same issue as in Incorrect fullness for sushi, in which we double count sushi fullness if the charpane fullness counter is active.

We probably should make a new Bug/New Content report for dealing with KoL's fullness dislay in the charpane
 

Orbrisa

Member
Okay. Finally got around to downloading a new build. (Sorry, I'm lazy about this when not actively ascending.) In 10220 it is indeed fixed, in terms of not getting confused about fullness values. However, it does still say when I go to eat scone 8 (after using the distention pill) that Got Milk will run out before I finish eating scone 8 when it won't, because of the way that this seems to work. (i.e., yes, there is only 1 turn of Got Milk left, which would not be enough for a scone normally, since they are 2 fullness, but with a distention pill they are only 1 fullness, and so 1 turn of Got Milk is enough.)

Thanks, slyz and Veracity, for taking a look at this. (And Roippi. Not exactly sure whose work went into this revision.)
 
Last edited:

slyz

Developer
(i.e., yes, there is only 1 turn of Got Milk left, which would not be enough for a scone normally, since they are 2 fullness, but with a distention pill they are only 1 fullness, and so 1 turn of Got Milk is enough.)

Thanks for pointing that out. Fixed in r10221.
 
Top