First Things First -- a multipurpose pre-combat consult script

Status
Not open for further replies.

Geno

New member
How does setting an olfact target work? I wanted to auto-olfact 'bustle in the hedgerow' in the great trip so I added bustle in the hedgerow to ftf_olfact. That doesn't seem to do anything though. Whenever I encounter the bustle I go right from my combat macro to attacking. Is it because of my macro or something else? By the way, I'm using the latest daily build so that combat macros work.

My custom combat settings

1: special action
2: consult smartstasis.ash
3: attack

I switched to this to see if it would help but it didn't work either.

1: special action
2: consult firstthingsfirst.ash
3: consult smartstasis.ash
4: attack

Also, is there a way I can use the auto-olfact functionality of first things first and incorporate it into a combat macro? That would excellent.
 

Bale

Minion
It's probably because of your macro. Mafia does not really support combat macros yet, so please don't expect anything to work properly when you're using macros and mafia at the same time.

Also, is there a way I can use the auto-olfact functionality of first things first and incorporate it into a combat macro? That would excellent.

If you want advice on using macros, there are several threads on KoL's Gameplay forum devoted to proffering help. Please keep it there until the day comes that it has something to do with FTF.
 

zarqon

Well-known member
I have updated to the latest version of ZLib and i am still getting that message.

Did you also delete any old versions of ZLib in your mafia directory? If you have the newest SS/FTF/ZLib, you basically can't get that error.

@Geno: yeah, this won't work with macros, but BatMan probably would if it was last action in your CCS. Too bad you can't use BatMan yet. Ha. Also, please note that you don't need "special action" in your CCS if you use FTF.
 

slyz

Developer
Whenever I encounter the bustle I go right from my combat macro to attacking. Is it because of my macro or something else? By the way, I'm using the latest daily build so that combat macros work.

What are you calling a combat macro? If you are talking about a KoL combat macro, Mafia will log the actions, but will not use them. You can only use those from the relay browser, adventuring manually.

EDIT: Oh, and you can remove the 'special action' line and have simply this as your CCS:
Code:
1: consult smartstasis.ash
2: attack
 

Geno

New member
Did you also delete any old versions of ZLib in your mafia directory? If you have the newest SS/FTF/ZLib, you basically can't get that error.

@Geno: yeah, this won't work with macros, but BatMan probably would if it was last action in your CCS. Too bad you can't use BatMan yet. Ha. Also, please note that you don't need "special action" in your CCS if you use FTF.
Ah, okay. I'll try converting my native combat macro to a kolmafia combat macro. I'll try and figure out how to incorporate olfaction into a native combat macro too to reduce server hits, but I'm kind of a nub at coding and the combat macro thread seems really confusing. I was hoping you guys had magically already figured that out!

Also, what's this about batman?
 

slyz

Developer
@geno: How exactly are you using FTF? If you are playing through the relay browser, using a koL combat macro, FTF (and mafia in general) won't do anything during the combat. If you are using Mafia to autoadventure (by setting a location in the adventure tab etc...), then your KoL combat macro will not be used.

Maybe you should take a look at the KoLMafia Guide to see if Mafia is using the Custom Combat Script with SmartStasis.

You also need to check Mafia's restore setting to make sure you always have enough MP to actually cast olfaction.
 

Geno

New member
I definitely have enough mp, and I'm using kolmafia to autoadventure and my native combat macro is working. Olfaction didn't work so I switched to a kolmafia customcombat macro instead. It still doesn't work and I have no idea why. I'm not sure if I edited firstthingfirst wrong or what.

Here's my ftf_olfact in firstthingsfirst:

setvar("ftf_olfact","bustle in the hedgerow, blooper, dairy goat, shaky clown, some zombie waltzers, goth giant, knott yeti, hellion, violent fungus");

Here's my custom combat settings (Note: no native combat macro is being used):

1: skill pop and lock it
2: skill break it on down
3: skill run like the wind
4: consult smartstasis.ash
5: attack with weapon

Any ideas?
 

heeheehee

