Get Slimy

Rubix314

New member
How exactly do you set up a combat script? What would I type there if I just want to cleesh it and kill it?

Edit: Woohoo never mind :D

Edit Edit: err....never mind the never mind. I'm still lost >_>

Edit Edit Edit: I suppose it would help to say what I tried. I went to the Custom Combat tab under Adventure, and put:

[folder icon] cleesh
1: skill cleesh
2: attack with weapon

Didn't work =/

Edit Edit Edit Edit: Ahhh, I see the button that makes a new custom combat... never mind again. Success!

For the other people looking for step-by-step CCS directions:
-Under the main adventure tab, go to the Custom Combat tab.
-In the bottom right, click "New." Name it whatever name you put into the actual script.
-Edit that particular one. See http://kolmafia.sourceforge.net/combat.html for how to script combats. Above the text box, you see a drop-down menu that allows you to switch between your various combats.
-Voila!
 
Last edited:

Oltum

New member
Edit ok nevermind. I got the CSS working for minml. now how do I get maxml to go back to teh regular script? So after it cleeshes and I the script puts back on maxml it says CSS script not found. I want it to work just like it was working when i was using green smoke bombs. What is the best way to tell the CSS to do that?
 
Last edited:

playhavock

New member
You're joking, right? The last 7 pages of this thread are people asking the same question. Put it into your /scripts directory and edit the variables at the beginning of the script to reflect your character's uniqueness. Then when you have a specific problem, ask again.

sorry, i also dont read everything. so its automaticaly on - not sure how to edit it , but i'll look at it... yes I looked at it and have no clue what I'm looking at.

What about my charter is unique? I dont understand.
Argh.
 

Alhifar

Member
If you can't figure out ANY of the settings in the (mostly) clearly marked settings area, then I'm sorry, but this script may not be for you. If you don't understand one or two settings (such as the ccs, which I agree is confusing, but I can't think of a better way. If you can, please shoot the idea my way!) that's fine. Not understanding ANY of them? That seems to me to be willful stupidity.
 

Oltum

New member
See my edited post. I figured out CSS sorry it is late here. I just need help with the last step. How to get teh maxml CSS to go back to teh script. I tell it to attack with weapon and it keeps trying to break my hippy stone.
 
Last edited:

Alhifar

Member
You need to make another CCS that will kill the higher level slimes, and set the name of that script for max_ml_ccs.
If it still gives you an error, type "debug on;call slime.ash;debug off" into the cli. (Assuming you named your script slime.ash) Then, attach the debug log from your mafia folder to your post, and I'll take a look at it as soon as I can tomorrow.
 

Rubix314

New member
For new people:

I'll try to help with explaining the script, as I was once in your spot...mafia can be very intimidating. All you pros out there, feel free to correct me if necessary.

To edit, go to page four of this thread and find Alhifar's link. Copy/paste all of it into notepad. In the top section, you have some options that you can edit. Don't touch anything below the row of ##'s. When you're done editing, find the file "scripts" (it should be somewhere near wherever you saved kolmafia). Save it in there as a .ash file. (NOTE: Typing .ash after the end won't work; then you'll save it as something like blah.txt.ash. To save it as a .ash, under the "Save as type" dropdown menu, choose "All files" and then type .ash. That should work. If you want to be really safe, click an existing .ash file and just modify the file name.) Once you're in kolmafia, click "Scripts" up at the top and load the appropriate script.

To edit stuff: I've copy/pasted the important parts of the options section. Only change the bolded parts.

string max_ml_outfit = "maxml";
string max_ml_familiar = "purse rat";
(Insert the outfit name and familiar for maximal ML)

string min_ml_outfit = "minml";
string min_ml_familiar = "hound dog";
(Insert the outfit name and familiar for minimal ML. The script will switch outfits for one battle to get a bunch of turns of Coated in Slime.)

boolean use_tatter_like = false;
item which_tatter = $item[green smoke bomb];
(The script explains this part)

string max_ml_ccs = "[blank]";
string min_ml_ccs = "[blank]";
(See the last section of this post for making Custom Combat Scripts)

int fumble_buffer = 0;
(Put in how many times you would expect yourself to fumble. If you're confident that you'll always kill the slime, or if you have chalky hands, leave it at zero.)

boolean use_hottub = true;
boolean verbose = true;
(I don't think this part really matters. Change use_hottub to false if you don't have access to a clan hottub. Change verbose to false if you don't need the script to update you with everything that it's doing)

For those looking for step-by-step CCS directions:
-Under the main adventure tab in Mafia, go to the Custom Combat tab.
-In the bottom right, click "New." Name it whatever name you put into the actual script.
-Edit that particular one. See http://kolmafia.sourceforge.net/combat.html for how to script combats. Above the text box, you see a drop-down menu that allows you to switch between your various combats.
-Voila!

So...yeah. It's a little long, but I hope that helps.
 
Last edited:

Oltum

