Page 112 of 216 FirstFirst ... 12 62 102 110 111 112 113 114 122 162 212 ... LastLast
Results 1,111 to 1,120 of 2160

Thread: BatBrain -- a central nervous system for consult scripts

  1. #1111
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,746

    Default

    That's been mentioned first in post 982, zarqon commented in 983, mentioned again in 1008, zarqon thought it may still be a problem in 1011 and said no code had changed to fix it in 1013.

    Any chance the problem is that it's doing an exact match? This appears to be the code line in question:
    Code:
          fvars["dmg"] = dmg_dealt(res.dmg);   // this is used for starfish/mosquitos and as a dmg_dealt cache
    What it's actually trying to match though is -dmg, so we could throw:
    Code:
          fvars["dmg"] = dmg_dealt(res.dmg);   // this is used as a dmg_dealt cache
          fvars["-dmg"] = -dmg_dealt(res.dmg); // this is used for starfish/mosquitos
    to replace it and explain what each does.

  2. #1112
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,618

    Default

    Yes, I don't know what's causing that and haven't been able to duplicate it, even when using any of those familiars.

    This problem occurs because "dmg" is not being replaced with a number in the string "-dmg", which means that fvars somehow doesn't contain "dmg" at the time the formula is evaluated. I don't know why this is, since the code setting "dmg" happens before other formula evaluations in to_event(), but evidently something's happening out of order for you which isn't happening for me.

    Adding an fvar for "-dmg" would be pointless, as if the first fvar isn't present, the second one wouldn't be either.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | 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!

  3. #1113
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,746

    Default

    So it's not an exact matcher? I was thinking that fvars["dmg"] was trying to match dmg and only dmg... and fvars["-dmg"] is not fvars["dmg"], so it wouldn't match and be replaced...

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

    Default

    Here's what the matcher in ZLib's eval() makes of the formula "-dmg":

    > ash string expr = "-dmg"; matcher m = create_matcher("\\b[a-z_][a-zA-Z0-9_]*\\b", expr); m.find(); m.group(0)

    Returned: dmg
    It doesn't also grab the minus sign. So it's identifying "dmg" and then checking if fvars contains "dmg". If it does, it replaces "dmg" with a number. If it doesn't, it generates the error.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | 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. #1115
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,618

    Default

    r14 Update

    Some very nice goodies in this update!

    • The first goodie is a squashed bug! Since moving monster data to batfactors, multistun immunities were not actually correctly handled -- in fact, BatBrain ignored those immunities because it was checking the wrong number. I have flattened that bug. Who knew crushed arthropods could be so satisfying?
    • The second goodie is an enhancement which I believe will drastically increase the satisfaction level of results attained through BatBrain-powered action selection. BatBrain now ignores HP/MP profit from out-of-combat restore items, such as MMJ, seltzers, casts, etc. This will not only prevent restoratives from being preferred as stasis actions or attack actions (which I've seen more times than I like), it will also keep recovery handling more in the hands of your recovery script, in addition to not squandering combat rounds restoring HP/MP you could just as easily restore out of combat. BatBrain still recognizes the HP/MP gain from these actions (so if a combat script wanted to recover up to a target MP, it could), but it ignores the profit from them.


    Next, my recent diving has resulted in not only my first wicked cool outfit piece, but also a few Sea enhancements for this script!

    • I added monster healing for Mer-kin Outpost monsters. I assumed a 50% rate at 250 HP, for an average of +125 HP/round, capped at the monsters' max HP. That ought to help your script to choose actions which will actually kill the monsters before the combat runs out.
    • The Pufferfish is now treated as having a special attack and never missing (much like Mammon the Elephant). Also, I now make exceptions for these two monsters in die_rounds(), calculating the actual number of rounds remaining rather than dividing your HP by the expected damage on that one round (quite inaccurate for these two monsters). These changes ought to help your BatBrain-powered script defeat pufferfish rather than losing to them.
    • I've also added the Ball/Net/Blade gladiatorial skills to batfactors, so if you should be diving with those weapons equipped, BatBrain will know what those skills can do (until you summon a dolphin and mafia forgets you're in the Sea -- but that squishy insect has been reported so hopefully it won't last too long). When I get around to that path next run I'll have a go at adding auto-responses for the monsters with the keywords.


    Enjoy these deaths of segmented creepy beasties!
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | 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!

  6. #1116
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,517

    Default

    I've also added the Ball/Net/Blade gladiatorial skills to batfactors, so if you should be diving with those weapons equipped, BatBrain will know what those skills can do (until you summon a dolphin and mafia forgets you're in the Sea -- but that squishy insect has been reported so hopefully it won't last too long). When I get around to that path next run I'll have a go at adding auto-responses for the monsters with the keywords.
    Originally Posted by zarqon View Post
    Well... you can use those skills in any underwater combat and they will do things for you. You can use them exactly once each per combat - unless you are in the Colosseum and are using the correct skill in response to a special move by your opponent.

    Are you taking that into effect - i.e. Net Loss vs. a balldodger who is about to "lose control" (which leaves Net Loss available for you to use again this combat) vs. Net Loss at any other time - even against a balldodger - which delevels him, but makes the skill unavailable to use again this combat?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  7. #1117
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,618

    Default

    Yep. Adding those skills to batfactors makes them work (although I hadn't realized they all were once-only) in the majority of underwater combats. Adding the auto-responses (not yet done) will make them work against the special monsters.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | 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!

  8. #1118
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,746

    Default

    Probably needs override handling when the auto-response code is added to remove the once, but only when the response is right. Or just re-read available skills.

    Since you can't macro-fy those combats, since they need to happen a round at a time, right? Or can you make a pure-KoL macro string that will automatically match combat-text and pick the right attack for you? My brain says no, but... that would be pretty nifty if you could, and would save 3-25 server hits (depending on how buffed you are) per fight.

  9. #1119
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,517

    Default

    According to the Wiki, every skill except for Ball Sack, Net Neutrality, and Blade Runner - all of which temporarily stun your opponent - is marked "once per combat". Presumably the other three can be used to re-stun your opponent, after it pulls itself together again.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #1120
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,618

    Default

    I marked all the skills with "once" that say so in the Wiki (Although I'd missed marking Ball Sweat; that's now fixed). Auto-responses, just like all the other auto-responses that are automatically added to every macro submitted, will use BALLS checks to determine whether to reactively cast the skill, so they will work against the special monsters regardless of their presence in opts. You will then be able to defeat these monsters by simply enqueueing your normal attack action over and over (or by simply clicking any attack action in BatMan RE).
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | 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!

Similar Threads

  1. Feature - Implemented random_attributes not being passed to consult scripts
    By DoctorRotelle in forum Bug Reports
    Replies: 7
    Last Post: 05-25-2015, 04:38 AM
  2. Replies: 25
    Last Post: 04-05-2015, 07:20 PM
  3. Feature - Implemented Duplicate scripts cause "not found" error for consult scripts
    By nightslide in forum Bug Reports
    Replies: 6
    Last Post: 06-10-2013, 07:07 PM
  4. Multiple consult scripts?
    By fxer in forum Scripting Discussion
    Replies: 2
    Last Post: 03-04-2013, 08:43 PM
  5. Passing variables to consult scripts from the ccs
    By Captain Kirk in forum Custom Combat Settings
    Replies: 0
    Last Post: 08-17-2008, 05:53 AM

Posting Permissions

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