CLI / CCS Help

Raven434

Member
I have been reading through various threads here but think I am missing something.

I have a CCS called db-farming-meat. In that CCS, I call SmartStasis.ash

It looks like when I run it from a batch login as opposed to live, it is only attacking and not using my CCS.

My prefs files seem to look ok though:
battleAction=custom combat script
customCombatScript=db-farming-meat


db-farming-meat

[ default ]
consult SmartStasis.ash
dance of doom
boog
attack

[goth giant]
consult SmartStasis.ash
poke
doom
boog
attack

[ candied yam golem ]
consult SmartStasis.ash
moxi

[ malevolent tofurkey ]
consult SmartStasis.ash
moxi

[ possessed can of cranberry sauce ]
consult SmartStasis.ash
moxi

[ stuffing golem ]
consult SmartStasis.ash
moxi

[ La Novia ]
consult SmartStasis.ash
moxi

[ El Novio ]
consult SmartStasis.ash
moxi

[ El Padre ]
consult SmartStasis.ash
moxi

[ La Persona Inocente ]
consult SmartStasis.ash
moxi


Output is:
[23531] Giant's Castle
Encounter: Goth Giant
Strategy: unknown [default]
Round 0: BH wins initiative!
Round 1: BH attacks!
Round 1: Congress sits on your fallen opponent's body, blows a smoke ring, and winks at you.
Round 1: You gain 1023 Meat
Round 1: goth giant takes 267 damage.
You gain 1023 Meat
You acquire an item: awful poetry journal
You gain 8 Beefiness
You gain 13 Magicalness
You gain 13 Cheek

Request 126 of 208 (Beanstalk: Giant's Castle) in progress...

[23532] Giant's Castle
Encounter: Furry Giant
Strategy: unknown [default]
Round 0: BH wins initiative!
Round 1: BH attacks!
Round 1: Congress sits on your fallen opponent's body, blows a smoke ring, and winks at you.
Round 1: You gain 823 Meat
Round 1: furry giant takes 239 damage.
You gain 823 Meat
You acquire an item: furry fur
You gain 5 Beefiness
You gain 13 Wizardliness
You gain 17 Sarcasm

Thanks for any suggestions. Like I said, it works fine when I run KoL Mafia manually, but seems to be not working as I intended when I call Mafia as a batch file.
 

jasonharper

Developer
Your batch file is apparently not setting the current directory to the same location as when you run the program directly. It is therefore using an entirely different set of user data, which lacks your CCS files.
 

Raven434

Member
This doesn't make sense.

Even when I specify absolute paths inside of the file, it still goes off into the weeds.

Everything seems to be being picked up except the location of the CCS.

I even copied the contents of the ccs I wanted to use into the default.ccs...

:-/
 
Last edited:

Raven434

Member
The batch file is invoked as:

java -jar "E:\Games\KoL\Current Builds\BH\KoLmafia-7445.jar" "E:\Games\KoL\Current Builds\BH\batch.txt" --CLI

batch.txt:
login BH
call "E:\Games\KoL\Current Builds\BH\scripts\Advanced-Booze-Food-Spleen.txt"
set ccs "E:\Games\KoL\Current Builds\BH\ccs\db-faming-meat"
call "E:\Games\KoL\Current Builds\BH\scripts\Farming-Meat.txt"
wait 300
call "E:\Games\KoL\Current Builds\BH\scripts\Night Cap.txt"
call "E:\Games\KoL\Current Builds\BH\scripts\logout.txt"
exit


Here is the content of the meat farming script.

echo Alright meat farmers, let's get farming...
outfit Farming_Meat_UPC
familiar Hobo
mood Farming_Meat_UPC
set ccs "E:\Games\KoL\Current Builds\BH\ccs\db-farming-meat"
I have also tried 'set ccs db-farming-meat'
adventure * Giant's Castle
 
Last edited:

jasonharper

Developer
I'm not sure that a full path will work for a CCS - and in any case, the "set" commands you're using have no effect since there's no equals sign in them (and you're not even trying to set the right preference, anyway). The proper command for selecting a CCS is simply:
ccs db-farming-meat
This command sets the customCombatScript preference, and also sets your battleAction to "custom combat script" to make sure that you're actually using a CCS.
 

Raven434

Member
Hi JH,

Same basic problem.

Earlier versions of the script were exactly as you specified for setting the CCS.

The batch windows even *says* CCS set for db-farming-meat and then it still borks out.

:-(
 

Nazrax

New member
I'm seeing that same "Strategy: unknown [default]" in my combat messages.

If I try to set a bogus CCS, it complains, but if I try to set a real one it takes it, so I know it's able to find my CCS's.

Have you made any progress in getting this to work?
 

ashes123

New member
java -jar "E:\Games\KoL\Current Builds\BH\KoLmafia-7445.jar" "E:\Games\KoL\Current Builds\BH\batch.txt" --CLI

add this before your java statement to get the enviroment set to your kolmafia directory

e:
cd Games\KoL\Current Builds\BH

so your runmafia.cmd file should look like this:

e:
cd Games\KoL\Current Builds\BH
java -jar E:\Games\KoL\Current Builds\BH\KoLmafia-7445.jar

this fix worked for me, hope it solves your problem
 
Top