Bug - Not A Bug Mafia loses effects

ckb

Minion
Staff member
In the past few days (since 2015 I think, on r15102), I have has an issue where Mafia sometimes loses awareness of all my effects, and cannot recover them. Intrinsic effects still seem to be in the effect list, but no others.

This is a problem, because if I try to cast a buff on myself, Mafia will continue until it thinks I have succeeded. So 'cast 3 Smooth Movement' will keep casting until it thinks I have 30 turns of smooth movement.
Mafia continues to try and cast, and still reports nothing. Then I exit and log back in, and I have 14,000 turns of the effect.

This has happened a few times in the last few days. I do not know why. logging out and back in seems to fix it. I will try and figure out a repeatable way to reproduce this. Mafia does not kick out any debug logs. I see nothing weird in the session logs.

Edit - this just happened again. Mafia only reports my intrinics in 'Active Effects'. Refresh session does not fix this.
Also, my effects are not reported in the relay browser either in the char pane. Casting a buff from the skills page reports that I am successful, but it does not show up in the char pane effects list.
 
Last edited:

Veracity

Developer
Staff member
This is a problem, because if I try to cast a buff on myself, Mafia will continue until it thinks I have succeeded. So 'cast 3 Smooth Movement' will keep casting until it thinks I have 30 turns of smooth movement.
I see no code to "cast until it thinks you have succeeded." What I see is "if you ask to use a skill 3 times, it will loop up to 3 times, depending on MP cost of the skill and your maximum MP." There is no code to look at your effects and thereby decide whether you have succeeded.

Let's see the part of your session log. For one of my characters, I see something like this:

cast 3 Leash of Linguini
You acquire an effect: Leash of Linguini (duration: 30 Adventures)
That's it. Note that this character has enough maximum MP to do it all in one cast, so that's what it did.
 

lostcalpolydude