Developer
Staff member
Actually, setvar only works the first time a variable is executed. Type
zlib ftf_olfact = bustle in the hedgerow, blooper, dairy goat, shaky clown, some zombie waltzers, goth giant, knott yeti, hellion, violent fungus
into the CLI, and that should work. Just remember to set your ZLib variables this way.
 

slyz

Developer
It is not possible for your native combat macro to be used when you auto-adventure with Mafia. Unless you modified it in some way, or are using an elaborate script.

Please, let's use the same vocabulary so we can understand each other:
- combat macro: the new native KoL feature that allows you to script fights (when adventuring manually)
- custom combat script (CCS): a way to define what Mafia does during a combat, set up in Adventure -> Custom Combat

A few basic questions first:
- did you set your action to "custom combat script" in the Adventure tab (as described KoLMafia Guide)?
- can you autoadventure until you fight a bustle in the hedgerow, and copy/paste the gCLI ouput for the fight here?

EDIT: Ah, thanks heeheehee, I misread geno's post.

To clarify a little: the setvar() function in a script only contains the default value for the variable that is defined. In this case, you edited the script, and told him that "if ftf_olfact doesn't exist in vars_<playername>.txt, use this". Since ftf_olfact already existed, the list you edited wasn't used and your current ftf_olfact value was used.

Zarqon did this so that users wouldn't have to edit scripts to change settings. There are a few ways you can change it: by directly editing vars_<playername>.txt, by using the zlib command in the gCLI ( zlib <var> = <value>, with the spaces), or by using a User Interface Script like this one.

This problem comes up regularly, maybe scripters should add a comment warning how zlib settings should be used next to setvar().
 
Last edited:

Geno

New member
Actually, setvar only works the first time a variable is executed. Type
zlib ftf_olfact = bustle in the hedgerow, blooper, dairy goat, shaky clown, some zombie waltzers, goth giant, knott yeti, hellion, violent fungus
into the CLI, and that should work. Just remember to set your ZLib variables this way.
Hmm, I'll give this a try. I still don't know a lot about the cli and mafia in general, so thanks for the tip.

It is not possible for your native combat macro to be used when you auto-adventure with Mafia. Unless you modified it in some way, or are using an elaborate script.

Please, let's use the same vocabulary so we can understand each other:
- combat macro: the new native KoL feature that allows you to script fights (when adventuring manually)
- custom combat script (CCS): a way to define what Mafia does during a combat, set up in Adventure -> Custom Combat

A few basic questions first:
- did you set your action to "custom combat script" in the Adventure tab (as described KoLMafia Guide)?
- can you autoadventure until you fight a bustle in the hedgerow, and copy/paste the gCLI ouput for the fight here?

EDIT: Ah, thanks heeheehee, I misread geno's post.

To clarify a little: the setvar() function in a script only contains the default value for the variable that is defined. In this case, you edited the script, and told him that "if ftf_olfact doesn't exist in vars_<playername>.txt, use this". Since ftf_olfact already existed, the list you edited wasn't used and your current ftf_olfact value was used.

Zarqon did this so that users wouldn't have to edit scripts to change settings. There are a few ways you can change it: by directly editing vars_<playername>.txt, by using the zlib command in the gCLI ( zlib <var> = <value>, with the spaces), or by using a User Interface Script like this one.

This problem comes up regularly, maybe scripters should add a comment warning how zlib settings should be used next to setvar().
Well, I don't know what to tell you about the combat macro working. It totally works fine for me aside from the actions not being described correctly in the cli. Maybe I just got lucky.

As for the questions, I did set my combat setting as custom combat script in the adventure tab. I've been using ftf and smartstasis for a few months now so I'm used to manipulating the adventure tab as needed. If the problem comes up again after trying your fix I'll post the cli for bustle in the hedgerow. Hopefully I won't have to.

Yeah, a comment warning would be nice. Zarqon said to edit ftf olfact to add new monsters if needed in the original post, and I took that as meaning editing the script directly. I guess that could've been avoided by reading through the Zlib thread but reading's for shmucks.

Thanks again dudes for the help.
 

