Feature - Implemented Track learning of Mer-Kin gladiatorial weapon skills

Magus_Prime

Well-known member
I would like to request that Mafia track the learning of the skills associated with the use of the:

  • Mer-Kin Switchblade
  • Mer-Kin Dodgeball
  • Mer-Kin Dragnet

This would allow scripts to determine appropriate actions based on which skills are known.

Thank you for your consideration.
 

Veracity

Developer
Staff member
What do you mean by "track the learning of the skills"? Can you not, for example, do

if ( have_skill( $skill[ Ball Bust ] ) { ... }

to check if you have the "Ball Bust" skill?

Or, are you you saying that KoLmafia does not recognize when you learn such skills - in which case, that is a bug.

Edit: the Wiki says the skills are announced as "New Special Move Unlocked". I think I'll try the Gladiator Path when I hit the Sea again - Monday, probably - and I'll save the fight text to look at.

It's probably as simple as adding some appropriate code to call ResponseTextParser.learnSkill() in FightRequest.processNode() when it gets that message in the appropriate format during a fight. I need the HTML to look at.
 
Last edited:

Bale

Minion
What do you mean by "track the learning of the skills"? Can you not, for example, do

if ( have_skill( $skill[ Ball Bust ] ) { ... }

to check if you have the "Ball Bust" skill?

Nope. They are item linked combat skills. You can only tell that you possess them by being in a fight while equipped with the appropriate weapon.
 

Veracity

Developer
Staff member
Which brings me back to my original question: What do you mean by "track the learning of the skills"?
 

Magus_Prime

Well-known member
I made the request after Theraze responded to a question I asked in the WHAM thread:

One thing I found myself wishing for is an auto-stop once the third skill for a given weapon is learned. Is that something that you might entertain as a feature request. Perhaps controlled by a zlib variable?

Right now WHAM helps with the process of learning the skills, by prolonging normal combat, but WHAM keeps going even if all skills for a given weapon are learned.

Here is Theraze's response:

Since this is a combat script rather than an adventuring script, it's rather difficult to autostop without making things go wrong in the middle of combat. Seems like the best fix for this would be requesting mafia tracking of the skills being learned, with the various texts posted, so that you can track that properly. Bonus from mafia learning them: it properly resets on ascensions.

So I made the feature request.
 

Darzil

Developer
I'd have thought it pretty trivial to exit a combat script when the text for learning the third skill appears, or when the third skill associated with the equipped weapon appears in the dropdown ?
 

Winterbay

Active member
The first could possibly be done with a match-predicate for the macro sent, but since the script sends the entire thing in one request (to save server hits) looking for the skill becoming available in the dropdown won't work. I have no idea what the proper text is to look for though.
 

Veracity

Developer
Staff member
The best fix for this would be requesting mafia tracking of the skills being learned, with the various texts posted, so that you can track that properly.
Let me try again. Maybe third time will be the charm.

What do you mean by "track the learning of the skills"? What, exactly, would your consult script look at to determine that your character has learned a skill? Without the context you quoted, your original request looked like you wanted the consult script to be able to use the skill if you knew it. Now it appears that you simply want it to know how many net/blade/ball skills you know in total.

Or maybe both. I don't use scripts. I don't think I'd use this feature. I don't know what is useful.

What do you - or WHAM - want?
 

Magus_Prime

Well-known member
My original thought was simply: allow a consult script to detect whether all three skills for a given mer-kin gladiatorial weapon had been learned. Once detected a script could then, optionally, stop adventuring, switch weapons, etc..

The responses from Theraze and Winterbay convinced me that it was more complex to implement than I thought. Winterbay can, hopefully, speak to how WHAM would best use the information.
 

Darzil

Developer
The first could possibly be done with a match-predicate for the macro sent, but since the script sends the entire thing in one request (to save server hits) looking for the skill becoming available in the dropdown won't work. I have no idea what the proper text is to look for though.

From the wiki pages on the weapons :

New Special Move Unlocked: Net Neutrality
New Special Move Unlocked: Ball Sack
New Special Move Unlocked: Blade Runner
 

Veracity

Developer
Staff member
Are the skills for a given weapon always learned in the same order?

KoLmafia could easily "learn" skills when it sees "New Special Move Unlocked". It could have, for example, a setting like "ballSkillsKnown" which starts at 0 and is set to 1, 2, or 3 when you learn a skill. A consult script could look at that, if you have the dodgeball equipped, and decide if it needs to stasis criticals and attempt to learn more skills. Or, it could look at that and decide to use one of the skills you already know. It would have to know that if you have 2 ball skills, you have "Ball X" and "Ball Y" - unless KoLmafia made that known to it via have_skill(), say.

I don't use consult scripts. I use the Relay Browser and KoLmafia's stationary buttons, which, due to slyz's great feature a while back, automatically update to include item-provided skills, based on what's in the skill dropdown. Therefore, I confidently expect that as I learn Ball skills, new buttons will automatically appear for me when I have a dodgeball equipped. I'll find out as early as Monday.

I'd like to hear what Winterbay says he needs. Thanks.
 

Magus_Prime

Well-known member
Based on 5 runs so far the skills are learned in the same order. The Relay Browser action buttons do update properly when a weapon skill has been learned.

What I'm requesting is for some way to tell, outside of combat with a specific weapon, how many of the skills for a given weapon have been learned.
 

Winterbay

Active member
I'd like to hear what Winterbay says he needs. Thanks.

I think, for me, from Mafia I need one thing: A way to tell if the third skill is already learned. The abort should probably be added to the abort of the macro as a match against the new combat move text for the last skill.

Edit: Revisoion 13 of WHAM Beta attempts to abort the stasising if it detects that we have learned the last skill. It will still try every fight though since we don't know that this is true when we are in combat which is what this feature request could help with :)
 
Last edited:

Theraze

Active member
As I understood the MP request, he wanted to be able to know, outside of combat, that he didn't need to start another combat with the same weapon equipped. Something like ballSkillsKnown would accomplish this. While WHAM could track the skills as they're learned, outside of combat WHAM has no connection to the user changing equipment and so I suggested that it probably wasn't the best place for equipment-change requests. :)
 

Veracity

Developer
Staff member
I experimented with a multi. Turns out, learning a special move is tagged by KoL as "familiar actions", for some reason.

Code:
    <p>
      You're getting better at fighting with a Mer-kin dodgeball!
      <!--familiarmessage-->
    <center>
      <table>
        <tbody>
          <tr>
            <td align="center" valign="center">
              <img src="http://images.kingdomofloathing.com/itemimages/dodgeball.gif" width="30" height="30">
            <td valign="center">
              New Special Move Unlocked:
              <b>
                Ball Bust
Revision 12252 recognizes when you learn a special move, logs it, and sets the appropriate setting to the correct value:

gladiatorBallMovesKnown
gladiatorBladeMovesKnown
gladiatorNetMovesKnown

They do not appear on your character sheet, so, I don't think we have a way of recognizing if you learn moves outside of KoLmafia - other than parsing the "skills" dropdown on the Fight page and seeing if the skills appear there. Perhaps KoL could put it on your Other Accomplishments page - like your seahorse name - but I wouldn't hold my breath. There are other things (like the sea lasso or the pool table) that you get better at with training that KoL does not expose.

Tell me if there is anything else you need for this feature. I'll be back in the Sea with my main on Monday.
 

Winterbay

Active member
Revision 12252 recognizes when you learn a special move, logs it, and sets the appropriate setting to the correct value:

gladiatorBallMovesKnown
gladiatorBladeMovesKnown
gladiatorNetMovesKnown

Thanks. I've added that to the train_skills-check.
 
Top