Results 1 to 7 of 7

Thread: NPE when using Macrometeorite or CHEAT CODE: Replace Enemy in a CCS

  1. #1
    Junior Member
    Join Date
    May 2019
    Posts
    7

    Default NPE when using Macrometeorite or CHEAT CODE: Replace Enemy in a CCS

    KolMafia version 20.4, build 20201

    I'm getting a Null Pointer Exception when using Macrometeorite or CHEAT CODE: Replace Enemy in a CCS. Stack traces are attached -- the first trace was raised during a custom ASH script run (dresses up, adventures in the Frat House, executes a manually-generated CCS script that does an Extract Jelly and then replaces the enemy, over and over) which dropped me into "Round 2" of the fight (I suspect it was not actually round 2). The second and third trace were me trying to use Macrometeorite from the skill menu in the web interface.

    Here is the mafia log trace:
    Code:
    ----------------------------------------------------------------------------------------------------
    > grindJellyWithEnemyReplacement (true, true, sleaze jelly, true);
    
    Putting Wudolph the Robortender back into terrarium...
    Taking Bogarth the Space Jellyfish out of terrarium...
    Mood swing complete.
    RECOMMENDING BANISHER: Throw Latte on Opponent
    Maximizer: +combat, 0.1 item, -equip Kramco Sausage-o-Matic™, -equip "i voted" sticker, +equip Powerful Glove, +equip latte lovers member's mug, +equip Fourth of May Cosplay Saber, +equip mafia thumb ring, -equip broken champagne bottle, +equip pantogram pants, -familiar
    Maximizing...
    32011 combinations checked, best score 54.00
    68543 combinations checked, best score 54.00
    86112 combinations checked, best score 54.00
    Putting on bounty-hunting helmet...
    Equipment changed.
    Holding latte lovers member's mug...
    Equipment changed.
    Putting on cod cape...
    Equipment changed.
    Putting on "Remember the Trees" Shirt...
    Equipment changed.
    Putting on mafia thumb ring...
    Equipment changed.
    Putting on Powerful Glove...
    Equipment changed.
    Putting on Ass-Stompers of Violence...
    Equipment changed.
    Maximizer: +combat, 0.1 item, -equip Kramco Sausage-o-Matic™, -equip "i voted" sticker, +equip Powerful Glove, +equip latte lovers member's mug, +equip Fourth of May Cosplay Saber, +equip mafia thumb ring, -equip broken champagne bottle, +equip pantogram pants, -familiar
    Maximizing...
    13920 combinations checked, best score 54.00
    Saving outfit: dressupSavedEquipSet
    Outfit saved
    Mood swing complete.
    
    [198] Frat House
    Encounter: Orcish Frat Boy
    Round 0: TQuilla wins initiative!
    Round 1: You lose 1 hit point
    Round 1: Bogarth drops onto your foe's head like a big gloopy helmet, and sucks out some of their life essences. This naturally makes them a little weak, physically speaking.
    Round 1: Orcish Frat Boy (Pledge) drops 36 attack power.
    Round 1: Orcish Frat Boy (Pledge) drops 36 defense.
    executing script: if !monstername "beefy bodyguard bat" && !monstername "sabre-toothed lime" && !monstername "dairy ooze";pickpocket;endif;sub pgMain; if !times 10; skill extract jelly; skill CHEAT CODE: Replace Enemy; call pgMain; endif; endsub; call pgMain; sub macroMain; if !times 3; skill extract jelly; skill Macrometeorite; call macroMain; endif; endsub; call macroMain; skill extract jelly; skill Throw Latte on Opponent
    Round 1: TQuilla executes a macro!
    Round 1: TQuilla casts EXTRACT JELLY!
    Round 2: Bogarth attaches itself to your opponent's groin and I can't possibly finish this sentence with a PG rating. Horrible story short, you get some stuff called "sleaze jelly", holy crap.
    You acquire an item: sleaze jelly
    Round 2: TQuilla casts CHEAT CODE: REPLACE ENEMY!
    Unexpected error, debug log printed.
    Mood swing complete.
    Encounter: Orcish Frat Boy
    Round 0: TQuilla wins initiative!
    Round 1: You lose 1 hit point
    Round 1: Bogarth sucks out some of your opponent's life essences, which makes them a little sleepy.
    Round 1: Orcish Frat Boy (Pledge) drops 36 attack power.
    Round 1: Orcish Frat Boy (Pledge) drops 36 defense.
    executing script: if !monstername "beefy bodyguard bat" && !monstername "sabre-toothed lime" && !monstername "dairy ooze";pickpocket;endif;sub pgMain; if !times 10; skill extract jelly; skill CHEAT CODE: Replace Enemy; call pgMain; endif; endsub; call pgMain; sub macroMain; if !times 3; skill extract jelly; skill Macrometeorite; call macroMain; endif; endsub; call macroMain; skill extract jelly; skill Throw Latte on Opponent
    Round 1: TQuilla executes a macro!
    Round 1: TQuilla casts EXTRACT JELLY!
    Round 2: Bogarth drains your foe of their essences or energy or whatever, but apparently it's not the kind of whatever that's good for making jelly.
    Mood swing complete.
    Encounter: Orcish Frat Boy
    Round 0: TQuilla loses initiative!
    KoLmafia thinks it is round 1 but KoL thinks it is round 2
    executing script: if !monstername "beefy bodyguard bat" && !monstername "sabre-toothed lime" && !monstername "dairy ooze";pickpocket;endif;sub pgMain; if !times 10; skill extract jelly; skill CHEAT CODE: Replace Enemy; call pgMain; endif; endsub; call pgMain; sub macroMain; if !times 3; skill extract jelly; skill Macrometeorite; call macroMain; endif; endsub; call macroMain; skill extract jelly; skill Throw Latte on Opponent
    Round 2: TQuilla executes a macro!
    KoLmafia thinks it is round 3 but KoL thinks it is round 2
    Returned: void
    KoLmafia thinks it is round 3 but KoL thinks it is round 2
    Round 2: TQuilla casts MACROMETEORITE!
    Unexpected error, debug log printed.
    Round 3: TQuilla casts MACROMETEORITE!
    Unexpected error, debug log printed.
    ----------------------------------------------------------------------------------------------------
    I ran into this bug a few days ago, after which I was not able to even use Macrometeorite or Replace Enemy that day (though they may have been all used up during the CCS execution, which makes some sense), but strangely, I was also also not able to use Asdon Martin: Spring-loaded Front Bumper either for the rest of that day (my script normally uses the Front Bumper to end the combat, not sure why it chose to use the latte banish today, I'll have to investigate that). Yesterday, I reverted to 20174, which seems to have fixed the issue, and today I updated to HEAD and ran into the bug again -- I think the buggy code is in rev. 20175.

    Thanks,


    sacha (TQuilla)
    Last edited by Veracity; 06-20-2020 at 11:38 PM.

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,330

    Default

    I am guessing that this is because we can no longer look a monster named "Orcish Frat Boy"; when given MONSTERID, we can always disambiguate it to Orcish Frat Boy (Music Lover), (Paddler), or (Pledge). Which means that I literally will have to test this in the Orcish Frat House. Fortunately, my Hippy Camp is bombed back to the stone age, but not my frat house.

    I think it is time to figure out how I can force the monster to be parsed again using MONSTERID from the fight.php response text in the middle of a fight, when you transform it like that.

    Tomorrow. I can only adventure today with Drunkula's wineglass, which disallows skill usage.

  3. #3
    Junior Member
    Join Date
    Jun 2019
    Posts
    4

    Default

    Ah, probably the same issue my script is running into at The Velvet / Gold Mine,and the male/female worker and overseer.

    Code:
    [63] The Velvet / Gold Mine
    Preference lastEncounter changed from sausage goblin to healing crystal golem
    Encounter: healing crystal golem
    Preference _lastCombatStarted changed from 20200621001327 to 20200621001330
    Round 0: fknslacker loses initiative!
    Round 1: You lose 6 hit points
    > lava_lamp_filter monster: healing crystal golem(1788)
    Round 1: fknslacker casts POCKET CRUMBS!
    > lava_lamp_filter monster: healing crystal golem(1788)
    Round 1: fknslacker casts BECOME A CLOUD OF MIST!
    You acquire an effect: Misty Form (1)
    Preference _vampyreCloakeFormUses changed from 5 to 6
    > lava_lamp_filter monster: healing crystal golem(1788)
    Round 2: fknslacker uses the Time-Spinner!
    Round 3: healing crystal golem drops 15 attack power.
    Round 3: healing crystal golem drops 15 defense.
    > lava_lamp_filter monster: healing crystal golem(1788)
    Round 3: fknslacker casts MACROMETEORITE!
    Unexpected error, debug log printed.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,330

    Default

    Yeah, I have a fix coded up, but I'd sort of like to test it before submitting it.
    Tomorrow.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,330

    Default

    I think I got it.

    Code:
    [13391] Frat House
    Encounter: Orcish Frat Boy
    Round 0: Veracity wins initiative!
    Round 1: Veracity uses the seal tooth!
    Round 2: Orcish Frat Boy (Paddler) takes 1 damage.
    Round 2: Veracity casts CHEAT CODE: REPLACE ENEMY!
    Round 3: your opponent becomes an Orcish Frat Boy!
    Round 3: Veracity uses the seal tooth!
    Round 4: Orcish Frat Boy (Pledge) takes 1 damage.
    Round 4: Veracity casts MACROMETEORITE!
    Round 5: your opponent becomes an Orcish Frat Boy!
    Round 5: Veracity uses the seal tooth!
    Round 6: Orcish Frat Boy (Music Lover) takes 1 damage.
    Round 6: Veracity attacks!
    Round 7: Orcish Frat Boy (Music Lover) takes 1831 damage.
    Round 7: Veracity wins the fight!
    Revision 20205.

  6. #6
    Junior Member
    Join Date
    May 2019
    Posts
    7

    Default

    My script runs cleanly now and with expected results. Thank you!

  7. #7
    Junior Member
    Join Date
    Jun 2019
    Posts
    4

    Default

    I think I got it.
    Originally Posted by Veracity View Post
    That was quick, my issue is fixed. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •