Feature - Implemented Break Sequence for CLI mode (stop button)

Catch-22

Active member
In CLI mode if an ASH script gets caught up somewhere there's no way to stop it (unless I am missing something).

It would be nice if a keyboard break sequence could be implemented that aborts the script and returns control to the CLI, CTRL+C is probably the old favourite.
 

Catch-22

Active member
I don't particularly mind what key is used, unless you are suggesting to me that Esc should already work, in which case it doesn't.

I believe Esc works in the swingui, not the textui.
 

Catch-22

Active member
Thanks :D

"In headless mode, process commands asynchronously from their input."

So my understanding is that the commands will still queue and execute in order but if a -- is seen the queue basically gets flushed out?

I guess I'll test it out later :)
 
Last edited:

Catch-22

Active member
Any chance we could get this to be a little more aggressive? I'm noticing some scripts are still managing to bork up the queue and won't release control. It probably applies more generally to KoLmafia aborts as a whole though, not just in CLI mode.

Seems to be the case with scripts that make use of wrapper functions to do adventuring? If that's anything to go by...

Code:
> CURRENT: bcasc
> QUEUED 1: goals

KoLmafia declares world peace.
KoLmafia declares world peace.

> CURRENT: bcasc
> QUEUED 1: goals
> QUEUED 2: goals

KoLmafia declares world peace.
KoLmafia declares world peace.
KoLmafia declares world peace.
KoLmafia declares world peace.
KoLmafia declares world peace.
KoLmafia declares world peace.
^ Me spamming "abort", "--" and spam clicking the abort button in KoLmafia in frustration. The only way to fix it is to completely CLOSE KoLmafia (if you log out and login again, the queue will still be blocked).
 

nworbetan

Member
Seems to be the case with scripts that make use of wrapper functions to do adventuring? If that's anything to go by...

^ Me spamming "abort", "--" and spam clicking the abort button in KoLmafia in frustration. The only way to fix it is to completely CLOSE KoLmafia (if you log out and login again, the queue will still be blocked).

I've had this exact same problem countless times in the gcli, and I've heard other people complaining about it in /clan too. The common denominator that I've always seen personally is that mafia will send something to the servers, the servers will do what needs to be done, and then mafia will wait for a response and never get it (or maybe the response comes in and mafia is to busy doing... something, to react). The technical details are over my head, but the behavior I've seen is always the same. The last thing that mafia did is done after it's restarted, but the gcli just never recogized that it was finished doing that thing.

The funny thing is that even when the gui is completely locked up like this, the relay browser continues to work.

ETA: I never complained about it before because it was really easy to chalk the issue up to just having a superbly flaky ISP.
 
Last edited:

PerilousApricot

New member
I actually hit this a lot too, it appears the even using the "time out laggy requests" option doesn't make scripts "un-stick". Last night, before I went to bed, I told mafia to adventure 100 times in the crimbo toy factory, when I got up this morning, I had this in my gcli:

[2761] Crimbokutown Toy Factory
Encounter: Card Teacher Evangelion
Strategy: /Users/meloam/Library/Application Support/KoLmafia/ccs/default.ccs [default]
Round 0: perilousapricot wins initiative!
Round 1: perilousapricot executes a macro!
Round 1: perilousapricot attacks!
Round 2: card teacher evangelion takes 38 damage.
Round 2: perilousapricot attacks!
Round 3: card teacher evangelion takes 38 damage.
Round 3: perilousapricot attacks!
Round 4: card teacher evangelion takes 37 damage.
Round 4: perilousapricot wins the fight!
After Battle: GET DA TREETS does a little fairy dance.
You acquire an item: plastic ingot
You gain 14 Strongness
You gain 17 Magicalness
You gain 11 Chutzpah

Request 46 of 140 (Override: Crimbokutown Toy Factory) in progress...
 
Top