Testudinata's buffs updated; verifying Mafia support for users?

Nikademus

New member
I've finally brought Testudinata into 2010 with the Crimbo 2009 buffs and a couple additional buff packages. Previously established prices are remaining the same, because it causes tremendous confusion every time I lower prices; thus I don't want to do that too often. (This process was already well underway when Kingdom of Buffing disappeared into the mists. Mmm, coincidences.)

Anyway, I want to make sure that Mafia understands the new offerings to the extent that it can, but I'm still not entirely familiar with how this should properly be done. I can now personally host a Web page with the necessary information, assuming it's low-bandwidth. What should I do for this? You may respond either here or k-mail me (Nikademus #95105, preferably not Testudinata herself) in-game.
 

heeheehee

Developer
Staff member
Basically, create an XML file, and build it, as follows:
PHP:
<?xml version="1.0" encoding="ISO-8859-1"?>
<botdata>
<name>Testudinata</name>
<playerid>537858</playerid>
<free-list>
	<buffdata>
		<name>The Ode to Booze</name>
		<skillid>6014</skillid>
		<price>1</price>
		<turns>15</turns>
		<philanthropic>true</philanthropic>
	</buffdata>
	<buffdata>
		<name>Moxious Madrigal</name>
		<skillid>6004</skillid>
		<price>2</price>
		<turns>240</turns>
		<philanthropic>true</philanthropic>
	</buffdata>
	<buffdata>
		<name>Ghostly Shell</name>
		<skillid>2007</skillid>
		<price>23</price>
		<turns>300</turns>
		<philanthropic>false</philanthropic>
	</buffdata>
</free-list>
<normal-list></normal-list>
</botdata>
(First two philanthropic buffs and first normal buff done for you)

Then, when it's done, host it online and let the Mafia devs know the URL to the XML file.

At least, I think that's how it works. I'm not entirely sure what's up with "free-list" and "normal-list"; I used NotBot's file as a template, for the most part.
 

Veracity

Developer
Staff member
Looking at the code, I think the buffbot itself creates that .xml file in "buffs/<username>.xml"
 

Ranrar

New member
I have recently built a bot and can confirm that the file mafia/buffs/botname.xml is auto created by mafia when a buffbot is started. I had to delete it once in order to get it to update and now just do it as a habit whenever I change pricing. Not sure if that is necessary.

Also, be smarter than me and don't freak out that the file looks very basic and texty when you open it. Lots of things will auto-render the file on open.
 

Nikademus

New member
Looking at the code, I think the buffbot itself creates that .xml file in "buffs/<username>.xml"

Yeah, that I realised (you also need buffbot.xsl from the same directory), I just wasn't sure where to put the file. I suppose I'll host the files myself; is telilng you sufficient, or is there someone else I should inform? The updated xml file is now at:

http://www.rawbw.com/~ssjlee/kol/testudinata.xml

It's only 33kb, but I don't have epic bandwidth, so I hope it doesn't get hit too often. If for whatever reason you think it'd be better to host the file elsewhere, let me know.

There's something not related I might as well bring up here, while I'm at it: if a buff pack casts 2 or more Accordion Thief buffs, but the requester can accommodate some but not all of them, it appears as though the ones that can be successfully cast are done, and then failure of the subsequent buffs causes the entire routine to abort without full proper error handling. Have other people been reporting this?
 

Veracity

Developer
Staff member
The file gets read every time somebody first clicks the "get buffs" icon in KoLmafia. You put the file wherever is convenient and tell us the URL, as you just did. It's entirely up to you; we have no opinion about it, other than that it should be on-line all the time, rather than on a server which has extended downtime.

We then enter it into buffbots.txt and submit the revision and voila! Revision 8529.

Nobody has reported problems with the buffbot code for years. What do you mean by "the entire routine" aborts? It stops acting as a buffbot?
 

Nikademus

New member
Nobody has reported problems with the buffbot code for years. What do you mean by "the entire routine" aborts? It stops acting as a buffbot?

If a bot is supposed to cast multiple buffs on a requester, and that includes at least one Accordion Thief song, it will occasionally stop casting buffs in that request after the AT song, but still report in the log that everything was cast. It's sporadic, happening only a small percentage of the time (<1%, easily) , so it's not going to be easy to reproduce.

Actually, I also have a request: how hard would it be to add the capacity to privately message (via /msg command) a bot with a request for a buff? This would only be for philanthropic buffs.
 

heeheehee

Developer
Staff member
A chatbotScript should be able to do this. Since I haven't actually written one, this is all theoretical:
PHP:
string[string,skill]map;
file_to_map("offerings.txt",map);
void main(string sender, string message) {
    if(have_skill(message.to_skill()) && map[sender,message.to_skill()]!=today_to_string()) {
        map[sender,message.to_skill()] = today_to_string();
        use_skill(1,message.to_skill(),sender);
        map_to_file(map, "offerings.txt")
    }
}
This would be a simple script that enables a user to request a single cast of a specified skill, limited to once per skill per day for that player. Obviously you could do something much more advanced, but this is, as mentioned, just a simple example.
 

Nikademus

New member
A chatbotScript should be able to do this. Since I haven't actually written one, this is all theoretical:

Thanks, I'll look into it -- I have other things on my mind at present.

I've set up a temporary buffbot, Fuhransi (#59975), to handle Sonata/Cantata/Ur-Kel/Dirge while Binary ascends and gets other stuff. However, a couple things aren't quite functioning right:

  • The "minimize to system tray" option isn't working. It works fine for the other bots.
  • When Fuhransi casts an Accordion Thief buff on a player who is already maxed out on AT buffs, it will report the cast as successful, rather than properly giving a message about the target having too many AT buffs and providing a refund.

What should I do to fix these problems?

Thanks for any help you can give!
 
Top