Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / scripts / unblockjam / level_tools / README.md
| 1 | ## Puzzle converter |
| 2 | Converts puzzles from [Michael Fogleman's format](https://www.michaelfogleman.com/rush/#DatabaseFormat) to unblockjam's JSON format. |
| 3 | |
| 4 | > [!IMPORTANT] |
| 5 | > The output level pack will have a default pack name and all colors set to `0`. You will need to manually set these in the resulting file. |
| 6 | |
| 7 | ## Usage |
| 8 | `Stdin`: Puzzles in [this format](https://www.michaelfogleman.com/rush/#DatabaseFormat). |
| 9 | `Stdout`: Converted level pack. |
| 10 | |
| 11 | ## Example |
| 12 | You can find a large set of puzzles [here](https://www.michaelfogleman.com/rush/#DatabaseDownload). |
| 13 | |
| 14 | ```sh |
| 15 | cd src |
| 16 | cat example_levels.txt | go run ./cmd/convert_set > example_pack.json |
| 17 | ``` |
| 18 | |
| 19 | ## Level IDs |
| 20 | Level IDs are automatically generated. They are a 96-bit slice of the board's sha256 representation encoded in URL-safe base64. I'm pretty sure this should suffice for avoiding collisions. There's also a version number (`n-`) prefixed onto each ID for future-proofing. |