Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

The old way of modding

Péter Marton edited this page Jan 31, 2022 · 3 revisions

OpenIV set the standard of modding by providing a way to replace files without the R* launcher removing the changes.

They achieved this by redirecting the game's file reader functions to a custom mods folder as you can see here: https://github.com/martonp96/ClosedIV/blob/master/src/hooks/FileReadHooks.cpp

Basically the game is looking for a file, then the redirected function checks if it exists in the mods folder, if yes use it, if no then keep looking for the original file.

Logging this process looks somewhat like this when the game is started: https://pastebin.com/2rGdYnar

The drawback of this, is that you have to copy and edit entire RPFs, even if you want to change a single letter in any file.

Clone this wiki locally