Feature Check result of using scrolls against RAM (or allow user scripted scroll creation)

slyz

Developer
I don't really know where this is coming from, but while farming for 31337 scrolls I had a few occurrences of combats against rampaging adding machines where a scroll was reported as used by Mafia, and was indeed used when checking for refreshed item amounts after combat, but wasn't taken into account by KoL.

Here is an example of CLI output where this happened:
Code:
[2289] Orc Chasm
Encounter: rampaging adding machine
Strategy: D:\dloads\KoLMafia\ccs\chasm.ccs [rampaging adding machine]
Round 0: slyz loses initiative!
Round 1: ML irritates the crap out of you and your opponent with his incessant high-pitched yapping.
Round 1: rampaging adding machine takes 1 damage.
Round 1: rampaging adding machine takes 10 damage.
Round 1: rampaging adding machine takes 4 damage.
You lose 1 hit point
(unable to macrofy vs. RAM)
Round 1: slyz uses the 30669 scroll!
Round 2: slyz uses the 668 scroll!
Round 3: slyz uses the 334 scroll!
Round 4: slyz uses the 334 scroll!
Round 5: slyz uses the 334 scroll!
You acquire an item: 668 scroll
Round 6: slyz uses the 334 scroll!
Round 7: slyz uses the 30669 scroll!
Round 8: slyz uses the 668 scroll!
Round 9: slyz uses the 334 scroll!
Round 10: slyz uses the 334 scroll!
Round 11: slyz uses the 334 scroll!
You acquire an item: 668 scroll
Round 12: slyz uses the 334 scroll!
Round 13: slyz uses the 30669 scroll!
Round 14: slyz uses the 668 scroll!
Round 15: slyz uses the 334 scroll!
Round 16: slyz uses the 334 scroll!
Round 17: slyz uses the 334 scroll!
You acquire an item: 668 scroll
Your familiar gains a pound: ML, the 3 lb. Purse Rat
You gain 16 Fortitude
You gain 14 Enchantedness
You gain 26 Sarcasm

The first two scrolls used didn't result in a 31337 scroll, and one of those first two simply disappeared without being eaten by the RAM. Mafia kept throwing scrolls two by two, but was out of synch with what was happening during the combat, and the only scrolls created where 668 scrolls created accidentally with the 2nd 334 of a first try to create a 668, and the 1rst 334 of a second try to create a 668.

Here is a second combat:
Code:
[2303] Orc Chasm
Encounter: rampaging adding machine
Strategy: D:\dloads\KoLMafia\ccs\chasm.ccs [rampaging adding machine]
Round 0: slyz loses initiative!
Round 1: ML irritates the crap out of you and your opponent with his incessant high-pitched yapping.
(unable to macrofy vs. RAM)
Round 1: slyz uses the 30669 scroll!
Round 2: slyz uses the 668 scroll!
Round 3: slyz uses the 334 scroll!
Round 4: slyz uses the 334 scroll!
KoLmafia declares world peace.

Round 5: slyz uses the 334 scroll!
You acquire an item: 668 scroll
KoLmafia thinks it is round 7 but KoL thinks it is round 6
Round 7: slyz uses the 30669 scroll!
KoLmafia thinks it is round 8 but KoL thinks it is round 7
Round 8: slyz uses the 668 scroll!
KoLmafia thinks it is round 9 but KoL thinks it is round 8
You acquire an item: 31337 scroll
Round 9: slyz uses the 334 scroll!
KoLmafia thinks it is round 10 but KoL thinks it is round 9
Round 10: slyz uses the 334 scroll!
KoLmafia thinks it is round 11 but KoL thinks it is round 10
You acquire an item: 668 scroll
Round 11: slyz uses the 30669 scroll!
KoLmafia thinks it is round 12 but KoL thinks it is round 11
Round 12: slyz uses the 668 scroll!
KoLmafia thinks it is round 13 but KoL thinks it is round 12
You acquire an item: 31337 scroll
Round 13: rampaging adding machine takes 3 damage.
Round 13: rampaging adding machine takes 5 damage.
Round 13: rampaging adding machine takes 4 damage.
You lose 1 hit point
KoLmafia thinks it is round 14 but KoL thinks it is round 12
Round 14: slyz uses the 334 scroll!
KoLmafia thinks it is round 15 but KoL thinks it is round 13
Round 15: slyz uses the 334 scroll!
KoLmafia thinks it is round 16 but KoL thinks it is round 14
You acquire an item: 668 scroll
Round 16: slyz uses the 30669 scroll!
KoLmafia thinks it is round 17 but KoL thinks it is round 15
Round 17: slyz uses the 668 scroll!
KoLmafia thinks it is round 18 but KoL thinks it is round 16
You acquire an item: 31337 scroll
Round 18: slyz uses the 334 scroll!
KoLmafia thinks it is round 19 but KoL thinks it is round 17
Round 19: slyz uses the 334 scroll!
KoLmafia thinks it is round 20 but KoL thinks it is round 18
You acquire an item: 668 scroll
You gain 11 Fortitude
You gain 20 Magicalness
You gain 26 Sarcasm

