Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 39 of 39

Thread: MONSTERID in fights.

  1. #31
    Senior Member Crowther's Avatar
    Join Date
    Nov 2006
    Posts
    1,560

    Default

    I'm getting errors in The Haiku Dungeon.
    Code:
    [13920] The Haiku Dungeon
    Encounter: Knob Goblin poseur
    MONSTERID not found
    A sausage goblin that showed up was recognized fine.

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

    Default

    I've been experimenting with ways to transform a monster (CLEESH, Macrometeorite, CHEAT CODE: REPLACE MONSTER) and attempting to figure out what the new monster is before you sibmit an action and get the new response text. We will re-read MONSTERID from the next responseText, and we will accurately know what the monster is, but you'd probably like to know what the monster is before you submit the next action. Twiddling your thumbs will count as an action, but it's an extra step.

    What we used to do:

    Leave last_monster() unchanged and discover the actual monster next round.

    What we do now:

    Attempt to look up the new monster by name (which is provided).
    If found, cool.
    If ambiguous, attempt to look up the new monster by image (which is provided)
    If found, take it - but images are shared, so no guarantees.

    This is revision 20208.

    I submitted a Bug Report to KoL asking for MONSTERID to be included in the argument list for newpic(), the Javascript function KoL uses itself to change the image on the page. We'll see how they respond.

    Code:
    I've been diving into transforming monsters and how to recognize which monster you end up with.
    
    tl;dr: I'd like you to include MONSTERID as an argument to the newpic() Javascript function.
    
    It works like this.
    
    I am in fight.php. I see monster X.
    I submit an action which transforms the monster - CLEESH, CHEAT CODE: REPALCE MONSTER, Macrometeorite, etc.
    The response shows me the picture of monster X - and MONSTERID is for X.
    The text says that the monster is replaced. Depending on the skill, it may tell you what the new monster is. CLEESH does, CHEAT CODE: REPLACE ENEMY does not.
    The following script runs:
    
    newpic("/iii/adventureimages/newt.gif", "a newt",100,100);
    newpic("/iii/adventureimages/fratboy.gif", "an Orcish Frat Boy",100,100);
    newpic("/iii/adventureimages/darkness.gif", "the darkness",100,100);
    
    Those are 3 examples. It is not really "/iii", although it could be.
    
    So How do I tell, for sure, what the new monster is? MONSTERID on the page is the old monster.
    The response to the next action - which could twiddling your thumbs - has the new MONSTERID.
    So that is the guaranteed way to tell what the replacement monster is. Unfortunately, it requires an action.
    
    How about looking up the monster by name? That works for "a newt", but there multiple Orcish Frat Boys:
    
    62 = fratboy.gif
    63 = fratboy.gif
    64 = fratskirt.gif
    527 = fratboy.gif (War Pledge)
    
    (War Pledge shares the same image, which makes looking up by image even more complicated.)
    
    Similarly for Ninja Snowman:
    
    338 = ninjarice.gif
    137 = snowman.gif
    100 = snowman.gif
    
    factory workers and factory overseers and mine workers and mine overseers all have male and female versions - but the images are distinct, at least.
    
    I would like to be able to get the MONSTERID of the transformed monster from the same response text where the transformation happens.
    
    I suggest the following:
    
    Change the signature of the Javascript newpic() function.
    
    newpic("/iii/adventureimages/newt.gif", "a newt",100,100,MONSTERID);
    newpic("/iii/adventureimages/fratboy.gif", "an Orcish Frat Boy",100,100,MONSTERID);
    newpic("/iii/adventureimages/darkness.gif", "the darkness",100,100,-1);
    
    KoL doesn't need that in order to render the monster transformation, but it would make KoLmafia's life a lot easier.
    
    Thanks for reading this bug report.

  3. #33
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,308

    Default

    I'm getting errors in The Haiku Dungeon.
    Code:
    [13920] The Haiku Dungeon
    Encounter: Knob Goblin poseur
    MONSTERID not found
    A sausage goblin that showed up was recognized fine.
    Originally Posted by Crowther View Post
    I have reproduced this for normal Haiku Denizens.
    Also for the sausage golem, whose name is not presented in Haiku, unlike non-wanderers in that location.

    There really is no MONSTERID in the response when the monsters are introduced in Haiku.

    I submitted a Bug Report to KoL.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #34

    Default

    We have haiku monsterids now it seems

  5. #35

    Default

    I've been told that macrometeor, cleesh and other such stuff that changes the monster should automatically and immediately update MONSTERID.

  6. #36
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,308

    Default

    Thanks!

    Revision 20225 will transform a monster when we detect a new MONSTERID in the fight response, rather than we detect the script that changes the monster image - although we still use that to log the new monster in the session log.

  7. #37

    Default

    Last I checked, modifiers and CLEESH were not working on KoL's end.

    EDIT: Just saw your bug report. Maybe it was fixed? I'll check about the bug report stuff.
    Last edited by Aenimus; 07-01-2020 at 07:28 PM.

  8. #38
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,308

    Default

    CLEESH worked - except for the displayed text, which did not have the monster name.
    By "modifiers", I assume you mean things like OCRS and Intergnat.
    Yes, those are not updated, near as I can tell, until the following round (or a twiddle).

  9. #39

    Default

    CDM says modifiers can't be fixed, sadly. I've mentioned the CLEESH text missing.

    EDIT: CLEESH text is fixed!
    Last edited by Aenimus; 07-01-2020 at 09:50 PM.

Posting Permissions

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