# [OpenIV](<https://openiv.com/>)

OpenIV is a powerful tool for modifying, creating and extracting internal files. It can be used to create `.img` and `.rpf` files, which can be useful for [modloading](<https://gillian-guide.github.io/extras/modloading/index.md>) or mod creation. You may also, very rarely, come across mods packaged in `.oiv` - this tool allows you to install them as well.

---

## Installation

1. Go to the [official website](<https://openiv.com/>) ([mirror if the official server is down](<https://community.pcgamingwiki.com/files/file/2710-openiv-version-41/>)).
2. Press on `Download now`.
3. Install `OpenIVSetup.exe`.

> [!TIP]
>
> If the official website is down, an offline installer is available [here](<https://community.pcgamingwiki.com/files/file/2710-openiv-version-41/>).

---

## Usage

1. Open OpenIV.
2. In the `Grand Theft Auto IV` section, click on `Windows`.
3. If requested, set the directory with the game files.

> [!WARNING]
>
> Be sure to back up your files before making any changes.

---

### Creating archives

> [!NOTE]
>
> This might be useful for you if you're making a mod/packing an existing mod for a [modloader](<https://gillian-guide.github.io/extras/modloading/index.md>).

1. Click `File` - `Create Archive` and choose the type of the archive you need.
2. Choose the directory where you want to save the archive
3. Add and modify the files as you wish - changes are saved automatically.

---

### Extracting internal files

1. Locate the files of interest in the explorer.
2. Double click to open an `.img` archive.
3. Select the files you want to export.
4. Right click - `Extract...`. Or right click on an empty space and click `Extract all...`.
5. Pick a folder where to extract the files. Done!

---

### Editing existing archives (installing mods to game files)

1. Locate the files of interest in the explorer (mods usually give the structure to follow).
2. Double click to open an `.img` archive.
3. Press `Edit mode` on top.
4. Modify the files as you wish - changes are saved automatically.

---