> inv 31337

31337 scroll (43)

> refresh inv

Refreshing closet...
Updating consumable items...
Updating miscellaneous items...
Refreshing stickers...
Requests complete.

> inv 31337

31337 scroll (43)

I stopped the combat when I saw that no 31337 scroll was created from using the first two scrolls, and finished manually. During the combat, I checked that the number of 30669 and 668 scrolls reported by the KoL CAB where the same as the number reported by Mafia's inventory, and I checked after that Mafia hadn't missed any 31337 scroll acquired during combat.

I really don't know why a scroll was used, but not eaten by the RAM. It doesn't look like lag is the problem here, since the scrolls did disappear from inventory, so I would bet on a server-side issue.

Finally, the feature request would be for Mafia to check if using a pair of scrolls had the desired result (ie checking if a 668 scroll was acquired after using the second 334 scroll) before continuing the combat, in order to avoid getting out of synch this way.

Another solution would be to be able to skip Mafia automatic scroll creation and go directly to a consult script (or combat macro) that could handle this problem. Right now, the options are "show in Browser" or "create goal + ...". I tried removing goals and choosing "create goal scrolls only", but after the combat Mafia added the 31337 scrolls as goals automatically.
Code:
Validating adventure sequence...
Condition added: 31337 scroll (35)
31337 scroll (35)
Requests complete.

This would also help with the few reports of Mafia mis-behaving when trying to create scrolls with the Black cat batting away items.
 

slyz

Developer
Sorry for double post, but I managed to catch a debug log of a combat where this happened, and found the origin of the problem: the first 668 scroll that mafia tries to use in those combats where the problem appears actually isn't in my inventory:
Code:
Round 2: slyz uses the 668 scroll!
Connecting to fight.php...

Requesting: http://www3.kingdomofloathing.com/fight.php?action=useitem&whichitem=548

[ ... ]

<td>
  <center>
    <table>
      <tbody>
        <tr>
          <td>
            <img id="monpic" src="http://images.kingdomofloathing.com/adventureimages/adding.gif" width="100" height="100">
          <td valign="center">
            You're fighting
            <span id="monname">
              a rampaging adding machine
    <br>
    You don't have that item.
    <br>
Processing result: 668 scroll (-1)

Now I don't really know why Mafia thought there was a 668 scroll in my inventory.
 

Attachments

  • DEBUG_20100531.txt
    694.8 KB · Views: 35
Last edited:

Winterbay

Active member
Since resurrecting threads seems to be popular at the moment I would like to add my support to having an option to have the adding machine fought under user control (instead of as now "goal scrolls, all scrolls, show in browser").
Would this be possible?

I've had a few instances when Mafia for some reason has ignored the adding machines even though I've had enough scrolls and a manual option would at least make sure that it's my fault...
 

Salculd

New member
Explicit CCS for adding machine ignored

...although I guess some people might consider this a feature.

I was doing the chasm and set up a simple CCS to abort when I ran into an adding machine, since I wanted to do some nonstandard stuff to it:

Code:
[ adding machine ]
abort

However, when I did run into one, it seemed that it was aware of the CCS, but chose to ignore it anyway:

Code:
[452] Orc Chasm
Encounter: rampaging adding machine
Strategy: D:\Documents and Settings\Chris\My Documents\kolm6\ccs\default.ccs [adding machine]
Round 0: Viki wins initiative!
Round 1: Viki uses the 334 scroll and uses the 334 scroll!
You acquire an item: 668 scroll
Round 2: Viki uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
Round 3: Viki uses the 668 scroll and uses the 64067 scroll!
You acquire an item: 64735 scroll
Round 4: Viki wins the fight!
After Battle: Mirage smiles on the inside. Unlike all other life-forms, it's doing it literally, with its second set of jaws.
You gain 9 Fortitude
You gain 9 Wizardliness
You gain 17 Chutzpah

I'm assuming this is some sort of hard-coded overriding functionality, probably precipitated by my being too lazy to remove the default 64735 scroll condition since I didn't think it would make a difference. Nevertheless, since I'd explicitly added a CCS for it, and it seemed to have recognized that, I would've really preferred for my abort to have precedence. Maybe by only having the hard-coded functionality fire if the CCS it would be using is [default], or something along those lines.
 

Veracity

Developer
Staff member
Perhaps this is related to - or is subsumed by this Feature Request. In any case, KoLmafia is behaving as it is coded to behave, which means what you are seeing is not a "bug", regardless of whether you think it is desirable.

