loathers / greenbox

Script for examining and sharing a player's loadout of skills and items in the Kingdom of Loathing
https://greenbox.loathers.net
Apache License 2.0
6 stars 7 forks source link

[RFC] Presets #62

Open gausie opened 1 year ago

gausie commented 1 year ago

I'm proposing a set of shareable filter "presets" that make it possible to view a greenbox profile showing only the boxen that are important for a specific scope.

Proposed Implementation

A new package would be added to the repository with the following structure

.
└── packages/
    └── greenbox-presets/
        ├── package.json
        ├── garbo.yml
        ├── standard23.yml
        └── hccs70.yml

These yml files are formatted like this

version: 1 # Just so we can change this file's structure if necessary
name: Preset name
description: |
  Markdown for description
  Multilines or whatever!
items:
  - 104 # For ease of editing this file you could add names for these ids as comments
  - id: 154
    reason: Optional reasons!
    priority: required # "required" and "recommended"?
skills:
  - 55
  - id: 105
    reason: Optional reasons!
  - 7004

When viewing a profile, you can add &p=garbo (for example) and have the view filtered to only the items and skills specified in the file.

docrostov commented 1 year ago

overall i like this a lot; the yml file feels -slightly- annoying to write in your spec but certainly could be worse and i can't immediately think of a better way to format it. in terms of ensuring we have the right presets, would this just be a "you have to PR your preset into greenbox and keep it updated" type thing for people who want to build a custom one? to your point, i think there are basically 3 categories of presets:

my guess is we'd get the most preset action in the farming space but contest space could be good both for ASS and people on the kol forums. to that end, would probably be good to think through if there are ways we could automate the generation of presets from, say, a CSV file or a google sheet. that way people who are not very technical could still make preset concepts and we can easily generate the yml needed to add them. (also, lazily, i like the fact that i can update the iotm tier list on my phone, so it would be neat if this could automatically ingest/update that shared tier list).

dhouck commented 1 year ago

Preset generation would be nice, but before that should come a way to upload[^1] or give a URL for a yaml file to get a preset the site doesn’t support.

The URL one might be easier; you could do &p=http%3A%2F%2Fexample.com%2Fmy-profile.yml.

[^1]: By which I mean just for a single session; I don’t expect the server to store the uploads.

gausie commented 1 month ago

Preset generation would be nice, but before that should come a way to upload1 or give a URL for a yaml file to get a preset the site doesn’t support.

The URL one might be easier; you could do &p=http%3A%2F%2Fexample.com%2Fmy-profile.yml.

Footnotes

1. By which I mean just for a single session; I don’t expect the server to _store_ the uploads. [↩](#user-content-fnref-1-1a34e8a4b4e21865102852df0ddb7050)

We can't do that because we don't necessarily know ahead of time what items for which we need to check existence.