Feature - Implemented Add new Fax(ing) bots

ckb

Minion
Staff member
There are two new bots for delivering faxes:
Easyfax
Faustbot

It would be great to have them added to the faxbot interface.
Not sure what is required for this to happen easily, as they both have slightly different ways of working. If we ask nicely, we could probably get them to spit out an xml file for parsing (I believe this is what faxbot does).
 

Bale

Minion
I'm sure it wouldn't be too hard to add them to KoLmafia if you can convince the owners of those bots to provide easily parse-able information in either XML or JSON format so that KoLmafia knows what commands summon which monsters. Until that happens I really wouldn't expect KoLmafia to even consider supporting them.
 

Crowther

Active member
Right now, I'm a bit too surprised it actually worked. I keep expecting something to go very wrong. Making an XML file isn't that big a deal, but I'd need some place to host it.
 

Veracity

Developer
Staff member
We already have code that parses faxbot's format. Adding new bots will require other coding changes, but not having bot-specific config file formats would certainly make things easier.

faustbot.xml looks good, to my eyes, at least. I haven't tried it with my computer. :)
 

Crowther

Active member
I've setup a repository on SourceForge and automated xml file generation with uploading. It worked when I ran it manually, we'll see if cron can keep it up to date. The file is Easyfax.xml. I believe that's the best URL.

For people who want to see a history of which monsters came and went from the network, I made a more readable list. Updates are hourly.
 
Last edited:

Veracity

Developer
Staff member
By the way, Crowther, if I have KoLmafia look up Easyfax's config file at https:...xml it redirects with a 302 to http:...xml. If I have it go straight to http: initially, it works fine.

I have it parsing all three config files and storing the bot-specific data in FaxBot objects, rather than in static class variables. Now it's just a matter of changing the "request a fax" frame to have a dropdown to choose which bot you want and change the available monsters list on the frame appropriately. Probably another afternoon's worth of coding.
 

ckb

Minion
Staff member
Wow Veracity, that sounds awesome!
Does this somehow tie in to the faxbot() ash command? And/or the CLI faxbot command?
 

Veracity

Developer
Staff member
As coded right now, the ASH and CLI commands will take the first faxbot on the list. I can envision two improvements:

- a two argument ASH function and an optional CLI argument to specify a bot by name, if you care. Perhaps your clan doesn't have all the bots WLed, for example.
- if you don't specify a bot, pick the first configured bot that has the requested monster and is online

I figure I'll release the GUI changes and the other changes can come later. Perhaps not by me. ;)
 

Veracity

Developer
Staff member
Revision 14129 adds a faxbots.txt file that lists faxbot, faustbot, and easyfax. The "Request a Fax" frame (from the People menu) is now a card layout with all three bots available. (I considered making them tabs, but I did that with Coinmasters, originally, and eventually switched to this same scheme when there got to be too many of them. I think this is better for something which has an unknown and potentially changing number of items.)

Each bot has unique messages to say that it has delivered a monster or that it can't find one. I tested all of those. I would guess that each bot has a different message for "Your clan doesn't have me whitelisted", but since all the clans I have access to seem to have all three of them whitelisted, I couldn't test that. Well, I actually own a couple of clans. I COULD unwhitelist them for testing. Later.

The CLI command and ASH function continue to get the first configured bot (FaxBot), as before.

Suggestions are welcome.
 

Crowther

Active member
Oh drat. I'd intended to change my messages to match faxbot to avoid giving you extra work, but totally forgot about it.

Right now, Easybot says, "I couldn't get into your clan."
 

Veracity

Developer
Staff member
Well, yeah. If we decide to add new bots in the future, I think we'll have to say that not only does the XML config file have to be compatible, but the messages have to be compatible with one of the existing bots. We recognize the following:

Successful delivery:

FaxBot has copied a Rockfish into your clan's Fax Machine.
Your monster has been delivered to your clan Fax Machine. Thank you for using FaustBot.
Your fax is ready.

Bogus request:

I do not understand your request
Sorry, it appears you requested an invalid monster.
I couldn't find that monster. Try sending "list" for a list of monster names.

Whitelist failure:

... could not whitelist
I am unable to whitelist to clan 'xxx', please verify faustbot (#2504770) is whitelisted. Thank you.
I couldn't get into your clan

Revision 14131 adds the WL failure messages for Faustbot and Easyfax.
 

Crowther

Active member
Which leaves out my somewhat joking message, "I couldn't get my stuff in your fax." That happens when there is a whitelist, but no fax machine.
 

Veracity

Developer
Staff member
KoLmafia won't ask for a monster if the clan you are in doesn't have a fax, so we will never see that message.
 

xKiv

Active member
KoLmafia won't ask for a monster if the clan you are in doesn't have a fax, so we will never see that message.

Does that mean that a character without VIP key can't request faxes, even in clans with fax (because the character can't get into VIP room to check)? Not that I would want to do that.
Well, it may make sort of sense as a "I will request a fax and the first of you who grabs the monster and faxes it right back in wins!" 'game',
or maybe calling a fax on behalf of somebody who's on each bot's blacklist (but that's not a go reason to implement anything in mafia, and anybody can manually /w faxbot anyway)
 

Crowther

Active member
It's just a GUI interface. Said VIPkeyless person can still manually make a request. I really doubt it happens that often.

EDIT: Okay, there's an ash and CLI interface too, but I can't imagine someone needs to automate helping others send a PM.
 
Top