Yeah. I'm just going to merge this one with the existing Feature Request.
 

Bale

Minion
I was doing the chasm and set up a simple CCS to abort when I ran into an adding machine, since I wanted to do some nonstandard stuff to it:

I agree that it is unintuitive behavior that mafia would ignore a CCS for an adding machine when it won't ignore the CCS for any other monster. However there is still a way to accomplish your goal.

If you check choice adventures for the Orc Chasm you'll see that Adding Machine can be controlled there. (Yeah, once again not intuitive for a combat to be controlled in the choice adventure section, but it was the sanest place to put the option.)

You can select "show in browser" to cause mafia to abort when it encounters an adding machine.
 

chef noodleman

New member
I'll second Winterbay's request for an option to apply a ccs even if scrolls are a goal. Maybe a non-default option in the drop down Bale mentioned?

In the meantime another workaround could be detecting adding machines with the last encounter preference, instead of using scrolls as goals, since I think that's what triggers mafia to ignore your ccs. This way you can avoid the relay browser if you want.
 

omegonthesane

New member
Rampaging Adding Machine does not respect player script

Combat with the Rampaging Adding Machine is overriding my intended script in order to feed it scrolls, even at great risk to the character in question - risk that could be avoided if the script was respected.

Exhibit A:
[824] Orc Chasm
Encounter: rampaging adding machine
Strategy: C:\Users\User\Downloads\ccs\tamer.ccs [rampaging adding machine]
Round 0: Bxork wins initiative!
Round 1: Bxork uses the 334 scroll!
You lose 29 hit points
Round 2: Bxork uses the 334 scroll!
You acquire an item: 668 scroll
You lose 29 hit points
Round 3: Bxork uses the 334 scroll!
Round 4: Theophanus kicks your opponent in the shin (or shin-analogue) with her clear plastic high-heels, for 18 damage.
Round 4: rampaging adding machine takes 18 damage.
You lose 29 hit points

At this time, "tamer.ccs [rampaging adding machine]" was not the above, but in fact
[ rampaging adding machine ]
skill entangling noodles
abort


Exhibit B:
[779] Orc Chasm
Encounter: rampaging adding machine
Strategy: C:\Users\User\Downloads\ccs\tamer.ccs [default]
Round 0: Bxork wins initiative!
Round 1: Bxork uses the 334 scroll!
Round 2: Theophanus kicks your opponent in the shin (or shin-analogue) with her clear plastic high-heels, for 15 damage.
Round 2: rampaging adding machine takes 15 damage.
You lose 34 hit points
Health fell below 6. Auto-abort triggered.
You're on your own, partner.
Click here to continue in the relay browser.

At this time, [default] was "skill fearful fettucini".

Exhibit C:
[803] Orc Chasm
Encounter: rampaging adding machine
Strategy: C:\Users\User\Downloads\ccs\tamer.ccs [rampaging adding machine]
Round 0: Bxork loses initiative!
You lose 32 hit points
Round 1: Bxork uses the 334 scroll!
You lose 33 hit points
Health fell below 6. Auto-abort triggered.
You're on your own, partner.
Click here to continue in the relay browser.

At this time, [rampaging adding machine] was "abort".

What am I doing wrong?
 

Winterbay

Active member
The RAM is handled as a very specific monster. Under the choice adventure tab when you are in the Chasm zone there is a drop down for the RAM which can be set to "abort", "create goal scrolls" and some other options. Unfortunately it is not possible to set it to "use my CCS".
 

slyz

Developer
You can also set "auto entangle" in the Special zone of the combat tab. This will be ignored by your CCS, but it will (should?) fire against the RAM.
 

Fluxxdog

Active member
The RAM is handled as a very specific monster. Under the choice adventure tab when you are in the Chasm zone there is a drop down for the RAM which can be set to "abort", "create goal scrolls" and some other options. Unfortunately it is not possible to set it to "use my CCS".
Would it be safe to say then that instead of a bug, it should be changed to a FReq to allow a CCS to handle it?
 

AlbinoRhino

Active member
I would also like to request an "use CCS" option, so I could use my own fight logic. In fact, it's not clear to me why mafia insists on handling this fight itself.
 

fronobulax

Developer
Staff member
In fact, it's not clear to me why mafia insists on handling this fight itself.

My recollection, always subject to correction, is that it was done so that the scrolls could be used as goals/conditions.

So any change needs to guarantee that the scroll goal can be met or that the user is explicitly warned that making the scrolls is their problem. Doing this so that a new or naive user doesn't have a problem is the hard part.

To veer slightly, I have often wondered whether an "out of the box" mafia should come with a pre-configured CCS.
 
Top