Compiling/Installing the pokesprite-gen Project from GitHub
PokéSprite
If you've ever seen fun little Pokémon sprites around, chances are they are from the GitHub repo PokéSprite.
I've been using them for my Living Dex project - specifically the ones that Pokedex Tracker uses. However when Pokédex Tracker moved to using the 3D styled Pokémon Legends Arceus sprites, I decided it was time to make my own build and only grab the the things I want. Check out my post Making a Living Dex: Appendix A - The Whole Living Dex Roster to see how I use the sprites.
By the same user, msikma, there is also the pokesprite-gen repo. This repo compiles the sprites to generate spritesheets. Technically there is also the repo pokesprite-spritesheet but this hasn't been updated for awhile and has fallen to code rot.
So to recap, the user msikma has:
- PokéSprite: Data and images of Pokémon, items, etc
- pokesprite-gen: Takes PokéSprite and generates a spritesheet
- pokesprite-spritesheet: An outdated compiled spritesheet
And we'll be making it such that we can run the outdated pokesprite-gen to generate spritesheets for us.
Pokesprite-gen
Thankfully there is already an issue with a solution posted:
Except... At the time of writing this I'm awful at NPM/node/Yarn so it took me awhile to follow. So here are more clear steps for those of us who aren't that great at this.
Big thanks to koenigderluegner for the fix and to isabroch for helping understand what to do.
Get the correct branch
We'll be grabbing koenigderluegner's fix branch to do this.
Update dada-cli-tools
In the two files:
- \cli\package.json
- \lib\package.json
Change the following from:
"dada-cli-tools": "^1.0.0"
To:
"dada-cli-tools": "git+https://github.com/msikma/dada-cli-tools.git#4ccb2086a06a56a22bc9ad6fe932b6f932375eab"
The creator has changed the signatures of the methods in the data-cli-tools library, namely ReadDataSync
now does not exist. This is why we're pinning this library to a specific commit. If you're interested, see this commit for when the breaking change happened:
Update pokesprite-images dependency
Updated the \lib\package.json from
"pokesprite-images": "^2.1.0"
To
"pokesprite-images": "^2.6.0"
Or, whatever version is current a the time.
npm i
Run the install command at root
npm i
yarn
Run the yarn command at root
yarn
Run
From here, you can now run the script from root with:
node .\packages\cli\index.js --standard-build
The results should be in the assets
folder.
Congratulations 🎉🎉
Assuming no other breaking change has happened since, you should now have the ability to generate your own spritesheets! The flags for running are still available on the readme if you want specific forms/items/etc.