# CoD4 Rewrite A reimplementation of *Call of Duty 4: Modern Warfare* multiplayer on [Bevy](https://bevyengine.org) 0.19. The repository contains **no game data**. Maps, models and textures are read at runtime from your own CoD4 installation, the way OpenMW works for Morrowind. ## Download and play 1. Download this repository (Code > Download ZIP) and unzip it anywhere. 2. Double-click **`Launcher.exe`**. It downloads the latest build of the game from this repository's [Releases](https://github.com/Nilbong/COD4-Rewrite/releases) into a `game` folder beside it, keeps it up to date (it checks each time it starts, in about a second) and starts the game. No Rust or other tools are needed: GitHub builds `cod4rw.exe` for every release. You need Windows, a graphics card with Vulkan, and your own installed copy of CoD4 (Steam or retail, patch 1.7); the game reads its maps, models and sounds from it, and none of them are downloaded. `Launcher.exe --build` builds from this folder's source instead (needs Rust, see below). **Your games' folders.** CoD4 is needed; *Black Ops*, *Modern Warfare 2* and *World at War* are optional and add their guns, maps and characters. Each is found automatically in your Steam libraries (any drive, any library folder) and the usual retail folders. The launcher lists what it found each time it starts; if one isn't found, choose its folder there (`Launcher.exe --folders` opens the list any time) or in the game's **Options > Game Folders**. MW2 counts only with *Modern Warfare 2 Multiplayer* installed (on Steam it's a separate download). Changes apply the next time the game starts. For maintainers: pushing a version tag (`git tag v0.1.0 && git push origin v0.1.0`) makes the `Release` workflow (`.github/workflows/release.yml`) build `cod4rw.exe` and `Launcher.exe` and attach them to the release. ## Running You need a Rust toolchain and an installed copy of CoD4 (Steam or retail, patch 1.7). Installs of *Call of Duty: Black Ops*, *Modern Warfare 2* and *World at War* are optional. When found, their content is added to the game; without them it runs with CoD4's content alone. Like CoD4, they are found in your Steam libraries (Steam's `libraryfolders.vdf`) and the usual retail folders, or where you chose them (launcher or Options > Game Folders, saved in `%LOCALAPPDATA%\cod4rw\game_paths.txt`). The environment variables `COD4_PATH`, `BLACKOPS_PATH`, `MW2_PATH` and `WAW_PATH` (each the folder with the game's exe) take precedence; `cargo run -p gamepaths --example status` prints what's found. ```bash cargo run --release -p game ``` This opens CoD4's main menu; *Private Match* then *Start Match* begins a match. Pass `--map` to skip the menus and go straight into a match: ```bash cargo run --release -p game -- --map mp_killhouse --bots 6 ``` If the CoD4 install isn't found, choose its folder in the launcher, or set `COD4_PATH` to the folder containing `iw3mp.exe`. Options: | flag | default | | | --- | --- | --- | | `--map` | `mp_killhouse` | start this map directly (see map support below) | | `--bots` | `6` | players per team (you take one Marines slot) | | `--skill` | `0.6` | bot skill, 0..1 | | `--bodycam` | off | start with Bodycam gunplay | | `--hardcore` | off | Hardcore rules (also a Private Match option) | | `--spectate` | | watch the bots instead of playing: a free camera, or follow a bot by name (`Gaz`) or role (`anchor`, `rusher`, `flanker`) | | `--record` | off | record your play to `recordings/-