Skip to content

Commit

Permalink
Update tutorial for the rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisaphone committed Jul 5, 2024
1 parent 26bf778 commit 94838ad
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
Binary file added docs/tutorial-finished.webp
Binary file not shown.

0 comments on commit 94838ad

Please sign in to comment.