I've continued to put in a lot of work on this project. It's shaping up well, although I have a fair amount of additional work needed, which I will mention as I go along here. I'm about to go away for a couple weeks, so this will be on hold, but here's where we are now and what I'll be working on later.
The goal is for the user to be decide if they are able to automate adventuring in a particular location, given current character state, quest progress, available items, and simple things that KoLmafia could do on your behalf the do not require spending turns or Meat. "Automating" can be done in the GUI, via the "adventure" command in the gCLI (or a CLI script), or via the adventure or adv1 functions of ASH.
KoLmafia attempts to keep its state up to data and in synch with KoL. It's easiest if KoLmafia has been able to see you do everything, but it is a goal to be able to figure out things you did outside of KoLmafia, whether or not they are reported to us by KoL itself. KoL does report quest progress, for example, and we SHOULD be accurate in updating state based on the quest log. Similarly, we know your current inventory (and other "accessible" (configured) sources of items) and your current set of effects, but there are some things you could have done - read a "day pass" for an IOTM you do not own that we can figure out after the fact by taking a look at one of the various area maps.
Here are the three stages of validation.
If you tell KoLmafia to automate - GUI, CLI command, script function - KoLmafia's assumption is that you really want to go there now and it will use not-too-expensive resources that are available to you right now without spending Meat or Adventures. It goes through these three steps in order. Each is allowed to return true or false. False will abort before actually initiating an adventure request.
ASH (Javascript) programs can call the steps manually and make their own decisions on possibly remedies, if any step returns false.
1) boolean pre_validate_adventure(location)
This is intended mostly for zones opened by IOTMs that might be permanently open but also have a (fairly expensive) day pass.
If you have permanent access or have already used a day pass, return true.
Given that you can do things outside of KoLmafia, with neither, peek at a map location to see if you have daily access.
If not, return false. It is up to the user (or program) to decide if a day pass is appropriate.
- Spring Break Beach
- Conspiracy Island
- DinseyLandFIll
- That 70s Volcano
- The Glaciest
- Gingerbread City
- Never Ending Party
- Tunnel of L.O.V.E.
- The Spacegate (not QUITE a day pass; the portable spacegate lets you adventure for 20 turns on a random planet with none of the other amenities of a full Spacegate facility).
To do:
*** FantasyRealm and PirateRealm have day passes. We should look at the Monorail.
*** El Vibrato portal can be seen in your campground. If it is out of energy, leave it to user to decide if - and which kind - of sphere to power it up with.
*** Psychoanalytic couch is visible in Campground. If we don't know which jar, could look at it and see
2) boolean can_adventure(location)
This checks whether zones are currently available, given quest progress, currently available (not too expensive) items, path, any number of things.
Some zones wholly depend on quest progress.
Others can be unlocked by visiting NPCs (the marketplace quests or getting a continuum transfunctioner from the Crackpot Mystic).
Others can be unlocked by using items in inventory (sonars in the Bat Hole, Knob Perfume with a harem girl outfit, Knob Cake with the guard outfit).
Some require particular outfits to be available - and equippable.
Stage 3 will visit NPCs, use items, put on outfits or specific equipment.
Some zones that you have quest-access to have additional requirements we are not willing to make game choices for you to fulfill.
Stench resistance in Guano Junction, Cold resistance on the Shrouded Peak or Icy Peak.
To do - more things that can be validated here, some of which can be done in step 3:
*** Perhaps talk to Lady Spookyraven on 1st and 2nd floor, if haven't done so yet.
*** Talk to trapper to unlock McLargeHuge zones, if at appropriate stage of quest
*** Talk to Melvign to start quest if haven't done so yet
*** The Sea. Whoah, this is complicated. User's call on how to equip, set familiar, get Fishy...
Astral Trips - we already will use a mushroom and select the trip you asked for.
*** Should be a Limit Mode
Shape of Mole
*** Should use a gong and select the form for you.
*** Should be a Limit Mode
Grimstone - we COULD use a mask and select the fairy tale you want to visit.
*** Can we detect if you have finished up with a currently open one?
*** El Vibrato - be willing to use trapezoid - a quest item, which opens the (charged) portal
*** Gingerbread City has daily-limited turns
FantasyRealm requires that you have selected a hat and gotten the G.E.M.
*** given that we will equip the G.E.M., but until you get it, we cannot make the choice for you.
PirateRealm requires that you have acquired the eyepatch and selected ship, crew and equipment.
*** we can equip the eyepatch, but will not select your ship, crew, and equipment
3) boolean prepareForAdventure(location)
- will build a dingy dinghy for any Island zone
- will set you onto a bad, mediocre, or great trip, as requested
*** should use gong and select path of mole
*** should use grimstone, as appropriate
- will acquire and equip Spacegate required gear
- will equip harem girl outfit and use Knob Perfume, if needed
- will equip elite guard outfit and bake Knob cake, if required
- will equip outfit for Dwarven mine office
- will put on Cola War Uniform if requested
- will unequip part of such a uniform if ask to adventure on the battlefield without a uniform.
- will get a continuum transfunction from mystic, if needed, and equip it.
- will equip Talisman for the Palindome
- will plant enchanted bean to grow beanstalk, if needed
- will equip swashbuckling getup or pirate fledges for pirate zones
- will use on-hand sonars to blast open Bat Hole rubble
*** Will error and return false with insufficient elemental resistance at certain zones
- will use familiar drops for IOTM zones:
-- Drink Me potion, devilish folio, tiny bottle of absinthe, transporter transponder, Deep Machine snowglobe
-- (Will equip Deep Machine Elf, if you have one.)
- Will equip Drip harness
- Will equip FantasyRealm G.E.M. and unequip familiar
*** Should equip piraterealm eyepatch if needed. Maybe other gear? Not our job to lower your stats...
- Will use appropriate Filthworm stench gland
- Will use item or start quest with NPC for Skeleton Store, Madness Bakery, or Overgrown Lot
(At the moment, will use item if you have it and start quest of you don't. If you want to do the quest, you should start the quest. If you just want to investigate paranormal activity, perhaps you don't care.)
The goal is for the user to be decide if they are able to automate adventuring in a particular location, given current character state, quest progress, available items, and simple things that KoLmafia could do on your behalf the do not require spending turns or Meat. "Automating" can be done in the GUI, via the "adventure" command in the gCLI (or a CLI script), or via the adventure or adv1 functions of ASH.
KoLmafia attempts to keep its state up to data and in synch with KoL. It's easiest if KoLmafia has been able to see you do everything, but it is a goal to be able to figure out things you did outside of KoLmafia, whether or not they are reported to us by KoL itself. KoL does report quest progress, for example, and we SHOULD be accurate in updating state based on the quest log. Similarly, we know your current inventory (and other "accessible" (configured) sources of items) and your current set of effects, but there are some things you could have done - read a "day pass" for an IOTM you do not own that we can figure out after the fact by taking a look at one of the various area maps.
Here are the three stages of validation.
If you tell KoLmafia to automate - GUI, CLI command, script function - KoLmafia's assumption is that you really want to go there now and it will use not-too-expensive resources that are available to you right now without spending Meat or Adventures. It goes through these three steps in order. Each is allowed to return true or false. False will abort before actually initiating an adventure request.
ASH (Javascript) programs can call the steps manually and make their own decisions on possibly remedies, if any step returns false.
1) boolean pre_validate_adventure(location)
This is intended mostly for zones opened by IOTMs that might be permanently open but also have a (fairly expensive) day pass.
If you have permanent access or have already used a day pass, return true.
Given that you can do things outside of KoLmafia, with neither, peek at a map location to see if you have daily access.
If not, return false. It is up to the user (or program) to decide if a day pass is appropriate.
- Spring Break Beach
- Conspiracy Island
- DinseyLandFIll
- That 70s Volcano
- The Glaciest
- Gingerbread City
- Never Ending Party
- Tunnel of L.O.V.E.
- The Spacegate (not QUITE a day pass; the portable spacegate lets you adventure for 20 turns on a random planet with none of the other amenities of a full Spacegate facility).
To do:
*** FantasyRealm and PirateRealm have day passes. We should look at the Monorail.
*** El Vibrato portal can be seen in your campground. If it is out of energy, leave it to user to decide if - and which kind - of sphere to power it up with.
*** Psychoanalytic couch is visible in Campground. If we don't know which jar, could look at it and see
2) boolean can_adventure(location)
This checks whether zones are currently available, given quest progress, currently available (not too expensive) items, path, any number of things.
Some zones wholly depend on quest progress.
Others can be unlocked by visiting NPCs (the marketplace quests or getting a continuum transfunctioner from the Crackpot Mystic).
Others can be unlocked by using items in inventory (sonars in the Bat Hole, Knob Perfume with a harem girl outfit, Knob Cake with the guard outfit).
Some require particular outfits to be available - and equippable.
Stage 3 will visit NPCs, use items, put on outfits or specific equipment.
Some zones that you have quest-access to have additional requirements we are not willing to make game choices for you to fulfill.
Stench resistance in Guano Junction, Cold resistance on the Shrouded Peak or Icy Peak.
To do - more things that can be validated here, some of which can be done in step 3:
*** Perhaps talk to Lady Spookyraven on 1st and 2nd floor, if haven't done so yet.
*** Talk to trapper to unlock McLargeHuge zones, if at appropriate stage of quest
*** Talk to Melvign to start quest if haven't done so yet
*** The Sea. Whoah, this is complicated. User's call on how to equip, set familiar, get Fishy...
Astral Trips - we already will use a mushroom and select the trip you asked for.
*** Should be a Limit Mode
Shape of Mole
*** Should use a gong and select the form for you.
*** Should be a Limit Mode
Grimstone - we COULD use a mask and select the fairy tale you want to visit.
*** Can we detect if you have finished up with a currently open one?
*** El Vibrato - be willing to use trapezoid - a quest item, which opens the (charged) portal
*** Gingerbread City has daily-limited turns
FantasyRealm requires that you have selected a hat and gotten the G.E.M.
*** given that we will equip the G.E.M., but until you get it, we cannot make the choice for you.
PirateRealm requires that you have acquired the eyepatch and selected ship, crew and equipment.
*** we can equip the eyepatch, but will not select your ship, crew, and equipment
3) boolean prepareForAdventure(location)
- will build a dingy dinghy for any Island zone
- will set you onto a bad, mediocre, or great trip, as requested
*** should use gong and select path of mole
*** should use grimstone, as appropriate
- will acquire and equip Spacegate required gear
- will equip harem girl outfit and use Knob Perfume, if needed
- will equip elite guard outfit and bake Knob cake, if required
- will equip outfit for Dwarven mine office
- will put on Cola War Uniform if requested
- will unequip part of such a uniform if ask to adventure on the battlefield without a uniform.
- will get a continuum transfunction from mystic, if needed, and equip it.
- will equip Talisman for the Palindome
- will plant enchanted bean to grow beanstalk, if needed
- will equip swashbuckling getup or pirate fledges for pirate zones
- will use on-hand sonars to blast open Bat Hole rubble
*** Will error and return false with insufficient elemental resistance at certain zones
- will use familiar drops for IOTM zones:
-- Drink Me potion, devilish folio, tiny bottle of absinthe, transporter transponder, Deep Machine snowglobe
-- (Will equip Deep Machine Elf, if you have one.)
- Will equip Drip harness
- Will equip FantasyRealm G.E.M. and unequip familiar
*** Should equip piraterealm eyepatch if needed. Maybe other gear? Not our job to lower your stats...
- Will use appropriate Filthworm stench gland
- Will use item or start quest with NPC for Skeleton Store, Madness Bakery, or Overgrown Lot
(At the moment, will use item if you have it and start quest of you don't. If you want to do the quest, you should start the quest. If you just want to investigate paranormal activity, perhaps you don't care.)