BatMan Relay -- more info, less clicking

zarqon

Well-known member
BatMan RE -- more info, less clicking

BatMan RE

In the words of Batman: "Before we set brain and sinew to this perplexing case, let's review all the facts." To assist us with that, BatMan RE (Battle Manager, Relay Edition) exists for relay play! I consider this my "flagship" script, if it's even possible for a script to be a ship of any kind whatsoever. I personally find it to be an indispensable during a run and when fighting tougher bosses.

I apologize in advance for the wordiness of this post. I have tried to keep things concise but there's just SO MUCH that this script offers you.

What does it do?

Well, this:
screen-BMRE.png

It overhauls your relay combat experience, making it very easy to blast though your combats intelligently, find information to assist you in making decisions, and significantly reduce the time you spend clicking and looking things up. It adds three incredibly helpful tools to your relay experience: 1) an actions table, b) a quick menu, and III) a CLI box. It also enhances (or provides) your Monster Manuel output and adds a blacklist editor, Wiki tab, Witchess helper, and extremely helpful Adventure Again info box. And beyond just enhancing your combat experience, you also get several integrated relay extensions to assist with selecting/not forgetting semirares, hunting factoids, and clubbing not-so-innocent seals. "Tell me more!" you say. Okay.

Actions Table

The first thing you'll notice during combat is that there is now a handy table (searchable and sortable) containing all of your attack options.

Here's a rundown of what each column in the table contains.

  • Attack. When the table loads, it is sorted by attack_action(), meaning that what BatBrain thinks is your best option to profitably kill the monster (minus BatBrain's usual filters on custom actions and such) will be at the top, followed by the second best, and so on. You can click the Attack header to return to this initial sorting.

    Clicking the name of the action will submit a batround()-enhanced macro performing that action.

    Certain icons will appear in front of certain actions when appropriate:
    • Little colored circle (green <--> red gradient): This appears for all actions, and simply shows the action's hitchance. To see the exact percentage, mouse over the circle for the tooltip.
    • Spam sandwich: Click this to submit a macro spamming that action indefinitely. This icon will only appear for actions predicted to successfully kill the monster.
    • Watch: Click this to submit a macro which attempts to stasis using this action. It only appears for actions which match the criteria used by SmartStasis, and the macro is submitted with all the same repeat conditions.
    • Black cat: Click this to submit a macro that attempts the action until it is not blocked by your Black Cat. This icon will only appear if you have a Black Cat as your familiar.
    • Asterisk: This may appear after the action name. Mouseover it to read some extra information about this action (usually something BatBrain doesn't yet know how to take into account). The cost of the action (in meat) will also always be listed after the action name.
  • Damage. This column simply displays the raw average damage the action will deal to the monster. Note that this includes hitchance, so don't mentally multiply this number by hitchance, that's already been done. If the monster has resistance/vulnerability or the damage is of multiple types, the actual damage dealt is helpfully displayed here as well. Hovering your mouse over the damage column will display the associated damage formula from batfactors.txt. Click the header to sort by damage dealt.
  • Delevel Attack. This displays the modifier to the monster's attack. If your defense stat is below the number for no-hit, a small sword icon will also appear in front of the modifier. Clicking the sword icon will submit a macro which repeats this action until the monster can no longer hit you with regular attacks (mouseover to see how many uses of the action will be submitted). Click the header to sort (ascending only).
  • Delevel Defense. This displays the modifier to the monster's defense. If you are still able to miss the monster, a small shield icon will also appear. Clicking the shield icon will submit a macro which repeats the action until you can always hit the monster (again, mouseover to see details). Click the header to sort (ascending only).
  • Stun. This column displays the stun chance of the action. Click the header to sort by BatBrain's stun_action() function.
  • HP. This is displayed rather counter-intuitively at the moment, showing the number in terms of player damage. The reason for this is that it displays the numbers as a spread (with types of damage listed in appropriate colors, as with damage to the monster) rather than a single integer. In the words of Batman, "When fighting crime even the most minute detail must not be ignored." This column sorts oddly by string for now.
  • MP. Quite simply, this column shows the MP gain/loss from the action. Use this column to see the MP cost of skills or find in-combat MP restorers quickly. Click the header to sort (descending only).
  • Profit. The estimated profit of performing the action right now, including HP/MP loss/gain, familiar actions, cost of items, predicted monster damage, etc. Header to sort.
  • Send to Blacklist. Clicking the arrow in this column will automatically add the item to your blacklist (viewable on the Blacklist tab), removing it from your options.

And there you have it! An invaluable informational resource during combat! I have already been spared multiple trips to the Wiki simply due to having this information readily at hand.

Quick Menu

But that's not all! There's also a quick menu that slides in on the upper left of the frame. It stubbornly remains there for your clicking convenience, even if you scroll down the page.

What sort of things are in this quick menu? Those of you familiar with my SmartStasis script probably know that it performs three major functions: executes custom actions, performs disco combos, and prolongs combat when profitable. The quick menu is designed to give you immediate and handy access to all of those functions and more, and a means to swiftly execute them with minimal clicking and mouse movement.

The menu options will always be in the following order, and the menu always starts at the same place on your screen. This means that if you were to leave your mouse in one place (the first menu button) and keep clicking, you would eventually complete every combat almost identically to the way SS followed by repeated attack_action()'s would. The Quick Menu also has keyboard shortcuts; it's linked to the top row of your keyboard. The topmost option is the ` key (to the left of the '1' key on most keyboards), the next option is the '1' key, the next option is the '2' key, and so on. So rather than spamming your mouse, you could also spam the ` key to blast through fights.

Let's look at each possible menu item.

  • Lightbulb. This is the custom actions menu, which only appears if there are custom actions to perform. Mousing over the light bulb icon will popup more information, listing each custom action chosen by SS, and also including the same handy special icons as the actions table. You can click an individual action there (or one of the icons) to perform it, or you can click the lightbulb itself to execute a macro containing all of the custom actions at once. Nifty!
  • Disco Ball. This is the disco combos menu, which only appears if you have disco combos available. The popup allows you to individually perform combo macros, or you can click the disco ball to perform all profitable combos at once. Handy!
  • Watch. This is the stasis menu, which only appears if you have an action with profit greater than your BatMan_profitforstasis setting. Mousing over this will display the action selected by BatBrain for stasis. A table icon appears underneath -- clicking that button will sort the actions table by stasis_action() in case you want to choose a different stasis action. You can click the action in the popup to perform it once, or you can click the watch icon to submit a stasis macro identical to the one SS would submit, with all the same repeat conditions. Sufficiently advanced technology!
  • Banana peel. This is the stun menu. It will appear whenever you have a profitable stunning action and your attack option won't one-shot the monster. Mousing over this will display the action selected by BatBrain's stun_action(). There is also a table icon you can click to sort the actions table by stun_action(). This is identical to sorting the actions table with its own Stun column, but perhaps handier if your mouse is already there. Clicking the banana peel will perform the stun action. Useful!
  • Sword/Crossbow. This is the attack menu, which appears if BatBrain's attack_action() chooses a viable attack for killing the monster. Mouse over this to display the action BatBrain chose, again with the table icon to sort by attack_action(), which is the same as sorting by the table's Attack column. Clicking the sword/crossbow will also perform the attack action. Convenient!
  • Beverage. If you're adventuring with a Happy Medium, it can be involved to decide whether you should siphon or not. This helpful menu appears whenever Siphon Spirits is available, and the image is whichever drink would be siphoned. The name of the drink is displayed in the color of the medium's aura (NOTE: not the color mafia uses associated with drink quality), with information about the drink and a clicky link to Wiki it. Clicking the beverage will Siphon it. Siphoning is fun again!
  • Circular Arrows. This is the "Automate" menu. Clicking this will hand the combat over to mafia to automate, then show you the results (the last page load). This is essentially identical to the CAB's "Script" button.
  • Curly Braces. This is the "Macros" menu. This is where the time lost in loading BatMan RE's enhancements can get made up for and then some. Not only can you quickly access your saved combat macros here (Without having to switch to the KoL tab), but your previous fight vs. this particular monster is saved and presented here in macro form. Clicking the braces will submit your entire previous fight as a macro. This essentially makes BatMan RE a giant repository of custom-tailored combat macros chosen by you (or chosen by the last BatBrain-powered script that automated your previous fight against this monster). Due to speed concerns, there's no sanity checking here though, so the macros may run into aborts if they contain skills you no longer have available since the last time you faced this monster.
  • Hourglass. When combat is complete, the Adventure Again menu appears. Clicking this will adventure again in the same place, and mousing over it will also show you a slew of useful information and links related to your current locations, such as links to use items, your current goals if you have any set, the queue of monsters in the zone and their appearance rates, an interface to control their appearance rates, your progress toward relevant quest goals, and that's only just scratching the surface. Checking here after a fight, you will find loads of helpful information pertinent to the zone you're adventuring in that you would otherwise have to head over to the CLI to check. My goal for this menu is to nearly eliminate the need to tab over to the CLI during relay play, so if you think of another feature for this box please suggest it!
  • Fortune Cookie. When it's getting close to time to make a decision about your semirares (i.e. eat a cookie or actually get your semirare), the Semirare Helper menu appears after combat. From this menu, you can see a countdown to the approaching counter, eat a cookie, scroll through a list of all semirares, or click the cookie to go to Sera (discussed below), an in-depth list of semirares, filtered by availability and grouped by concept. From either the small list or Sera, you can click to adventure in the target zone.
  • Bat. The Bat Menu is always the final menu item, containing the requisite links to this thread and the BatBrain thread, new version alerts for SS, BB, and itself, should any of them be out of date, and most importantly, choice morsels of wisdom from Batman himself, inspiring confident clicking and informed form submissions. There is also an option to disable BatMan RE here, in case the script is causing any problems, or you want to use extensions like Sera, Factroid!, or GROSS but don't want fight.php enhancements. Disabling the script here is on a per-character basis. If you click the bat itself, it will take you to my BAT KING OF THE WORLD progress page! I'm still not king yet and would appreciate your help! :)

CLI Box

If you press the '0' key, you'll get a dialog box for performing CLI commands. Through the magic of jQuery using AJAX to talk to ASH, we can execute CLI commands without leaving your current page. If your command puts mafia in an error state (the side pane turns red), you'll get a red error message letting you know your command failed, otherwise you'll get a green message reporting that execution is complete.

Extensions

As BatMan RE has gotten more and more ambitious, it has grown a few extensions to help with certain aspects of play. There are currently three included extensions: Factroid!, Sera, and GROSS. All three of these function as standalone scripts you can call from your relay menu, which are also integrated in various ways with BatMan RE.


Factroid!

screen-Factroid.png

Ladies and gentlemen, the ultimate visual factoid tracker/checker. The focus of this script design was on ease of information, with particular attention to a quick loading time. It's a relay script (you load it from your relay script menu) with images because visual groupings and monster images make the information very easy to take in at a glance. It also tracks your factoids known in an external datafile, meaning that if nothing has changed it doesn't need to re-scrape Manuel for data and can load almost instantly! Tracking for factoids was also integrated with BatBrain, so when you gain a factoid in combat, BatBrain saves that information to Factroid's data file and Manuel still doesn't need to be rescraped! Of course, if you want to, there's a button at the bottom to refresh the data directly from Manuel to ensure that your data is correct. Also, since KoL names sometimes differ from mafia names, Manuel needs to be rescraped whenever you get your first factoid for a given monster, but don't worry; BatBrain will set that flag for you so that Factroid knows when it needs to refresh and when it can just load the cached data.

So, you can see which factoids you still need to collect. Awesome. But wait! There's more!

  • If you click a given monster, Manuel's information table loads underneath that monster, and also provides a set of handy links to wiki, fax, or Rain Man said monster (Rain Man is still not complete; all it does at the moment is cast Rain Man, dumping you at the monster selection page).
  • Faxing monsters is easy with this script -- it only provides fax links if you can still fax for the day and if can_faxbot() is true for that monster. Note that faxing will fail if your clan hasn't whitelisted the relevant faxbots. I believe it may also fail due to timeout if you're not logged into chat.
  • If you have CanAdv installed, Factroid provides a link to adventure at available parent locations! In keeping with the emphasis on fast loading, this information is AJAX'd in after the page loads, and only for visible elements (more load if you scroll).
I'd like to give a big shoutout to turing's missingManuel script, which I referenced a lot in figuring out how to handle the differences between mafia's monster list and KoL's.


Sera

screen-Sera.png

I'm ALSO proud to introduce another integrated/standalone addition to the BatMan RE/Factroid relay stable: Sera, the semirare helper! Sera is a handy informational script that includes all the semirare info you could hope for!

  • All semirares are listed, sorted into handy categories: buffs, combat items, edible items, elemental items, fights, and a miscellaneous category for the handful of oddballs.
  • Your fortune cookie counter information is displayed on the top right, with a link to eat a cookie if relevant.
  • For profit-driven adventurers, mall price information for each semirare is listed.
  • For ascending adventurers, Sera suggests ascension-relevant semirares you might want by presenting the links in boldface.
  • If you have CanAdv installed (highly recommended for this script), it will also filter out all the locations you are unable to adventure in, narrowing down your list quite handily. If you still wish to see the impossible locations, click "Show unavailable" at the top to restore the full list.



GROSS

If you are a Seal Clubber, you are granted access to top secret club G.R.O.S.S. (Get Rid Of Slimy sealS), a very handy visual assistant for all your seal clubbing needs. You can easily take care of all your daily seal clubs here. What a great club! I won't say anything more here because of how secret it is. If you want access to further information, you'll have to sing the club song. OR install the script.


Wow! How do I try it out?

You may install this script by pasting the following into your CLI:
Code:
svn checkout https://svn.code.sf.net/p/batman-re/code/

This will install BatMan RE's dependencies (CLI Links, SmartStasis, BatBrain, and ZLib) if you lack them, a couple data files in your data directory, and a variety of necessary files into your relay folder, including the minified DataTables jQuery plugin.

Enjoy! And in the words of Batman: "Let's go, Robin. We've set another youth on the road to a brighter tomorrow."

Changelog
Code:
4.29.12 - ver. 1.0 posted.
4.30.12 - ver. 1.1 changes: Stun menu should not submit stasis macro.
5.08.12 - ver. 1.2 changes: Add more goal information, and location/monster-relevant wisdom from Batman himself.  Fix Action Table sorting for all columns except HP.  Improved logic for when stun menu appears.  Begin version checking transition to "BatMan RE".  Remove version checking from adventure.ash and only decorate the page if it contains "adventure.php".
5.15.12 - ver. 1.3 changes: All-new CLI box!  Fix incompatibility with IE (and possibly other browsers as well).  Remove KoL's import of an older version of jQuery.  Show potion info in Dungeons of Doom, evil in Defiled zones, and insults in the Barrr.  Lots of little tweaks here and there.  Enabled tilde key for submitting the top menu item. Finish version checking transition to "BatMan RE".
5.29.12 - ver. 1.4 changes: Add "Automate" to quick menu.  Load and show the page [i]before[/i] loading and showing the table/menu, for much less waiting.  Refresh Adventure Again menu when submitting a CLI command.  Add unknown_ml editor for unknown monsters.
1.12.13 - ver. 1.5 changes: Fix monster names.  Correct Batman's Spanish.  Automatically "show old combat form" with CAB enabled.  Mousing over damage shows damage formula.
1.17.13 - ver. 1.6 changes: Unknown monster raw stats are now -1. Tighten up the actions table and style it a little nicer. Enhance Manuel's information table and include monster value with a partial breakdown.  Add this information (using BatBrain's adjusted stats) even if you don't have Manuel.
1.31.13 - ver. 1.7 changes: Monster damage is now a spread.  Added Siphon Spirits information to Quick Menu.
5.31.13 - ver. 2.0 changes: fridiculously many!
6.01.13 - ver. 2.1 changes: compatibility fixes for fight.php alterations by some browsers, KoL, and mafia.  Add pixel count and link to create digital key to Adventure Again box in the 8-bit realm.
7.02.13 - ver. 2.2 changes: BatMan RE is now hosted on SourceForge.

Changes after this point can be found on BatMan RE's [URL="https://sourceforge.net/p/batman-re/code/log/"]SourceForge changelog[/URL], however I will continue to post more in-depth release notes in this thread.

Important! If you have enabled "run betweenBattleScript before manual adventures", you may need to disable it. When a betweenBattleScript is enabled for relay play, sometimes mafia will fully automate one combat before serving up the second combat in the relay browser, causing you anger and bewilderment as you wonder where the extra adventure went.
 
Last edited:
Did you have to release this after I was done playing my turns? I can't wait to test this out!

EDIT: This is a thing of beauty.
 
Last edited:
Did you have to release this after I was done playing my turns? I can't wait to test this out!

This.

EDIT: Too excited to wait until tomorrow, so I booted up Mafia and used a drum machine so I could fight whilst drunk, except I can't get the relay browser to use BatMan Relay.

Screenshot: http://dl.dropbox.com/u/3800091/KoL/(lack of) Batman relay.png

Presumably I'm being an imbecile but I can't see what I've done wrong.

Help!
 
Last edited:
I couldn't find the Quick Menu. I'm using Opera. I couldn't find it either with or without KoL's CAB enabled. Maybe I'll try it in another browser later, but that's not convenient at the moment.

The rest of it looks nice though.

Edit: I have the Quick Menu in Firefox! It looks nice. I don't have it in Opera though. Even after I turned off ad blocking.
 
Last edited:
Follow the instructions in the first post and unzip the file in Mafia's \relay folder. You don't need to call the scripts, the are relay overrides, and Mafia calls them automatically when it loads the page.

EDIT: or maybe disable Mafia's combat bar, if you did unzip the files in the right place.
 
I didn't think I would ever use one of these automated combat things, but this looks like it's worth trying out. I'm sure I will be slow in adapting to it, especially with my next ascension being a speed run and all powerful new tools being scary in that context.
 
Actually, this is the non-automated part of BatBrain... it (mostly) just tells you how much profit each action does, shows you your items in a pretty clickable view where you don't need to scroll (or if you have a small screen, need to scroll way more) and so on. :D

That being said, I've been loving the various iterations of this since zarqon first leaked a spoiler something around a year ago. Happy to finally have it be an officially supported bit that will stay up to date. :)

Edit: Only issue I've found so far is that the columns sort as strings, not numbers, so my top 3 'damage' items do 55, 40, and 317.82 damage per round. My 3 'best' profit choices are -1154.2, -120, and -143.63 meat. So yeah, maybe I have VoA set a bit high, but... meh. :) Anyways, looks very nice.
 
Last edited:
Hmmm, I was going to tell zanmatoer that he should make sure he enabled relay overrides in mafia's Preferences menu, but when I just checked I couldn't see that option anymore. I couldn't even find the preference using "prefref". Are relay overrides enabled by default now?

