diff --git a/README.md b/README.md index 99be13a..307e01e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,53 @@ -# nirvana-zig +# ⚾ Baller -An opinionated [Zig] project starter. There are many like it, but this one is mine. +Modding tools for Backyard Baseball 2001. -[Zig]: https://ziglang.org/ +If you don't want to download anything, you can always [browse the scripts online](https://github.com/whatisaphone/baller/tree/browse). + +## Tutorial + +Let's extract the game scripts, modify one of them, and rebuild the game. + +Before you start of course, [download the latest release](https://github.com/whatisaphone/baller/releases). Open a terminal and run `baller --help` to make sure it works. + +1. Pick some directories to keep your project in. This tutorial uses: + + - `~/bb2001src` as the project directory, with extracted source files. + - `~/bb2001game` as the output directory, with the compiled game you can run. + +2. Copy your original game files to `~/bb2001game`. Make sure to include all the original data files: `baseball 2001.he0`, `baseball 2001.(a)`, etc. + + Before you start, you could try running the game from this directory with ScummVM to make sure your untouched files are working. + +3. Extract the assets to your project directory: + + ```sh + baller extract ~/bb2001game/baseball\ 2001.he0 ~/bb2001src + ``` -## Development + This will write project.txt, some supporting files, and one directory per room. + + (It may output some warnings; as long as the exit status is 0 you can ignore them.) + +4. Modify a script. The file `baseball/RMDA_0002.bin` contains the hover text for the main lobby. Open it in a hex editor, and at offset 0xf945 change "Meet the players" to "Meet the modders". + +5. Build the assets. This will **overwrite** `baseball 2001.he0` and other files in the output directory. + + ```sh + baller build ~/bb2001src/project.txt ~/bb2001game/baseball\ 2001.he0 + ``` + +Now when you run the game, it will use your changed text: + +![Screenshot of game after rebuilding](docs/tutorial-finished.webp) + +## Contributing Install prerequisites: -- [Zig] +- [Zig] 0.13.0 + +[Zig]: https://ziglang.org/ Run the app: diff --git a/docs/tutorial-finished.webp b/docs/tutorial-finished.webp new file mode 100644 index 0000000..b7e910b Binary files /dev/null and b/docs/tutorial-finished.webp differ