Bug - Fixed Mafia no longer collects Drink Me potion, pumpkin?

illarion

Member
I would swear Mafia used to collect this automatically. Now, not only does it not seem to do so, but it won't even get a hatter buff from daily deeds I'm currently on r10783, but this has been the case for a goodly number of daily builds - at least a few weeks' worth IIRC.

Furthermore, it no longer seems to automatically collect pumpkins from my garden. (My Prefs->In Ronin garden slot is set to "pumpkin", and I have pumpkins planted).
 

Veracity

Developer
Staff member
You are talking about Breakfast, I assume?

I am in Ronin (HC, actually)
I have "visit clan VIP lounge" checked
I have "peppermint sprout" selected

I am on the third day of this run. I have 3 "DRINK ME" potions in inventory, all collected via breakfast. Additionally, KoLmafia has automatically picked my peppermint every day.

Nothing has changed in Breakfast since the peppermint was changed, I believe.
 

fronobulax

Developer
Staff member
From a run today...

Visiting Looking Glass in clan VIP lounge
You acquire an item: "DRINK ME" potion

I also had hatter buffs available via Daily Deeds. The first thing that comes to mind is does mafia know you have the Clan VIP Lounge key? I once inadvertently put it in my DC and started a HC run and it was unavailable until I finished the run. Another question might be are you clan hopping and perhaps there is something different about lounge contents or access? I suspect this is Not A Bug but I'll let someone else mark it.
 

Terion

Member
For the "normal user" viewpoint, mine has been working fine as well. The only thing I've noticed is that it doesn't automatically run Breakfast after you reincarnate into a new life; after I forgot to harvest my garden on Day 1 one life, I quickly gained the habit of just running Breakfast after I start a new run. Of course, it would also do it if I ever logged out and then later logged in during that day.

(There's probably a setting for that, but for now it's just easiest for me to simply type a quick "breakfast" into the cli after my new life starts.)

One other idea: did the Breakfast checkbox on your login screen for Mafia become unchecked? Mine went unchecked sometime in the past couple weeks, but I figured I just clicked on it by mistake at some point; since I turned it back on, it's stayed.
 

Theraze

Active member
The setting is your postAscension script. :)

And the Breakfast checkbox on my accounts has been going unchecked when I log off, but comes back when I change users again...
 
I've had my mafia set to do breakfast on login for a very long time. Recently that boxed is no longer checked, and remains unchecked.
 

roippi

Developer
There've been some people over on GD that lately have mentioned their breakfast settings going away, too. I've had no such problems myself.
 
My issue with the way breakfast is currently set up, I I have one character with peppermint and one character with pumpkins. Which just means a settings change in my login script I guess. Whatever. I fixed it by just taking patch control from mafia and adding it to my login script.
 

illarion

Member
Interesting - the breakfast checkbox had indeed become unchecked - I'm as confident as I can be that it was not by my hand, though I guess one can never state something like that as an absolute certainty.

Checking it, then restarting Mafia does now have it checked, so hopefully I'm good - I'll keep an eye on it in future, just in case there is something unchecking it rather than my error :)

Thanks and apologies for the wasted time.
 

Veracity

Developer
Staff member
My issue with the way breakfast is currently set up, I I have one character with peppermint and one character with pumpkins. Which just means a settings change in my login script I guess. Whatever. I fixed it by just taking patch control from mafia and adding it to my login script.
And, given that breakfast settings are global, rather than per-character, that is the correct solution.

I could see a case for the settings being per-character. I haven't thought through what the implications would be for existing characters were we to make that change now, though.
 

Theraze

Active member
illarion, I have Breakfast automatically uncheck itself anytime I log out of a character, but then it re-checks itself after changing characters... usually. I had two characters that stayed unchecked for a few days until I manually rechecked them.

Could it be that mafia is unchecking breakfast if it knows that breakfast has already run fully for that character? I only notice the auto-unchecking when using log out...
 

Ethelred

Member
I could see a case for the settings being per-character. I haven't thought through what the implications would be for existing characters were we to make that change now, though.

I happen to think that would be a very nice change and would welcome it.
 

Theraze

Active member
Okay... think I might have come up with a reproducable way to cause this bug.

1) Log in with Breakfast enabled.
2) Log out.
Notice that breakfast is unchecked. If you change characters and change back, it re-checks itself. Temporarily odd, but no bug. However...
3) Log in with Breakfast disabled, because mafia turned it off after step 2.
4) Log out.
Notice that breakfast is still unchecked. If you change characters and change back, it stays off.
 

slyz

Developer
It looks like the getBreakfast setting is a global per-character setting. It is stored like passwords, in GLOBAL_prefs.txt but in the form:
Code:
setting.name = value

In LoginFrame.java, LoginNameComboBox.setPassword() has code to check or uncheck the "Breakfast" box based on the character's setting.

I'm not sure what the course of action should be. I guess getBreakfast is global because it is set at a time where Mafia doesn't know definitively which character it should be associated to. So we need to keep the setting.name.

So we only need to make sure the box is checked according to the getBreakfast.name setting. Maybe adding
PHP:
LoginPanel.this.getBreakfastCheckBox.setSelected( Preferences.getBoolean( lastUsername, "getBreakfast" ) );
around line 254 of LoginFrame.java could do the trick.
 
Last edited:

fronobulax

Developer
Staff member
We have plowed some of this ground before. The workaround suggested last time around was to leave breakfast unchecked and have a login script that called breakfast, or not, based upon which character logged in and what else the character had done. I can think of no reason why the checkbox has to be available before login so this is a candidate for conversion to a per character variable, if I am right. If that is going to happen then it probably should be a separate development effort and apply to more than just breakfast. Note also that tracking clovers gotten (which is part of Breakfast) is on one of the Things That Need To Be Done posts.
 

Theraze

Active member
Well, if for some reason you're trying to avoid the automatic breakfast settings (to check your mana or something before casting), you might not want to follow your normal settings... The issue goes with breakfast being global and the only per-character setting is whether or not you want it all.

The immediate fix would be to not try to update the breakfast display based on whether or not breakfast had run, but to leave it on whatever setting the user had actually requested.
 

slyz

Developer
r10819

The issue goes with breakfast being global and the only per-character setting is whether or not you want it all.
Breakfast is technically a global setting, but there's actually one getBreakfast setting per character (getBreakfast.character_name).
 

Bale

Minion
My issue with the way breakfast is currently set up, I I have one character with peppermint and one character with pumpkins. Which just means a settings change in my login script I guess. Whatever. I fixed it by just taking patch control from mafia and adding it to my login script.

Does your login script contain anything more elegant than this?

PHP:
if(visit_url("campground.php").contains_text("action=garden"))
	cli_execute("garden pick");
 

Theraze

Active member
r10819


Breakfast is technically a global setting, but there's actually one getBreakfast setting per character (getBreakfast.character_name).

Yes, that's what I was trying to say. Badly, apparently. :D

Your breakfast specifics are global. Whether your character wants it is per character.
 
Top