loathers / garbage-collector

Script for farming meat (and garbage) in 2003 web RPG Kingdom of Loathing
25 stars 57 forks source link

Garbo keeps trying to look up trainset items during a fight #1517

Closed RooftopTal closed 1 year ago

RooftopTal commented 1 year ago

Garbo keeps failing with a trace similar to the one posted below. Essentially:

  1. Garbo starts a fight
  2. The trainset drops an item; e.g. bottle of gin, vinyl ore, etc.
  3. Garbo tries to look up the item dropped
  4. Garbo fails, crashes, and has to be restarted

This happened on the most up to date version of kolmafia as of posting this (SHA id: 89601d425dd572774903c2d915d99dca341b1837).

garbo version prints out:

> garbo version

Using adventure value 4000.
Skipping version check for custom build

...so I ran:

git delete garbage-collector
git checkout loathers/garbage-collector.git release

Today, 20/8/2023.

Example of error:


Visit to Speakeasy: An Unusually Quiet Barroom Brawl in progress...

[3774] An Unusually Quiet Barroom Brawl
Preference lastEncounter changed from undercover prohibition agent to traveling hobo
Encounter: traveling hobo
Preference _lastCombatStarted changed from 20230820143635 to 20230820143755
Round 0: captain yaksworth wins initiative!
Preference cosmicBowlingBallReturnCombats changed from 25 to 24
Round 1: Your toy train moves ahead to the Grain Silo. You spot some fermented grains (or grapes, or whatever) sitting on the loading dock and grab them.
Preference trainsetPosition changed from 2531 to 2532
You acquire an item: bottle of gin (2)
Preference lastCopyableMonster changed from undercover prohibition agent to traveling hobo
Preference _lastCombatWon changed from true to false

Preference _concoctionDatabaseRefreshes changed from 555 to 556
Searching for "bottle of gin"...
mall.php: redirected to a fight page.
logPreferenceChange => false
Preference logPreferenceChange changed from true to false
logPreferenceChangeFilter =>
CCS set to default
(but battle action is currently set to attack with weapon)
autoSatisfyWithCoinmasters => false
dontStopForCounters => false
hpAutoRecoveryTarget => 1
mpAutoRecoveryTarget => 0.3
hpAutoRecoveryItems => free rest;scroll of drastic healing;cannelloni cocoon;relaxing hot tub;filthy poultice;gauze garter;tongue of the walrus;tiny house
currentMood => basic
autoTuxedo => false
autoPinkyRing => false
autoGarish => false
valueOfInventory => 1.8
choiceAdventure1106 => 0
choiceAdventure1107 => 0
choiceAdventure1340 => 0
choiceAdventure1341 => 0
choiceAdventure1470 => 1
choiceAdventure1473 => 3
choiceAdventure1474 => 1
shadowLabyrinthGoal => browser
choiceAdventure1324 => 0
Encounter: traveling hobo
You fought 0 KGEs at the beginning of the day, and an additional 0 digitized KGEs throughout the day. Good work, probably!
Including this, you have fought 0 across all ascensions today
You are currently in a fight.
Extreme Items:
1 pink candy heart worth 1845 total
2 bottle of gin worth 70 total
2 bottle of gin worth 70 total
1 pink candy heart worth 1845 total
This run of garbo, you generated 1,915 meat, with 0 raw meat and 1,915 from items
So far today, you generated -245,569 meat, with -295,394 raw meat and 49,825 from items
JavaScript exception: KoLmafia error: mall.php: redirected to a fight page. (file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js#33203)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:33203 (f)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:34859 (freeFights)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:40529
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:24321 (withClan)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:24315 (withVIPClan)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:40510
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:24300 (withStash)
at file:/C:/work/KoL/kolmafia/scripts/garbage-collector/garbo.js:40509 (main)
``
RooftopTal commented 1 year ago

As a side note, I "fixed" this by manually removing all train set drops, at which point it was just looping the speakeasy.

This seems non-optimal, but I have no idea if its relevant, but here's the session log just in case.

captain_yaksworth_20230820.txt

horrible-little-slime commented 1 year ago

The actual issue here is that combats are not being resolved appropriately and that combat handling is broken in a bizarre and profound way.

docrostov commented 1 year ago

do you have any scripts that run mid-combat in some way? one dev smartly suggested this may be due to a spading script or a mood script that's activating and cutting off garbo's autoattack in some way. this is definitely a weird one, not entirely sure what is going on. but as the czar of garbo noted, it's broken in a bizarre and profound way.

RooftopTal commented 1 year ago

@docrostov - none that I can think of, but I have been able to run the script from a completely fresh mafia install today, which does mean its specific to that mafia setup, rather than anything wider.

I'll slowly add new changes and see what makes a difference; I'm just don't think I added anything new to Mafia recently. Could be that I have an older script that got broken by an update?

Either way, if this is a bug, it's a niche one. Happy for you to close, otherwise I can post what breaks it if I manage to catch it!

docrostov commented 1 year ago

great -- closing the issue, if something like this recurs please let us know. have a good day!