Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to easily add custom formats #28

Closed
scheibo opened this issue Mar 6, 2024 · 0 comments
Closed

Unable to easily add custom formats #28

scheibo opened this issue Mar 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@scheibo
Copy link
Contributor

scheibo commented Mar 6, 2024

Users get confused when formats are missing as the documentation does not make clear that @pkmn/sim contains a different set of configured formats than upstream Pokémon Showdown by design. Documentation should call this out, explain that config/formats.ts is in fact configuration that depends on arbitrary project preferences and thus something you can not always depend on, and also show how to easily augment the default formats with ones preferred formats (or those formats which are present on https://github.com/smogon/pokemon-showdown).

Sadly, this last part is not working as intended today due to some intersection of #21 and #25, so really all three of the issues will probably get addressed at the same time.

@scheibo scheibo added the bug Something isn't working label Mar 6, 2024
scheibo added a commit that referenced this issue Mar 11, 2024
documentation and unit testing are still necessary, though
this should mostly handle #21 and #28 once published.

This isn't very pretty:

- FormatList is kind of impossible to type correctly with access to
  @pkmn/sim, but @pkmn/mods cant really depend on @pkmn/sim. I am
  fine just punting with `any`
- I don't know what the consequences are (other than performance) of
  making modded dexes build their own formatsListCache. I can't see
  any obvious issue this might cause, but its entirely possible its
  going to fuck something up
- The corresponding mod rulesets should really be in the mods'
  rulesets.ts files instead of in the main rulesets, but this is
  really awkward to accomplish (lots of ugly code to add to
  `import`) so we're punting on this as well

Not a feel good change, but crudely patches an otherwise pretty
obnoxious hole in the API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant