Bug faxbot command stopped working

wRAR

New member
I'm trying to fax an ungulith while in CS. A simple TS "faxbot($monster`ungulith`)" worked until yesterday, now it makes Mafia print "Configuring Easyfax (2504737)" and hang. The same happens when using "ash faxbot($monster[scary pirate]);" or "ash can_faxbot($monster[scary pirate]);" in CLI manually, BUT the same also happens with "ash faxbot($monster[scary pirate], "CheeseFax");", as in it doesn't talk to CheeseFax, still hanging after "Configuring Easyfax". Same with "faxbot ungulith" and "faxbot ungulith cheesefax". Also, none of these opens a chat tab with any of the bots.

"/whois easyfax" says it's online. "/msg easyfax fax ungulith" opens a chat tab with it, and it replies "I couldn't find that monster", but I assume the Mafia code doesn't even send the message so that wouldn't matter.

Mafia version is r27530.
 

fronobulax

Developer
Staff member
Might not be a mafia problem but we shall see.

Once per session mafia will try and download faxbot files from a repository so if the repository is momentarily unavailable that will break faxing.

The files are in data/ Easyfax.xml and faxlist.xml and if they are corrupted results will vary.

Just because a faxbot shows up as online does not mean it is processing requests. That is something that the bot runner needs to address.

I occasionally see "I couldn't find that monster" even when the fax list says it should be available and all the usual issues with non-printing characters have been checked. That usually goes away after a couple of days. I always thought "I couldn't find that monster" meant there was an error in the monster name as sent to the faxbot but it could also mean the faxbot could not find a visitable clan to fetch the monster.

So my first response is to suggest you wait and try again unless someone recalls a recent mafia change that might have had an unintended side effect.
 

wRAR

New member
Both data/easyfax.xml and data/cheesefax.xml are non-empty and valid XML (and contain both ungulith and scary pirate).

If easyfax replies "I couldn't find that monster" I'd expect the command to give an error or try cheesefax and if when I pass cheesefax as the second arg I'd expect the command to try cheesefax directly. The behavior I get suggests something else is happening, but I have no idea what does faxbot() do under the hood. The chat tab not appearing also suggests the command wasn't sent, but again I don't know when does it actually appear so I cannot assume anything.
 

Veracity

Developer
Staff member
For sending messages to faxbots, the message is "ungulith", not "fax ungulith".

I don't use the "faxbot" command, since I don't want to require an open chat window; my scripts send a chat message to a particular faxbot and periodically check to see if the monster has arrived. They don't even check if the specific faxbot advertises that it has the monster. I should probably do that. Using can_faxbot(), perhaps?

From one character's session log this afternoon:

Code:
> Requesting a fax
> Trying to get Knob Goblin Embezzler from cheesefax...
You acquire an item: photocopied monster
WARNING: updated modifier not in modifiers.txt: Item:[4873]
You acquire an item: photocopied monster
> cheesefax sent us a Knob Goblin Embezzler

From another characer's session log, a couple of seconds ago:

Code:
> Requesting a fax
> Trying to get Black Crayon Constellation from cheesefax...
You acquire an item: photocopied monster
WARNING: updated modifier not in modifiers.txt: Item:[4873]
> cheesefax sent us a Black Crayon Constellation

I should probably look into the (KoLmafia generated) WARNING, but simply sending a message with only the monster name in it prompted the faxbot to come and give me the monster.

Considering that I am not using the faxbot command, this doesn't actually address your question.

Let's see:

I opened a chat window:

Code:
> ash faxbot($monster[ungulith])

Visiting Fax Machine in clan VIP lounge
Asking Easyfax to send a fax of ungulith: ungulith
Receiving a fax.
You acquire an item: photocopied monster
You receive a photocopied ungulith from the fax machine.
Returned: true

That worked.

Trying with cheesefax, first it had to dump the old fax.

Code:
> ash faxbot($monster[ungulith], "cheesefax")

Visiting Fax Machine in clan VIP lounge
Sending a fax.
You load your photocopied monster in the fax machine.
Asking CheeseFax to send a fax of ungulith: ungulith
Receiving a fax.
You acquire an item: photocopied monster
You receive a photocopied ungulith from the fax machine.
Returned: true

That also worked.
 

wRAR

New member
Yes, it feels like the problem is not happening for everyone (it would break many various scripts), but I wonder why is it happening for me? I wonder if I can debug it in some way.
 

Crowther

Active member
I don't see anything unusual in Easyfax's logs (except "fax ungulith" failing). It looks like an ungulith was delivered to your clan every time you asked for one.
 
Top