Bug - Fixed KoLmafia thinks it is round # but KoL thinks it is round #-1

icon315

Member
This happened both with my Main and my multi. Mafia seems to not know which round it is. This hasn't happened before (that i remember)


Code:
[145] Typical Tavern Quest
Encounter: drunken rat
Round 0: noon loses initiative!
Round 1: noon casts ENTANGLING NOODLES!
Round 2: noon
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: noon attacks!
KoLmafia thinks it is round 4 but KoL thinks it is round 3
Round 4: noon attacks!
KoLmafia thinks it is round 5 but KoL thinks it is round 4
Round 5: noon attacks!
KoLmafia thinks it is round 6 but KoL thinks it is round 5
Round 6: noon attacks!
KoLmafia thinks it is round 7 but KoL thinks it is round 6
Round 7: noon attacks!
KoLmafia thinks it is round 8 but KoL thinks it is round 7
You lose 5 hit points
Round 8: noon uses the magical mystery juice!
KoLmafia thinks it is round 9 but KoL thinks it is round 8
You gain 10 Mana Points
Round 9: noon casts RAVIOLI SHURIKENS!
KoLmafia thinks it is round 10 but KoL thinks it is round 9
Round 10: noon attacks!
KoLmafia thinks it is round 11 but KoL thinks it is round 10
You lose 5 hit points
 

lostcalpolydude

Developer
Staff member
It's been like that in the daily builds for a while, and it will always happen if you have auto-attack on. Except you don't have auto-attack on, so I don't really know what happened there. It's probably related to Round 2, where mafia lists a line but no action.
 

icon315

Member
It happens often, this wasn't the first time. my default CCS is:
Code:
[ default ]
1:consult SmartStasis.ash
2:attack

does this effect anything?
 

Bale

Minion
The "error message" is not an error. It is informative.

CCS uses the "KoL thinks it is round" to determine what action it will take.

This popped up when Veracity got around to improving fight processing and realized that there was a long standing bug that would mess up people's CCSes if she fixed it. She compromised with the aforementioned message about round difference while she considered how best to fix the problem. She hasn't come to any decision yet.
 

Veracity

Developer
Staff member
It's on my list of "things to look at". Of course, it was on that list during 13.9, too, and I didn't figure it out before 14.0, so it's still there.

This bug report is as good as any to remind me it needs to be fixed, specially considering that the previous bug report I was tracking was in the the old bug report system and is no longer accessible.
 

Bale

Minion
Since this thread is here... Here's a little bit of output that shows Saucy Salve is also a culprit.

Code:
[841] Next to that Barrel with Something Burning in it
Encounter: batwinged gremlin
Strategy: H:\KolMafia\ccs\default.ccs [default]
Round 0: bale wins initiative!
1/4 monsters dropping 1 goals.
This monster drops all your remaining goals!
Round 1: bale casts ENTANGLING NOODLES!
Round 2: bale uses the rock band flyers!
Round 3: bale casts SAUCY SALVE!
KoLmafia thinks it is round 4 but KoL thinks it is round 3
You gain 30 hit points
Round 4: bale casts SAUCY SALVE!
KoLmafia thinks it is round 5 but KoL thinks it is round 3
You gain 10 hit points
Round 5: bale casts SAUCY SALVE!
KoLmafia thinks it is round 6 but KoL thinks it is round 4
You gain 15 hit points
Round 6: bale casts SAUCY SALVE!
KoLmafia thinks it is round 7 but KoL thinks it is round 5
You gain 11 hit points
You lose 8 hit points
Round 7: bale uses the molybdenum magnet!
KoLmafia thinks it is round 8 but KoL thinks it is round 6
You acquire an item: molybdenum hammer
You gain 78 Meat
After Battle: Enn Reitel smiles a three-lipped smile from beneath the shade of his little sombrero.
You gain 19 Fortitude
You gain 19 Magicalness
You gain 23 Sarcasm
 

Winterbay

Active member
I can add that it is also caused by pickpocket, at least the one you get to do when you get the jump on the monster.
 

Veracity

Developer
Staff member
Any autoattack. And, I expect, Stealth Mistletoe. I'm perming that and ascending into DB, after I finish the carboloading trophy in 4 days. I'll look more into this at that time.
 

icon315

Member
A person in my clan sent me this (not really sure why he didn't just make his own account):
He was adventuring in the Junkyard
Code:
Round 1: phil4011 uses the facsimile dictionary!
You lose 30 hit points
Round 2: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 4 but KoL thinks it is round 2
Round 4: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 5 but KoL thinks it is round 2
Round 5: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 6 but KoL thinks it is round 2
Round 6: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 7 but KoL thinks it is round 2
Round 7: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 8 but KoL thinks it is round 2
Round 8: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 9 but KoL thinks it is round 2
Round 9: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 10 but KoL thinks it is round 2
Round 10: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 11 but KoL thinks it is round 2
Round 11: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 12 but KoL thinks it is round 2
Round 12: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 13 but KoL thinks it is round 2
Round 13: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 14 but KoL thinks it is round 2
Round 14: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 15 but KoL thinks it is round 2
Round 15: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 16 but KoL thinks it is round 2
Round 16: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 17 but KoL thinks it is round 2
Round 17: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 18 but KoL thinks it is round 2
Round 18: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 19 but KoL thinks it is round 2
Round 19: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 20 but KoL thinks it is round 2
Round 20: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 21 but KoL thinks it is round 2
Round 21: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 22 but KoL thinks it is round 2
Round 22: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 23 but KoL thinks it is round 2
Round 23: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 24 but KoL thinks it is round 2
Round 24: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 25 but KoL thinks it is round 2
Round 25: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 26 but KoL thinks it is round 2
Round 26: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 27 but KoL thinks it is round 2
Round 27: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 28 but KoL thinks it is round 2
Round 28: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 29 but KoL thinks it is round 2
Round 29: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 30 but KoL thinks it is round 2
Round 30: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 31 but KoL thinks it is round 2
Round 31: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 32 but KoL thinks it is round 2
Round 32: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 33 but KoL thinks it is round 2
Round 33: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 34 but KoL thinks it is round 2
Round 34: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 35 but KoL thinks it is round 2
Round 35: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 36 but KoL thinks it is round 2
Round 36: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 37 but KoL thinks it is round 2
Round 37: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 38 but KoL thinks it is round 2
Round 38: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 39 but KoL thinks it is round 2
Round 39: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 40 but KoL thinks it is round 2
Round 40: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 41 but KoL thinks it is round 2
Round 41: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 42 but KoL thinks it is round 2
Round 42: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 43 but KoL thinks it is round 2
Round 43: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 44 but KoL thinks it is round 2
Round 44: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 45 but KoL thinks it is round 2
Round 45: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 46 but KoL thinks it is round 2
Round 46: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 47 but KoL thinks it is round 2
Round 47: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 48 but KoL thinks it is round 2
Round 48: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 49 but KoL thinks it is round 2
Round 49: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 50 but KoL thinks it is round 2
Round 50: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 51 but KoL thinks it is round 2
Round 51: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 52 but KoL thinks it is round 2
Round 52: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 53 but KoL thinks it is round 2
Round 53: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 54 but KoL thinks it is round 2
Round 54: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 55 but KoL thinks it is round 2
Round 55: phil4011 uses the molybdenum magnet!
KoLmafia declares world peace.
KoLmafia thinks it is round 56 but KoL thinks it is round 2
You're on your own, partner.

Round 56: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 57 but KoL thinks it is round 2
Round 57: phil4011 uses the molybdenum magnet!
KoLmafia thinks it is round 58 but KoL thinks it is round 2
Round 58: phil4011 attacks!
KoLmafia thinks it is round 59 but KoL thinks it is round 3
You lose 34 hit points
Round 59: phil4011 attacks!
KoLmafia thinks it is round 60 but KoL thinks it is round 4
You gain 20 hit points
You gain 20 Mana Points
You gain 115 Meat
You gain 11 Strongness
You gain 22 Wizardliness
You gain 8 Roguishness

He said that after round 57 he went on the relay browser
 
More Combat Macro stuff

Very slight bug, might not be a big deal at all: if a macro doesn't actually do anything on the given round, mafia still thinks that the round counter increases.

For example:
Code:
Encounter: The Black Knight
Round 0: DiablosMinion13 wins initiative!
Round 1: DiablosMinion13 executes a macro!
Round 1: DiablosMinion13 casts TRANSCENDENT OLFACTION!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DiablosMinion13 attacks!
When you're already on the trail of something.

Additionally, this also happens when your macro simply doesn't perform an action:
Code:
Encounter: black adder
Round 0: DiablosMinion13 wins initiative!
Round 1: DiablosMinion13 executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DiablosMinion13 attacks!
 

StDoodle

Minion
Yeah, that hit me yesterday; mafia spent about half an hour doing nothing. Not the worst thing that can happen, but still...
 

Theraze

Active member
Saucy Salve does not increase combat round

Here's an adventure on my latest tower run:
[5374] Sorceress' Hedge Maze
Encounter: topiary golem
Strategy: C:\Program Files (x86)\KoLMafia\ccs\default.ccs [default]
Round 0: Theraze loses initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Monster value: 0
Meat/round from Cocoabo: 7.57
MP/round from Cocoabo: 2.3
HP/round from Cocoabo: 2.3
Profit per round: 29.68
Round 1: Theraze casts SAUCY SALVE!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You gain 10 hit points
Round 2: Theraze casts SAUCY SALVE!
KoLmafia thinks it is round 3 but KoL thinks it is round 1
You gain 15 hit points
Round 3: Theraze casts SAUCY SALVE!
KoLmafia thinks it is round 4 but KoL thinks it is round 1
You gain 13 hit points
Round 4: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 5 but KoL thinks it is round 2
Round 5: Gronald coos softly, and nuzzles you with his beak.
You gain 26 hit points
You gain 26 Mana Points
Round 5: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 6 but KoL thinks it is round 3
Round 6: Gronald lodges the ice-cold pick in your enemy, dealing 11 damage.
Round 6: topiary golem takes 11 damage.
Round 6: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 7 but KoL thinks it is round 4
Round 7: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 8 but KoL thinks it is round 5
Round 8: Gronald roots around in the ground, and comes up with some Meat. He wings it to you. LIMIT BREAK!
You gain 198 Meat.
Round 8: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 9 but KoL thinks it is round 6
Round 9: Gronald coos softly, and nuzzles you with his beak. LIMIT BREAK!
You gain 47 hit points
You gain 47 Mana Points
Round 9: Theraze uses the facsimile dictionary!
KoLmafia thinks it is round 10 but KoL thinks it is round 7
Round 10: Theraze executes a macro!
Round 10: Theraze attacks!
KoLmafia thinks it is round 11 but KoL thinks it is round 8
Round 11: Theraze attacks!
Round 12: Theraze attacks!
Round 13: Theraze attacks!
Round 14: Gronald lodges the ice-cold pick in your enemy, dealing 10 damage.
Round 14: topiary golem takes 10 damage.
Round 14: Theraze attacks!
Round 15: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 21 damage.
Round 15: topiary golem takes 21 damage.
Round 15: Theraze attacks!
Round 16: Theraze attacks!
Round 17: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 42 damage. LIMIT BREAK!
Round 17: topiary golem takes 42 damage.
Round 17: Gronald lodges the ice-cold pick in your enemy, dealing 10 damage.
Round 17: topiary golem takes 10 damage.
Round 17: Theraze attacks!
Round 18: Theraze attacks!
Round 19: Theraze attacks!
Round 20: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 21 damage.
Round 20: topiary golem takes 21 damage.
You lose 36 hit points
Round 20: Theraze attacks!
Round 21: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 21 damage.
Round 21: topiary golem takes 21 damage.
Round 21: Theraze attacks!
Round 22: Theraze attacks!
Round 23: Gronald lodges the ice-cold pick in your enemy, dealing 12 damage.
Round 23: topiary golem takes 12 damage.
Round 23: Theraze attacks!
Round 24: Gronald lodges the ice-cold pick in your enemy, dealing 11 damage.
Round 24: topiary golem takes 11 damage.
Round 24: Theraze attacks!
Round 25: Theraze attacks!
Round 26: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 22 damage.
Round 26: topiary golem takes 22 damage.
Round 26: Theraze attacks!
You lose 39 hit points
Round 27: Theraze attacks!
Round 28: Theraze attacks!
Round 29: Gronald coos softly, and nuzzles you with his beak. LIMIT BREAK!
You gain 47 hit points
You gain 47 Mana Points
Round 29: Theraze attacks!
Round 30: Theraze attacks!
Round 31: Gronald lodges the ice-cold pick in your enemy, dealing 11 damage.
Round 31: topiary golem takes 11 damage.
Round 31: Theraze attacks!
Round 32: Theraze attacks!
Round 33: Gronald paws at the ground for a second, and then charges your opponent, bashing him for 23 damage.
Round 33: topiary golem takes 23 damage.
Round 33: Theraze attacks!
Round 34: Gronald lodges the ice-cold pick in your enemy, dealing 11 damage.
Round 34: topiary golem takes 11 damage.
You acquire an item: hedge maze puzzle
You gain 13 Strengthliness
You gain 31 Wizardliness
You gain 16 Chutzpah

I was suspecting that might be the case... it appears that rounds where you use SAUCY SALVE where no actions besides your casting happen don't actually count against the 30 round max. What seems like it would be the 'proper' behaviour for this would be for mafia to not actually increment the round counter if salve triggers properly.
 
Last edited:

Veracity

Developer
Staff member
How about titling this "Saucy Salve does not increase combat round" to let us know what the problem is without having to read the bug report?
 

Theraze

Active member
Title of the initial post updated. Unfortunately I think that a forum administrator needs to change the thread title. I was trying to decide how to describe it and couldn't come up with a good solution.
 

heeheehee

Developer
Staff member
For reference, the difference between salve taking up a round and not taking one up is the presence of the word "quickly" (i.e. "You quickly conjure" vs. "You conjure").

Presumably rate of occurrence isn't relevant if you just parse the combat results. Probably also useful to know is that there's no chance of the monster being killed if salve doesn't take a turn -- nothing happens other than the casting of salve.

edit: Also related is Mafia's incrementing of round number even if an invalid action is taken -- that is, submitting 0 as the item/skill/macro number. For item/skill, it spits out "That doesn't make sense" followed by some other text. For a macro, it just outputs "Invalid Macro".

"Fun" fact: it's probably a KoL bug that using an invalid item (i.e. bad item number or something that's not combat-usable) increments the round number, even though KoL just spits out an error. An invalid skill (e.g. shieldbutt without a shield) uses up MP if you have the skill, "amusingly" enough, as well as a round.
 
Last edited:

Theraze

Active member
Yeah, I mention it mostly because it can be important if you're trying to decide how close you are to losing on Wossname boss fights when plinking them. Not much else I've done where I hit and don't manage to damage them enough to kill in time.
 

Theraze

Active member
So, looking at when the actual round incrementing happens, it goes with the following... +1 if node name equals "hr" in processNode, +1 if updateCombatData is called, +1 in updateCombatData if autoAttacked is true (with a note that it shouldn't be like this and that code needs sanity checking eventually). No clue what the hr node is... updateCombatData doesn't seem to be called anywhere in FightRequest though. Seems to be called in generic request, if the page loaded is fight.php... so updateCombatData should be able to have a matcher for quickly casting and skip the incrementing if so. As I said, not certain on the "hr" bit... if that gets processing including player command, it should be easy to mark as skipping. Else, it may need to actually decrement the round in node processing, rather than just skipping the increment.
 
Top