loathers / garbage-collector

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

[BUG] Failing to set `aabosses` flag under certain circumstances #1824

Closed scud121 closed 8 hours ago

scud121 commented 4 months ago

Before Reporting Mafia and Garbo both up to date

Also, read this.

Describe the bug Script gets confused between digitized and non-digitized embezellers, resuting in the "Your on your own" message from Kolmafia

To Reproduce Running the script reproduces this every time.

Expected behavior To fight embezellers without aborting

Session Log [2453] The Deep Dark Jungle Preference lastEncounter changed from garbage tourist to Knob Goblin Embezzler Encounter: Knob Goblin Embezzler Preference _sourceTerminalDigitizeMonsterCount changed from 3 to 4 Preference relayCounters changed from 2452:Digitize Monster loc= type=wander:watch.gif to Preference relayCounters changed from to 2502:Digitize Monster loc= type=wander:watch.gif Round 0: scud121 wins initiative! Round 1: scud121 executes a macro! KoLmafia thinks it is round 2 but KoL thinks it is round 1 You're on your own, partner. (Macro Aborted ("abort "Expected a digitized Knob Goblin Embezzler, but encountered something else."")) Click here to continue in the relay browser.

Preference _concoctionDatabaseRefreshes changed from 860 to 861 logPreferenceChangeFilter => garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings Preference logPreferenceChangeFilter changed from _lastCombatStarted,libram_savedMacro,maximizerMRUList,testudinalTeachings to garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings hpAutoRecoveryTarget => 0 Preference hpAutoRecoveryTarget changed from 0.0 to 0 mpAutoRecoveryTarget => 0 Preference mpAutoRecoveryTarget changed from 0.0 to 0 allowNonMoodBurning => true Preference allowNonMoodBurning changed from false to true Preference customCombatScript changed from grimoire_macro to garbo CCS set to garbo Autoattack is disabled. Autoattack is disabled. logPreferenceChange => false Preference logPreferenceChange changed from true to false logPreferenceChangeFilter => CCS set to default dontStopForCounters => false hpAutoRecovery => 0 hpAutoRecoveryTarget => 0.75 mpAutoRecovery => 0.25 mpAutoRecoveryTarget => 0.65 betweenBattleScript => BestBetweenBattle.ash currentMood => barf autoTuxedo => false autoPinkyRing => false autoGarish => false libramSkillsSoftcore => all valueOfInventory => 1.8 choiceAdventure1106 => 2 choiceAdventure1108 => 1 choiceAdventure1340 => 0 choiceAdventure1341 => 0 shadowLabyrinthGoal => browser choiceAdventure1324 => 0 choiceAdventure164 => 2 choiceAdventure165 => 2 choiceAdventure166 => 3 choiceAdventure888 => 4 choiceAdventure889 => 3 Encounter: Knob Goblin Embezzler You fought 0 Knob Goblin Embezzler at the beginning of the day, and an additional 0 digitized Knob Goblin Embezzler throughout the day. Good work, probably! Including this, you have fought 38 across all ascensions today Extreme Items: 1 psychoanalytic jar worth 68739 total 1 pulled blue taffy worth 3941 total 1 stench jelly worth 2518 total 1 garbage juice slurpee worth 5 total 1 magical sausage casing worth 10 total 1 How to Avoid Scams worth 50 total This run of garbo, across 2 turns you generated 86,992 meat, with 10,826 raw meat and 76,166 from items So far today, across 23 turns you generated 298,735 meat, with -5,393 raw meat and 304,128 from items JavaScript exception: KoLmafia error: You're on your own, partner. (Macro Aborted ("abort "Expected a digitized Knob Goblin Embezzler, but encountered something else."")) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:29435 (_do) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:29236 (execute) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48091 (execute) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:29156 (run) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48148 (runGarboTasks) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48154 (runGarboQuests) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48617 at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:40384 (withClan) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:40378 (withVIPClan) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48588 at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:40363 (withStash) at file:/C:/Users/chris/Desktop/kol/scripts/garbage-collector/garbo.js:48587 (main)

