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

Status
Not open for further replies.
Evidently we are on our periods together (despite being male), since my response to your "report" was given in exactly the same style and tone. Ha.

Thanks, aqua. But it's not quite as complicated as you make it sound -- these variables were intended to be changed from the CLI. Typing "zlib vars" will display all of your variables in a format designed to be copied and pasted back into the CLI for easy editing. In other words, if you type "zlib vars", one of the display lines might say "zlib ftf_olfact = blooper, dairy goat, shaky clown, zombie waltzers, goth giant, knott yeti, sponge, hellion, violent fungus, killer clownfish". It's a simple matter to paste this back into the CLI, remove the desired monster, and press enter.

These variables were not really intended to be changed via ASH, but it's relatively simple to check for a monster using contains_text(), and to remove a monster using replace_string(). Just be sure to write the map back to disk when you've finished editing.
 
is there a time I can report bugs when you're not on your period?

1) You are not reporting a bug. Script is working exactly as intended and is olfacting waltzers against your will despite Zarqon's best efforts (and they are very effective efforts) to explain everything and make things easy to configure.
2) What you are asking for is a feature that surpasses FTF/SS's scope. FTF/SS is meant to be very general, not class specific.
3) There are a few ways to go around doing what you want. First of all, since you don't want to always olfact waltzers, take them off zlib's ftf_olfact list. Then, use one of several ways Mafia offers to automate olfaction (CCS, one-time olfaction, consult script ...)
 
Here's a slight update of FirstThingsFirst.ash to work with some changes I made to SmartStasis to incorporate disco combos. It'll try to pick pockets twice if you've got the Bling of the New Wave on, and it explicitly initializes "stolen" so that other scripts can pick up the value of that item.

(I don't know if explicit initialization is necessary but I figure it can't hurt.)
 

Attachments

w00t, other people helping!

Glazius, correct me if I'm wrong, but the only changes you made to FTF here were the two lines you actually mentioned in the post, right? I'm adding your updates into my local FTF so I can have everything in one place for my upcoming update.

