First up, I'm sorry but this is wholly AI generated readme. It looks correct and it seems.....fine. It probably waffles a lot less that it would if I wrote it though.
Ideally I'd make this also load sdk stuff and do function hooking on behalf of a mods, but I'm not there yet. This is mostly just a nicer way to break out the proxy dll from the stuff I'm tinkering with.
The only mod this works with is https://github.com/oldgrev/a-battle-arena-mod-for-itr2/
Since this mod is technically proxying a windows dll which can be considered a scary behaviour by AV scanners, it's possible it may be detected as a virus or trojan. If you ever get a virus warning, definitely quarantine the dll and don't use it if you're not comfortable. If you don't trust random dll's downloaded from the internet, but still want to try it, then clone the repo and use the github actions to build it yourself and compare. Or download it and compile it with visual studio community 2022. The code is fully readable and pretty simple, run it through an ai for a second opinion even! But then you'll have your own version of the mod loader that you know exactly what it was built with.
Anyway... on to the slop!
A mod loader DLL for ITR2 that enables modding support by dynamically loading compatible mods from a mods directory.
ITR2ModLoader is a DLL that acts as a mod loader for ITR2. When loaded by the game, it:
- Checks for a
modssubfolder in the game directory - Creates the
modsdirectory if it doesn't exist - Scans for any
.dllfiles in the mods directory - Validates each mod by checking its SDK version compatibility
- Keeps only compatible mods loaded and unloads incompatible ones
Game Starts
│
▼
ITR2ModLoader (version.dll) Loaded
│
├── Create mods/ directory if needed
│
├── Scan mods/ directory for .dll files
│
└── For each .dll found:
├── Load the DLL
├── Call GetModSDKVersion() function
│
├── If version matches "1.0.0":
│ └── Keep mod loaded ✓
│
└── If version doesn't match or function missing:
└── Unload mod ✗
The compiled DLL is named version.dll (a DLL that many Windows applications depend on). This clever workaround allows the mod loader to be loaded by the game without requiring any special launchers or modifications to the game executable.
The DLL proxies all exported functions from the real Windows version.dll located in System32, ensuring the game continues to function normally while the mod loader runs in the background.
- Current SDK Version:
1.0.0 - Mods must export a function
GetModSDKVersion()that returns this exact string to be considered compatible
- Windows 10/11
- Visual Studio 2022 (or newer)
- C++20 support
- Open
ITR2ModLoader.slnin Visual Studio - Select the desired configuration:
- Debug - For development and testing
- Release - For production builds
- Select the desired platform:
- x64 - 64-bit (recommended)
- Win32 - 32-bit
- Build the solution (Ctrl+Shift+B)
The compiled DLL will be located:
atx64/Release/version.dll
To create a mod compatible with ITR2ModLoader:
- Create a new DLL project
- Export a function called
GetModSDKVersionthat returns"1.0.0" - Compile your mod as a
.dllfile - Place your mod in the
modsfolder next to the game executable
extern "C" __declspec(dllexport) const char* GetModSDKVersion()
{
return "1.0.0";
}ITR2ModLoader/
├── dllmain.cpp # Main DLL entry point and mod loading logic
├── framework.h # Windows framework headers
├── pch.h # Precompiled header
├── pch.cpp # Precompiled header source
├── Source.def # Module definition file (exports)
├── ITR2ModLoader.sln # Visual Studio solution
├── ITR2ModLoader.vcxproj # Visual Studio project file
└── README.md # This file
The DLL proxies all standard version.dll functions:
| Function | Description |
|---|---|
| GetFileVersionInfoA/W | Retrieves version information for a file |
| GetFileVersionInfoExA/W | Retrieves extended version information |
| GetFileVersionInfoSizeA/W | Gets size of version info |
| GetFileVersionInfoSizeExA/W | Gets size of extended version info |
| VerFindFileA/W | Finds a file |
| VerInstallFileA/W | Installs a file |
| VerLanguageNameA/W | Gets language name from language ID |
| VerQueryValueA/W | Queries version information value |
This project is provided as-is for modding purposes.