Additional context I have an awful lot of IoTMs from past years so anything could be causing this.

scud121_20240312.txt

s-k-z commented 4 months ago

I can't determine the reason why auto-attacks are failing on these Knob Goblin Embezzlers.

Normally it auto-attack should execute as long as you get the jump which your logs demonstrate. It's possible that some network errors occured, and the auto-attack submissions were lost in transit. Those errors would not be written to the session log but could lead to this result.

scud121 commented 4 months ago

It's wierd because it seems like mafia is failing to count properly or confusing monsters. To add insult to injury, I'm also getting aborts with a "Failed to Ensure Free run source" and manually adventuring via the Relay browser doesn't fix it.

sery commented 4 months ago

I'm also getting this error.

[12139] Barf Mountain
Preference lastEncounter changed from garbage tourist to Knob Goblin Embezzler
Encounter: Knob Goblin Embezzler
Preference _romanticFightsLeft changed from 3 to 2
Preference relayCounters changed from 12144:Romantic Monster window end loc=* type=wander:rparen.gif:12156:Digitize Monster loc=* type=wander:watch.gif to 12156:Digitize Monster loc=* type=wander:watch.gif
Preference relayCounters changed from 12156:Digitize Monster loc=* type=wander:watch.gif to 12156:Digitize Monster loc=* type=wander:watch.gif:12153:Romantic Monster window begin loc=*:lparen.gif
Preference relayCounters changed from 12156:Digitize Monster loc=* type=wander:watch.gif:12153:Romantic Monster window begin loc=*:lparen.gif to 12156:Digitize Monster loc=* type=wander:watch.gif:12153:Romantic Monster window begin loc=*:lparen.gif:12163:Romantic Monster window end loc=* type=wander:rparen.gif
Round 0: mx indigo wins initiative!
Round 1: Knob Goblin Embezzler takes 10 damage.
Round 1: mx indigo executes a macro!
Preference lastMacroError changed from Macro Aborted ("abort "Expected a digitized Knob Goblin Embezzler, but encountered something else."") to Macro Aborted ("abort")
Preference _concoctionDatabaseRefreshes changed from 841 to 842
Preference logPreferenceChangeFilter changed from _lastCombatStarted,libram_savedMacro,maximizerMRUList,testudinalTeachings to garboEmbezzlerCount,garboEmbezzlerDate,garboEmbezzlerSources,libram_savedMacro,maximizerMRUList,spadingData,testudinalTeachings
Preference hpAutoRecoveryTarget changed from 0.0 to 0
Preference mpAutoRecoveryTarget changed from 0.0 to 0
Preference allowNonMoodBurning changed from false to true
Preference customCombatScript changed from grimoire_macro to garbo
> In fight, trying to get away to return items to stash...
Round 1: mx indigo executes a macro!
Round 1: mx indigo attacks!
Round 2: Knob Goblin Embezzler takes 1188 damage.
Round 2: Flame-ey! showers a clump of hot nuggets onto you. Um. That's not a poop joke. She was carrying them in her purse.
You acquire an item: hot nuggets
Round 2: Hobo-y! climbs up and sits on your shoulder, and hands you some Meat. Huh, where did he find that?
You gain 96 Meat.
Round 2: Knob Goblin Embezzler drops 2 attack power.
Round 2: Knob Goblin Embezzler drops 3 defense.
Round 2: Your opponent writhes as he takes 5 damage from the poison.
Round 2: Knob Goblin Embezzler takes 5 damage.
Round 2: mx indigo wins the fight!
After Battle: You remember a party at KoL Con VII, when you and Lady Defense took turns doing benchpresses with Lord Super's car. Wait, did that really happen?
After Battle: You gain 9 Fortitude
After Battle: A love grub shyly approaches you and hands you some extra Meat.
Preference lovebugsMeatDrop changed from 42 to 43
After Battle: Flame-ey! surveys the scene from atop the throne and sighs.
After Battle: Hobo-y! sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 15347 Meat
After Battle: Goblins like this always have a bottle of beer concealed in their arm.
You acquire an item: Cobb's Knob Wurstbrau
You acquire an item: meat stack
You acquire an item: meat stack
You acquire an item: meat stack
You acquire an item: embezzler's oil
After Battle: You gain 4 Strongness
After Battle: You gain 6 Wizardliness
After Battle: You gain 10 Sarcasm
Preference _stinkyCheeseCount changed from 46 to 47
Preference _pantsgivingCount changed from 37 to 38
Preference lastCopyableMonster changed from garbage tourist to Knob Goblin Embezzler
Preference _concoctionDatabaseRefreshes changed from 842 to 843
You are currently a member of The Consortium of the Syndicate of the Kingdom
Preference _concoctionDatabaseRefreshes changed from 843 to 844
Preference _concoctionDatabaseRefreshes changed from 844 to 845