Besides Glazius' handling for extra stealing, the upcoming update will also include:

  • Expand pirate insults to the Cove as well as the F'c'le. (thanks kain)
  • Abort for unknown monsters if your unknown_ml is set to 0.
  • Replace all instances of nowfightingonstageone with last_monster(). This also means that functions no longer need to pass the monster as a parameter.
  • Skip detecting your familiar's spentness after it's already spent. (thanks Bale)
  • Use the new has_goals() in ZLib for deciding to olfact/putty for goals. This means (for example) you will now olfact a black widow if your goal is black pepper.
  • Always detect unknown bang potions if you have > 1 -- otherwise, follow mafia's setting.
  • Avoid false positive on gremlins when fighting with a "hammer". (thanks heeheehee)
  • ftf_olfact and ftf_grin are no longer case-sensitive.
  • Use both Creepy Grin and the Stinkeye against ftf_grin monsters, in that order.
  • Initialize and sometimes alter variables which are not actually used anywhere in FTF! Oooh, BatMan teasers.
  • Only cast your "free" Salve if your HP is below expected_damage(), or below your healing target and it's a better value than your out-of-combat restoration (more UR synergy).
  • Don't check autoEntangle anymore -- mafia handles this differently now.
  • Pasta Guardians -- added Nemesis stuff like the Bandolier giving five more summons, and the Spaghetti Elemental (summons if you're not in the clear).
  • While looking at PM ghosts, I fixed a horrendous, longstanding misunderstanding which I'm very surprised no one mentioned since basically ghost summoning never worked properly. Turns out pastamancerGhostExperience contained what it said it did -- the experience of your combat ghost -- rather than your ghost's level. Until this update, FTF thought your combat ghosts were leveling up with every summon! :) You can tell I've only been a PM once since this update was added!
  • Another quite interesting result of writing BatMan is that FTF will calculate the value of each monster (meat and items, not including stats gained) -- and it will adjust (reduce) this value if you successfully steal.
  • It also has a few detections added into it (such as Mother Slime's adaptive resistances) which will be of no use to pretty much everyone! Exciting!

Because of the change that eliminates nowfightingonstageone, I can't update this without also updating SS, so I'll be adding the Rave Combo stuff in there before updating both of them. Hopefully it'll keep you happy while I pick away at BatMan.
 
Last edited:
Hi folks! First, let me say that I absolutely love these scripts and I appreciate everyone's hard work to make these better!! I probably wouldn't play KOL as much as I do if you weren't doing this work. So...thank you!!

I'm having some recent trouble with the First things first script that I'm hoping I can get some help with - I don't know if it's something I've done. Here is the message

Function 'vprint( string, int )' undefined (FirstThingsFirst.ash, line 50)

Is this something I can fix on my end?

Thanks for the help!
 
You must have deleted (or never had) ZLib. Make sure it's in your scripts directory, since FTF relies on it for some of its functions, such as vprint(). Link in my sig!
 
Could you make it so the initial cast of saucy salve is only done if it makes sense to do so from a meatpermp/meatperhp standpoint or just disable it entirely? Typically in aftercore I sent my healing target pretty low because I'm just farming and I don't see the need to restore ~15 hp at the beginning if combat. Maybe this will come into play more with BatMan since you're probably going to have a better idea if the monster you're fighting is even worth healing against.
 
You must have deleted (or never had) ZLib. Make sure it's in your scripts directory, since FTF relies on it for some of its functions, such as vprint(). Link in my sig!

Ah that's makes sense. I recently reinstalled the most recent Ascend package and it must have overwritten my current zlib version. Thanks!!
 
Cast Stealth Mistletoe if you're not in the clear. (This line is commented in ftf() by default; there needs to be more logic to determine when to cast it. Suggestions?)
I'd actually think that this is more of a BatMan decision, but some basic logic would be:
  1. If you're in the clear, don't cast it.
  2. If one cast of a deleveling skill will put you in the clear, don't cast it. (If the character has multiple disco dances check their mp cost + mp cost of Mistletoe to decide if you want to just use the disco dance or a disco dance plus mistletoe.)
  3. If twice the characters strongest disco dance is insufficient to put the character in the clear, then don't cast it because the character might have a better way of killing the monster.
 
I ran into a problem with the gremlin detection while doing the quest with my Sledgehammer of the Vælkyr. Because the weapon name contains the word "hammer", FTF was trying to use a molybdenum magnet every round. I changed the code to be more specific in the matching, and it successfully stole from the gremlins.

Fix below for great copy/pasting justice!
Code:
   if (item_amount($item[molybdenum magnet]) > 0 && contains_text(to_string(nowfightingonstageone),"Gremlin") &&
       (contains_text(action,"It whips out a hammer") || contains_text(action,"He whips out a crescent wrench") ||      // gremlin has tool
        contains_text(action,"It whips out a pair of pliers") || contains_text(action,"It whips out a screwdriver")))
 
@bigevildan: Thanks for bringing this to my attention. However, that fix won't work for people with the sword behind equipped. We need to match strings without prepositions.

Silly people with that sword equipped, though, honestly.
 
That sword is massively annoying in so many ways. I'm impressed by the coding KoL did to make it work so reliably in so many different situations. That really is very cool. However, it fucks everything up, big time.
 
Or... a compromise!
Code:
if (item_amount($item[molybdenum magnet]) > 0 &&
   contains_text(to_string(nowfightingonstageone),"Gremlin") &&
   contains_text(action,"whips")  && (contains_text(action,"a hammer") ||
   contains_text(action,"a crescent wrench") ||      // gremlin has tool
   contains_text(action,"pliers") || contains_text(action,"a screwdriver")))

I'm fairly sure that'll match it for sure, at least until some new items with really funky names are added...
 
@Rinn: that sounds good -- I'll change it to only fire if a) your HP is lower than your healing setting and it's better than your out-of-combat restore options as informed by UR, or b) your HP is less than expected_damage().

@Bale: I honestly haven't been a DB since before Crimbo. This skill can be used freely anytime? The only limitation is once per combat, then?

@heeheehee: Thanks. I'll add that in and hope it solves things.
 
Status
Not open for further replies.
Back
Top