soolar / sl_ascend

An ascension script for kolmafia
11 stars 5 forks source link

woven baling wire bracelets infinite loop and other issues #328

Open taltamir opened 4 years ago

taltamir commented 4 years ago

I occasionally get an infinite loop where sl_ascend will equip then replace woven baling wire bracelets repeatedly.

The infinite loop form:

Encounter: Dr. Gordon Stuart, a Scientist

[872] Dr. Gordon Stuart's Science Tent
Encounter: Eldritch Tentacle named Ggggrrggllblglssssbrghbrgh
Round 0: taltamir wins initiative!
Round 1: You lose 1 hit point
Round 1: You lose 6 hit points
slAdvBypass has encountered a combat! (param: 'sl_combatHandler')
Round 1: taltamir executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You're on your own, partner.
Click here to continue in the relay browser.

Round 1: taltamir casts SAUCEGEYSER!
Round 2: Eldritch Tentacle takes 85 damage.
Round 2: Eldritch Tentacle takes 10 damage.
Round 2: Bubediah pulls out a tiny bowling ball and hurls it at your opponent, striking it for 6 damage.
Round 2: Eldritch Tentacle takes 6 damage.
Round 2: You lose 34 hit points
Round 2: taltamir casts SAUCEGEYSER!
Round 3: Eldritch Tentacle takes 85 damage.
Round 3: Eldritch Tentacle takes 11 damage.
Round 3: Bubediah pulls out a tiny bowling ball and hurls it at your opponent, striking it for 5 damage.
Round 3: Eldritch Tentacle takes 5 damage.
Round 3: taltamir wins the fight!
After Battle: You look to the sky just in time to catch a glimpse of a falling star. Lucky! Well, not really lucky, because you totally knew it was going to be there.
After Battle: Some extra meat has appeared in your pouch when you weren't looking. Presumably Mysterious Glitter's doing.
You gain 13 Meat.
After Battle: Bubediah stomps around in a circle, its buckles jingling.
You acquire an item: eldritch effluvium
You acquire an item: eldritch effluvium
After Battle: You gain 31 Strengthliness
After Battle: You gain 79 Wizardliness
After Battle: You gain 42 Smarm
This combat did not cost a turn
You acquire an effect: Soulerskates (10)
Soul Rotation was successfully cast.
You gain 150 Mana Points
Soul Food was successfully cast.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
KoLmafia declares world peace.
Equipment changed.

What happened here is, it started tent tentacle fight, didn't know what to do, so i manually killed it. then it tried to do after combat script, switching back and forth between pledge pin and the bracelets (because the bracelets give discount on casting spells I think), Then I manually aborted via esc key

There is also the repeat loop that is not infinite when it does something like

equip acc3 woven baling wire bracelets

cast 1 Rage of the Reindeer
You acquire an effect: Rage of the Reindeer (10)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Spiky Shell
You acquire an effect: Spiky Shell (5)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Scarysauce
You acquire an effect: Scarysauce (5)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Jalapeño Saucesphere
You acquire an effect: Jalapeño Saucesphere (5)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Ghostly Shell
You acquire an effect: Ghostly Shell (5)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Walberg's Dim Bulb
You acquire an effect: Walberg's Dim Bulb (10)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Springy Fusilli
You acquire an effect: Springy Fusilli (10)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Blubber Up
You acquire an effect: Blubbered Up (10)

equip acc3 FantasyRealm G. E. M.

equip acc3 woven baling wire bracelets

cast 1 Tenacity of the Snapper
You acquire an effect: Tenacity of the Snapper (5)

Where it repeatedly does: equip baling wire bracelet cast buff unequip baling wire bracelet repeat to cast multiple buffs.

It should instead switch to the bracelet, cast all the buffs it wants at once, then equip the next thing.

Sometimes it goes back and forth 3-4 times before deciding to cast the buff

taltamir commented 4 years ago

another instance of the infinite loop, this time I did not interfere in combat, sl_ascend handled it entirely on its own

Visit to The Snojo: The X-32-F Combat Training Snowman in progress...

[877] The X-32-F Combat Training Snowman
Encounter: the X-32-F Combat Training Snowman
Round 0: taltamir wins initiative!
Round 1: You lose 1 hit point
sl_combatHandler: 0
Round 1: taltamir casts CURSE OF WEAKSAUCE!
Round 2: X-32-F Combat Training Snowman takes 34 damage.
Round 2: X-32-F Combat Training Snowman drops 4 attack power.
Round 2: X-32-F Combat Training Snowman drops 5 defense.
Round 2: Gollace pulls out a tiny bowling ball and hurls it at your opponent, striking it for 10 damage.
Round 2: X-32-F Combat Training Snowman takes 10 damage.
Round 2: taltamir casts MICROMETEORITE!
Round 3: X-32-F Combat Training Snowman drops 6 attack power.
Round 3: X-32-F Combat Training Snowman drops 8 defense.
Round 3: Gollace climbs up and sits on your shoulder, and hands you some Meat. Huh, where did he find that?
You gain 73 Meat.
Round 3: X-32-F Combat Training Snowman takes 36 damage.
Round 3: X-32-F Combat Training Snowman drops 2 attack power.
Round 3: X-32-F Combat Training Snowman drops 4 defense.
Round 3: Gollace pulls out a tiny bowling ball and hurls it at your opponent, striking it for 10 damage.
Round 3: X-32-F Combat Training Snowman takes 10 damage.
Round 3: taltamir casts COWBOY KICK!
Round 4: X-32-F Combat Training Snowman takes 14 damage.
Round 4: Gollace's bells jingle merrily.
Round 4: X-32-F Combat Training Snowman takes 35 damage.
Round 4: X-32-F Combat Training Snowman drops 5 attack power.
Round 4: X-32-F Combat Training Snowman drops 3 defense.
Round 4: Gollace pulls out a tiny bowling ball and hurls it at your opponent, striking it for 10 damage.
Round 4: X-32-F Combat Training Snowman takes 10 damage.
Round 4: taltamir wins the fight!
After Battle: A love stag beetle brushes up against your ankle affectionately.
After Battle: You gain 5 Fortitude
After Battle: Some extra meat has appeared in your pouch when you weren't looking. Presumably Mysterious Glitter's doing.
You gain 14 Meat.
After Battle: You gain 8 Beefiness
After Battle: You gain 34 Wizardliness
After Battle: You gain 7 Roguishness
You gain 4 Soulsauce
This combat did not cost a turn

Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
Equipment changed.
Putting on bejeweled pledge pin...
Equipment changed.
Putting on woven baling wire bracelets...
KoLmafia declares world peace.
jaspercb commented 4 years ago

This is pretty baffling. If you ever notice this happening again, can you abort the loop and record a few stack traces?

taltamir commented 4 years ago

It was happening repeatedly, the only reason it stopped happening is that i put the woven baling wire bracelets in my display case so it couldn't be used.

worth noting that woven baling wire bracelets are the reward for doing a hippy sidequest in the frat-hippy war, and that is almost never done since frat is faster than hippies. Also, I forgot to mention, on 2019-08-22 I was doing a 2crs run, as a sauceror, with vole sign. normal (not hardcore).

I think it was trying to equip them for the MP discount, as can be seen in the non infinite loop. However it was not taking into account that they do not give an MP discount in 2crs

I will also try to reproduce the problem and run a stack trace