add to stash: 1 repaid diaper
> Returned repaid diaper to stash in The Consortium of the Syndicate of the Kingdom.
unequip acc1
Preference _concoctionDatabaseRefreshes changed from 845 to 846

add to stash: 1 mafia pointer finger ring
> Returned mafia pointer finger ring to stash in The Consortium of the Syndicate of the Kingdom.
You are currently a member of Cool Guy Crew
Preference _concoctionDatabaseRefreshes changed from 846 to 847
Preference _concoctionDatabaseRefreshes changed from 847 to 848
Preference logPreferenceChange changed from true to false
> You fought 15 Knob Goblin Embezzler at the beginning of the day, and an additional 0 digitized Knob Goblin Embezzler throughout the day. Good work, probably!
> Including this, you have fought 45 across all ascensions today
> Extreme Items:
> 27 meat stack worth 2700 total
> 9 Cobb's Knob Wurstbrau worth 522 total
> 4 gold nuggets worth 400 total
> -2 pulled blue taffy worth -7738 total
> -18 Mountain Stream soda worth -4374 total
> 16 Source essence worth 16 total
> This run of garbo, across 11 turns you generated 168,302 meat, with 175,577 raw meat and -7,275 from items
> So far today, across 35 turns you generated 862,083 meat, with 456,654 raw meat and 405,429 from items

After screwing with the preferences related to digitized monsters, it would still abort on fights with a wandering KGE, but with a generic message. The one thing all my aborts have in common is "KoLmafia thinks it is round 2 but KoL thinks it is round 1"

I also have lots of old IoTMs, but fewer newer ones. I went on hiatus in 2018 and just returned to playing KoL.

Some other examples of aborted KGE fights are attached, as well as my full logs from yesterday and today.

mx_indigo_20240320.txt mx_indigo_20240319.txt

message (1).txt message.txt

senkaku commented 4 months ago

The macro at time I encounter the same issue is as follows.

1: if (monsterid 530) && !gotjump && !(pastround 2);if monsterid 530;if hasskill Sing Along;skill Sing Along;endif;if monsterid 1760;if hasskill Offer Latte to Opponent;skill Offer Latte to Opponent;endif;endif;if monstername angry tourist || monstername garbage tourist || monstername horrible tourist family || monstername Knob Goblin Embezzler || monstername sausage goblin;if !hppercentbelow 25 && monstername sausage goblin;if hascombatitem Time-Spinner;use Time-Spinner;endif;endif;if !hppercentbelow 25 && monstername sausage goblin;if hasskill Micrometeorite;skill Micrometeorite;endif;endif;if !hppercentbelow 25;if hasskill 7273;skill 7273;endif;endif;if !hppercentbelow 25;if hascombatitem porquoise-handled sixgun;use porquoise-handled sixgun;endif;endif;while !hppercentbelow 25 && !pastround 20;use facsimile dictionary;endwhile;endif;if hasskill Furious Wallop;skill Furious Wallop;endif;while !pastround 24 && !hppercentbelow 25 && !missed 1 && !snarfblat 567;attack;endwhile;while hasskill Saucegeyser;skill Saucegeyser;endwhile;while hasskill Weapon of the Pastalord;skill Weapon of the Pastalord;endwhile;while hasskill Cannelloni Cannon;skill Cannelloni Cannon;endwhile;while hasskill Wave of Sauce;skill Wave of Sauce;endwhile;while hasskill Saucestorm;skill Saucestorm;endwhile;while hasskill Northern Explosion && snarfblat 567;skill Northern Explosion;endwhile;while hasskill Lunging Thrust-Smack && !snarfblat 567;skill 1005;endwhile;attack;repeat;endif;abort "Expected a digitized Knob Goblin Embezzler, but encountered something else.";