@Bale: That's odd, since as you know I'm also an Opera user, and I developed this script using almost entirely Opera. Are you using any Greasemonkey scripts that might conflict? Do you get any errors in the Java console when visiting the page?

@lost: The idea is that it gives you all the info with options to make it as automated as you want. You can still execute individual actions (the ones you probably want are in the quick menu, or if not there, easily located in the actions table), or you can execute chunks of actions (custom actions, combos, kitty insurance, spamming an action, etc). I think there's still an Automate button at the bottom which gives the fight to mafia to run. In short, it's as automated as you want it to be, but it gives you the info you need to decide that.

@Theraze: The issue you "found" was explained multiple times in the first post. ;)

Anyone have ideas for what info/links should be in the Adventure Again info box? Perhaps for each goal there could be an "obtain" link which automates obtaining that goal? Or perhaps we could display the average profit of the zone? Or the average monster hitchance? Or suggest gear improvements? I want that box to be super awesome.
 
Hmmm, I was going to tell zanmatoer that he should make sure he enabled relay overrides in mafia's Preferences menu, but when I just checked I couldn't see that option anymore. I couldn't even find the preference using "prefref". Are relay overrides enabled by default now?
Short of editing mafia source code, you can't disable them. Except by not having them in that folder, which seems simple enough to not need a setting any more.

@lost: The idea is that it gives you all the info with options to make it as automated as you want. You can still execute individual actions (the ones you probably want are in the quick menu, or if not there, easily located in the actions table), or you can execute chunks of actions (custom actions, combos, kitty insurance, spamming an action, etc). I think there's still an Automate button at the bottom which gives the fight to mafia to run. In short, it's as automated as you want it to be, but it gives you the info you need to decide that.
Yep, that's why I downloaded all the stuff for this script anyway, right before my speed run. I expect it to be amazing.
 
@Bale: That's odd, since as you know I'm also an Opera user, and I developed this script using almost entirely Opera. Are you using any Greasemonkey scripts that might conflict? Do you get any errors in the Java console when visiting the page?