New member
Ok thanks for your help. got it working. I had teh mood messed up. your script is awesome BTW :D
 
Last edited:

Rubix314

New member
I noticed something in the new update...
"## This script assumes you will be using a skill that will do AT LEAST as much damage as LTS."

What if we don't have LTS (or anything of that sort) permed?

What else has changed? (Is there a version log for this script somewhere...)

Modest, low-priority requests for your next update (first two for the end-of-script ML report):
-Don't count the ML killed when we cleesh a slime.
-I don't think your ML counter counts bladder squeezes. (At least I hope it doesn't...otherwise I'm slightly screwed)
-I still get beaten up quite a few times. Is there a way to make the "safe" range of HP higher?
 
Last edited:

Alhifar

Member
That is for the function that checks to see if you will survive a fight. I couldn't think of a reasonable way to figure out if you are going to be using LTS or not, so I assumed you would. If you have a suggestion of how I could find out if you will be using LTS, do tell. I'd love to hear it!

No, I don't have a version log. all that has change between 1.5.3 and 1.6.0 was the addition of some code to try to keep you from getting beaten up as often, and a bugfix so that it didn't try to reset the MCD every turn.

As to your requests:
1) I'll see what I can do. As it is currently, the script doesn't actually know if you are cleeshing the low level slimes. Maybe I can assume if you have a ccs set in min_ml_ccs, that you will be cleeshing?
2) It should already do that. If it doesn't seem to be, can I get a list of your ML modifiers (type "modtrace Monster Level" into the CLI), how many turns you spent, how many bladders you actually squoze, and the ML that the script said that you were using?
 

Bale

Minion
If you have a suggestion of how I could find out if you will be using LTS, do tell. I'd love to hear it!

string get_ccs_action( int x )

Returns the action that will be executed on round x by the active ccs. Though I'm not sure that this works when the script isn't in an active fight.
 
Last edited:

Veracity

Developer
Staff member
I may have to update, since you say you fixed one of the things I fixed myself: unnecessarily resetting the MCD all over the place.

I also did a few other little speedups:

- I refactored the two versions of slime_damage, rather than having duplicated code.
- I do not hit the server to check gall bladder squeezes every time through the loop. Unless your clannies are going into the tube and adding squeezes while you are adventuring, that is unnecessary.
- I moved things like skill lookups (which require KoLmafia to search through lists) out of the loop.
- Just for the sake of my simple-minded editing mode, I added comments to "close" the quotes in ASH $skill constants

And, I was worried about what would happen when I hit the choice adventure for Mother Slime, since I absolutely did not want the script to try to run that combat for me. I made it abort if a choice adventure requested manual control - which wouldn't have worked as coded, I think, since option "0" is not valid to give to KoL.

I ran a cheap (no extra chamois, no tattering, no slime consumables), Slime Hate +7, Monster Level >1000, two-nodule run with this script. It worked like a charm.

Thanks!

FYI, I attach my modified script. Take what you want from it.
 

Attachments

  • slime.ash
    8.4 KB · Views: 54

Bale

Minion
And, I was worried about what would happen when I hit the choice adventure for Mother Slime, since I absolutely did not want the script to try to run that combat for me. I made it abort if a choice adventure requested manual control - which wouldn't have worked as coded, I think, since option "0" is not valid to give to KoL.

I'd run into that bug myself and added an abort to the script also. You're smart to have realized it before finding kolmafia stuck in a loop. :)
 

Rubix314

New member
Edit: Never mind. It counts squeezes. I was being silly >.<

Is there any way to make a buffer for a couple fumbles? I've killed 185 Slimes and I've gotten beaten up 7 times. I suppose piling on more Slime resistance (currently I'm only using the chamoisole to save money and be able to eat/drink more) would work, but I'd be willing to spend a few more scrolls. Damn I wish I had cocoon permed.
 
Last edited:

Alhifar

Member
Okay, I think I've got all of those suggestions/fixes included now.
If anyone uses any skills regularly other than LTS, give me a holler so I can see about getting them added to the check for if you will survive.
 

giannis

New member
Hi, I tried the script using a Turtle Tamer.
I think that it calculates wrong the damage done by a Turtle Tamer, when LTS is used (the script was underestimating the damage done by my Lvl 21 character by ~150).

I have no experience in programming for KolMafia, but I think that the problem is in expected_rounds_needed() and especially in this condition:

if( my_class() == $class[seal clubber] && lts_factor != 1 )
musc_dam = max( 0 , ( my_buffedstat( $stat[muscle] ) * 1.3 ) - monster_defense( $monster[slime1] ) );

I was too lazy to find out the correct formula, but when I changed it to just:
if( lts_factor != 1 ) ....

The calculated damage was very close to the damage I was doing...
 

Alhifar

Member
Oops, apparently I can't read the wiki. I was checking for just being a seal clubber for extra damage, instead of checking for EotS. Sorry about that, it is fixed.
 
Top