when tabbed out looks like this

"if (monsterid 530) && !gotjump && !(pastround 2); if hasskill Sing Along; skill Sing Along; endif; if monsterid 1760; if hasskill Offer Latte to Opponent; skill Offer Latte to Opponent; endif; endif; if monstername angry tourist || monstername garbage tourist || monstername horrible tourist family || monstername Knob Goblin Embezzler || monstername sausage goblin; if !hppercentbelow 25 && monstername sausage goblin; if hascombatitem Time-Spinner; use Time-Spinner; endif; endif; if !hppercentbelow 25 && monstername sausage goblin; if hasskill Micrometeorite; skill Micrometeorite; endif; endif; if !hppercentbelow 25; if hasskill 7273; skill 7273; endif; endif; if !hppercentbelow 25; if hascombatitem porquoise-handled sixgun; use porquoise-handled sixgun; endif; endif; while !hppercentbelow 25 && !pastround 20; use facsimile dictionary; endwhile; endif; if hasskill Furious Wallop; skill Furious Wallop; endif; while !pastround 24 && !hppercentbelow 25 && !missed 1 && !snarfblat 567; attack; endwhile; while hasskill Saucegeyser; skill Saucegeyser; endwhile; while hasskill Weapon of the Pastalord; skill Weapon of the Pastalord; endwhile; while hasskill Cannelloni Cannon; skill Cannelloni Cannon; endwhile; while hasskill Wave of Sauce; skill Wave of Sauce; endwhile; while hasskill Saucestorm; skill Saucestorm; endwhile; while hasskill Northern Explosion && snarfblat 567; skill Northern Explosion; endwhile; while hasskill Lunging Thrust-Smack && !snarfblat 567; skill 1005; endwhile; attack; repeat; endif; abort "Expected a digitized Knob Goblin Embezzler, but encountered something else."; "

which looks like its being initialized below in garbo.js line 45228.

name: "Digitize Wanderer", .... combat: new GarboStrategy(function() { return Macro2.meatKill(); }, function() { return Macro2.if_("(monsterid ".concat(globalOptions.target.id, ") && !gotjump && !(pastround 2)"), Macro2.meatKill()).abortWithMsg("Expected a digitized ".concat(SourceTerminal_exports.getDigitizeMonster(), ", but encountered something else.")); })

removing the following from the line seems to have made it work for me && !gotjump && !(pastround 2)

so one of those two conditions is failing for every digitized monster

scud121 commented 4 months ago

I'll give that a whirl after rollover and see if the edit helps me, thanks.

horrible-little-slime commented 4 months ago

Can you check something for me?

While Garbo is in operation (ideally when it's on barf turns, so it's in a more stable state), use the relay browser to navigate to options => combat, and take a screenshot of the state of these checkboxes: image

senkaku commented 4 months ago

Good Timing had it running right when the message came.

garboCombat

scud121 commented 4 months ago

Deleted that snippet and it seems to run mostly ok. however now im getting whinges about free runs sources. Which was already apparantly fixed, so ive no idea why its popping up

horrible-little-slime commented 4 months ago

You can temporarily fix this by enabling "use autoattack against bosses and special monsters". It's TBD why garbo is failing to check this box itself, so this issue will be left open.

scud121 commented 4 months ago

Ahar, thanks very much for that. Now to get it to stop whinging about free run sources.

gausie commented 4 months ago

When you point a finger (complain about an inanimate piece of software "whinging") three point back at you (whinging yourself about totally automated messages from software)

horrible-little-slime commented 1 day ago

May finally be resolved