Feature Req: Integate spell restores, rest restores, and item restores into one mega-restore

MCroft

Developer
Staff member
There are (at least) nine places with some restore functionality (I have changed that number six times now). None of which necessarily needs to go away, but which could use some rationalization to make restores less fractured.

I don't have a good idea for a solution yet, just a vague feature request to hopefully kick off enough discussion and thinking about this to come up with a way to do this. My immediate thoughts: Add a Restore Frame which unifies Item Restore, Adventure Restore (rest), Spell Restore, and auto-restore. It would probably look like the gCLI "restores" command, but in a regular sortable table.

  1. Item restores are in the restores tab and general tab of the Item Manager
  2. Item restores are in the recovery item pane of the Skill Casting Frame
    I just discovered this today...
  3. Skill restores are in the Skill Type: Remedies Dropdown of the Skill Casting Frame
    with costs (adv/MP), but no expected heal #s and doesn't grok free rests
  4. Auto-restores are in the HP/MP usage pane of the Adventure Frame
    with items, spells, and actions (e.g. rest in your campsite). There are no costs or effect values shown.
  5. Incidental places with restores
    1. the relay browser (various ways)
    2. the browser toolbar menu (if configured)
    3. the daily deeds panel
    4. the gCLI restore/restores commands
    5. the Travel menu
    6. Probably others I missed
 

philmasterplus

Active member
For UI stuff, we can draw a line between automation and manual control.
  • Manual stuff: Item restores, skill restores, Daily Deeds, Travel menu. These can be activated to heal HP/MP immediately.
  • Automated stuff: The Auto-restores panel does not heal HP/MP right away, but configures KoLmafia's auto-adventuring logic.
For internals, I am less certain. Decades ago, KoLmafia decided to store everything related to restorers in RestoresDatabase.java. Over time, some of its features have sprawled over into other classes (HPRestoreItemList, MPRestoreItemList, etc.) This is not ideal.

(I'm also appalled that these database classes store everything using strings. We really didn't consider the possibility of duplicate item/skill names back then, did we?)

(Also, we have another mini-language specifically for restores.txt? I refuse to believe anyone is parsing that with ASH. If it were me, I'd delete RestoreExpression.java and hardcode anything formula-based directly into RestoresDatabase.java.)



Some side thoughts:
  • The Skill Casting panel is rather ugly and could do a facelift to match KoL's modern skill page.
  • The Auto-restores mini-panel should technically be inside Preferences. But it has been living inside the Adventures tab for years, and I'm used to tweaking it every now and then...I'm not sure if we can move it.
 
Last edited:
Top