Developer
Staff member
I suspect that this is a KoL bug that others have also reported, and I also suspect the missing piece here is a mood or something that really wants you to have that effect active. If you are seeing effects in vanilla KoL but not mafia (see it in vanilla, then check in mafia, to rule out a case of logging out and back in fixing things on KoL's end), then come back.
 

fronobulax

Developer
Staff member
I have not tried to reproduce this but it may support that something is not quite right. As far as I know the only thing that should be casting these is my mood.

[ default ]
gain_effect beaten up => abort
gain_effect just the best anapests => uneffect Just the Best Anapests
lose_effect drescher's annoying noise => cast 1 drescher's annoying noise
lose_effect leash of linguini => cast 1 leash of linguini
lose_effect pasta oneness => cast 1 manicotti meditation
lose_effect shield of the pastalord => cast 1 shield of the pastalord

I noticed that I was BeatenUp. I ignored the between battle failure reported and adventured in the relay browser. I noticed anapests was not removed. I did this for three turns (total) and then saw anapests was removed. A portion of the session log is below and it does seem to show that something cast parts of my mood more than needed.

cast 1 Drescher's Annoying Noise
You acquire an effect: Drescher's Annoying Noise (duration: 20 Adventures)

cast 1 Leash of Linguini
You acquire an effect: Leash of Linguini (duration: 10 Adventures)

cast 1 Manicotti Meditation
You acquire an effect: Pasta Oneness (duration: 5 Adventures)

cast 1 Shield of the Pastalord
You acquire an effect: Shield of the Pastalord (duration: 10 Adventures)

cast 1 Drescher's Annoying Noise
You acquire an effect: Drescher's Annoying Noise (duration: 20 Adventures)

cast 1 Leash of Linguini
You acquire an effect: Leash of Linguini (duration: 10 Adventures)

cast 1 Manicotti Meditation
You acquire an effect: Pasta Oneness (duration: 5 Adventures)

cast 1 Shield of the Pastalord
You acquire an effect: Shield of the Pastalord (duration: 10 Adventures)

[866143] The Deep Dark Jungle
Encounter: Mercenary of Fortune
Round 0: fronobulax wins initiative!
You lose 3 hit points
> WHAM: Running SmartStasis
> WHAM: Starting evaluation and performing of attack
> WHAM: We are going to 1-shot with Weapon of the Pastalord.
Round 1: fronobulax executes a macro!
Round 1: fronobulax casts WEAPON OF THE PASTALORD!
Round 2: Mercenary of Fortune drops 3 attack power.
Round 2: Mercenary of Fortune drops 3 defense.
Round 2: fronobulax wins the fight!
You acquire an item: specialty ammo bandolier
You acquire an item: Coinspiracy
You gain a Muscle point!
You gain a Mysticality point!
You gain a Moxie point!

cast 1 Drescher's Annoying Noise
You acquire an effect: Drescher's Annoying Noise (duration: 20 Adventures)

cast 1 Leash of Linguini
You acquire an effect: Leash of Linguini (duration: 10 Adventures)

cast 1 Manicotti Meditation
You acquire an effect: Pasta Oneness (duration: 5 Adventures)

cast 1 Shield of the Pastalord
You acquire an effect: Shield of the Pastalord (duration: 10 Adventures)

[866144] The Deep Dark Jungle
Encounter: Mercenary of Fortune
Round 0: fronobulax wins initiative!
You lose 3 hit points
> WHAM: Running SmartStasis
> WHAM: Starting evaluation and performing of attack
> WHAM: We are going to 1-shot with Weapon of the Pastalord.
Round 1: fronobulax executes a macro!
Round 1: fronobulax casts WEAPON OF THE PASTALORD!
Round 2: Mercenary of Fortune drops 4 attack power.
Round 2: Mercenary of Fortune drops 5 defense.
Round 2: fronobulax wins the fight!
You acquire an item: Coinspiracy
You gain a Muscle point!
You gain a Mysticality point!
You gain a Moxie point!

cast 1 Drescher's Annoying Noise
You acquire an effect: Drescher's Annoying Noise (duration: 20 Adventures)

cast 1 Leash of Linguini
You acquire an effect: Leash of Linguini (duration: 10 Adventures)

cast 1 Manicotti Meditation
You acquire an effect: Pasta Oneness (duration: 5 Adventures)

cast 1 Shield of the Pastalord
You acquire an effect: Shield of the Pastalord (duration: 10 Adventures)

uneffect Just the Best Anapests
> Restoring HP! Currently at 6811 of 33357 HP, 10907 of 63120 MP, current meat: 690804 ... Target HP = 33357.

It could be because of anapests, the abort on neaten up or something else.

r15121 with some test code that should not have effected this.
 

ckb

Minion
Staff member
If you are seeing effects in vanilla KoL but not mafia (see it in vanilla, then check in mafia, to rule out a case of logging out and back in fixing things on KoL's end), then come back.

My casting loop is a result of casting inside a while (have_effect()) loop. Not a casting issue per se, but definitely a have_effect() issue.

When this does happen, there are no effects viable on the charpane (other than intrinsic) or in the 'Active Effects' Mafia window. This is with NO relay scripts. also, no moods set. also, no anapests.
Logging out and logging back in fixes this problem (I see my effects correctly).
Logging in without Mafia shows my effects correctly.

I will try more detailed investigation as I have time (likely tomorrow).
 

Veracity

Developer
Staff member
OK, do this next time it happens.

open the relay browser (if not already open).
turn on debugging
click the refresh icon at the bottom of the green charpane in the GUI (this submits api.php)
click the "refresh" link KoLmafia adds at the bottom the charpane in the Relay Browser (this submits charpane.php).
turn off debugging
post the log here

Thanks.
 

lostcalpolydude

Developer
Staff member
This is a KoL bug. Logging out and back in, and spending 1 turn doing stuff (I think anything will do?) should fix things.
 
Top