None of that. (Where is this java console?) I don't use any userscripts these days, though there are a few extensions. I tried disabling anything that might conflict..

However, there is one other really weird thing. Right before every fight I see this:

New Version of BatBrain Available: 1.23
Upgrade from 1.21 to 1.23 here!

Two weird things about that. The first is that I don't see that if I automate the fight with DAM which uses BatBrain; only if I use the relay override. The second weird thing is that I updated BatBrain yesterday. Here's a snippet from zversions.txt

Code:
batbrain	1.23	20120429
batmanrelay	1.0	20120429
map_batfactors.txt	2012-04-23T11:40:07-05:00	20120429
SS	3.15	20120429
zlib	r35	20120429

That's pretty clear.

Why am I still getting that update message and why is it only triggered by using batmanrelay.
 
Last edited:
I saw the same BatBrain update message. "1.21" isn't in any files for me except a bumcheekcity data file, so it makes no sense.

This script made fight.php go from under 1 second to load up to 10 seconds to load.
 
I love it! Except, when I click on again or adventure again, i'm getting 2 combats, the first one is automated w/ my ccs, the 2nd one loads the bat brain screen and lets me do combat manually. Not particularly ideal atm. :/

The other issue I'm suddenly having is when I try to automate barrrney's barr, even though I have the outfit equipped, mafia is telling me that area is not available, altho, I'm adventuring there in the relay browser. ??
 
Last edited:
Follow the instructions in the first post and unzip the file in Mafia's \relay folder. You don't need to call the scripts, the are relay overrides, and Mafia calls them automatically when it loads the page.

EDIT: or maybe disable Mafia's combat bar, if you did unzip the files in the right place.

Done and done.

Hmmm, I was going to tell zanmatoer that he should make sure he enabled relay overrides in mafia's Preferences menu, but when I just checked I couldn't see that option anymore. I couldn't even find the preference using "prefref". Are relay overrides enabled by default now?

Indeed, recently was trying to help a mafia newbie to run a relay script, and searched for the option for about 15 minutes before checking here that it was in fact on by standard.

Still no luck.

Other possibly pertinent info:
I got it to work with a multi! Looks super cool, if a bit overwhelming. As far as I'm aware there are no significant configuration differences between the main and multi.

My main is a level 31 AoBoris with access to a crapton of combat items. Multi was in-run, used the script to fight the NS :)

Don't know what else could be relevant?
 
Did it fail to load the script for you main or just took a very long time? (with lots of itmes it'll take a while to get teh page to load I think)
 
Failed to load the script. Just shows the normal fight screen as expected without BatMan relay. Loads just as quickly as before.
 
This is pretty awesome. I could finally test it in-run (and not with a level 50 character who one-shots anything with any action). The Quick Menu is really great, especially after I realized that clicking the lightbulb or the weapon will execute all the actions proposed.

Two small issues, which both disappear if I disabled KoL's CAB:

- If I click the lightbulb to perform all my custom actions (currently Intimidating Bellow and rock band flyers), the actions are performed but I get a blank frame afterwards. This doesn't happen with the "spam Mighty Axing" attack action.
- The quick menu hourglass doesn't appear

Thanks again :)

EDIT:
"1.21" isn't in any files for me
I had "1.21" in BatMan's adventure.ash
 
If you're having version checking issues you probably grabbed the placeholder I uploaded to create the thread. Reinstall and that should go away.

I did not test with either of the combat bars, other than making sure this script would stay out of the way. I suppose I have to test that now.

I haven't experienced slow loading times, unless it's the first load of the day, which does all the version checking. Are you using a "legacy" machine?

@Zan: try this with a fresh Mafia directory (all default settings) and see if we can narrow down why it's not working for your main.
 
Oh for f***s sake. My apologies, worked it out.

I've been playing with bUMRATs, so that was set as the masterRelayOverride. Unset that, and BatMan relay works. Both relieved and annoyed that it was so gorram simple.

Now I can use this properly, can I say that it's absolutely amazing.


I am however experiencing the same issue weatherboy is, wherein clicking any of the possible "adventure again" links (including the hourglass) runs an adventure manually, then hands me back control for the next fight.
 
Back
Top