zarqon

Well-known member
Should also mention: current values of all ZLib settings can be viewed by typing "zlib vars" into the CLI. They will appear, with additional instructions, in a handy easy-to-paste format in the event that you would like to edit any of them.

A relay script for easily editing ZLib vars is in my list of things to script eventually.

EDIT: I thought I did have a comment in front of most of my setvar() blocks, but it looks like FTF didn't have one. Added and will make its way into the next release, whenever that is. For other script authors, here's a nice comment you can add before you use setvar():

Code:
// NOTE: after running this script, changing these variables here in the script will have no
// effect.  You can view ("zlib vars") or edit ("zlib <settingname> = <value>") values in the CLI.
 
Last edited:

Geno

New member
I changed the zlib settings via cli then executed my custom combat script. Nothing is set to autoattack.

Custom combat script:

Code:
[ default ]
1: skill pop and lock it
2: skill break it on down
3: skill run like the wind
4: consult smartstasis.ash
5: attack with weapon

Here's what happens:

Code:
[58530] Astral Mushroom (Great Trip)
Encounter: the Elders of the Gentle Race
Strategy: C:\Users\John\Documents\KoL\KoL mafia\ccs\Cupcakes.ccs [default]
Round 0: geno wins initiative!
Round 1: geno casts POP AND LOCK IT!
Round 2: geno casts BREAK IT ON DOWN!
Round 3: geno casts RUN LIKE THE WIND!
You acquire an item: purple-frosted astral cupcake
"if" requires a boolean conditional expression (FirstThingsFirst.ash, line 257)
Consult script 'smartstasis.ash' not found.
You're on your own, partner.

Round 4: geno attacks!
You acquire an item: toast
You gain 6 Strengthliness
You gain 10 Magicalness
You gain 30 Smarm

What happened there?

I managed to make a combat macro that does everything I need so I don't technically need to use this script at the moment, but it would be nice to see why it did that. Note: I updated to the latest zlib.
 

slyz

Developer
Did you update to the latest versions of Zlib, SmartStasis and FTF?
Also, can you copy here the ftf_olfact line when you do zlib vars in the gCLI?
 

JohnnyRamrod

New member
bad monster value issue

For a little while (maybe 2-3 weeks) I've been getting the following error:

Bad monster value: "breakdancing raver" (FirstThingsFirst.ash, line 157)
Consult script 'smartstasis.ash' not found.
You're on your own, partner.

This is happening whenever I get to a combat adventure, where I am calling 'consult smartstasis.ash' as the first action.

(For what it's worth, I'm currently running this script as a PM, and spending time either meat farming or levelling in the bathroom).

Being a very poor script writer I'm stumped. I'm not even sure if this is Mafia or FTF/SS related? I have updated zlib, SS and FTF scripts and even with the most recent updates the same issue occurs (across multiple PCs too - although I did copy the directory, so I guess that stands to reason).

I even went to the latest weekly Mafia build as well - no change...

I tried to comment out that section to get it running at least, but when I comment out the section I get:

Cannot store boolean in temp of type float (FirstThingsFirst.ash, line 261)
Consult script 'smartstasis.ash' not found.
You're on your own, partner.

So I stopped messing with it, as I must admit to not fully understand it all. Anybody have any ideas why this is happening and how I can get this running again? Using a stocking mimic without smartstasis is far too frustrating...
 
"if" requires a boolean conditional expression (FirstThingsFirst.ash, line 257)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.

I'm in the nemesis' lair as a sauceror, in version 8398. It refuses to print. Why won't it print?
 
Last edited:

heeheehee

Developer
Staff member
JohnnyRamrod: Which build are you using? Also, can you check to make sure that SS, FTF, and ZLib are all up to date?
forgot my password: Did you update ZLib?
 

zarqon

Well-known member
@Johnny: if you've updated everything (mafia, ZLib, FTF, SS) and still have that error, you probably have an outdated data file sitting around. Type "update clear" in the CLI and see if that fixes it.

@password: update everything, not just ZLib. It will work.
 
Status
Not open for further replies.
Top