CrumblingButtercookie
New member
Using r25740, I have a CCS that goes like
A few months ago this used to work fine, but now after returning from my pause, this breaks fights with an "Invalid Macro" error. After playing around with a few things, I think I've tracked it down to this:
In the GUI I only have the two pickpocketing-related special actions checked, but since I don't have that skill, it won't actually result in any special action taking place, unless I (or a script) happen to want to olfact something.
If by chance I happen to want to olfact something, this happens and things work fine:
If however no special action is necessary, it seems like the then empty "special action" macro is being optimised down to a bunch of newlines, which then seem to break KoL and cause an "Invalid Macro" message (with no further details):
Edit: I've realised the problem doesn't just apply to "special action" – if I add an entry for a specific monster with an explicit olfaction instruction before the consult script, the same thing happens when I encounter the monster once I've already olfacted it: The olfaction command is optimised into a bunch of newlines and bam, error.
I should also add that just using a consult script without any other further CCS instructions also works fine, since in that case it seems that Mafia doesn't attempt any combat macro generation at all.
Code:
[ default ]
special action
consult WHAM.ash
A few months ago this used to work fine, but now after returning from my pause, this breaks fights with an "Invalid Macro" error. After playing around with a few things, I think I've tracked it down to this:
In the GUI I only have the two pickpocketing-related special actions checked, but since I don't have that skill, it won't actually result in any special action taking place, unless I (or a script) happen to want to olfact something.
If by chance I happen to want to olfact something, this happens and things work fine:
Code:
stopping macrofication due to action: consult WHAM.ash
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
call mafiaround; use 347
mark mafiampexit
endsub#mafiamp
#mafiaheader
if hasskill 19
call mafiaround; skill 19
endif
Optimized macro:
#mafiaround
#mafiamp
#mafiaheader
if hasskill 19
; skill 19
endif
class net.sourceforge.kolmafia.request.FightRequest
Round 1: Crumbling Buttercookie executes a macro!
Connecting to fight.php...
Requesting: https://www.kingdomofloathing.com/fight.php?action=macro¯otext=%0A%0A%0Aif+hasskill+19%0Askill+19%0Aendif%0A
If however no special action is necessary, it seems like the then empty "special action" macro is being optimised down to a bunch of newlines, which then seem to break KoL and cause an "Invalid Macro" message (with no further details):
Code:
stopping macrofication due to action: consult WHAM.ash
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
call mafiaround; use 347
mark mafiampexit
endsub#mafiamp
#mafiaheader
Optimized macro:
#mafiaround
#mafiamp
#mafiaheader
class net.sourceforge.kolmafia.request.FightRequest
Round 1: Crumbling Buttercookie executes a macro!
Connecting to fight.php...
Requesting: https://www.kingdomofloathing.com/fight.php?action=macro¯otext=%0A%0A%0A
Edit: I've realised the problem doesn't just apply to "special action" – if I add an entry for a specific monster with an explicit olfaction instruction before the consult script, the same thing happens when I encounter the monster once I've already olfacted it: The olfaction command is optimised into a bunch of newlines and bam, error.
I should also add that just using a consult script without any other further CCS instructions also works fine, since in that case it seems that Mafia doesn't attempt any combat macro generation at all.
Last edited: