fribbels / hsr-optimizer

A Honkai Star Rail optimizer, relic scorer, damage calculator, and various other tools for building and gearing characters
https://fribbels.github.io/hsr-optimizer/
MIT License
261 stars 45 forks source link

[Feature] Support arbitrary scanner source #327

Closed wormtql closed 1 month ago

wormtql commented 5 months ago

Description

Currently only some sources are supported, new scanners will not be able to import their json. Actually I'm developing a new scanner (relics only) with the format of HSR, but the source field blocks me from importing. I can set the source to HSR-Scanner to allow import, but that's a little bit wierd since the scanner is actually not HSR.

wormtql commented 5 months ago

One more thing, is it possible to not provide meta data, since my scanner is relics only.

fribbels commented 5 months ago

Could you link the details of your scanner? I'm happy to support it.

We store details about the scanner here including the github page (so we can link to it) and the latestBuildVersion (so we can notify the user when the scanner is out of date).

https://github.com/fribbels/hsr-optimizer/blob/679dc5c4e00f2400accc78e414048c19b6a32f9e/src/lib/importer/importConfig.js#L4

Also if you prefer we have a dev channel on the discord server, I'll be able to respond faster there

wormtql commented 5 months ago

Here is my scanner yas-scanner, which is relics only. The output does not contain a metadata with UID and trailblazer name. So will it be supported to import relics only data? Some extra info:

export const ReliquaryArchiverConfig = {
  name: 'Yas Scanner',
  author: 'wormtql, YCR160',
  homepage: 'https://github.com/wormtql/yas',
  releases: '', // not released yet
  defaultFileName: 'hsr.json',
  sourceString: 'yas-scanner',
  latestBuildVersion: 'v0.0.0',
  latestOutputVersion: 3,
}
fribbels commented 1 month ago

Closing this for now, let me know if there are any scanner updates in the dev discord channel and I'll be happy to update.

Regarding the original request for arbitrary sources, I like the current system of named & versioned scanners so that we can remind users to update their versions when its out of date, will probably try to keep that going