Bug - Fixed Mafia not logging dart skills properly?

Lord President

New member
Hi,
This is probably not a big deal but it seems Mafia isn't logging dart skills usage properly.
I have set my autoattack (BALLS) to include these lines of text:
if hasskill throw at torso
skill throw at torso
endif
which is working fine in KoL, always hits torso.
But Mafia isn't logging it properly.
Roughly 75% of the time (or maybe more often) it logs a different, random part:
Round 1: Lord President casts DARTS: THROW AT HEAD!
or
Round 1: Lord President casts DARTS: THROW AT ARM!
or
Round 1: Lord President casts DARTS: THROW AT LEG!
etc.
My darts are fully upgraded.
Not sure why it's happening.
Has anyone else noticed this discrepancy?
 
Last edited:
I added that logging, based on what we've deduced about the skill-to-part mapping that we figure out when we see the dartboard.
I have never automated darts. It has always been completely accurate, whenever I use darts. Which is every single fight, except for four gremlins. :)

I suspect the issue is that it's your auto-attack.
Which is to say, the skill fires before you've even see the initial round of the fight.

I have never used autoattack.

I'll take a look at how/when we make the skill/body part mapping.
 
if it helps, the autoattack combat usually looks like this:
[11] Cobb's Knob Treasury
Encounter: Knob Goblin Embezzler
Round 0: Lord President wins initiative!
Round 0: Lord President casts SING ALONG!
Round 1: Lord President casts DARTS: THROW AT BUTT! (incorrectly logged part)
Round 2: Knob Goblin Embezzler takes 410 damage.
Round 2: Lord President wins the fight!

It does seem to be related to autoattack, yes.
Just tested now, when doing the combat manually, the logging is correct.
edit: The rounds are also numbered slightly different when playing manually.
[12] Cobb's Knob Treasury
Encounter: Knob Goblin Embezzler
Round 0: Lord President wins initiative!
Round 1: Lord President casts SING ALONG!
Round 2: Lord President casts DARTS: THROW AT TORSO!
Round 3: Knob Goblin Embezzler takes 580 damage.
Round 3: Lord President wins the fight!
 
Last edited:
I think I understand the issue.

1) I created a macro like yours and set autoattack to use it.
2) On my first turn of the day, I adventured in The Defiled Nook.
3) After skipping 5 NCs, I found a toothy skleton.

Code:
[534] The Defiled Nook
Encounter: toothy sklelton
Round 0: Veracity wins initiative!
Round 0: Veracity casts DARTS: THROW AT %PART1!
Round 1: toothy sklelton takes 511 damage.
Round 1: Veracity wins the fight!
Since auto attack killed the monster, no dart board was shown.
Since I had run no turns previously, I didn't have a dart board saved.
Therefore, it had no choice but to log the raw skill name.

That's as good as it can do in this case. From my DEBUG log:

<!-- macroaction: skill 7513 -->

We depend on KoL to tell us what the action was, rather than, say, parsing the English text and trying to figure it out.

I'll try disabling autoattack and going in again - and letting KoLmafia learn the dartboard - and then setting autoattack again and going yet a third time. I predict it will label the dart attack using the previous dart board.

Yup. That's what happened.

Code:
[535] The Defiled Nook
Encounter: spiny skelelton
Round 0: Veracity wins initiative!
Round 0: Veracity casts DARTS: THROW AT SKULL!
Round 1: spiny skelelton takes 523 damage.
Round 1: Veracity wins the fight!

I think the solution is to clear the dartboard at the end of the battle, in which case, we'll just not label the dart action from auto attack, since we can't do that accurately.
 
Oh, ha ha! It turns out that the (accurate) dartboard is on the page - even if your autoattack kills the monster.
It's just hidden.

Simple fix: parse the dartboard before parsing the rest of the fight.
 
Back
Top