Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 39

Thread: MONSTERID in fights.

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

    Default MONSTERID in fights.

    This post says:

    MONSTERID is now included in the HTML. This is mostly for Mafia support. It is intended that darkness and darkness only will obscure MONSTERID (I won't spoil the other good example here).]
    and this post says:

    Yes, this removes the pain from Gremlins, essentially. It was discussed as one of the main drawbacks of the change, but also just doesn't hold that much impact. New players won't be checking HTML (probably), and if they did, wouldn't know why it was relevant to the quest. That means they can still explore it the "normal way", as can those who don't use Mafia.

    People (The ErosionSeeker, etc.) already did something similar by never collecting the Factoids of the "wrong" gremlins.
    Very nice.

    What do we do now?

    AdventureRequet.registerEncounter passes the combat "encounter" and responseText to AdventureRequest.ranslateGenericType.
    AdventureRequest.ranslateGenericType goes through a bunch of gyrations to try to figure out which monster it is.
    It figures out the MonsterData and returns the monster name as the "encounter".
    And then later, in FightRequest, it looks up the monster name and disambiguates it vis consequences.txt.

    That seems like a lot of unnecessary processing.

    What does translateGenericType to convert "monstername" to MonsterData to an "encounter" string?

    - If you are in Fernswarthy's Basement, BasementRequest already genericized it for you.
    - If WumpusManager says it's the wumpus, believe that, even if you are blind, for some reason.
    - time prank and be any player name, so attempt to look for message
    then
    - remove OCRS modifiers - add to MonsterData.lastRandomModifiers
    - remove intergnat modifications - add to MonsterData.lastRandomModifiers
    - handle mutants from Nuclear Autumn - add mutant to MonsterData.lastRandomModifiers
    - handle masks - add to MonsterData.lastMask and to MonsterData.lastRandomModifiers
    then
    - call ConsequenceManager.disambiguateMonster

    and then lookup the monster name to get a MonsterData

    If we still can't find it,
    - look for monsters with synonymous names from LT&T
    - look up monster by image
    - disambiguate Video Game bosses and minibosses, DMT monsters, etc.

    That is immensely complicated, but this KoL fix will let us simplify it a lot

    - We still need to do the OCRS/Intergnat/Nuclear Autumn/Disguises Delimit stuff to calculate MonsterData.LastRandomModifiers and MonsterData.lastMask stuff.
    - We still need to disambiguate via ConsequenceManager, although the vast majority of monster consequences should not be needed.

    If we are given a monster ID we don't know, we can do look it up and learn monster IDs. Hard Mode dreadsylvania monsters, ultrarare monsters, etc., etc.

    And if we are calculating MonsterData, anyway, how about if we don't go back and forth between encounter name to MonsterData to encounter name to MonsterData?

    This is pretty exciting. Unless gausie has had time to start this, I'll hop onto it.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Revision 20162 uses MONSTERID.

    I confirmed we handle the darkness (blind) correctly.
    I confirmed that we can identify all three kinds of Ninja Snowmen and all three finds of Orcish Frat Boys without having to disambiguate through images.

    I'll do some more testing with dice equipment and intergnat and so on.
    If anyone is doing OCRS, Nuclear Autumn, or Disguise Delimit any time soon, I'd like to know if we are still passing a monster with the expected random modifiers to your consult script.
    I'd like to make the IslandDecorator decorate the Junkyard gremlins more usefully, since we now know for sure if they have the tool or not.

    And I'd like to calculate the MonsterData for the specify monster you are fighting exactly once, when we parse the fight text and have monster ID, rather than going back to a String and then back again to a MonsterData.

    So, a fair amount of work left, but this is the core of it. Let's see how it works out for all of you.

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

    Default

    So far, so good:

    Code:
    [9036] Barf Mountain
    Encounter: tie-dyed, bouncing, quacking, turgid, cloud-based, fragile garbage tourist AND TESLA!
    Round 0: Veracity wins initiative!
    
    > ash last_monster().random_modifiers
    
    Returned: aggregate boolean [string]
    tie-dyed => true
    bouncing => true
    quacking => true
    turgid => true
    cloud-based => true
    fragile => true
    tesla => true

  4. #4
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,798

    Default

    Ooh fantastic!
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Woss | Om****est (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  5. #5

    Default

    I'm getting a few monsters come through as if I'm blinded, all triggered by unusual combat triggers - eldritch tentacle and a numberology'd infantryman for example. I didn't check but it's possible that kol isn't setting the monsterid for them. But more likely that we are not registering those encounters properly.

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

    Default

    Need a debug log for that, please/

  7. #7

    Default

    Will get you one asap. I also think we should rename the tooled gremlins to remove the " (tool)" from the end and use square bracket disambiguation for them. Is that already present for monsters as it is for items and skills?

  8. #8
    Developer
    Join Date
    Apr 2006
    Posts
    962

    Default

    I tried to reproduce that this morning with the frat calculate the universe and the two tentacle fights but wasn't able to. Looking at the code if the MONSTERID_PATTERN matcher fails, it will always return The Darkness unless it's the wumpus, so maybe it would be worth updating the code for the moment to save a debug log of the combat page text if the darkness image isn't found as well? It's possible there could be kol bugs since it's a new feature, or maybe it's just something trivial like white space being different in the html comment.

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

    Default

    Will get you one asap. I also think we should rename the tooled gremlins to remove the " (tool)" from the end and use square bracket disambiguation for them. Is that already present for monsters as it is for items and skills?
    Originally Posted by gausie View Post
    Yes, we can disambiguate monster with the same name via monster ID in square brackets now, But we have other examples of monsters where we disambiguate by changing the name. For example:

    Code:
    Ninja Snowman (Chopsticks)	338	ninjarice.gif
    Ninja Snowman (Hilt)	137	snowman.gif
    Ninja Snowman (Mask)	100	snowman.gif
    Orcish Frat Boy (Music Lover)	62	fratboy.gif
    Orcish Frat Boy (Paddler)	63	fratboy.gif
    Orcish Frat Boy (Pledge)	64	fratskirt.gif
    Just as with the gremlins, each of the above has different item drops and may or may not have the same image. We used to disambiguate the frat boys via intro text when you encounter them, but were not able to disambiguate the snowmen, so we used to have a pseudo-monster "Ninja Snowman (Hilt/Mask)".

    I am content to leave the tool gremlins with distinguishable names.

    I tried to reproduce that this morning with the frat calculate the universe and the two tentacle fights but wasn't able to. Looking at the code if the MONSTERID_PATTERN matcher fails, it will always return The Darkness unless it's the wumpus, so maybe it would be worth updating the code for the moment to save a debug log of the combat page text if the darkness image isn't found as well? It's possible there could be kol bugs since it's a new feature, or maybe it's just something trivial like white space being different in the html comment.
    Originally Posted by Rinn View Post
    Good idea. Revision 20166 will put the responseText into the DEBUG log (opening and closing it, if necessary) if there is no MONSTERID and also no darkness.gif
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Looking at monsters.txt:

    Code:
    ancient protector spirit	0	protspirit.gif	HP: 80 Def: 145 Atk: 158 Init: 10 Phys: 100 P: undead GHOST
    # --- ancient protector spirits are distinguishable only by location/drop
    ancient protector spirit (The Hidden Apartment Building)	442	protspirit.gif	HP: 80 Def: 145 Atk: 158 Init: 10 Phys: 100 P: undead GHOST Manuel: "ancient protector spirit"	moss-covered stone sphere (c100)
    ancient protector spirit (The Hidden Hospital)	443	protspirit.gif	HP: 80 Def: 142 Atk: 162 Init: 10 Phys: 100 P: undead GHOST Manuel: "ancient protector spirit"	dripping stone sphere (c100)
    ancient protector spirit (The Hidden Office Building)	444	protspirit.gif	HP: 80 Def: 140 Atk: 160 Init: 10 Phys: 100 P: undead GHOST Manuel: "ancient protector spirit"	crackling stone sphere (c100)
    ancient protector spirit (The Hidden Bowling Alley)	445	protspirit.gif	HP: 80 Def: 144 Atk: 156 Init: 10 Phys: 100 P: undead GHOST Manuel: "ancient protector spirit"	scorched stone sphere (c100)
    ancient protector spirit (obsolete)	446	protspirit.gif	HP: 80 Def: 144 Atk: 160 Init: 10 Phys: 100 P: undead GHOST Manuel: "ancient protector spirit" Wiki: "ancient protector spirit"	obsidian dagger (c100)
    # ---
    Do we still need the "ancient protector spirit" pseudo-monster? That is what you used to get when we looked up monsters by name, but now we are looking them up by monster ID.

    Code:
    Ed the Undying	473	ed.gif,ed2.gif,ed3.gif,ed4.gif,ed5.gif,ed6.gif,ed7.gif	NOCOPY Atk: 180 Def: 162 HP: 1 Init: -10000 P: undead
    Ed the Undying (1)	0	ed.gif	BOSS NOMANUEL HP: 256 Def: 162 Atk: 180 Exp: [75+ML/3] Init: 10000 P: undead
    Ed the Undying (2)	0	ed2.gif	BOSS NOMANUEL HP: 256 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead
    Ed the Undying (3)	0	ed3.gif	BOSS NOMANUEL HP: 128 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead
    Ed the Undying (4)	0	ed4.gif	BOSS NOMANUEL HP: 64 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead
    Ed the Undying (5)	0	ed5.gif	BOSS NOMANUEL HP: 32 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead
    Ed the Undying (6)	0	ed6.gif	BOSS NOMANUEL HP: 16 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead
    Ed the Undying (7)	0	ed7.gif	BOSS NOMANUEL HP: 8 Def: 162 Atk: 180 Exp: [75+ML/3] Init: -10000 P: undead	Holy MacGuffin (n100)
    We disambiguate monster ID #473 to one of the 7 Eds via consequences.txt

    Code:
    the darkness (blind)	0	darkness.gif	NOMANUEL
    We return this for anything with no MONSTERID. We used to do it via consequences.txt

    Code:
    X-32-F Combat Training Snowman	0	xxx.gif	NOWANDER Atk: 1 Def: 1 HP: 1 E: cold P: construct
    Look what my session log says!

    Code:
    *** Monster 'the X-32-F Combat Training Snowman' has monsterId = 1858
    Here is current MONSTER section of consequences.txt:

    Code:
    # Monster disambiguation:
    
    # Monster ID -94
    MONSTER	pooltergeist	poolter2\.gif	"pooltergeist (ultra-rare)"
    
    MONSTER	Ed the Undying	/ed(\d)\.gif	"Ed the Undying ($1)"
    MONSTER	Ed the Undying	.	"Ed the Undying (1)"
    
    @ Monster ID -89, -88, -87, -86, -85, -84
    MONSTER	Count Drunkula	drunkula_hm\.gif	"Count Drunkula (Hard Mode)"
    MONSTER	Falls-From-Sky	fallsfromsky_hm\.gif	"Falls-From-Sky (Hard Mode)"
    MONSTER	Great Wolf of the Air	wolfoftheair_hm\.gif	"Great Wolf of the Air (Hard Mode)"
    MONSTER	Mayor Ghost	mayorghost_hm\.gif	"Mayor Ghost (Hard Mode)"
    MONSTER	The Unkillable Skeleton	ukskeleton_hm\.gif	"The Unkillable Skeleton (Hard Mode)"
    MONSTER	Zombie Homeowners' Association	zombiehoa_hm\.gif	"Zombie Homeowners' Association (Hard Mode)"
    I will be curious to learn if the Hard Mode Dreadsylvania bosses are really distinct monsters. I bet they are.

Posting Permissions

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