Extra Options (EO) is the quality-of-life mod most FH2 PC players run. It patches the game in memory, mounts the
mediaoverride and mediapc folders, loads data-only mods and plugin DLLs, and rewrites some UI pages as the game
reads them. This chapter is for anyone who writes an EO plugin or EO mod, and for platform mod authors whose mods run
beside EO: what it changes, where, how to work with it, and how not to switch it off by accident.
Extra Options is written by Arthur (RokkuDayo) and released under the GNU GPL v3:
https://github.com/RokkuDayo/ForzaHorizon2_ExtraOptions (the wiki is on the same repo). Everything here describes EO
0.6.0 unless a version is named. EO changes quickly; when this chapter and EO's own docs\ folder disagree, trust
EO's docs for the version you have.
All addresses are for forza_durango_release_final.exe of 24 Nov 2015 (TimeDateStamp 0x565501ED, SizeOfImage
0x3A18000), image base 0x140000000. game+0xRVA is the offset from the image base; the full address is
0x140000000 + RVA.
Related chapters: Getting started (installs and the three routes), The FH2 Mod Platform, Game data (files, database, strings, XAML), Hooking safely and Troubleshooting.
What Extra Options is
A proxy DLL beside azimuth.exe
- On Azimuth, EO is
winmm.dllnext toazimuth.exe. Azimuth imports WINMM statically (fortimeBeginPeriod), and WINMM isn't a KnownDLL, so the copy in the application folder wins. EO forwards every winmm export to System32'swinmm.dll. - EO also supports a second translation layer, where it is loaded as
xg.dllin the game'sMountfolder. Plugins can tell the two apart withcontext->adapter(section The plugin API). - EO 0.6.0 also runs Forza Motorsport 5 and Forza Horizon 3, each with its own ini (
FM5_ExtraOptions.ini,FH3_ExtraOptions.ini). It recognises the title from Azimuth's TitleId; FH2 is1A96545B. - It exports
Fh2TweaksStatus(), which returns the same status text as line 2 of its log. Other code (the FH2 Mod Platform included) uses this export to detect EO.
File (beside azimuth.exe) | What it is |
|---|---|
winmm.dll | EO itself |
FH2_ExtraOptions.ini | Settings read at start-up (strict, see below) |
FH2_ExtraOptions.dat | Choices made on EO's in-game settings rows |
FH2_ExtraOptions.log | Rewritten every start. Line 1 is the version, line 2 the status |
mods\ | EO mods and their plugins |
EO is built with Zig and Python (python build.py <zig.exe> --azimuth); you only need that to build EO itself, not to
write plugins for it.
Licence
EO is GPLv3. A plugin talks to EO through a plain C header and a context struct passed at run time; it links nothing from EO. If you copy EO's code into your own project, that code brings the GPL with it.
A warning worth repeating to players
EO's README warns that there is no "All-In-One" PowerShell installer. Anything that asks players to paste PowerShell commands to "install Extra Options" is a scam (one was a keylogger). Link players to EO's GitHub releases.
Which EO fits which Azimuth
EO checks the Azimuth executable it runs inside, by size, PE timestamp, SizeOfImage and a full SHA-256. Every new Azimuth release needs a new EO release. There is no bypass; on an unknown Azimuth EO patches nothing and says so.
| EO | Released | Azimuth | Where it goes |
|---|---|---|---|
| 0.2.34 | Oct 2026 | 0.9.6 | replaced data\bin\azimuth-tls.dll |
| 0.2.68 / 0.2.74 | Oct 2026 | 0.9.9 | same |
| 0.2.88 / 0.2.98 | Oct 2026 | 0.9.10 | winmm.dll proxy |
| 0.3.0 | Oct 2026 | 1.0.1 only | winmm.dll beside azimuth.exe |
| 0.3.2 | Oct 2026 | 1.0.2 | same |
| 0.4.4 | Oct 2026 | 1.0.1, 1.0.2, 1.0.3, 1.0.4 | same; mods in mods\<mod> |
| 0.4.5 | Nov 2026 | same | mods move to mods\Forza Horizon 2\<mod> (migrated automatically) |
| 0.6.0 / 0.6.1 | Nov 2026 | 1.0.1 to 1.0.4, and 1.0.4 with the FH3 DLC patch | same |
- GitHub tag names such as
Azimuth_v1.0.4name the Azimuth version, not EO's. Read the release title for EO's. - On an unsupported Azimuth the log says: "REFUSED: unsupported Azimuth build. Extra Options x.y.z supports the inspected Azimuth 1.0.1, 1.0.2, 1.0.3 and 1.0.4 executables only".
- Azimuth 1.0.4 does not load
winmm.dllfrommods\. It must sit besideazimuth.exe, or EO silently isn't there. - When a new Azimuth ships before EO supports it, players run without EO for a while. Nothing reads
mediaoverridethen unless something else mounts it; this is why the FH2 Mod Platform 2.7.3 and later mount it themselves when EO is absent (see Living alongside the platform).
How EO starts (Azimuth, 0.4.4 and later)
azimuth.exeloadswinmm.dllat process start. EO'sDllMainonly records its module handle.- When Azimuth first resolves
timeBeginPeriod, EO arms a redirect of Azimuth's game-mapping call (12 bytes written into int3 padding inazimuth.exe, byte-guarded, restored before the original runs). The log status meanwhile is "Waiting for Azimuth to prepare the loaded game." - When Azimuth's mapper returns, the game is mapped at 0x140000000, relocated and its imports bound, but no game code has run. EO reads the TitleId; for other titles it logs "INACTIVE: the loaded title is outside this build's supported profiles." and only forwards winmm.
- EO then, in one go on that thread: reads the ini and
.dat, hashes the exe on disk, preparesmods\, configures plugins, applies every patch in one transaction, optionally repairs Azimuth save markers, and writes the log. - Plugins load later, on a worker thread started from EO's file resolver on the game's first file lookup.
Installing EO and its strict ini
Players install EO by copying winmm.dll and FH2_ExtraOptions.ini beside azimuth.exe. A missing ini means all
code defaults (which differ from the shipped ini in places, see the table below).
One unknown key stops all of EO
FH2_ExtraOptions.ini is parsed strictly:
- At most 8,192 bytes, UTF-8 or ASCII (a UTF-8 BOM is fine). UTF-16 is refused: "REFUSED: INI must use UTF-8 or ASCII, not UTF-16."
- Comments start with
;or#. - Any unknown section, unknown key or invalid value refuses the whole of EO: "REFUSED: invalid INI section, option, or value. See the supplied FH2_ExtraOptions.ini."
- Known sections:
Global(aliasGeneral),Content,Frontend,Autodrive,PhotoMode,Bindings,Mods,Files,Compatibility,Experiments, plus the legacyGameplay,Camera,Graphics,Livery,HUD,Language,Profile. A few retired keys are silently ignored.
Never add your own keys to EO's ini, and never tell players to. One typo or one extra key disables every EO feature, its mod loader and every plugin. Keep your mod's settings in your own file.
Status lines
Line 2 of FH2_ExtraOptions.log (and Fh2TweaksStatus()) starts with OK: (patched, or the exe already carries EO's
patches), DISABLED: ([Global] Enabled=0), INACTIVE: (not a title EO supports) or REFUSED: (nothing patched,
see the table below). After it come the effective Key=value settings, then feature lines (FILES:, MODS:,
PLUGINS:, GARAGE: and so on). There are no timestamps; an old file date means EO didn't run at all.
All or none: how EO verifies the game
EO only patches a game it has checked byte for byte, and it applies all its patches or none. This matters to every other mod: if you change one of EO's bytes before EO looks, players lose all of EO without an obvious error.
- The exe on disk.
forza_durango_release_final.exemust be 58,204,160 bytes with SHA-2563ec04c6163fb5614e3d351ba0570d39b846041a257715d6340eceb03ccb7f0a3, after EO puts back the original bytes at its own patch ranges. EO also accepts about 24 exes pre-patched by its own older exe patcher (core, VIP, frontend, livery and anti-aliasing variants). Any other change anywhere in the file fails. - The mapped image. AMD64, TimeDateStamp 0x565501ED, SizeOfImage 0x3A18000.
- Every site in memory. Before writing anything, EO compares the live bytes at every one of its 352 sites (0.6.0: 91 fixed byte patches, 261 runtime callback sites and one data value) with its list of accepted bytes (the original, or EO's own patched bytes). One unexpected site and nothing is written.
- The write. EO pins its own DLL, makes every page writable, writes, flushes the instruction cache and restores protection. A failure at any step rolls back.
EO checks once, before writing, and never again. So:
- Changing one of EO's sites before EO runs makes EO refuse everything.
- Changing one after EO has finished doesn't make EO refuse, but you are now fighting EO for that code.
What makes EO refuse, and the fix
| Log line 2 | Cause | Fix |
|---|---|---|
REFUSED: unsupported Azimuth build... | Azimuth newer or older than this EO supports | Get the EO release for that Azimuth |
REFUSED: invalid INI section, option, or value... | Unknown key, typo, bad value | Restore the shipped ini, then change values only |
REFUSED: INI must use UTF-8 or ASCII, not UTF-16. | Ini saved as UTF-16 | Save as UTF-8 |
REFUSED: unsupported executable size. / ...differs from the supported FH2 build outside the known patch ranges. | Exe patched by another tool, or a different build | Restore the original exe |
REFUSED: unsupported loaded executable headers. No patches applied. | Wrong game build mapped | Use the 24 Nov 2015 build |
REFUSED: unexpected loaded bytes at <site name>. No patches applied. | Another mod changed an EO site before EO ran | Hook only after EO has finished (platform mods: wait_for_code) |
REFUSED: cannot make every patch page writable... / ...instruction-cache flush failed... | Rare system failures | Report to EO with the log |
| Log missing or old | EO didn't load | Wrong folder, unsupported Azimuth, or Wine's builtin winmm (see the checklist) |
Feature and patch reference
This is what EO 0.6.0 changes, so you know which settings a player may have on, which game code is already taken, and which pad buttons already do something.
The sites other mods meet most often
| Site | RVA | Address | What EO does there |
|---|---|---|---|
File resolver slot (CFileSys vtable +0x210) | game+0x2E6EF28 | 0x142E6EF28 | Swaps the pointer (original game+0x11F49B0) for its own resolver: media overrides, mods, plugin start-up |
| UIRenderer LoadComponent resource call | game+0x16EBB37 | 0x1416EBB37 | Redirects through a thunk at game+0x13FE354: the XAML rewrite point |
| Stateflow XML parse slot | game+0x2EC4FE0 | 0x142EC4FE0 | Edits pause.xml, ui_screens.xml and others in memory (original game+0x13DE7E0) |
| Local car update slot | game+0x2C5CC00 | 0x142C5CC00 | Pad gestures, lights, roof; drives the plugin vehicle callback (original game+0x2A9400) |
| PauseMenu wire-the-tiles slot | game+0x2E14310 | 0x142E14310 | Points it at EO's callback, which calls the original game+0xDC6E30 |
| HUD options reset slot | game+0x2DF07C8 | 0x142DF07C8 | HUD page reset (original game+0xD33AE0) |
| Treasure Map extras entry | game+0xDBDD90 | 0x140DBDD90 | Call replaced by mov al,1 |
| Game database open | game+0xF65322, game+0x109312E | 0x140F65322, 0x14109312E | Calls retargeted to thunks: merges EO mods' database.json |
| String table load | game+0x1245441 | 0x141245441 | Call retargeted to a thunk: merges strings.json |
| FMOD bank DiskPath slot | game+0x2E6EEC8 | 0x142E6EEC8 | Bank paths for mod files (original game+0x11F1460) |
| Bink video open slot | game+0x2EA8650 | 0x142EA8650 | .bk2 overrides (original game+0x11A0710) |
Settings in the ini
Default is the value in the shipped ini; the code default (used when the key is absent) is in brackets where it differs.
| Section.Key | Default | What it does |
|---|---|---|
Global.Enabled | 1 | Everything, including the mod loader and plugins. 0 = DISABLED |
Content.UnlockDLC | 1 | All DLC entitlements (the Storm Island map still needs its package) |
Content.OfflineVIP | 1 | VIP perks: double credits and XP, wheelspin bonus |
Content.UnlockTreasureMap | 0 | Bonus boards and barns revealed; stays in the save once saved |
Content.UnlockStormIslandCars | 1 | Ranger T6 and #7 SST without the Storm Island events |
Frontend.CarsNextToHome | 1 | Pause menu tab order (Cars right of Home). Restart |
Frontend.ShowPlaygroundEvents | 0 | Playground events in "Show All Events" |
Frontend.MenuTurboIntervalMs | 100 | LB/RB held 0.5 s repeats; 20-1000 ms, 0 off. Restart |
Frontend.SkipIntro | 1 | Boot straight to "Press Start" |
Frontend.GetInCarFromPauseMenu | 1 | "Get In Car" from My Cars in free roam |
Frontend.AllRimsCategory | 1 [0] | Combined aftermarket and stock rim categories, no database writes |
Frontend.EnableMarketplace, EnableSocial, EnableClubs, EnableRivals | 1 | Live-only pause tabs offline |
Autodrive.Enabled | 1 [0] | GPS autodrive |
PhotoMode.FreeCamera | 1 | No photo-mode collision or bounds |
Mods.DatabaseCache | 1 | Cache of the merged database in mods\Cache\fh2-db |
Files.EnableMediaOverrides | 1 [0] | Mount mediaoverride and mediapc |
Compatibility.DisableParentalLocks | 1 | User-content privilege checks allowed locally |
Compatibility.GenerateMissingSaveCommits | 1 | Rebuild missing Azimuth save commit markers |
Experiments.LocalDrivatarLiveries | 1 | Drivatars wear saved designs from the player's library |
Experiments.MaxDrivatarLiveries | 5 [6] | 0-32 |
Experiments.UnlockAeroTuning | 0 | Aero tuning without aero parts (can change PI) |
Experiments.AllEngineSwaps, AllTransmissionSwaps | 0 | Whole catalogue in swaps; keep on while using cars saved with them |
Many settings moved into the game's own Video, HUD, Audio, Assist and Controller pages, saved in the .dat: drift
camera, field of view per camera, sun shadows, photo samples, minimap orientation, livery resolution and anti-aliasing,
spawn location, units, player character and more. Their old ini keys (for example Livery.Enable4K,
HUD.MinimapFollowsCamera, Graphics.SmoothSunShadows) are still accepted.
Pad and keyboard bindings
If your mod takes a pad button, check EO's [Bindings] defaults first, or one press does two things:
- Pad: autodrive DPadDown; headlights RightStick tap; roof RightStick held 1.5 s while stationary; signals DPadLeft/DPadRight held 0.5 s (a tap still changes the radio); hazards DPadUp; photo mode DPadUp held 1 s; showroom photo View; car meet photo X; return to garage X; jump to manufacturer View (cars) and Y (rims).
- Keyboard: autodrive F2, headlights F3, roof F4, jump to manufacturer Tab, toggle UI F1.
- Players can rebind them (
A,B,X,Y,LB,RB,LT,RT,View,Menu, the DPad and sticks,+for combinations,Noneto turn one off), so treat these as likely, not certain.
Patches and hooks by feature
| Feature | Setting | Fixed byte patches (RVA) | Runtime hooks |
|---|---|---|---|
| Skip intro | Frontend.SkipIntro | 0x21D5A0, 0x21E68D, 0x22009D, 0x221280 (jumps made unconditional) | |
| Offline VIP | Content.OfflineVIP | 7 calls replaced by mov eax,1, 0x29F00C to 0x6F54D7 | |
| DLC | Content.UnlockDLC | 0x9BE8BB, 0x9BEC6B, 0x1E03795 | |
| Treasure Map | Content.UnlockTreasureMap | 10 sites incl. 0x405E86 (barns), 0xD72DB4/0xD72DBA (map), 0xDBDD90 (Extras) | callback pointer in padding 0x4028F8 |
| Storm Island cars | Content.UnlockStormIslandCars | 0xB02F69, 0xCACEC9 | |
| Skip car-meet boot | in-game spawn choice | 0x87AC66 | |
| Photo free camera | PhotoMode.FreeCamera | 0x3978E8, 0xAA0081, 0xAA00FB | |
| Lights, hazards, signals | Bindings.* | 0x963703, 0x964C00, 0x964D08, 0x964D38 | local car update 0x2C5CC00, roof fade 0x2C81388, thunks 0x9630D4, 0x964DB4, 0x965464 |
| Minimap follows camera | in game | 0xBAAFF6, thunk in padding 0xBABB88 | callback pointer 0xBAAE68 |
| Get In Car from pause | Frontend.GetInCarFromPauseMenu | 0xCCF660 | stateflow parse 0x2EC4FE0; pause slots 0x2E14310, 0x2E14350, 0x2E20DD0 |
| Marketplace tab | Frontend.EnableMarketplace | 5 group flags 0xDDACAD-0xDDBB3E; 177-byte SQL string in .rdata at 0x1F538C0 | |
| Clubs, Rivals, Social tabs | Frontend.Enable* | 5 + 7 + 3 group flags, 0xDDAE0A-0xDDBE0E | |
| Aero tuning | Experiments.UnlockAeroTuning | 0xE9AB3B, 0xE9ABA7, 0x1057635, 0x10576B0 | thunks 0x1061064, 0x1061234 |
| Rims | Frontend.AllRimsCategory | 12 sites, 0xEB6A30-0x13A92BF | thunks 0xEB0274, 0xECD6A4, 0xECDE31, 0xECFC22, 0x108D414; name slots 0x2D826A0, 0x2E5EF20 |
| Drift camera | in game | 0x10369C9, 0x103C87D | thunks 0x103B261, 0x103B281; camera update slots 0x2E703D0, 0x2E77EC8, 0x2E78140 |
| Field of view | in game | 6 camera slots 0x2E70420-0x2E788F0 | |
| Sun shadows | in game | 0x1131C02, 0x1153E5A, 0x11556B5 | |
| 4K liveries, MSAA | in game | 9 sites 0x121D0A1-0x12258F1 (code in int3 padding) | |
| Parental locks | Compatibility.DisableParentalLocks | 0x1249C50, 0x1249E90 | |
| Settings pages, page rewrites | Global.Enabled | 0x16EBB37 | thunk 0x13FE354, reset slots 0x2E60900, 0x2DF07C8 |
| Autodrive | Autodrive.Enabled | 13 slots (GPS, tracker, pause, UI draw) | |
| Media overrides, mods | Files.EnableMediaOverrides, Global.Enabled | resolver 0x2E6EF28, video 0x2EA8650, bank 0x2E6EEC8, database 0xF65322/0x109312E, strings 0x1245441 | |
| Showroom photo | Bindings.ShowroomPhotoXbox | 6 slots 0x2D63CF8-0x2DD3750 | |
| Photo samples | in game | runtime data value at 0x2E83CE4 (int, original 295) |
EO's runtime hooks come in five kinds, all verified before writing:
| Kind | What EO writes |
|---|---|
| relocated vtable pointer | Swaps a pointer in a vtable or .rdata, after checking the original pointer |
| vtable function pointer | Same, for a function slot it wraps |
| callback pointer in unused padding | An 8-byte pointer written into int3 padding |
| callback thunk in unused padding | 12 bytes, mov rax, imm64; jmp rax, over int3 padding |
| relative call to callback thunk | An E8 rel32 call retargeted to such a thunk |
Besides the 64 runtime hooks EO describes in patches.json, about 200 more callback sites live in the
PatchDefinition tables of its fh2/<feature>.c files: manufacturer jump (51, mostly car-list vtables), offline
events (42), showroom photo (24), autodrive (12), presentation controls (8) and smaller groups. Before you claim any
vtable slot in the car lists, pause menu or settings pages, search those tables.
| Group | Site | RVA | Address | Bytes |
|---|---|---|---|---|
| INTRO | intro_resources_skip | game+0x21D5A0 | 0x14021D5A0 | 6 |
| INTRO | intro_sequence_skip | game+0x21E68D | 0x14021E68D | 2 |
| INTRO | intro_complete_state | game+0x22009D | 0x14022009D | 2 |
| INTRO | intro_resource_name_skip | game+0x221280 | 0x140221280 | 6 |
| VIP | main_values_vip | game+0x29F00C | 0x14029F00C | 5 |
| VIP | local_vip_profile | game+0x2F850E | 0x1402F850E | 7 |
| VIP | loaded_profile_vip | game+0x3265A0 | 0x1403265A0 | 5 |
| VIP | reward_context_vip | game+0x612EBA | 0x140612EBA | 5 |
| VIP | wheelspin_display_vip | game+0x6E8A80 | 0x1406E8A80 | 5 |
| VIP | wheelspin_claim_vip | game+0x6E9155 | 0x1406E9155 | 5 |
| VIP | alternate_claim_vip | game+0x6F54D7 | 0x1406F54D7 | 5 |
| PHOTO_CAMERA | photo_camera_world_restrictions | game+0x3978E8 | 0x1403978E8 | 6 |
| PHOTO_CAMERA | photo_camera_ui_collision | game+0xAA0081 | 0x140AA0081 | 2 |
| PHOTO_CAMERA | photo_camera_ui_vertical_bounds | game+0xAA00FB | 0x140AA00FB | 6 |
| TREASURE_MAP | treasure_map_mainland_property | game+0x4028F0 | 0x1404028F0 | 6 |
| TREASURE_MAP | treasure_map_barn_marker_reveal | game+0x405E86 | 0x140405E86 | 2 |
| TREASURE_MAP | treasure_map_board_setup_binding | game+0x4F5771 | 0x1404F5771 | 7 |
| TREASURE_MAP | treasure_map_mainland_property_binding | game+0xA5E9DA | 0x140A5E9DA | 7 |
| TREASURE_MAP | treasure_map_island_property_binding | game+0xA5E9F7 | 0x140A5E9F7 | 7 |
| TREASURE_MAP | treasure_map_island_map_check | game+0xD72DB4 | 0x140D72DB4 | 4 |
| TREASURE_MAP | treasure_map_mainland_map_check | game+0xD72DBA | 0x140D72DBA | 4 |
| TREASURE_MAP | treasure_map_extras_catalog | game+0xD783DA | 0x140D783DA | 5 |
| TREASURE_MAP | treasure_map_extras_entry | game+0xDBDD90 | 0x140DBDD90 | 5 |
| TREASURE_MAP | treasure_map_island_property | game+0x1657060 | 0x141657060 | 6 |
| BOOT_CAR_MEET | mainland_boot_skip_car_meet | game+0x87AC66 | 0x14087AC66 | 2 |
| VEHICLE_CONTROLS | blinker_radio_left_query | game+0x964D08 | 0x140964D08 | 5 |
| VEHICLE_CONTROLS | blinker_radio_right_query | game+0x964D38 | 0x140964D38 | 5 |
| VEHICLE_CONTROLS | hazards_photo_input | game+0x964C00 | 0x140964C00 | 5 |
| VEHICLE_CONTROLS | hazards_photo_hold_ready | game+0x963703 | 0x140963703 | 5 |
| DLC | ownership_predicate | game+0x9BE8BB | 0x1409BE8BB | 4 |
| DLC | active_entitlement_predicate | game+0x9BEC6B | 0x1409BEC6B | 4 |
| DLC | catalog_purchased | game+0x1E03795 | 0x141E03795 | 1 |
| ISLAND_CARS | storm_island_car_availability | game+0xB02F69 | 0x140B02F69 | 5 |
| ISLAND_CARS | storm_island_purchase_gate | game+0xCACEC9 | 0x140CACEC9 | 5 |
| MINIMAP | minimap_camera_heading_call | game+0xBAAFF6 | 0x140BAAFF6 | 5 |
| MINIMAP | minimap_camera_heading_thunk | game+0xBABB88 | 0x140BABB88 | 6 |
| PAUSE_GARAGE | pause_garage_get_in_car | game+0xCCF660 | 0x140CCF660 | 2 |
| MARKETPLACE | marketplace_group_enabled_1 | game+0xDDACAD | 0x140DDACAD | 6 |
| MARKETPLACE | marketplace_group_enabled_2 | game+0xDDAE1F | 0x140DDAE1F | 6 |
| MARKETPLACE | marketplace_group_enabled_3 | game+0xDDB2F5 | 0x140DDB2F5 | 6 |
| MARKETPLACE | marketplace_group_enabled_4 | game+0xDDB910 | 0x140DDB910 | 6 |
| MARKETPLACE | marketplace_group_enabled_5 | game+0xDDBB3E | 0x140DDBB3E | 6 |
| MARKETPLACE | catalog_include_owned_packs | game+0x1F538C0 | 0x141F538C0 | 177 |
| CLUBS | clubs_group_enabled_ddae0a | game+0xDDAE0A | 0x140DDAE0A | 6 |
| CLUBS | clubs_group_enabled_ddb2a1 | game+0xDDB2A1 | 0x140DDB2A1 | 6 |
| CLUBS | clubs_group_enabled_ddbad5 | game+0xDDBAD5 | 0x140DDBAD5 | 6 |
| CLUBS | clubs_group_enabled_ddbcd8 | game+0xDDBCD8 | 0x140DDBCD8 | 6 |
| CLUBS | clubs_group_enabled_offline_refresh_ddbe0e | game+0xDDBE0E | 0x140DDBE0E | 6 |
| RIVALS | rivals_group_enabled_ddae34 | game+0xDDAE34 | 0x140DDAE34 | 6 |
| RIVALS | rivals_group_enabled_ddaef0 | game+0xDDAEF0 | 0x140DDAEF0 | 6 |
| RIVALS | rivals_group_enabled_ddaf7a | game+0xDDAF7A | 0x140DDAF7A | 6 |
| RIVALS | rivals_group_enabled_ddb123 | game+0xDDB123 | 0x140DDB123 | 6 |
| RIVALS | rivals_group_enabled_ddb2b6 | game+0xDDB2B6 | 0x140DDB2B6 | 6 |
| RIVALS | rivals_group_enabled_ddb655 | game+0xDDB655 | 0x140DDB655 | 6 |
| RIVALS | rivals_group_enabled_ddbaea | game+0xDDBAEA | 0x140DDBAEA | 6 |
| SOCIAL | social_group_enabled_ddae81 | game+0xDDAE81 | 0x140DDAE81 | 6 |
| SOCIAL | social_group_enabled_ddb75d | game+0xDDB75D | 0x140DDB75D | 6 |
| SOCIAL | social_group_enabled_ddba96 | game+0xDDBA96 | 0x140DDBA96 | 6 |
| AERO_TUNING | aero_front_tuning_unlocked | game+0xE9AB3B | 0x140E9AB3B | 5 |
| AERO_TUNING | aero_rear_tuning_unlocked | game+0xE9ABA7 | 0x140E9ABA7 | 5 |
| AERO_TUNING | front_aero_physics_ranges | game+0x1057635 | 0x141057635 | 5 |
| AERO_TUNING | rear_aero_physics_ranges | game+0x10576B0 | 0x1410576B0 | 5 |
| RIMS | stock_rim_localized_name_call | game+0xEBC61E | 0x140EBC61E | 5 |
| RIMS | all_rims_categories_query | game+0xECE71F | 0x140ECE71F | 6 |
| RIMS | all_rims_items_query | game+0xECF307 | 0x140ECF307 | 6 |
| RIMS | stock_wheel_variant_query | game+0x108FADC | 0x14108FADC | 5 |
| RIMS | factory_rim_size_category_lock | game+0xEB6A30 | 0x140EB6A30 | 5 |
| RIMS | factory_rim_size_category_select | game+0xEBFB45 | 0x140EBFB45 | 5 |
| RIMS | factory_rim_size_part_lock | game+0xEBFF38 | 0x140EBFF38 | 5 |
| RIMS | stock_wheel_archive_preload | game+0xFD054C | 0x140FD054C | 5 |
| RIMS | stock_wheel_models_startup | game+0x11AF25B | 0x1411AF25B | 5 |
| RIMS | stock_wheel_models_preview | game+0x11B0F30 | 0x1411B0F30 | 5 |
| RIMS | stock_wheel_archive_startup | game+0x138E634 | 0x14138E634 | 5 |
| RIMS | stock_wheel_archive_preview | game+0x13A92BF | 0x1413A92BF | 5 |
| DRIFT_CAMERA | drift_camera_heading_call | game+0x10369C9 | 0x1410369C9 | 5 |
| DRIFT_CAMERA | drift_camera_chase_spring_call | game+0x103C87D | 0x14103C87D | 5 |
| SUN_SHADOWS | sun_shadow_all_cascades_per_frame | game+0x1131C02 | 0x141131C02 | 7 |
| SUN_SHADOWS | sun_shadow_cascade_direction_refresh | game+0x1153E5A | 0x141153E5A | 2 |
| SUN_SHADOWS | sun_shadow_focus_direction_refresh | game+0x11556B5 | 0x1411556B5 | 2 |
| LIVERY | livery_5 | game+0x121D0A1 | 0x14121D0A1 | 13 |
| LIVERY | livery_6 | game+0x121D1E1 | 0x14121D1E1 | 13 |
| LIVERY | livery_7 | game+0x121D341 | 0x14121D341 | 13 |
| LIVERY | livery_2 | game+0x121EA6A | 0x14121EA6A | 6 |
| LIVERY | livery_1 | game+0x121F0DA | 0x14121F0DA | 5 |
| LIVERY | livery_0 | game+0x121F112 | 0x14121F112 | 5 |
| LIVERY | livery_3 | game+0x12258E9 | 0x1412258E9 | 8 |
| LIVERY | livery_4 | game+0x12258F1 | 0x1412258F1 | 8 |
| MSAA | livery_msaa | game+0x121E9B7 | 0x14121E9B7 | 6 |
| PARENTAL | profile_multiplayer_privilege | game+0x1249C50 | 0x141249C50 | 10 |
| PARENTAL | profile_content_privilege | game+0x1249E90 | 0x141249E90 | 10 |
| VIDEO_OPTIONS | drift_video_resource_call | game+0x16EBB37 | 0x1416EBB37 | 5 |
| Group | Hook | Kind | RVA | Address | Original target |
|---|---|---|---|---|---|
| FRONTEND_XML | garage_xml_parse_hook | relocated vtable pointer | game+0x2EC4FE0 | 0x142EC4FE0 | game+0x13DE7E0 |
| ROAD | garage_nearest_road_store_hook | relocated vtable pointer | game+0x2D275D0 | 0x142D275D0 | game+0x93CA40 |
| TREASURE_MAP | treasure_map_board_setup_callback | callback pointer in unused padding | game+0x4028F8 | 0x1404028F8 | |
| AUTODRIVE | autodrive_gps_update | relocated vtable pointer | game+0x2CC3198 | 0x142CC3198 | game+0x6B4D30 |
| AUTODRIVE | autodrive_gps_deactivation | relocated vtable pointer | game+0x2CC31B0 | 0x142CC31B0 | game+0x6C0C70 |
| AUTODRIVE | autodrive_tracker_update | relocated vtable pointer | game+0x2CC3288 | 0x142CC3288 | game+0x6B4E40 |
| AUTODRIVE | autodrive_tracker_destruction | relocated vtable pointer | game+0x2CC3278 | 0x142CC3278 | game+0x6A26E0 |
| AUTODRIVE | autodrive_pause_entry | relocated vtable pointer | game+0x2D16698 | 0x142D16698 | game+0x8E98E0 |
| AUTODRIVE | autodrive_event_context_entry | relocated vtable pointer | game+0x2D1EA50 | 0x142D1EA50 | game+0x912860 |
| AUTODRIVE | autodrive_ui_wait_render | relocated vtable pointer | game+0x2E7F040 | 0x142E7F040 | game+0x1140ED0 |
| AUTODRIVE | autodrive_notice_text | relocated vtable pointer | game+0x2ECF6C8 | 0x142ECF6C8 | game+0x140A800 |
| AUTODRIVE | autodrive_ui_draw | relocated vtable pointer | game+0x2ECFAA8 | 0x142ECFAA8 | game+0x15B51A0 |
| AUTODRIVE | autodrive_ui_present | relocated vtable pointer | game+0x2ECFAA0 | 0x142ECFAA0 | game+0x15B5110 |
| AUTODRIVE | autodrive_ui_wait_render_plain | relocated vtable pointer | game+0x2E832A8 | 0x142E832A8 | game+0x1140ED0 |
| AUTODRIVE | autodrive_ui_draw_base | relocated vtable pointer | game+0x2F09088 | 0x142F09088 | game+0x15B51A0 |
| AUTODRIVE | autodrive_ui_present_base | relocated vtable pointer | game+0x2F09080 | 0x142F09080 | game+0x15B5110 |
| MINIMAP | minimap_camera_heading_callback | callback pointer in unused padding | game+0xBAAE68 | 0x140BAAE68 | |
| MEDIA_OVERRIDES | media_override_native_resolver | relocated vtable pointer | game+0x2E6EF28 | 0x142E6EF28 | game+0x11F49B0 |
| RIMS | all_rims_query_callback | callback pointer in unused padding | game+0xECF5D8 | 0x140ECF5D8 | |
| DRIFT_CAMERA | drift_camera_heading_thunk | callback thunk in unused padding | game+0x103B261 | 0x14103B261 | |
| DRIFT_CAMERA | drift_camera_chase_spring_thunk | callback thunk in unused padding | game+0x103B281 | 0x14103B281 | |
| DRIFT_CAMERA | drift_camera_driver_update | vtable function pointer | game+0x2E78140 | 0x142E78140 | |
| DRIFT_CAMERA | drift_camera_hood_update | vtable function pointer | game+0x2E77EC8 | 0x142E77EC8 | |
| DRIFT_CAMERA | drift_camera_bumper_update | vtable function pointer | game+0x2E703D0 | 0x142E703D0 | |
| VIDEO_OPTIONS | drift_video_resource_thunk | callback thunk in unused padding | game+0x13FE354 | 0x1413FE354 | |
| VIDEO_OPTIONS | drift_video_reset_options | vtable function pointer | game+0x2E60900 | 0x142E60900 | |
| CAMERA_FOV | fov_follow | relocated vtable pointer | game+0x2E78410 | 0x142E78410 | game+0x1034120 |
| CAMERA_FOV | fov_chase | relocated vtable pointer | game+0x2E78680 | 0x142E78680 | game+0x1034120 |
| CAMERA_FOV | fov_far_chase | relocated vtable pointer | game+0x2E788F0 | 0x142E788F0 | game+0x1034120 |
| CAMERA_FOV | fov_driver | relocated vtable pointer | game+0x2E78190 | 0x142E78190 | game+0x10340F0 |
| CAMERA_FOV | fov_hood | relocated vtable pointer | game+0x2E77F18 | 0x142E77F18 | game+0x10340F0 |
| CAMERA_FOV | fov_bumper | relocated vtable pointer | game+0x2E70420 | 0x142E70420 | game+0x10340F0 |
| VIDEO_OPTIONS | hud_reset_options | relocated vtable pointer | game+0x2DF07C8 | 0x142DF07C8 | game+0xD33AE0 |
| VEHICLE_CONTROLS | local_car_vehicle_controls_update | relocated vtable pointer | game+0x2C5CC00 | 0x142C5CC00 | game+0x2A9400 |
| VEHICLE_CONTROLS | roof_black_fade_color | relocated vtable pointer | game+0x2C81388 | 0x142C81388 | game+0x477C50 |
| RIMS | stock_wheel_archive_text_thunk | callback thunk in unused padding | game+0xECD6A4 | 0x140ECD6A4 | |
| RIMS | stock_wheel_archive_string_thunk | callback thunk in unused padding | game+0xECDE31 | 0x140ECDE31 | |
| RIMS | stock_wheel_models_thunk | callback thunk in unused padding | game+0xECFC22 | 0x140ECFC22 | |
| RIMS | stock_rim_localized_name_thunk | callback thunk in unused padding | game+0xEB0274 | 0x140EB0274 | |
| VIDEO_OPTIONS | pause_garage_footer | relocated vtable pointer | game+0x2E14310 | 0x142E14310 | game+0xDC6E30 |
| VIDEO_OPTIONS | pause_garage_help_action | relocated vtable pointer | game+0x2E20DD0 | 0x142E20DD0 | game+0xDE7490 |
| VIDEO_OPTIONS | pause_garage_update | relocated vtable pointer | game+0x2E14350 | 0x142E14350 | game+0xDCE660 |
| VIDEO_OPTIONS | garage_location_activation | relocated vtable pointer | game+0x2C98D10 | 0x142C98D10 | game+0x559260 |
| VEHICLE_CONTROLS | blinker_radio_query_thunk | callback thunk in unused padding | game+0x964DB4 | 0x140964DB4 | |
| AERO_TUNING | front_aero_tuning_ranges | callback thunk in unused padding | game+0x1061234 | 0x141061234 | |
| AERO_TUNING | rear_aero_tuning_ranges | callback thunk in unused padding | game+0x1061064 | 0x141061064 | |
| RIMS | stock_rim_part_name_everyman | relocated vtable pointer | game+0x2D826A0 | 0x142D826A0 | game+0xEB70B0 |
| RIMS | stock_rim_part_name | relocated vtable pointer | game+0x2E5EF20 | 0x142E5EF20 | game+0xEB70B0 |
| RIMS | stock_wheel_variant_query_thunk | callback thunk in unused padding | game+0x108D414 | 0x14108D414 | |
| VEHICLE_CONTROLS | hazards_photo_input_thunk | callback thunk in unused padding | game+0x9630D4 | 0x1409630D4 | |
| VEHICLE_CONTROLS | hazards_photo_ready_thunk | callback thunk in unused padding | game+0x965464 | 0x140965464 | |
| ADDONS | addon_database_open_thunk | callback thunk in unused padding | game+0x108E9D4 | 0x14108E9D4 | |
| ADDONS | addon_sqlite_open_thunk | callback thunk in unused padding | game+0x108D524 | 0x14108D524 | |
| ADDONS | addon_database_open | relative call to callback thunk | game+0xF65322 | 0x140F65322 | |
| ADDONS | addon_sqlite_open | relative call to callback thunk | game+0x109312E | 0x14109312E | |
| ADDONS | addon_string_table_thunk | callback thunk in unused padding | game+0x1245514 | 0x141245514 | |
| ADDONS | addon_string_table_load | relative call to callback thunk | game+0x1245441 | 0x141245441 | |
| MEDIA_OVERRIDES | mod_video_file_redirect | relocated vtable pointer | game+0x2EA8650 | 0x142EA8650 | game+0x11A0710 |
| VIDEO_OPTIONS | showroom_photo_view | relocated vtable pointer | game+0x2DD3710 | 0x142DD3710 | game+0xCCE280 |
| VIDEO_OPTIONS | showroom_photo_pause_view | relocated vtable pointer | game+0x2D63CF8 | 0x142D63CF8 | game+0xCF8D80 |
| VIDEO_OPTIONS | showroom_photo_autoshow | relocated vtable pointer | game+0x2DC6C20 | 0x142DC6C20 | game+0xCA99A0 |
| VIDEO_OPTIONS | showroom_photo_view_input | relocated vtable pointer | game+0x2DD3750 | 0x142DD3750 | game+0xCD1690 |
| VIDEO_OPTIONS | showroom_photo_pause_input | relocated vtable pointer | game+0x2D63D38 | 0x142D63D38 | game+0xCD1690 |
| VIDEO_OPTIONS | showroom_photo_autoshow_input | relocated vtable pointer | game+0x2DC6C60 | 0x142DC6C60 | game+0xCADDB0 |
Not in patches.json but also hooked by 0.6.0: the audio globals open at game+0x13DE5D6 (thunk game+0x13DE661),
the FMOD bank DiskPath slot game+0x2E6EEC8, the bank load diagnostics at game+0x10121D4 and game+0x101218D, and
the game's CreateFileA import slot game+0x1DD11B0.
The plugin API
An EO plugin is an ordinary 64-bit DLL that EO loads into the game process. The API is small: one header, one context struct, and up to four optional exports. It gives you a place and a time to start, three callbacks and a log. It does not give you hooks, settings rows or anything else; you write those yourself.
Where plugins live and when they load
- Folder:
<Azimuth folder>\mods\Forza Horizon 2\<mod>\plugins\*.dll(EO 0.4.5 and later; 0.3.x-0.4.4 usedmods\<mod>\plugins\). There is no global plugins folder: a plugin always belongs to an EO mod. - Only top-level DLLs load. Subfolders are for your resources and dependencies. DLLs load with
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS, so a dependency beside your plugin resolves. - Order: mods in
loadorder.txtorder, then DLLs by case-insensitive file name. Prefix numbers if order matters. - Only active mods load plugins: the mod must be enabled in
loadorder.txt, itsdatabase.json(if any) must have merged, and[Global] Enabled=1.Files.EnableMediaOverridesdoesn't matter. - When: on a worker thread started from EO's file resolver at the game's first file lookup, after EO's patches. Game threads are already running. Nothing waits for your initialiser.
- Lifetime: no unloading, no reloading. A DLL stays loaded until exit even when its initialiser fails (it may own hooks). Restart the game after replacing a plugin. A plugin crash is a game crash.
The log gets one line per DLL:
PLUGINS: <path> | initialized
PLUGINS: <path> | loaded (no optional initializer)
PLUGINS: <path> | initializer returned FALSE; module retained
PLUGINS: <path> | load failed (<Windows error>)
PLUGINS: <path> | private media directory ready
PLUGINS: <path> | private media directory rejected
The context and the exports
Copy fh2/fh2_plugin.h from EO's repo. The ABI is version 1, unchanged since 0.2.x; the context is 64 bytes.
typedef struct FH2PluginContext {
uint32_t size; // sizeof(FH2PluginContext)
uint32_t api_version; // FH2_PLUGIN_API_VERSION (1)
uint32_t adapter; // 1 = Azimuth, 2 = the other translation layer EO supports
uint32_t game_image_size; // 0x3A18000 for FH2
void *game_image; // the mapped, relocated game (0x140000000 under Azimuth)
HMODULE plugin_module;
const wchar_t *plugins_directory; // this mod's plugins folder
const wchar_t *plugin_path; // this DLL
const char *extra_options_version; // for example "0.6.0"
void (*log_utf8)(const char *message);// appends raw text to FH2_ExtraOptions.log
} FH2PluginContext;
All four exports are optional and found by name (use extern "C" in C++):
| Export | Since | Called on | Contract |
|---|---|---|---|
BOOL WINAPI FH2PluginInitialize(const FH2PluginContext *) | 0.2.x | EO's loader worker, once, after your DllMain returned | Context and strings stay valid until exit. TRUE turns your callbacks on. FALSE is logged, the DLL stays, no callbacks, no retry |
void WINAPI FH2PluginVehicleUpdate(const FH2PluginVehicleFrame *) | 0.2.176 | the game thread updating the local player's car, before the original update; never AI cars | car is borrowed for this call only. Keep it short |
BOOL WINAPI FH2PluginDatabaseUpdate(const FH2PluginDatabaseFrame *) | 0.2.211 | the game thread that owns the database, once per merged database | Borrowed connection. Own your transaction; return FALSE after rolling back |
const wchar_t *WINAPI FH2PluginMediaDirectory(void) | 0.2.212 | the loader worker, once after a successful init | A finished, unchanging folder inside plugins_directory; its files add to your mod's media |
typedef struct FH2PluginVehicleFrame {
uint32_t size, input_enabled; // input_enabled = 0 in menus, loading, no gameplay input, or window unfocused
void *car; // ForzaCar*, borrowed
uint32_t buttons; // XInput-style button bits (16 bits used)
float delta_seconds;
int (WINAPI *flash)(void); // the game's white player-view flash; returns 0 if the camera is busy
} FH2PluginVehicleFrame;
typedef struct FH2PluginDatabaseFrame {
uint32_t size, api_version;
void *database; // the merged in-memory sqlite3* (the game's own SQLite)
int (*prepare)(void *, const char *, int, void **, const char **); // sqlite3_prepare_v2
int (*step)(void *);
int (*finalize)(void *);
int64_t (*column_int64)(void *, int);
} FH2PluginDatabaseFrame;
Details that catch people out:
- Under Azimuth,
GetModuleHandleW(NULL)isazimuth.exe, not the game. The game isn't a loaded module. Always usecontext->game_image. log_utf8adds no line ending, and it isn't atomic across threads (lines from two threads can interleave). End every line with\r\nand write whole lines in one call.- Vehicle callback: it still runs when
input_enabledis 0, so you can cancel a half-done gesture. Some stopped simulations don't update the car at all. Handle car changes, and require the button to be released before arming again. The bits come from the game's own controller state and match EO's binding table: DPad 0x1/0x2/0x4/0x8, Menu 0x10, View 0x20, LS 0x40, RS 0x80, LB 0x100, RB 0x200, A 0x1000, B 0x2000, X 0x4000, Y 0x8000. The triggers are not in this field. - Database callback: EO allows initialisers up to 5 seconds after the database handoff; ready providers run
before the game's database factory returns. Later ones run on the next local-car update. The connection is invalid
once a new merge begins; never use it from another thread. Only
prepare,step,finalizeandcolumn_int64are offered (no bind, no text columns), so write SQL with literal values. - Private media folder: EO canonicalises the path; it must be an existing folder strictly inside
plugins_directory, or it is "rejected". Your mod's normalmedia\wins over it. Don't rewrite files while the game may have them open. It doesn't add names to a base zip's file list. A mod'smod.jsoncan also point"media"into the plugin folder instead.
A minimal plugin
This plugin checks it is in the right game, logs a line, flashes the screen on a fresh LB press, and makes one car cheaper in the Autoshow. It has not been compiled or run for this guide; treat it as a starting point.
// MyPlugin.c -> <Azimuth folder>\mods\Forza Horizon 2\My Mod\plugins\MyPlugin.dll
#include "fh2_plugin.h" // copy from EO's repo: fh2/fh2_plugin.h
#define PAD_LB 0x0100u // LB in EO's binding table and in XInput
static const FH2PluginContext *g_ctx;
static void say(const char *line) { g_ctx->log_utf8(line); } // add "\r\n" yourself
// The mapped game keeps its PE header: check the exact build before touching anything.
static int is_fh2_build(const unsigned char *base) {
const IMAGE_DOS_HEADER *dos = (const IMAGE_DOS_HEADER *)base;
if (!base || dos->e_magic != IMAGE_DOS_SIGNATURE) return 0;
const IMAGE_NT_HEADERS64 *nt = (const IMAGE_NT_HEADERS64 *)(base + dos->e_lfanew);
return nt->Signature == IMAGE_NT_SIGNATURE &&
nt->FileHeader.TimeDateStamp == 0x565501EDu &&
nt->OptionalHeader.SizeOfImage == 0x3A18000u;
}
__declspec(dllexport) BOOL WINAPI FH2PluginInitialize(const FH2PluginContext *ctx) {
if (!ctx || ctx->api_version != FH2_PLUGIN_API_VERSION || ctx->size < sizeof(*ctx)) return FALSE;
g_ctx = ctx;
if (ctx->game_image_size != 0x3A18000u || !is_fh2_build(ctx->game_image)) {
say("MY MOD: this isn't the FH2 build I know, so I'm staying off.\r\n");
return FALSE;
}
// Install your own hooks here, after checking the exact bytes at each site
// (const unsigned char *)ctx->game_image + RVA. See 05-hooking.md.
say("MY MOD: ready.\r\n");
return TRUE;
}
__declspec(dllexport) void WINAPI FH2PluginVehicleUpdate(const FH2PluginVehicleFrame *f) {
static int armed = 1;
int held = (f->buttons & PAD_LB) != 0;
if (!held) { armed = 1; return; } // released: ready for the next press
if (!f->input_enabled) { armed = 0; return; } // pressed in a menu: wait for a release
if (armed) { armed = 0; if (f->flash) f->flash(); }
}
static int exec_sql(const FH2PluginDatabaseFrame *f, const char *sql) {
void *stmt = 0; const char *tail = 0;
if (f->prepare(f->database, sql, -1, &stmt, &tail) != 0 /* SQLITE_OK */) return 0;
int rc = f->step(stmt);
f->finalize(stmt);
return rc == 101; // SQLITE_DONE
}
__declspec(dllexport) BOOL WINAPI FH2PluginDatabaseUpdate(const FH2PluginDatabaseFrame *f) {
if (!f || f->size < sizeof(*f) || !exec_sql(f, "SAVEPOINT my_mod")) return FALSE;
// Car 247 is the 1969 Toyota 2000GT, 80,000 CR in the stock database.
if (exec_sql(f, "UPDATE Data_Car SET BaseCost=50000 WHERE Id=247"))
return exec_sql(f, "RELEASE my_mod");
exec_sql(f, "ROLLBACK TO my_mod");
exec_sql(f, "RELEASE my_mod");
say("MY MOD: database change failed and was rolled back.\r\n");
return FALSE;
}
Notes on the example:
- No
DllMainis needed; if you write one, keep it empty. Do your work inFH2PluginInitialize, outside the loader lock. - LB is only an illustration. The game reads the same button, so a real plugin should use a combination or a binding the player can change, and must avoid EO's own defaults (table above).
- The LB bit matches EO's own binding table and XInput's
XINPUT_GAMEPAD_LEFT_SHOULDER, but it is unconfirmed in game for this example.
Building it
Any x64 compiler that makes a normal Windows DLL works; the ABI is plain C.
:: MSVC, from an x64 Native Tools prompt (EO's own docs write /Isource; the header lives in fh2\ in the repo)
cl /nologo /LD /O2 /MT /I<folder with fh2_plugin.h> MyPlugin.c /link /OUT:MyPlugin.dll
:: llvm-mingw or mingw-w64
x86_64-w64-mingw32-clang -shared -O2 -I<folder with fh2_plugin.h> -o MyPlugin.dll MyPlugin.c
:: Zig (what EO's own plugins use)
zig cc -target x86_64-windows-gnu -shared -O2 -I<folder with fh2_plugin.h> -o MyPlugin.dll MyPlugin.c
Check that the exports kept their plain names (llvm-objdump -p MyPlugin.dll or dumpbin /exports): you should see
FH2PluginInitialize, FH2PluginVehicleUpdate and FH2PluginDatabaseUpdate, with no decoration. EO's repo has a
smaller example in examples/plugins/hello_plugin.c and two full plugins under fh2/plugins/ (an engine-rev plugin
and a weather plugin that adds a settings page).
Hooks in a plugin are your job
EO has no hook framework, no byte checks for you, and no chaining between plugins or with the FH2 Mod Platform. If you hook:
- Byte-check every site against the 24 Nov 2015 exe and stay off, with a log line, on any mismatch.
- Don't touch EO's own sites (the tables above, and the
PatchDefinitiontables in EO's source). - Game threads are already running when your initialiser runs. EO's weather plugin writes an 8-byte
jmp rel32to a stub near the image, keeps a trampoline for the displaced prologue, checks the expected prologue bytes, and suspends every other thread (checking none is inside the prologue) while it writes. MinHook does the same job. - If the FH2 Mod Platform is also installed, a platform mod may already have hooked the function you want, or will be refused later because you changed its bytes. Check for a jump before writing yours. See Living alongside the platform and Hooking safely.
Media overrides
The game opens every file by path through one resolver. EO mounts extra folders in front of the game's own files, so a mod can replace a file without touching the game's zips. Game data covers the file formats; this section covers where to put files and in what order they win.
How the game finds a file
game:\is the game'sMountfolder.T:\is FH2's temporary drive, which Azimuth 1.0 keeps in<Azimuth folder>\data\titles\1A96545B\tmpand doesn't empty between starts. Agame:\path containing..stops the game.- Every lookup goes through the file system's resolver at vtable slot
game+0x2E6EF28(CFileSysvtablegame+0x2E6ED18, +0x210), originalgame+0x11F49B0. The file system holds a list of volumes, each mounted at a path with a 32-bit priority, highest first. - Zips mount only if
media\zipmanifest.xmlhas a line for them, read once at start-up. Zip members appear under a virtual folder named after the zip:media\Camera.zipbecomesgame:\media\Camera\. - The exe has no
mediaoverrideormediapcfolder of its own. Loose overrides are entirely a mod feature.
What EO mounts, and in what order
On the first file lookup after the game's primary volume exists, EO mounts folder volumes, all at game:\media\:
| Volume | Priority | Where it is on disk |
|---|---|---|
mediaoverride | 0x7FFFFFFE | <game>\Mount\mediaoverride\ |
mediapc | 0x7FFFFFFD | <game>\Mount\mediapc\ |
| EO's carbin cache | 0x7FFFFFFC | under mods\Cache |
Each active EO mod's media | 0x70000001 + 2 × position (later in load order = higher) | <Azimuth folder>\mods\Forza Horizon 2\<mod>\media\ |
| EO mods' zips | registered with the game's own zip reader | inside the mod's media\ |
| The game's own files and zips | lower | <game>\Mount\media\ |
The log line is "FILES: mediaoverride > mediapc > mods (last first) > original assets; native folder mounts ready."
Things to know:
mediaoverrideandmediapcare in the game'sMountfolder, besideforza_durango_release_final.exe, not besideazimuth.exe.mods\is besideazimuth.exe. Mixing these up is the most common "nothing happens".- Every Azimuth install that shares one
Mountfolder sees the samemediaoverride. - Mapping: a loose file
media\path\filegoes tomediaoverride\path\file. A zip membermedia\X.zip→path\filegoes tomediaoverride\X\path\file. Example:media\Camera.zip→CameraGroups.xmlbecomesmediaoverride\Camera\CameraGroups.xml. Unchanged members still come from the zip. Matching ignores case. - The switch:
Files.EnableMediaOverridesdefaults to 0 when absent but is 1 in the shipped ini. When any EO mod is active, EO mountsmediaoverrideandmediapcanyway, even with the switch at 0. With 0 and no EO mods, nothing is mounted. - Restart after changing files. Mounts and EO mods' file indexes are built once; files added while the game runs aren't seen.
- Not covered: direct volume access, zip file lists (a loose file doesn't add a name to a zip's listing) and new DLC packages.
What can be overridden
| Kind | Where it goes | Status |
|---|---|---|
| UI pages (XAML) | mediaoverride\UI\... (members of media\UI.zip); new files there are found too | Proven |
| Camera and stateflow XML | mediaoverride\Camera\..., mediaoverride\stateflow\... | Proven |
| String tables | mediaoverride\Stripped\StringTables\<LANG>\<Table>.str (whole table) | Proven |
| Game database | mediaoverride\Stripped\gamedbRC.slt (whole file) | Proven; clashes with every other mod that does it, prefer database.json or the platform's add_sql |
| Car thumbnails | Stripped\RC<n>\Thumbnail_<Id>_Big.swatchbin / _Small.swatchbin, even names the RC zip lacks | Proven |
| Car zips | EO mod media\cars\ (no manifest), or a whole override zipmanifest.xml | Proven |
| Bink videos | media\ui\videos\*.bk2; EO opens these itself (mediaoverride, mediapc, then mods) | EO 0.6.0 |
audio\audioglobals.xml | Normal paths; the game opens it past the resolver, EO 0.6.0 special-cases it | EO 0.6.0 only |
FMOD banks (.bank) | for example media\audio\fmodanthem\durango\PG_<engine>.bank | Unconfirmed in game for EO mods and packs |
| Carbins | whole .carbin, or <car>.carbin.json patches (EO mods only) | Proven |
| Drivatar cache | media\DrivatarGlobalCache\DefaultCache.bin | Proven |
| Textures inside track archives (PGZP) | Not overridable: they bypass the resolver |
EO converts nothing and runs nothing from media: files must already be in the game's formats.
Loose files or zips
| Where | Loose files | New zips |
|---|---|---|
Mount\mediaoverride, Mount\mediapc | Yes | Only with a zipmanifest.xml line, which means overriding the whole manifest |
EO mod media\ | Yes; within one mod, loose beats zip members | Yes, found recursively, no manifest. Standard single-volume zips, stored or deflated; no ZIP64, no split archives. Registered only after the mod's database merge succeeds |
EO mod media\zipmanifest.xml, media\stripped\gamedbRC.slt | Ignored on purpose |
EO logs each zip it found and whether it mounted (entry count or the Windows error), and which volume answered the first carbin lookup per archive. Mounting doesn't prove the car's model data works in the game.
Azimuth's T:\ layer (FH2 Mod Platform without EO)
This isn't EO, but it explains why files "move" depending on whether EO is installed:
- Without EO on Azimuth 1.0 or later, platform 2.9.0+ writes its files (string tables,
set_files, Mods pages, database, mergedzipmanifest.xml) toT:\fh2-platform\media\, which is<Azimuth folder>\data\titles\1A96545B\tmp\fh2-platform\media, mounted at 0x7FFFFFFE. Car packs mount from 0x7FFFFFF0 down, andmediaoverride/mediapcmove to 0x7FFFFF00/0x7FFFFEFF. Each Azimuth folder then has its own mods even when installs share oneMount. - With EO, the platform writes to
Mount\mediaoverrideas before (EO mounts it), and car packs useT:\fh2-platform\eo-media(see car packs with EO). - With EO loaded,
EnableMediaOverrides=0and no active EO mod, the platform's files are written but never read.
Platform mods should always use set_file and override_root() and never hard-code mediaoverride
(The FH2 Mod Platform).
EO mods: data without code
An EO mod is a folder. It can carry loose files, zips, database changes, string changes, carbin patches and plugins, and EO merges them all in memory at start-up. The game's files are never written.
Layout (EO 0.4.5 and later)
<Azimuth folder>\
winmm.dll FH2_ExtraOptions.ini FH2_ExtraOptions.dat FH2_ExtraOptions.log
mods\
Cache\ EO's caches (fh2-db and others); delete only with the game closed
Forza Horizon 2\
loadorder.txt
My Mod\
mod.json optional manifest
database.json optional database changes
strings.json optional localised strings
media\ loose files, carbin JSON patches, ordinary zips
plugins\ optional DLLs
Folders from the older mods\<mod>\ layout are moved automatically (conflicts or locked files are logged and retried
next start; linked folders must be moved by hand).
loadorder.txt
- UTF-8, one folder name per line,
#comments. Disable a mod with# My Mod; EO won't turn it back on. - New folders are appended (alphabetically when the file is empty); missing ones are removed; your comments and order are kept.
- Later lines win.
- A duplicate or invalid line disables every EO mod.
- Folders starting with a dot and folder links aren't found.
- Limits: 128 mods, 64 KiB load order, 16 MiB per JSON file, 64 MiB of JSON in all.
- EO scans once per launch, on the first database open, file lookup or string load. Folders added later are seen next start.
mod.json
{
"format_version": 1,
"id": "my-mod",
"name": "My Mod",
"author": "Your name",
"version": "1.0.0",
"description": "What it does, in one line.",
"database": "database.json",
"media": "media",
"strings": "strings.json",
"dependencies": ["other-mod"]
}
id: lowercase ASCII letters, digits and single hyphens. Without amod.jsonthe folder name is the identity.addon.jsonis the old name.- Use
nullfor parts you don't have. Dependencies must be earlier in the load order and load successfully; a duplicate id rejects the later mod.
database.json
Never write this by hand. Make it with EO's diff tools (export_database_diff.py / mod_diff.py, or drag two files
onto "Mod Diff.cmd") from the stock gamedbRC.slt and your edited copy.
- Format 2 describes, per table, a
key,insertrows (all columns, never replacing),updaterows (wherethe full key,setnew values,expectthe original values) and guarded deletes. BLOBs are written{"blob_hex":"00ff"}. - No schema changes and no arbitrary SQL. Use a plugin's database callback for anything else.
id_conflicts:error(default): a clash skips your whole mod.nearest: your new row takes the closest free positive id (up to 32,768 away) and EO rewrites references to it, including foreign keys and the known car, engine, body, make, manufacturer and wheel references. Use this for new rows.last_wins(0.3.11+): rows share an identity; the later mod supplies every column and can override stock rows. Use only when you mean to.
update_conflicts:errororlast_wins.id_referencesdeclares extra relationships.target.base_sha256only warns.- Each mod is one transaction on a private in-memory copy of whatever database the game opened. A failure rolls back that mod and turns off its media and every mod that depends on it.
- With
nearest, ids depend on the load order. Keep the order stable once players have saves using those ids.
The cache: with [Mods] DatabaseCache=1 EO keys the merged result on the incoming database, EO's version, the
enabled mods in order and their JSON. Anything that rewrites the database the game opens on every launch (for example
another tool replacing mediaoverride\Stripped\gamedbRC.slt) forces a cold merge every time, which takes several
seconds.
strings.json
{
"format_version": 1,
"fallback_language": "EN",
"languages": {
"EN": { "Data_Car": { "27932": "911 GT3 RS (992)" } }
}
}
- Keys are string ids (decimal, 0-65534) inside the named table, not car ids. Table names have no
.strand must exist. - Languages: EN, GB, BR, CHT, CZ, DE, ES, FR, HU, IT, JP, KO, MX, NL, PL, RU, DEV, LOC.
- Later mods win; keys you leave out keep the game's text; strings can't be deleted.
- Database text columns hold references such as
_&1568980374. As a 32-bit number, the high 16 bits are the table id and the low 16 bits the string id: 0x5D84BD96 is table 23940 (List_PartManufacturer.str), string 48534. So a new car'sDisplayNamepoints at a string id you then define instrings.json.
Carbin JSON patches
Since DLL 0.2.140 an EO mod can patch a car's carbin instead of replacing it: put <car>.carbin.json next to the
carbin's virtual path, for example media\cars\SUB_BRZ_13\SUB_BRZ_13.carbin.json. The format is fh2-carbin-patch
version 1, made with carbin_json.py diff. With nearest, EO also remaps the carbin's upgrade, body and model ids in
memory. It never rewrites model GUIDs or asset paths, so give a new car distinct ones.
Add-on cars: with and without EO
A car is a Data_Car row plus media\cars\<MediaName>.zip (the carbin, modelbins, swatchbins and materials).
Game data covers the tables.
| Without EO | With an EO mod | |
|---|---|---|
| Mounting the zip | Needs a zipmanifest.xml line, so the mod ships a whole manifest (the game's 608 lines plus its own). A second car mod doing the same overwrites the first | No manifest. EO reads the zip's central directory itself and mounts it with the game's zip object |
| Database rows | Whole gamedbRC.slt or SQL; shared ids between mods roll back the later mod | database.json with nearest renumbers new ids |
| Name | Whole Data_Car.str | strings.json |
| Stock rims | Resolve through the donor's carbin (StockWheelID) | |
| Example | EO's repo: examples/mods/porsche-911-gt3-rs-2023 |
- There is no safe way to append one line to
zipmanifest.xml: a line for a missing zip likely crashes, an element that isn'tZiphangs start-up, and a changed zip needs its line's offsets changed. Don't edit the game's zips or manifest in place. - The FH2 Mod Platform's car packs (2.9.0+,
fh2-cars\) are a separate system that also avoids the manifest clash, and they do work with EO 0.6.0 (see below). Install a car as a pack or as an EO mod, never both.
Choosing the lightest form
| You want to | Use |
|---|---|
| Swap an asset | Loose files in an EO mod's media\ (or Mount\mediaoverride for a quick personal test) |
| Change data | database.json / strings.json from EO's diff tools |
| Add a car | EO mod: zip + database.json (nearest) + strings.json + thumbnails, or a platform car pack |
| Change behaviour | A plugin DLL, or a platform mod |
UI page rewriting by x:Class
EO adds its settings rows and changes a few menus by editing XAML text as the game reads it. If your mod ships its own page built from a stock one, EO may edit yours too.
Where and how EO matches
EO redirects the UIRenderer LoadComponent resource call at game+0x16EBB37 (through the thunk at game+0x13FE354)
and looks at every page the game loads, wherever it came from: UI.zip, mediaoverride, an EO mod or another mod's
file. It matches with an exact, case-sensitive substring search for x:Class="<class>": no spaces, double quotes.
| Class matched | What EO does |
|---|---|
ForzaUI.Scenes.Anthem.A_MessageBox | Manufacturer jump: replaces the whole tilt, MainContent and Menu tags with its own 550-wide list; unnamed parts and resources stay |
ForzaUI.A_HudOptions, ForzaUI.A_VideoOptions, ForzaUI.A_AudioOptions, ForzaUI.Scenes.Anthem.A_AssistOptions, ForzaUI.A_ControllerOptions | Adds EO's setting rows |
ForzaUI.A_PhotoMode | Driver options |
ForzaUI.A_PauseMenu | Tab order (CarsNextToHome) |
ForzaUI.A_PostRaceEventResults | Offline events |
ForzaUI.Scenes.Anthem.A_CarMeetCarDetails, ForzaUI.A_ViewCar, ForzaUI.A_ColorSelect | Photo and footer buttons; also needs a unique x:Name="DefaultHelpPanel" |
Any page with exactly one <local:FZMaterial ImageSource="{Binding SelectedItem.LogoPath, ElementName=UpgradePartList}" | Upgrade logos (not class-based) |
Size limits in 0.6.0: pages over 262,144 bytes are never touched; pages over 65,536 bytes only for the pause menu and post-race results; EO's output buffer is 131,072 bytes.
The x:Class = workaround
A track-import mod built its track picker on the message-box page. With EO loaded, EO replaced the page's layout with its manufacturer list and the picker came out wrong. The fix is one space:
<!-- EO edits this page: -->
<UserControl x:Class="ForzaUI.Scenes.Anthem.A_MessageBox" ...>
<!-- EO leaves this one alone; XML allows the space, and the game reads it the same: -->
<UserControl x:Class ="ForzaUI.Scenes.Anthem.A_MessageBox" ...>
This is proven in game with EO 0.4.4, and the FH2 Mod Platform writes its own pages the same way. Use it on any page
that copies one of the classes above, unless you want EO's edits. If a page still won't keep its layout, search
winmm.dll for the class and part names before blaming the game: a newer EO may match differently.
Stateflow XML
EO's parse hook (slot game+0x2EC4FE0) edits ui_screens.xml, pause.xml, race_trigger_activation.xml,
free_roam_start.xml, garage.xml, race_flow.xml and post_race_flow.xml in memory. It matches the file's base
name (ignoring case) and edits by text anchors, so a replaced pause.xml still gets EO's edits as long as the anchors
are there.
- Success: "GARAGE: pause.xml car reload/resume sequence patched in memory."
- Anchors missing: "GARAGE: unsupported menu-flow text; car reload unavailable." The feature is off for that session.
- Keep replaced stateflow files close to stock. The platform's own
pause.xmlkeeps EO's anchors.
The game's XAML reader
These are the game's rules, not EO's, but you meet them as soon as you edit a page:
- It decodes only
& ' " > <and hex references with a lowercase x,ó. Every other reference, including decimaló, becomes a space. - No BOM means one byte per character (Latin-1; 0x80-0x9F are control codes, not Windows-1252). A UTF-8 BOM switches on a lax UTF-8 decoder that can swallow a closing quote after a stray byte.
- Don't turn
{/}into real braces: an unknown markup extension crashes the page when it opens. - A page that names a missing resource or style crashes the game when it opens. Use only resources that exist in
UI.zip. - The Anthem fonts have every Polish, Czech and Hungarian letter but not Romanian ă ș ț, and Cyrillic only Ё/ё.
Game data has more on pages, fonts and the state machine.
Living alongside the FH2 Mod Platform
Most players who run platform mods also run EO. They coexist well once you know the order things happen in and which code each one owns.
Load order and timing
azimuth.exestarts and loads both as static imports from its folder: the platform asDWrite.dll(andd3dcompiler_47.dllon older Azimuth), EO aswinmm.dll.- The platform calls every mod's
fh2mod_initfrom its loader thread straight away. The game isn't mapped yet. - The player presses Play; Azimuth maps the game. EO verifies and patches here, before any game code runs.
- On the game's first file lookup, EO mounts its folders and starts its plugin worker.
- From then on, platform mod threads and EO plugin workers run side by side.
How the platform deals with EO:
- Detection: the platform looks for a loaded module exporting
Fh2TweaksStatus.GetModuleHandle("winmm.dll")isn't reliable (it can return System32's copy). wait_for_code(API 3) waits for the game, then, if EO is installed, until EO's log for this launch has its final status (OK:,REFUSED:,DISABLED:) or its winmm proxy line. After 20 s it goes ahead and logs that. With EO it is typically ready well under a second after mapping.
Hooking before EO switches it off
Any byte change at one of EO's 352 sites before EO checks them makes EO refuse everything, for the player, with no in-game sign: "REFUSED: unexpected loaded bytes at ". So:
- Platform mods: hook only after
api->wait_for_code(), from your own thread. See The FH2 Mod Platform. - Anything else (your own proxy, a plugin for another loader): wait for EO's status line before writing.
- EO plugins are safe here by design: they load after EO has patched.
After EO has patched, the platform compares the bytes each hook would change with the exe on disk. A site that EO (or anything else) changed is refused with "game code doesn't match" rather than layered on top. If you need a function EO patches, talk to EO's author rather than fighting over it.
EO plugins have no such check. A plugin can hook a function a platform mod wants; the platform mod is then refused. A plugin that hooks after a platform mod finds the platform's jump and must notice it and back off itself. There is no shared hook chain between the two systems.
Neighbouring sites
None of EO's sites is a site the platform or its mods hook, but some sit right next to each other. These all chain correctly today:
| Area | Platform | EO | Why it works |
|---|---|---|---|
| Marketplace Extras tile | Detours the handlers game+0xDBD720, game+0xDBDD00, game+0xDBDD60 (0x140DBDD60), game+0xDBFE40 | Patches a call at game+0xDBDD90 (0x140DBDD90) for Treasure Map | Different bytes |
| HUD options page | Swaps the pointer at game+0x2DF07B0 (0x142DF07B0, buttons) | Swaps game+0x2DF07C8 (0x142DF07C8, reset) | Different slots |
| Pause menu tiles | Detours game+0xDC6E30 (0x140DC6E30) inline | Swaps the vtable slot game+0x2E14310 (0x142E14310) that points to it | EO's callback calls game+0xDC6E30, so both run |
| File resolver | Swaps slot game+0x2E6EF28 itself only without EO (2.7.3+), byte-checked against disk | Owns the slot when loaded | Never both; with EO, EnableMediaOverrides decides |
The platform's AVUI property hook game+0x157FF60 and title-screen slot game+0x2E53940 aren't EO sites.
Hooking safely lists every site not to touch.
Conflicts seen, and their fixes
| What happened | Cause | Fix |
|---|---|---|
| EO's features all gone with a platform mod installed | Mod hooked before EO checked its bytes | wait_for_code (platform 2.2.0, API 3) |
| Platform mods' text, files and database changes vanished on Azimuth 1.0.1 | Azimuth shipped before EO supported it, so nothing mounted mediaoverride | Platform 2.7.3 mounts it itself when EO isn't loaded |
| Another mod's database overwritten | Mods pinning platform 2.7.1 or older rewrote mediaoverride\Stripped\gamedbRC.slt | Platform 2.7.2; change the database only with add_sql or database.json, never ship a whole gamedbRC.slt |
| A mod page lost its layout | EO's message-box rewrite matched its x:Class | x:Class = with a space |
| EO silently absent on Linux | Wine uses its builtin winmm | WINEDLLOVERRIDES="winmm=n,b" (and dwrite/d3dcompiler_47 for the platform). Platform 2.7.1+ logs "Extra Options isn't running: its winmm.dll is next to azimuth.exe, but Wine is using its own winmm.dll instead" |
| Car packs not read under EO | Early 2.9.0 builds didn't chain behind EO's resolver | Shipped 2.9.0 chains behind EO (next section) |
| EO never gets a warm database load | Something rewrites the database it opens every launch | Only write when inputs change; the platform reuses a byte-identical copy |
| EO missing after "tidying up" | winmm.dll moved into mods\; Azimuth 1.0.4 doesn't load it there | Keep it beside azimuth.exe |
Car packs with EO
The platform's own docs may suggest otherwise, but car packs do work with EO 0.6.0. The platform chains behind EO's resolver:
- It waits until slot
game+0x2E6EF28holds a pointer into EO's module, then swaps it atomically for its own resolver, keeping EO's as the next one. - It mounts the pack folders from 0x7FFFFFF0 down and its own
T:\fh2-platform\eo-mediaat 0x7FFFFFFF, above all of EO's volumes, then forwards to EO. - It checks this every start: EO took the lookup, packs mounted before EO's volumes, the order is right, and
zipmanifest.xmlandgamedbRC.sltcame fromeo-media. Any failure turns packs off for that session, andfh2-mods\platform-eo-packs.txtsaysinorlost.
Requirements and limits:
[Global] Enablednot 0, and eitherEnableMediaOverrides=1or at least one active EO mod (otherwise EO mounts nothing).- A pack file also present in
mediaoverride,mediapcor an EO mod leaves that pack out. An EO mod with its ownzipmanifest.xmlleaves every pack out. - Pack cars never take a
Data_Carid that an active EO mod'sdatabase.jsoninserts. An EO mod usinglast_winson a pack car's id leaves that pack out. - Started from the FH2MP launcher (online), packs are off.
- EO 0.6.0's FMOD bank hook (slot
game+0x2E6EEC8) calls the original resolver directly and can mount EO's folders before the platform's chained resolver sees a lookup. The platform then finds EO's volumes already mounted and may report packs aslost. Ifplatform-eo-packs.txtsayslostwith EO 0.6.0, this is the first thing to suspect.
Platform mod or EO plugin: which to use
| EO mod / plugin | FH2 Mod Platform mod | |
|---|---|---|
| Loader | winmm.dll; mods\Forza Horizon 2\<mod>, ordered by loadorder.txt | DWrite.dll / d3dcompiler_47.dll; DLLs in fh2-mods\, alphabetical |
| Data without code | Yes: media, database.json, strings.json, carbin.json, zips without a manifest | No; from a DLL with set_file, add_sql, string tables, car packs |
| Hooks | Your own; no byte checks or chaining provided | hook_function, hook_call, hook_pointer, hook_instruction, with disk checks and chaining |
| Callbacks | Init, local-car update, merged database, private media folder | Settings rows and pages, title-screen entries, hotkeys, commands, interfaces between mods, crash reports |
| Starts | After EO's patches, on the first file lookup | fh2mod_init before the game is mapped; hooks after wait_for_code |
| Azimuth support | 1.0.1 to 1.0.4, a new EO for each Azimuth | 0.9.7 to 1.0.1 unchanged; 1.0.3+ needs 2.7.4+ (DWrite.dll) |
| Works without the other | Yes | Yes (mounts the override folders itself) |
Rules of thumb:
- Asset or data change only: an EO mod. No code, no hooks, merges cleanly with other mods.
- Behaviour change that other mods might also touch, or that needs settings, hotkeys or pages: a platform mod, so hooks chain and players get a settings row.
- A small behaviour change for EO players, tied to the player's car: an EO plugin is fine, but do the byte checks yourself.
- Never ship your own
winmm.dll,DWrite.dllord3dcompiler_47.dllas a proxy. Load through one of the existing loaders.
Pitfalls and debugging checklist
Pitfalls
- Ini: never add keys; keep it UTF-8 and under 8 KB. One bad line disables all of EO.
- Folders:
mediaoverride/mediapcin the game'sMount;mods\andwinmm.dllbesideazimuth.exe. - Paths: mirror the game's path under
media\; a zip member goes under a folder named like the zip without.zip. - Restart after every change: mounts, indexes and plugins load once.
- Never edit the game's zips or
zipmanifest.xmlin place, and never ship a wholegamedbRC.sltor manifest when another route exists. Never tell players to deletemediaoverride\Stripped\gamedbRC.slt. - Database: diff tools only;
errorskips your mod on a clash;nearestfor new rows; keep the load order stable. - Plugins: empty
DllMain; checkapi_version,sizeandgame_image_size; usegame_image, notGetModuleHandle(NULL); end log lines with\r\n; keep the vehicle callback short; require a button release; mind EO's default bindings. - Hooks: byte-check against the 24 Nov 2015 exe; leave EO's sites alone; nothing may change EO's bytes before EO has run.
- Pages:
x:Class =with a space if you copy a class EO matches; hex references with a lowercase x only. - Exe: the exe on disk must be the original (or one of EO's own patched variants), or EO refuses.
- Saves: mods shouldn't write saves. EO's
GenerateMissingSaveCommitsonly rebuilds missing Azimuth markers.
Debugging checklist
FH2_ExtraOptions.log, line 2:OK,REFUSED(and why),DISABLEDorINACTIVE. If the file is old, EO didn't start: wrong folder, unsupported Azimuth, or Wine's builtin winmm.MODS:lines: your mod's id is ready, or the reason it was skipped (id conflict, dependency, JSON error).FILES:line: mounts ready, and the priority order.PLUGINS:lines: one per DLL;initializedis what you want.- Zip lines: mounted with an entry count, and which volume answered the first carbin lookup.
GARAGE:lines: whether your replaced stateflow file still has EO's anchors.- With the platform too:
<Azimuth folder>\fh2-mods\platform.log("game code doesn't match", "car packs with Extra Options:", media override lines) andfh2-mods\platform-eo-packs.txt. - Still stuck: take EO out (
[Global] Enabled=0) and test again. If the problem goes, it's an interaction; the conflicts table above lists the known ones.
Unconfirmed and open
- FMOD banks from EO mods or platform car packs reaching the game's audio: EO 0.6.0 has the hooks, but it is not confirmed in game.
- The example plugin in this chapter has not been compiled or run. The LB bit (0x100) matches EO's own binding table and XInput, but it is not confirmed in game for a plugin.
- EO 0.6.0 on Azimuth 1.0.2 wasn't checked for this chapter.
- EO 0.6.1 ("v0.6.1-latest" on GitHub) wasn't compared with the 0.6.0 source this chapter is based on.
- The car-pack "lost" case caused by EO's bank hook comes from a code review, not from a reproduced run.
