Add ability to export / import packs #426

Merged
LunarTides merged 13 commits from packager into main 2025-12-06 10:26:22 +00:00
LunarTides commented 2025-12-04 22:42:37 +00:00 (Migrated from github.com)

Closes #210

Jesus... This PR has exploded in scope... And has spawned #427 and #428, which are colossal... I'm pretty excited :3

  • Fix importing the same pack twice breaks ids. No longer relevant.
  • If importing a pack removes a card, or if the game adds a new one, the ids will get mismatched.
    • Make ids uuids instead of incrementing numbers.
  • Allow exporting existing packs, or press n to export a new one.
  • Add metadata (JSON).
    • Game version
    • Pack version
    • Name (for looking up, should be unique.)
    • Authors (String list of authors.)
    • Links (Name, link object. E.g. links: { github: "https://github.com/Example/Pack1.hspkg", youtube: "https://youtube.com/@Example" } The youtube one can be a channel name, or a video, it doesn't matter. The links can be whatever.)
    • Requires (Depend on other packs / cards (bp uuids) / custom classes or tribes)
    • Use package.json for reference.
  • Add proper packs README.
  • Make sure it works. (Stress test.)
Closes #210 Jesus... This PR has exploded in scope... *And* has spawned #427 and #428, which are *colossal*... I'm pretty excited :3 - [ ] ~~Fix importing the same pack twice breaks ids.~~ No longer relevant. - [x] If importing a pack removes a card, or if the game adds a new one, the ids will get mismatched. - [x] Make ids uuids instead of incrementing numbers. - [x] Allow exporting existing packs, or press `n` to export a new one. - [x] Add metadata (JSON). - [x] Game version - [x] Pack version - [x] Name (for looking up, should be unique.) - [x] Authors (String list of authors.) - [x] Links (Name, link object. E.g. `links: { github: "https://github.com/Example/Pack1.hspkg", youtube: "https://youtube.com/@Example" }` The youtube one can be a channel name, or a video, it doesn't matter. The links can be whatever.) - [x] Requires (Depend on other packs / cards (bp uuids) / custom classes or tribes) - [x] Use `package.json` for reference. - [x] Add proper packs README. - [x] Make sure it works. (Stress test.)
LunarTides commented 2025-12-05 07:06:10 +00:00 (Migrated from github.com)

Because of how much this changes things, especially when I'm so close to 3.0, I can't merge now. I'll move this to 4.0.

Because of how much this changes things, especially when I'm so close to 3.0, I can't merge now. I'll move this to 4.0.
LunarTides commented 2025-12-05 12:22:11 +00:00 (Migrated from github.com)

Rebased on top of ffeecc4. Let's begin!

Rebased on top of ffeecc4. Let's begin!
LunarTides commented 2025-12-06 10:26:18 +00:00 (Migrated from github.com)

YOLO!

YOLO!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js!426
No description provided.