descawed / re0box

An item box mod for Resident Evil 0
9 stars 0 forks source link

re0box

An item box mod for Resident Evil 0 HD on PC.

Usage

Download the latest release and unzip it to your Resident Evil 0 folder (if you don't know where it is, right-click on the game in Steam and choose Manage > Browse local files). It should then load automatically when you run the game. There are no physical item boxes; instead, you can access the box at any typewriter, even if you don't have an ink ribbon. When you select the option to open the box, the inventory menu will open, and you'll see the contents of the box on the left side of the screen where your partner's inventory is normally displayed. There's no visible scrollbar, but you can scroll by moving the cursor up from the top of the inventory or down from the bottom. Unlike some games in the series, the box inventory is not circular, so you can't scroll past the top to get to the bottom or vice versa. By default, the Leave option in the inventory is disabled while the mod is active, but you can change that in the config file (see the Configuration section below).

Important Notes

Configuration

The mod comes with a configuration file called re0box.ini with a couple options. You'll find it in your Resident Evil 0 folder and you can open it with any text editor. Note that changes to this file won't take effect while the game is running; you'll need to restart the game for it to pick up any changes.

Enable

This section controls whether mod features are enabled.

Log

This section controls logging behavior.

Uninstall

Delete scripts\re0box.asi from the Resident Evil 0 folder. None of the other mod files will have any effect once that's gone, but if you want to purge everything, this is the full list of files added by the mod:

Build

This mod is written in Rust. RE0 is a 32-bit game, so you'll need a 32-bit target installed. Either i686-pc-windows-gnu or i686-pc-windows-msvc will work. As long as Rust and an appropriate target are installed, you should just be able to do cargo build --target=<target>. The mod is currently distributed as an ASI plugin using Ultimate-ASI-Loader as the loader. This helps ensure compatibility with other DLL-based mods. Just rename re0box.dll to re0box.asi and put it in the scripts folder.

Aside from the DLL itself, we also have to edit the game's message files so typewriters prompt to use the box. These are found in nativePC\arc\message. There's one file for each language the game supports, named in the format msg_(lang).arc, where (lang) is a three-character language ID. Rather than replace the original files, which would cause problems if the user wants to uninstall the mod or if they verify their game files with Steam, the mod looks for message files named msg_(lang)_box.arc. You can use FluffyQuack's ARCtool to extract these files. Within the extracted folder, the message file containing the typewriter messages is found at message\message_commonmsg_(lang).gmd. The repo's data folder contains xdelta patches for this file for various languages that you can apply to add the updated typewriter message. Then you can use ARCtool to repack the file. If you want to edit the GMD files yourself, it's easy enough to do in a hex editor as long as you're only editing the message text. The text for all the messages are the last thing in the file delimited by null bytes. There's a little-endian u32 at offset 0x20 in the file that gives the size of the message block in bytes. Make whatever edits to the messages you want, then add the net number of bytes you added/removed to that value. Repack the arc file and your edits should show up in game.

Credits

This mod was made by descawed. I used a number of existing tools in the making of this mod; special thanks to: