Navigation
Browse the developer docs

FH2 Modding Guide · Chapter 8

Hook reference: camera, UI and input

Cameras, the HUD, pages and menus, and the controller.

By Trinculo54 · from the FH2 Modding Guide · CC BY 4.0 · copied 4 Dec 2026 · read the original, which may be newer

On this page

This chapter lists the game code behind what the player sees and touches: the cameras (including photo mode and the game's cinematics), the HUD and its notifications, the XAML pages and menus, and the controller. It is organised by what you want to do, and under each task it gives the hooks and game calls with their status. Read chapter 5 first for how to hook safely; this chapter only says where.

The FH2 Mod Platform already does much of this for you (pages, title-screen entries, pop-ups, the HUD layer, the pad layer, hotkeys). Where it does, use it: many of the game's UI sites belong to the platform, and hooking them breaks every mod's settings for the player.

All addresses are for forza_durango_release_final.exe of 24 Nov 2015 (TimeDateStamp 0x565501ED, SizeOfImage 0x3A18000), image base 0x140000000. game+0xRVA is an offset from the base; the full address is 0x140000000 + RVA. Status words: proven in game (seen working in a logged run or on screen), offline only (static reverse engineering, file decoding or an offline harness that maps the real exe), unconfirmed (a reasoned guess, not yet tested). Most addresses below are offline only unless they say otherwise.

8.1 Before you start

Use the platform where it covers the job

You want toPlatform APIWithout the platform (Extra Options plugin)
Show a pop-up like the game'sshow_toast (API 10), see UI templatesthe status route in 8.4, from a UI-thread hook of your own
Draw on the free-roam HUDthe HUD layer interface, see HUD layeryour own A_Hud.xaml copy and your own bindings (hard; see 8.4)
Hide the game's HUDhold_game_hud on the HUD layerthe suspend calls in 8.5
Add a menu pageadd_page, set_page_rows, set_page_xaml (API 8), see Pagesreplace a stock page with an EO mod, no new pages
Add a title-screen lineadd_title_entry (API 9), see Title-screen entriesnot possible without the platform's own site
Ask the player a questionshow_message_box (API 10)the message-box calls in 8.6
Put text on a game pageadd_page_text (API 11)your own FindProperty answer (not possible next to the platform)
Take controller buttonsthe pad layer interface, see Pad layerread FH2PluginVehicleFrame.buttons; you can't take them cleanly
A key or pad chordadd_hotkey (API 9), see Hotkeys and commandspoll GetAsyncKeyState and XInput yourself
Take over the cameranothing yet: hook CMultiCam::PostUpdate (8.2)the same hook with MinHook

Extra Options' plugin API (chapter 3) gives you the game's base, a log, a callback on the player car's update, a database callback and a media folder. It has no UI services and no hook chaining. An EO plugin that writes its own jump into a site a platform mod also hooks makes one of the two lose: the platform refuses a site whose bytes no longer match the exe on disk. Check for a jump before you hook, and back off with a log line.

Sites you must leave alone

The platform owns the game's settings page, pause menu tiles, HUD options page, title-screen buttons, the free-roam HUD page's shown/hidden/destructor slots, the minor-notification gate calls and the controller manager's "release taken controls" function. They are listed in full in 5.9 Sites you must not hook and again in the master table (8.9) under "platform". The notification constructor, destructor and the AchievementsModule tick are shared instruction sites: platform mods may add hook_instruction hooks there, nobody may write a jump of their own.

Extra Options 0.6.x also hooks sites in this area. Keep clear of them:

SiteWhat Extra Options does there
game+0x964C00, game+0x963703hazards and photo-mode input, the photo-mode hold
game+0x3978E8, game+0xAA0081, game+0xAA00FB[PhotoMode] FreeCamera=1 patches
vtable slots game+0x2E78410, 0x2E78680, 0x2E788F0, 0x2E78190, 0x2E77F18, 0x2E70420per-camera field of view
game+0x10369C9, game+0x103C87Ddrift camera
game+0xBAAFF6minimap orientation
game+0x2DF07C8HUD options page reset slot (next to the platform's 0x2DF07B0)
game+0x2E14310pause menu tile wiring slot
game+0xD8200Dthe call that builds the online Event Options rows

One frame on the main thread

Camera, HUD, pages and the controller are all driven by CForza::Update (game+0x2260D0) on one thread, in this order (proven in game):

StepCall siteWhat runs
1game+0x226893CControllerManager::Update (game+0x1075490): the pad is read
2game+0x2269D8CGameManager::Update: simulation, physics, views, then CMultiCam::PostUpdate (running path)
3game+0x2269E6the UI lock is taken (re-entrant critical section; UserInterface vtable +0x30)
4game+0x3FCD84the AchievementsModule tick: the platform's per-frame UI point
5game+0x2271E0UI update and render, including the input pump that sends keys to pages
6game+0xF5C170submit; the UI lock is released at game+0x227045

What follows from it:

  • Anything that touches AVUI objects, message boxes, the UI sound queue or the option store belongs at step 4, inside the UI lock. The lock was found held by another thread at step 1 in 136 of 112,818 samples, so the controller update is not a safe UI site.
  • Reading the camera at step 4 gives world-anchored UI with no lag (the data is about 0.9 ms old). Reading it at step 1 is one frame behind.
  • Hooks go live one at a time inside enable_hooks, and a shared tick can fire before the call returns. Gate per-frame work on a "ready" flag you set after enable_hooks returns (seen in a run).

8.2 Take over the camera

There is no platform camera API. Director Mode, a public free-roam cinematic director, takes the camera with the hooks below and is the best working reference; its byte checks for every site are in its src/hooks/sites.inc.

Finding the player's camera: the view chain

Walk this chain every frame and check each vtable before reading on: it changes on loads and view switches. Proven in game (read every frame by several mods).

StepReadCheck
CForza[game+0x34ABA60] (0x1434ABA60); [game+0x354F4F8] points at the same objectvtable game+0x2C47AE0
CGameManagerCForza+0x48 (getter game+0x21DFC0 is mov rax,[rcx+48h]; ret)vtable game+0x2C5F8C8
ForzaSimulationgm+0x10 (the same pointer is at gm+0x98)vtable game+0x2C5FAE0
Viewssim+0x2D0 / sim+0x2D8 = begin / end of a vector of pointers; the first is the player'sSplitView game+0x2C66188 (free roam), SimulationView game+0x2E6F570, MultiCamView game+0x2E6E890
Camera directorview+0x40 (for a non-SimulationView, view+0xC0 must equal it)ForzaMultiCam game+0x2C6C840 or CMultiCam game+0x2E70080
Followed carview+0x20ForzaCar game+0x2C5CB80

CMultiCam::PostUpdate — game+0xFE61C0

The one hook that moves the rendered camera in every mode.

  • Address: game+0xFE61C0 (0x140FE61C0). Kind: inline detour (hook_function), post-hook. Status: proven in game (tens of thousands of frames overridden 1:1, running and paused).
  • Does: fills the camera director's camera cache (mc+0x220..+0x2C7, 0xA8 bytes) from the active camera. The renderer, the audio listener, visual streaming and LOD all read that cache.
  • Lets a mod: write its own position, orientation, view matrix and field of view after the original returns. The world streams at full quality round the camera even 2 km from the car, and the FMOD listener follows it.
  • Signature: void PostUpdate(CMultiCam* mc, float dt /* xmm1 */, uint8_t flag /* r8b */).
  • Called from: the running path, SimulationView slot 2 (game+0xFDC270) at game+0xFDC2C8; the paused path (pause menu, photo mode), CMultiCam slot 5 (game+0xFE26F0) at game+0xFE27F8. CMultiCam::Update (game+0xFE6020) tail-jumps to it and also stores this in the global game+0x365AE10.
  • Byte check: prologue 48 89 6C 24 18 56 41 54 41 55 41 56 41 57 48 81 EC 90 00 00 00 C5 F8 29, and at +0x34 C5 F8 28 B9 20 02 00 00 (the read of +0x220). Director Mode also pins the cache stores at 0x140FE61F4, 0x140FE61FC, 0x140FE6257, 0x140FE628A, 0x140FE62D4, 0x140FE62E5, 0x140FE63CB, 0x140FE63F3, 0x140FE640C.
  • Conflicts: Director Mode and an on-foot mod both hook it; the platform chains them. Write only when the hooked mc is view 0's (found through the chain above) and you are on the frame thread; split views and other directors run here too.

The cache:

OffsetTypeMeaning
mc+0x219u8cut flag: 1 = this frame is a cut (motion blur and temporal effects reset)
mc+0x220float[4]position
mc+0x230float[4]velocity (write 0 for no motion blur)
mc+0x240float[4]forward
mc+0x250float[4]up
mc+0x260float[16]view matrix, LookToLH: rows {r.x,u.x,f.x,0} {r.y,u.y,f.y,0} {r.z,u.z,f.z,0} {-r·e,-u·e,-f·e,1}
mc+0x2A0floatvertical field of view in radians (the screen's aspect is applied later)
mc+0x2A8double[3]position as doubles (room for four); write it too

The rest of what you need to know:

  • Build the matrix as the game does: r = normalize(cross(u, f)), u = cross(f, r), e = eye. The game's own builder is XMMatrixLookToLH at game+0x9A8280. Axes: x right, y up, z forward (left-handed).
  • The game computes velocity as (pos - old) / max(|dt|, 0.001) and zeroes it above about 134 m/s. After a cut, write a sane velocity (or 0) yourself.
  • Mark a cut on the first frame of a takeover and on the first two frames after you hand the view back, or the picture smears. MultiCamView slot 4 (game+0xFC6810) clears the flag and resets post effects.
  • Handle dt == 0: placing the car at a route locator triggers a second camera update in the same frame with dt 0 (proven in a log).
  • The ground clamp (8.2, camera collision) runs inside PostUpdate, so a post-hook that rewrites the cache bypasses it.
  • SimulationView::UpdatePresentationCamera (game+0xFDD390) then copies the cache to the real presentation camera: FOV times 57.2958 to degrees, near and far from ICamera slots 40 and 41, bumper/hood/cockpit flags from slots 56-58. Read only.
using PostUpdateFn = void (*)(void* mc, float dt, uint8_t flag);
static PostUpdateFn o_post_update;

static void d_post_update(void* mc, float dt, uint8_t flag) {
    o_post_update(mc, dt, flag);                 // let the game fill the cache first
    if (!g_ready || !g_hold || mc != view0_director()) return;
    auto* c = static_cast<uint8_t*>(mc);
    write_pose(c + 0x220, g_eye, g_forward, g_up); // position, velocity 0, forward, up, matrix, doubles
    if (g_cut_frames > 0) { c[0x219] = 1; --g_cut_frames; }
}

// on your own thread, after wait_for_code and a byte check:
g_api->hook_function(g_mod, "CMultiCam::PostUpdate", game + 0xFE61C0,
                     reinterpret_cast<void*>(&d_post_update), reinterpret_cast<void**>(&o_post_update));

Extra Options plugin: the same detour with MinHook works, but it can't chain with Director Mode or the on-foot mod; check for a jump at the site first.

Near clip — game+0xFE2F60

  • Address: game+0xFE2F60 (0x140FE2F60). Kind: inline detour. Status: proven in game (Director Mode 0.3.6 and later).
  • Does: the near-clip forwarder, slot 40 of both ForzaMultiCam (game+0x2C6C980) and CMultiCam (game+0x2E701C0) vtables; it forwards to the active camera's slot 40. The view reads it at game+0xFDD4E9 and passes it to the renderer.
  • Lets a mod: pull the near plane in for close shots. Director Mode returns 0.05 m within 1.6 m of the car and 0.10 m within 4 m, only while its override is active.
  • Signature: float(CMultiCam*). Byte check: 48 8B 89 08 02 00 00 48 8B 01 48 FF A0 40 01 00 00.

CMultiCam::SetActiveCamera — game+0xFE5780

  • Address: game+0xFE5780 (0x140FE5780). Kind: direct call. Status: proven in game.
  • Does: switches the director to camera index (list below): deactivates the old camera (its slot 3), activates the new (slot 2), pushes or pops input mask 0xFE or 0x2FE through ForzaMultiCam slot 0x270 (game+0x393050) and sets the cut flag.
  • Lets a mod: switch to the developer free cameras (6 FreeCam, 8 FreeTargetCar, 15 FreeTrack; control comes back afterwards; they only fly while the world runs, and FreeTrack isn't free in free roam), or put the car camera back after the player's RB changed it.
  • Signature: void(CMultiCam* mc, int index).
  • Gotchas: it dereferences [App]+0x28 -> +0xC0, mc+0x1F0, mc+0x1E8, mc+0x208 and the camera-index deque without checks. Check them all, call only on the game thread with a live view, and never while photo mode (16) or cameras 12-14 are current. It skips the input push when game+0x126D070() vfunc 0x48 is true (CMultiscreen).
  • Related IMultiCam slots: 3 SetCamera(name) game+0xFE5D70; 4 SetCamera(index) game+0xFE5E20; 5/6 push and pop the index deque; 9 current index game+0xFE2AE0.

The 19 registered cameras (the CMultiCam constructor game+0xFE01F0 registers them; ForzaMultiCam's constructor game+0x391100 fills 12, 13, 14 and 16): 0 FollowCam, 1 FollowCam2, 2 DriverCam, 3 Hood, 4 BumperHigh, 5 FreeCam-Old, 6 FreeCam, 7 FPSFreeCam, 8 FreeTargetCar, 9 WheelCam, 10 SideCam, 11 OrthoCam, 12 TrackSeg (TV and replay), 13 CarRelativeCams, 14 PreRaceTrackCams, 15 FreeTrack, 16 PhotoMode, 17 RearView, 18 FadedOutCam. Camera groups come from Camera.zip:CameraGroups.xml: 1 Game, 2 Replay, 3 Debug (the free cameras), 4 Cinematics, 5-19 CarRelative1-15.

The developer free camera — CCamFree::Update, game+0x103CDA0

  • Address: constructor game+0x1030420, Update (slot 4) game+0x103CDA0, HandleInput (slot 7) game+0x103F660. Kind: direct calls or field writes. Status: offline only (switching to it is proven).
  • Does: CCamFree (0x270 bytes) rebuilds its look direction +0x1A0 from yaw +0x1B4 and pitch +0x1B8 (clamped to ±85°) on every Update. Write yaw and pitch, or use the slot 81 setter game+0x103B160; slot 77 game+0x397760 sets position +0x190, slot 78 game+0x3976A0 the FOV, slot 79 game+0x397770 roll. Activate (game+0x10377A0) resets the FOV to 45°.
  • Slot 5 is ret 0, so it only moves on the running path. Tunables (MoveForward 75, LR 40, UD 20) come from Camera.zip CameraSettings.ini, read once at start-up by game+0x395530.

Depth of field without a hook (CRenderThread)

  • Where: rt = [[game+0x354F4F8]+0x28] (CRenderThread, vtable game+0x2C65028). Kind: data writes. Status: proven in game (Director Mode's focus and aperture rows).
  • Does: the renderer decides once per view per frame whether to draw its real-time depth of field from a block at rt+0x590. Nothing in the retail game writes the override fields after construction.
OffsetTypeAs builtMeaning
rt+0x590u80forced on (the enabledof start-up option)
rt+0x594..+0x5ABfloat[6]1, 2, 30, 0.1, 50, 1fingerprint
rt+0x5AC, +0x5ADu81, 1fingerprint
rt+0x5AEu80override: use the two floats below
rt+0x5B0float1.0focus distance (metres)
rt+0x5B4float1.0aperture (f-number)
rt+0x5B8float0.04

Fingerprint the block before taking it and refuse if +0x5AE is already set. Write the floats first and the bytes last; when giving back, the bytes first. The focal length comes from the view's FOV on a 24 mm-high frame.

Render modes — game+0xFAF8B0

  • Address: game+0xFAF8B0 (0x140FAF8B0) SetDynamicRenderMode(sim, mode, 0). Kind: direct call. Status: used by Director Mode in game; the mode list is offline only.
  • Does: stores sim+0x3CC and loads that mode's render settings. Modes: 0 Hidden, 1 PreRace, 2 ThreeTwoOne, 3 Race, 4 RaceWithCollidables, 5 PostRace, 6 Replay, 7 PhotoMode (DOF on, 2048 shadows, full-detail car), 8 FrontEnd, 9 Splitscreen, 10 a showroom-lite mode, 11 CarMeet, 12 PlayerLOD0.
  • Lets a mod: get the full-detail car for close shots. Call it as photo mode does: (sim, 7, 0) on opening and (sim, previous mode, 0) on closing.

Playing the game's cinematic engine — CutsceneComponent, game+0x4DBFA0

  • Status: proven in game (new XML files under Cinematics/Global/<folder>/, served with set_file in fh2mod_init, load and play; Stop proven). A file created after the mount isn't seen.
  • Find the player: the entity global/cinematic_test_scene already exists in free roam with a CutsceneComponent. EntityWorld::FindEntity game+0x71B890, then GetComponent<CutsceneComponent> game+0x4EAEA0.
  • Calls (component vtable game+0x2C8F538):
CallRVANote
SetFileName / SetFullyPathed / SetInGame0x4D4B40 / 0x4D4D30 / 0x4D4CA0fields +0x130 (std::string), +0x168, +0x290
Load(comp, 0x60000)0x4DA4D0crashes on an unreadable file: check CFileSys::Exists game+0x11F9C80 first (CFileSys* at game+0x36614F0)
IsUnloaded / IsReady / IsCinematicReady0x4DA4B0 / 0x4DA470 / 0x4DA3B0Play crashes before IsCinematicReady is true
Play / IsPlaying / IsFinished / GetTime0x4DBFA0 / 0x4DA440 / 0x4DA3E0 / 0x4D9100
Stop / Unload / GetCinematic0x4DF620 / 0x4DF790 / 0x4DFBF0
Cinematic::SetTime0x174DFE0mode 0 absolute, 1 relative, 2 from duration
  • To give the player's camera back, call MultiCamView/SplitView slot 10 (game+0xFC7C80).
  • Gotchas (proven): the game leaves the HUD on during your cinematic (hide it, 8.5); replays never show your shots; a <Game> object's GameSpeed is set and never reset, so put it back yourself.

TV, replay and pre-race cameras are data

No hook needed: serve the files. Status: the files load and the pre-race intro from them is proven in game; the replay/TV view on a custom world was never opened.

  • ForzaSimulation slot 32 (game+0x2D5C10) loads, once per world, Tracks\<track>\Ribbon_<nn>\TrackSegCams.xml, ...\PreRaceCams.xml and Camera\CarRelativeCams.xml. The cut-queue loader game+0x394760 replaces a bad file with one default camera (no crash). Cameras must be sorted by StartCut.
  • TrackSeg cuts follow the route the target car is bound to (CTSCCamera cut choice game+0x393C50). In free roam there is no route, so camera 0 is used all the time. FH2's open world ships a single chase camera there.
  • Cinematics load only from Media\Cinematics\ (and Global\RouteSpecific\<route>\); there is no per-track Cinematics folder. The global pre-race intro has hard-coded mainland positions: on another world, serve a shifted copy under RouteSpecific. File formats are in chapter 10.

Camera collision and the ground clamp — game+0x103EF50

  • Address: ICamera slot 70 game+0x103EF50, the same function in all 24 camera classes. Status: offline only; the flag behaviour below is proven in game.
  • Does: once a frame, when the byte game+0x2E77450 is 1 (it is in the exe), asks CPhysicsWorld slot 33 (game+0x12BB070) for triangles round the camera with query flags 4 (mov byte [rsp+28h],4 at game+0x12BB312, the only flag-4 site) and pushes the camera out. The fallback (game+0x103F378) only keeps it 0.3 m above a ground ray.
  • Gotcha for collision mods: triangles you add through CollisionWorld::GetPolys without bit 0x04 in their flag byte are ignored by every camera (about one rejected query a frame, proven in game). See chapter 6.
  • Photo mode uses its own swept 0.5 m sphere with flags 0 (8.3).

Things that don't follow the camera

  • Collision streaming stays round view 0's car (CWorldCollObjMan+0x4F0, set at game+0x383936). A camera 2 km away sees full visuals and no collision. Offline only.
  • The audio listener does follow (FMOD set3DListenerAttributes, game+0x199B8E0, set from the presentation camera); the engine is only audible within about 100 m of the car. Proven in game.

Which render pass draws with which camera — game+0x1340022

  • Address: game+0x1340022 (0x141340022), the call to game+0x135A170(view). Kind: call site (hook_call). Byte check: E8 49 A1 01 00. Status: proven in game.
  • Does: a render-side view's update, once a frame per view before it draws, on a render thread, not the frame thread.
  • Lets a mod: find the camera the main picture was drawn with. info = *(view+0x4D8); info+0x1C = cull view in use, info+0x74 = count, info+0x10 == -1 = none. 22 cull-view records of 0xC0 bytes at info+0x560, camera position float[3] at +0xA0. Record 18 is the main picture (records 0-5 are the reflection cube's faces, 13-16 shadows).
  • Gotcha: the render side draws the frame before the newest game frame about 98% of the time. Anything you place from the frame thread must be matched to the camera of the frame the renderer draws, or it vibrates against the camera.

Gates: when may a camera mod act?

Director Mode reads these before it acts (proven in game): the pause-entry block (int32 at game+0x2CF73F0), the game-control lock (double pointer game+0x34B3678), the event context (UIContextModule +0x60: 2 free roam, 1 event, 3 online free roam), the replay recorder mode ([game+0x34D5700]+0x10) and the track id ([game+0x365AD70]+0x8: 542 mainland, 549 Storm Island). Paused and speed bytes are on CGameManager (8.10).

8.3 Photo mode

"May open photo mode" — game+0x9636C0

  • Address: game+0x9636C0 (0x1409636C0). Kind: inline detour or byte patch. Status: the conditions are offline only; the online unblock is proven in game.
  • Does: decides whether the photo-mode button works: tutorial stage (game+0xA65D90 >= 3), Storm Island checks, a busy check, the settings byte [game+0x34AF7D0]+0x2DFB, and a readiness call made at game+0x963703. A CLobby test at game+0x963739 then je at game+0x963740 (74 0F) blocks it online.
  • The button itself is action PHOTO_MODE_TOGGLE (15), read by States::WaitForPause::Update (game+0x964810).
  • Conflicts: Extra Options hooks game+0x964C00 and game+0x963703; avoid both. Online photo mode is FH2MP work in progress (it NOPs the je and hooks this test); see chapter 12.

PhotoModeScene::Update — game+0xDCF3E0

  • Address: game+0xDCF3E0, PhotoModeScene vtable slot 153 (pointer at 0x142E172E8). Kind: pointer (hook_pointer) or detour. Byte check: 48 89 5C 24 08 57 48 83 EC 40 48 8B F9 8B 89 94 11 00 00. Status: proven in game.
  • Does: runs the photo page. When the camera stops moving it accumulates a still from 26 frames.
  • Lets a mod: keep the picture live: set page+0x11C5 = 1 before each Update. Together with clearing the "stop simulation" byte gm+0x29 the world keeps running behind photo mode (the car drove 136 m with photo mode open; no 30 fps cap seen).
  • The page (vtable game+0x2E16E20, 0x11E0 bytes, scene id 0x80) switches the director to camera 16, saving the old index at +0x1190, and puts it back on closing (game+0xDB1A40).

Photo mode limits are data

Status: proven in game: stock limits are a 100 m radius and a 2 m height cap. Save and restore all of them together; a partial restore once left a 120 m cap.

AddressField
game+0x2C6C2F0, +0x2C6C2F4, +0x2C6C2F8CollisionFixIterations, SphereRadius, Pullback
game+0x2C6C300, +0x2C6C304, +0x2C6C308BoundaryCylinderRadius (exe 30, ini 100), Ceiling, Floor
game+0x2C6C30C..+0x2C6C30Fenable bytes: cylinder, ceiling, floor, world collision (clearing the last also lifts the height cap)
game+0x2C6C18CMaxHeight (2.0)
game+0x2C6C1A0, game+0x2C6C1A4StartingDistance (5), MinFOVPhotoMode (exe 22.5, ini 2.25)
game+0x34B29CEdisablephotomodecollisiondetection byte (command-line object game+0x34AF7D0 + 0x31FE); lifts the cap

The byte is read at game+0x3978E1; Extra Options' FreeCamera=1 patches the branch there, so leave that code alone and write the byte instead. The camera class is CCamPhotoMode (vtable game+0x2C6C578); its effect fields (shutter, focus, aperture, exposure and the rest) are set up by game+0x3227B0 (offline only).

8.4 Show text on the HUD

On the platform: use show_toast for a pop-up that looks exactly like the game's, the HUD layer for bars, chips, panels, a feed and your own canvas, and add_page_text for a line on a game page such as the name tags over cars. Don't hook the game's notification code yourself: the platform chains it with Achievements, and released mods check Show and MakeDisplayString byte for byte in memory.

In an Extra Options plugin: the calls below are yours to make, but only from the main thread inside the UI lock (step 4 of 8.1). EO gives you no callback there, and the tick the platform uses (game+0x3FCD84) can't take a second, hand-written jump. Use the status route (no hook, no shared site) from the earliest UI-thread hook you can justify, and say in your README which site you took.

The status route: a toast with no hook — game+0xAAED00

  • Status: proven in game (looks exactly like the game's toast, chimes, shows about 4.5 s, cancels cleanly before and after showing, reference counts balance).
  • Calls:
CallRVANote
Create(&out)0xAAED00factory 0xAB1AC0 makes a 0x140-byte MinorNotification status (vtable 0x2D54858)
SetMaintext(status, String*)0x51B520adds a reference, doesn't consume
SetSubtext(status, String*)0x51B590same
SetIconName(status, String*)0x51B4B0same
HUDModule submit(module, &status)0x777E50consumes one reference
HUDModule remove(module, &status)0x7857B0consumes one reference
  • Recipe: Create; for each text make an AVUI String (8.6), set it, release it; AddRef the status (+0x10) to keep it; submit. To cancel: AddRef, remove, release your kept reference.
  • Owner check first: the show code (game+0x777410) reads record+0x20 with no end check. Confirm the HUDModule is in the prioritiser's records ([prio+0x78]..[prio+0x80], stride 0x48, at most 256, some record's +0 equals the module). Finding the HUDModule is in 8.5.
  • The setters share the prologue 48 89 5C 24 08 57 48 83 EC 20 48 8B DA 48 8B F9 48 39 91, then 20, 28 or 30 01 00 00 74.

HUD notification Show — game+0x755330

  • Address: game+0x755330 (0x140755330). Kind: direct call, never patch. Status: proven in game (Achievements' pop-ups and the platform's).
  • Does: shows a minor notification on a live HUDMinorNotificationComponent for about 4.5 s.
  • Signature: Show(component, &main, &sub, &icon). It takes the three display strings by value and releases them itself: don't free them.
  • Byte check: 4C 89 4C 24 20 4C 89 44 24 18 48 89 54 24 10 55. Achievements 1.0.x checks 15 of these bytes in memory and FH2MP checks MakeDisplayString: any patch here turns their pop-ups off.
  • Finding a component: keep a list of live components from the constructor and destructor instruction sites game+0x73E0B1 (rbx = component, bytes 48 8D 8B A0 01 00 00) and game+0x73F046 (rbx = component, 48 89 41 28 48 81 C1 A0 01 00 00). Pick the one whose TemplateName (MSVC std::string at comp+0x128+0x18) is RoadDiscovery, else the oldest. These two sites are shared: hook_instruction only.

MakeDisplayString — game+0x323310

  • Address: game+0x323310. Kind: direct call, never patch. Byte check: 40 57 48 83 EC 30 48 C7 44 24 28 FE FF FF FF 48. Status: proven in game.
  • Signature: MakeDisplayString(out, const char*, -1). It converts with code page 0, so non-ASCII text can come out wrong.
  • Wide text: repeat its steps with the wide constructor game+0x1239840 (this, const wchar_t*, len or -1): tag = word at [TLS[_tls_index]+0x124] (_tls_index at game+0x354EBD8), heap = game+0x125F380(), object = game+0x125D850(heap, 0x18, tag, 0), construct, AddRef through vtable +0x10. Use the thread whose TLS tag you read (the tick). Proven in game with a hundred Polish pop-ups.

The Notifications option and its gate — game+0x754920

  • Does: the gate every minor notification passes when it is sent (not when it appears). It shows the notification if the profile option Options/MinorNotifications (Pause > Settings > HUD; Int32, default 1) is above 0, or if the top scene is LimitedHudMinorNotification (0x53). It doesn't cover the big banners at the top.
  • Platform-owned: its three call sites game+0x75542C (Show), game+0x7555A5 (the road discovery / photo / rewards sibling game+0x7554B0) and game+0x750FB1 (the reflected Show). Don't hook them.
  • Read the option yourself (game thread): store = game+0xB2BC80(); if (store) { CVariant v; game+0x2E11F0(store, &v, "Options/MinorNotifications"); value = *(int*)(v+8); game+0x107D880(&v); }. No store, or a store not loaded (store+0x38), reads 0 (Off). The options page writes the live store at once. Proven in game.
  • When the gate lets a notification through it stores a new object at component+0x198, so comparing that field before and after tells you it was shown.

The chime is automatic

HUDMinorNotificationControl (vtable game+0x2D92058) plays NOTIFY and goes to its "Shown" state when it receives ShowHUDStatusMinorNotification, about 0.28 s after the toast appears. Any notification shown through the prioritiser chimes by itself: don't add your own sound. Proven in game.

The free-roam HUD page — Hud vtable, game+0x2DEF9C8

  • What it is: Scenes/Anthem/A_Hud.xaml, class Hud (vtable game+0x2DEF9C8, RTTI .?AVHud@@), scene id 0x48 built by game+0xB3A2B0. One Hud page per session, built while loading (bindings resolve about 15 s before it is first shown). It is hidden, not destroyed, for the pause menu, map, photo mode, rewind and the telemetry HUD. Proven in game.
  • Platform-owned: slot 0 (deleting destructor game+0xD244C0), +0x488 shown (slot game+0x2DEFE50 = game+0xD38DD0, writes page+0x410 = 1) and +0x4F8 hidden (slot game+0x2DEFEC0 = game+0xD41540, writes page+0x410 = 0), and the file A_Hud.xaml itself. Read page+0x410 if you need to know whether it is on screen, or ask the HUD layer's hud_status.
  • Other pages that load the same file: LimitedHud (game+0x2DF3F28), LimitedHudMinorNotification (game+0x2DF4798). A getter bound on A_Hud may be called with them, so check the object's vtable before returning live values. The telemetry HUD (A_Telemetry.xaml, vtable game+0x2E555E8) replaces the Hud page entirely when it is on.
  • Layout: a 1920x1080 Grid under a local:ZPanel named LayoutRoot, then 24 status controls named like their status classes (Anna with the minimap, Speedometer, Radio, MinorNotification at the bottom centre, and so on). Extra elements go as one Grid just before the last </Grid> before </local:ZPanel> (draws over the game's controls); resources just before the first </ResourceDictionary>. Proven in game.
  • HUD controls are UserControls with a VisualStateManager group "Show"/"Hide" or "Shown"/"Hidden". The C++ side raises "Show" + <status type name> (built by game+0xAFFA30).

3D cards and world-anchored UI

AVUI can draw in 3D. A ZPanel's ZPanel.Transform and ZOffset attached properties take 3D transforms, and the UI camera has a vertical FOV of 0.471 rad, near 0.3, far 7500 (projection distance about 2250.4 px at 1080 lines). To match a game camera of vertical FOV f, scale depth by tan(f/2) / tan(13.49°). Proven in game:

  • bindings inside a Transform3DGroup never apply; nested single Transform3Ds, each set on one element, do bind every frame;
  • use OffsetZ, not ZOffset, on 3D elements;
  • a stage of nested elements (flip y, yaw, pitch, roll, scale, depth scale, translation) fed 4-6 values a frame at step 4 tracks the car with no lag for about 0.3-0.5 ms a frame. Add a near-plane fade: cards behind or very near the camera blow up.

The notification layer and name tags

  • A_NotificationLayer.xaml (scene 0x76, class Notifications, vtable game+0x2E037E0) is put on WindowLayerManager layer 2 once at start-up, outside the page stack: it holds the big top-centre pop-up, the race-finish countdown and the subtitles. Offline only.
  • The name tags over cars are AR_OpponentLabel.xaml (class OpponentLabel, vtable game+0x2E11A68), a pool of 12 pages. A text bound to a mod property added after the HVTIcon StackPanel shows on every tag, each with its own text (proven in game). On the platform this is exactly what add_page_text is for. FormattedGamertag is the name plus a club-role mark (U+222B leader); the formatter is game+0xB2B520.

8.5 Hide the HUD

On the platform: hold_game_hud(mod, 1) on the HUD layer, which re-asserts the hold every frame and counts holders across mods. Use the calls below only without it.

Suspend the HUD modules — game+0x78B0F0 and game+0x78B1A0

  • Addresses: suspend(HUDModule*) game+0x78B0F0 (0x14078B0F0), suspend(HUDModuleAR*) game+0x78B1A0 (0x14078B1A0), resume(module) game+0x785CD0 (0x140785CD0). Kind: direct calls. Status: proven in game.
  • Byte check: both suspends start 40 57 48 83 EC 50 48 C7 44 24 20 FE FF FF FF 48 89 5C 24 60 48 89 74 24; resume 40 53 48 83 EC 30 48 8D 54 24 20 48 83 C1 50 E8 5C 59 C6 FF 48 8B 08 C6.
  • Does: hides what the prioritiser shows for the module's groups and sets the prioritiser byte prio+0xA8 = 1 (resume clears it). While set, only statuses with status+0x110 != 0 show.
  • Re-assert every frame. The game clears the byte itself (prioritiser vtable +0x10, game+0x7813D0; stateflow global.suspend_all_huds/resume_all_huds; the end of a rewind; prepare_for_driving). Suspend again whenever it reads 0. Both modules share one prioritiser, so read both before acting.
  • What the player sees: speedometer, map and prompts gone; a resume brings them back in one frame with no flicker. Side effects: minor notifications and banners wait (one banner waited over two minutes), the autosave spinner waits, a Rivals status was dropped, in-world prompts passed during the hold are gone, queued skill banners flash for a frame, and Drivatar name tags stay (they are not statuses).

Finding the modules (re-read every tick; any change means a world change, drop everything):

  1. wm = [game+0x34C0F40] (WorldManager, vtable game+0x2CD1F20); world = [wm+8].
  2. head = [world+0xF8]; node = [head]; up to 512 nodes while node != head: if [node+0x20] != 0, obj = [[[node+0x18]]+0x10]. game+0x91A4A0 is World::GetHUDModule.
  3. Match by exact vtable: HUDModule game+0x2CDC7E0, HUDModuleAR game+0x2CDC890, HUDModuleNotification game+0x2CDC968.
  4. The prioritiser is a weak pointer at module+0x68 (control block +0x70, alive while dword [ctrl+8] > 0), vtable game+0x2CDC5E8.

HUD modules exist from boot, so "a world is loaded" must come from the world, not from finding them.

Other levers

LeverHowStatus
Name tags over carswrite CarLabelModule+0x70 (vtable game+0x2C818C0): 1 hides, 0 shows (the game's game+0x47DD40 / game+0x18E1F60 do the same)proven in game
Racing lineSetRacingLineMode game+0xFDBC20 (view slot 9); in free roam through SplitView's game+0x34EC00proven in game
The dev nohud switchconfig byte +0x2FED: the Hud and Notifications pages set their own Opacity to 0offline only
Telemetry HUDwith telemetry on, show_hud_and_continue shows A_Telemetry.xaml and the Hud page never showsproven in game

8.6 Add a page or menu

On the platform: row pages and own-design XAML pages on the MODS tab or the Achievements tile (add_page, set_page_rows, set_page_xaml), title-screen lines and lists (add_title_entry), message boxes (show_message_box), setting rows of every kind, and page texts (add_page_text). See chapter 2.

In an Extra Options plugin: you can't add pages next to the platform, because a new page needs the scene-record or FindProperty sites the platform owns. You can replace a stock page's XAML with an EO mod (keep it close to stock; see the rewrite rule below) and drive message boxes from your own UI-thread code.

AVUI in brief

FH2's front end is XAML in media\UI.zip, drawn by AVUI, a C++ re-implementation of WPF (Binding, Style, DataTrigger, ControlTemplate, converters, storyboards, VisualStateManager). Pages are under Scenes/Anthem/, controls under Controls/, shared resources under Resources/Anthem/, all merged app-wide by AnthemApp.xaml. Each page is also a C++ class (RTTI intact) that binds the XAML's PART_ elements and answers the properties its bindings ask for. Which page opens when is decided by media\stateflow.zip (ui_screens.xml, pause.xml, in_game_ui.xml, global.xml). Scene space is 1920x1080, scaled to the render size. The HUD and option pages set their DataContext to themselves, so a getter is called with the page object.

AVUI::Type::FindProperty — game+0x157FF60 (platform-owned)

  • Address: game+0x157FF60 (0x14157FF60). Kind: function the platform hooks: don't hook it. Status: proven in game.
  • Does: looks up a binding name on a type: walks type+0x40 (nodes {descriptor, next}), compares the descriptor's char* name at +0x40 with the AVUI String's UTF-16 text (+0x28), then tries the base type at type+0x80.
  • How the platform uses it: after the game's lookup fails it answers names starting FH2Mod_ with descriptors of its own. That is how {Binding FH2Mod_Slot_<n>}, FH2Mod_Text_<name> and the HUD layer's bindings reach any page, even inside game templates (RelativeSource FindAncestor, AncestorType={x:Type Page}).
  • Descriptor layout: getter at +0x28, called (out, desc, object), boxes the value into *out; setter at +0x30, (desc, object, value), payload at value+0x28; value type at +0x48. Model descriptors to copy: an On/Off int (EnableDrivatarLiveries, returned by game+0xD58660), a float slider value (game+0xED6E90).

Raise PropertyChanged — game+0xCF9C60

  • Address: game+0xCF9C60 (0x140CF9C60). Kind: direct call. Byte check: 40 57 48 83 EC 60 48 C7 44 24 20 FE FF FF FF 48. Status: proven in game.
  • Signature: void(object, descriptor). Synchronous, takes no lock and checks no thread: call it at step 4.
  • Cost (measured with about 189 bound properties on the HUD page): about 0.12-0.16 ms for any frame that notifies anything, plus about 0.035 ms per notify; a jump of 54-69 notifies in one frame cost 2-3 ms. The game itself notifies only on change (its speedometer compares before notifying NeedleAngle). Do the same.

Boxing values and making Strings

All direct calls, proven in game, on the game/UI thread only:

CallRVAByte check
box int (out, const int*)0x4702D040 53 48 83 EC 30 48 8B D9
box bool (out, const bool*)0x336BA040 53 48 83 EC 30 80 3A 00
box float (out, const float*)0x3F599040 53 48 83 EC 30 48 8B D9 C7 44 24 20 00 00 00 00
box colour (out, const float rgba[4])0xBEA4E0type 0x15C8D80(0) (TeamColor)
bool type (0)0x15C955080 3D 0D B8 0E 02 00 75 5F
String type0x16A4B3048 8D 05 59 B0 02 02 C3
AVUI alloc (size, type)0x14424E048 89 5C 24 08 57 48 83 EC 20 48 8B 05 6F 97 26
String ctor (obj, const wchar_t*, len or -1)0x166334048 89 4C 24 08 57 41 56 41 57 48 83 EC 30 48 C7
release at refcount 00x25773040 53 48 83 EC 20 48 8B D9 E8 B2 A2 1F 01

A String getter: s = alloc(0x40, String_type()); String(s, text, -1); *out = s;. The new String carries one reference (refcount at +0x10) and the caller of the getter releases it. Its text is UTF-16 at +0x28, length at +0x30. Avoid the game's ASCII helper (game+0x3D97B0): it sign-extends bytes.

Scene records: how a page is opened

A page is made from a scene record {id (dword +0), name, L"Anthem\\A_X" std::wstring at +0x28 (size +0x38, capacity +0x40, in place when capacity <= 7), factory +0x48}. A builder writes the id with C7 03 imm32. The record is built twice when a page opens (lookup, then inside the factory), and the factory's copy, stored at page+0x228, is the one the XAML loads from. Rewriting the 12 letters after Anthem\ in place makes the same page class load another file, and new files in the override folder are found like replaced ones. Proven in game: the platform's MODS pages are the HUD options class (builder game+0xB3A3E0, platform-owned) loading A_ModPage_<nn>.

Scene ids worth knowing (builder in brackets, offline only): A_PauseOptions 0x46 (0xB3A050), A_Hud 0x48 (0xB3A2B0), A_HudOptions 0x49 (0xB3A3E0), A_IslandMap 0x4F, A_Rewind 0x73 (0xB3D5C0), A_Map 0x75, A_NotificationLayer 0x76, A_OnlineEventOptions 0x77 (0xB3DA80), A_PauseMenu 0x7E (0xB3E2D0), A_Photomode 0x80, A_ReplayHud 0x97, A_Splash 0xAF (0xB41D00), A_Telemetry 0xB5, VirtualKeyboardPopup 0x106; A_MessageBox 0x84, 0x85, 0x86, 0xCF, 0xD6, 0xDC, 0xE2, 0xEA, 0xF2 (one builder each). 277 records in all.

A full page over the title screen — game+0xB467D0

The platform's own-design pages open only from a pause-menu tile. A track-import mod needed a full-screen picker at the title screen and got it by redirecting one message box.

  • Address: game+0xB467D0 (0x140B467D0), the title screen's message-box scene record builder (id 0xEA). Kind: inline detour, armed for one opening. Status: proven in game.
  • Signature: SceneRecord* build(SceneRecord* out). It writes L"Anthem\A_MessageBox" (19 characters, string at game+0x1EEA290, lea at +0x35: 48 8D 15 84 3A 3A 01) and id 0xEA (C7 03 EA 00 00 00 at +0x6F).
  • Byte check: prologue 48 8B C4 48 89 48 08 57 48 83 EC 70, plus the two instructions above.
  • The technique: after the original returns, if the path is 19 characters and equals Anthem\A_MessageBox, overwrite characters 7-18 with a 12-letter name of a file you set_filed under UI/Scenes/Anthem/. Arm it for the next box only (two builds or 1.5 s), then show a title-screen list box (show_message_box from a title entry's press). The PopupMenu class loads your XAML. If the hook or the page fails, the plain box opens. The record is built 297-797 ms after arming.
  • The page must keep x:Class of the message box (written x:Class =, see the Extra Options rule below) and its parts: BottomBar (ContentControl, A_Style_ButtonBar), HelpPanel (local:ControllerButtonPanel Layout="RightToLeft"), MainContent (StackPanel in A_Style_ContentControl_ScreenTilt) and Menu (local:CommonListBox, ItemsSource="{Binding Collection}"), and the bindings Title, Message, Collection. {Binding SelectedItem.Text, ElementName=Menu} follows the focus; DataTriggers on SelectedIndex and on platform properties work; LB, RB, X, Y, A and B reach the page; B closes; "start the game" still starts.
  • Conflicts: none known. This is a private hook beside the platform's message-box use; it is listed in 8.8 as a missing platform API.

Message boxes — game+0xD09D00

  • Address: game+0xD09D00 (0x140D09D00) show(host, &title, &message, items) -> popup. Kind: direct call (the platform's show_message_box uses it). Byte check: 48 89 5C 24 08 48 89 6C 24 10. Status: proven in game.
  • Arguments: title and message are references to CLocString objects (vtable game+0x2EB0E30, text from virtual +0x38). The game keeps the const wchar_t*, it doesn't copy it: keep your text alive for the box's whole life. Items: a collection from game+0xC65230, items from game+0xC65AB0(&item, &id, &label) (id at +0x68, label at +0x70), added through the collection's vtable +0x40 (collection, index, item).
  • Related calls:
CallRVANote
help bar (popup, layout)0xDD8820layouts: 0 (A) OK; 1 (A) OK (B) Cancel; 2 (A) OK (B) Back; 3 (B) Back; 4 (A) Yes (B) No; 5 (A) Select; 6 (A) Select (B) Cancel; 7 (A) Finish (B) Back (X) Continue. Layout 6 proven in game
set handler (popup, int event, std::function<void()>, bool close)0xDD86F0events 0-7; 0, 1, 2, 6 = A; 3, 4, 5 = B; 7 = X. The last registration wins, so register B (event 3) after the help bar. Event 2 proven in game, event 3 offline only
chosen item (popup)0xE01A60
  • Gotchas (proven in game): a box shown from inside another box's handler works (the old one closes after the handler returns). Never show two boxes in one frame outside a handler: the presenter drops the earlier one. While a box is up, input goes to the box, not the page behind it. Titles are upper-cased by A_StringToUpper, which handles Polish and Portuguese letters itself; box text is UTF-16 end to end.

PopupMenu buttons slot — game+0x2E24F40

  • Address: game+0x2E24F40 (0x142E24F40), PopupMenu vtable (game+0x2E249C8) +0x578, holding the shared button handler game+0xCEC3D0 bool(page, key, pressed). Kind: pointer (hook_pointer), only if the slot still holds base+0xCEC3D0. Byte check of the handler: 48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 40 41 0F B6 F8 8B F2 48. Status: proven in game as a pass-through logger.
  • Does: runs the page's registered key handlers (game+0x140B930, list at page+0x2C0) and B. Moving the focus is the engine's list navigation, not this slot.
  • Lets a mod: see every key a message box gets (codes in 8.7). The same shared handler sits in the Splash slot game+0x2E53940 and the HUD options slot game+0x2DF07B0, both platform-owned.

The title screen (platform-owned)

A_Splash.xaml, class Splash (vtable game+0x2E533C8). Only A is registered; it calls Splash::OnStart (game+0xEA0D40), which signs in and loads the profile. State at page+0x448: 0 waiting for A, 1 A pressed, 2 a popup over it, 3 and 4 moving on. The platform hooks the button slot game+0x2E53940 to run title entries and presses A for the player when an entry returns FH2_TITLE_START. Use add_title_entry; don't hook the slot, and don't set_file A_Splash.xaml.

Pause menu and settings (platform-owned)

Pause > Settings is A_PauseOptions.xaml (class PauseOptionsMenu, a 5x2 tile grid made once at boot). Its tiles are wired by game+0xDC8A60 through game+0xD9FC10(page, "PART_Button_X", &pmf); the pause menu's by game+0xDC6E30 through game+0xD9F9F0; tiles are found with game+0xCBDB20. The Achievements tiles' calls are game+0xDBD635 and game+0xDBF185, the Marketplace handlers game+0xDBD720, 0xDBDD00, 0xDBDD60, 0xDBFE40. All of these are the platform's. Tiles use A_ControlTemplate_IconTile (Shared_TiledMenus.xaml), and a tile's Tag takes a binding, which is how the platform puts a line on a tile (set_page_tile_text).

A row of your own on the online Event Options screen — game+0xD78E50

  • Address: game+0xD78E50 (0x140D78E50), builds every row of A_OnlineEventOptions (scene 0x77, class OnlineEventOptions, vtable game+0x2E0CBD8). Kind: inline detour. Byte check: 40 55 53 56 57 41 54 41 56 41 57 48 8D AC 24 F0. Status: proven in game with a stand-alone test build beside Extra Options 0.6.1.
  • Conflicts: Extra Options replaces its one call at game+0xD8200D; hook the builder itself, not that call.
  • Rows: OnlineEventOptionsItem (vtable game+0x2E0C898) in the collection at page+0x410: Title String +0x70, SelectedIndex +0x78, choices +0x80, std::function<void(LaunchOptions&, int)> +0x88.
  • Calls: make a row game+0xD709F0(out, &title, selected, &choices, &function); add it game+0xD6E650(collection, row); title text via MakeDisplayString then game+0x140AF10; a two-choice list game+0xD618E0(out). When the leader starts the event, game+0xD6F470 calls every row's function with its SelectedIndex. A row with an empty function stops the game (bad_function_call).

The loading screen video — game+0xCE76CE

  • Address: game+0xCE76CE (0x140CE76CE), in the loading page constructor game+0xCE7560. Kind: instruction (hook_instruction). Byte check: 41 0F B6 74 C0 08 49 8B 14 C0 48 8D 4C 24 68 at game+0xCE76C4. Status: proven in game.
  • Does: the constructor picks a video from a table of {wide path, island flag} (island test: three island videos, else six interleaved). At the hooked lea rcx,[rsp+68h], set rdx to your wide path (Media\UI\Videos\<name>.bk2) and rsi = 0 (no island watermark).
  • FH2 plays Bink 1 content under the .bk2 name; the stock files are Bink 2.

Maps

The map views (full map, island map, pause tile, HUD minimap) choose their profile with island tests at game+0xB62A97, game+0xDDC2CA, game+0x8AE667, game+0x93F191 and game+0xD8703B, and the map profiles are loose XML files read once at start-up. Those belong with the world: see chapter 6.

XAML that works

These rules come from crashed pages; all are proven in game unless marked.

  • Every resource key must exist. A {StaticResource} or {DynamicResource} key that doesn't exist crashes the page as it opens. Check against AnthemApp.xaml's merged dictionaries and the page's own resources. The platform (2.9.0 and later) checks this for its pages.
  • Every picture must exist. A literal /ForzaUI;component/Textures/<folder>/<name>.png resolves to a loose ui\textures\<folder>\<name>.swatchbin in any media layer, including a file you set_file at start-up. A missing texture crashes the page: omit the element when there is no picture. An ImageSource set from a trigger setter didn't work; use one picture part per choice shown by a Visibility trigger.
  • Text encoding: the reader decodes only the five named entities and lowercase-x hex references (&#x105;). Decimal references (&#243;) become a space. A file without a BOM is read one byte per character (Latin-1). A UTF-8 BOM switches on a lax decoder that can swallow a closing quote after a stray byte. Don't turn &#123;/&#125; into real braces: an unknown markup extension crashes the page. CRLF or LF doesn't matter. (DecodeEntity is game+0x153BEB0.)
  • Extra Options rewrites pages by exact x:Class text as the game reads them, whatever the file is called: A_MessageBox, A_HudOptions, A_AssistOptions, A_AudioOptions, A_VideoOptions, A_PhotoMode, A_PauseMenu, A_PostRaceEventResults, A_CarMeetCarDetails, A_ViewCar, A_ColorSelect. On the message box it replaces the whole tilt, MainContent and Menu tags with its own (550 wide). Write x:Class ="..." with a space before = on a page that keeps one of those classes; the game still accepts it. Re-check after an Extra Options update; search its DLL for the class name before blaming the game. Details in chapter 3.
  • Layout: text lines in a StackPanel overlap with A_Style_FZTextBlock_Body_Tight; give each line a Height. Negative side margins on unnamed children of a 550-wide box are honoured. Bindings inside a Transform3DGroup never apply.
  • Patterns proven on the HUD page: a root collapsed by default through a Style with a DataTrigger to Visible (a binding that never resolves then shows nothing); DataTrigger.EnterActions with 0.15 s Opacity fades; int DataTriggers swapping pad glyphs; TranslateTransform X="{Binding}" and ScaleTransform ScaleX="{Binding}"; ed:Arc with a bound EndAngle; local:ControllerButtonControl Button="{Binding}". On the name tags: inline ControlTemplate, MultiDataTrigger, trigger setters on Text. A Viewbox round large geometry did not draw.
  • Fades: keep a part's values until its fade ends (about 650 ms for the 0.5 s pop-up fade), or only an empty band fades. Three DataTriggers on values 3/2/1 popped only on the first number; restart one animation from one changing value instead.
  • Fonts: the Anthem fonts have Latin-1, every Polish, Czech and Hungarian letter, Š/Ž and U+2229..U+222C as icons, but not ă ș ț and no Cyrillic beyond Ё/ё; Cyrillic and Japanese show as boxes in HUD styles. Use U+00A0, not U+202F.
  • Safe resource keys (all exist): HUD text styles A_Style_FZTextBlock_HudVeryLarge (76), HudLarge (60), HudMediumLarge (34), HudMedium (28), HudSmall (22); A_Style_FZTextBlock_AnthemA..AnthemD; materials A_FZMaterialPresetRoundtangle_HudItem, A_FZMaterialPresetGlassRoundtangle_HudItem (GPU-heavy over large areas); converters A_FZBooleanToVisibilityConverter, A_Converter_StringToVis, A_StringToUpper; effect A_DropShadowEffect_DefaultHud; layout A_Style_ScreenSize, A_Style_Page_Generic, A_Style_ButtonBar, A_Style_ContentControl_ScreenTilt, A_Style_ListBox_TextMenu_Default; pad glyphs A_BitmapImage_ControllerButton_<A|B|X|Y|LB|RB|LT|RT|Menu|View|DPad...> (and a _Large set). There is no keyboard or mouse glyph anywhere in the game's files: draw keycaps.

The UI files themselves (where pages live, how to replace one) are in chapter 4.

Text input: the virtual keyboard

FH2 has no text box: every typed text goes through VirtualKeyboardPopup (vtable game+0x2E614A0, scene 0x106), which calls Windows.Xbox.UI.SystemUI (vtable slot 11, call [rax+0x58] at game+0xED2434). Every Azimuth so far answers with its own prompt: 64 UTF-16 units at most, append and Backspace only, no paste, one prompt at a time, and Esc/B/Cancel complete with the default text (no cancel signal). Offline only. The platform has no text-input API yet.

8.7 Read or take a controller button

On the platform: add_hotkey for a key or a pad chord the player can rebind (the game still gets the keys), the pad layer to take buttons while a modifier is held (or a latched layer), and the pad layer's buttons(&held) to read what the game read. See Pad layer.

In an Extra Options plugin: FH2PluginVehicleUpdate gives you buttons (XInput bits) and input_enabled on the local car's update. The game still sees every button: pick chords it ignores, wait for release before re-arming, and check Extra Options' own default bindings (d-pad, right stick, View, X, Y) to avoid double actions. Taking buttons cleanly needs the "release taken controls" site, which the platform owns.

What each button does while driving

ButtonDefault actionStatus
RT / LTaccelerator / brakeproven in game
Left stick / right sticksteering / look aroundproven in game
RBchanges the camera: never put a mod action on RB, not even in a chordproven in game
Yrewindproven in game
D-pad left / rightradio stationproven in game
D-pad downtelemetry (with its option on Toggle); Extra Options' Autodrive by defaultproven in game
D-pad upnothing noticeable in the stock game (Extra Options: hazards, photo mode on a 1 s hold)proven in game
LBclutch, only for manual with clutch; harmless as a held modifier for everyone elseproven in game
A, B, X, stick clicks, View, Menuprobably handbrake, shift up/down, horn/look back, map, pausenot checked: don't state these as fact

So LB is the best modifier, with a choice for clutch drivers. Avoid LB with A, B or X (clutch plus handbrake or a gear). Extra Options' keyboard keys default to F1, F2, Esc and Tab; another camera mod uses F5-F8; keep step keys away from Alt+F4. Azimuth keeps hold Esc 2 s (quit prompt), Alt+Enter and hold View 2 s (its menu). The game reads only WinRT Windows.Xbox.Input; Azimuth turns PC input into pad input, so the game can't tell a keyboard from a pad.

CControllerManager::Update — game+0x1075490

  • Address: game+0x1075490 (0x141075490), called only from CForza::Update at game+0x226893 (E8 F8 EB E4 00). Kind: inline detour. Byte check: 48 8B C4 48 89 48 08 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 B8 FE FF. Status: proven in game.
  • Does: reads every controller once per main-loop iteration, paused or not, before the game update (about 104 calls a second). It runs on the same thread as CMultiCam::PostUpdate, so the two can share state without locks.
  • Lets a mod: a reliable per-frame callback on the game thread (call the original first). Director Mode's tick. It runs before the UI lock: not a UI-safe site.
  • Conflicts: Director Mode and an on-foot mod hook it; the platform chains them.

ReadPad call — game+0x1075580

  • Address: game+0x1075580 (0x141075580), the call to ReadPad game+0x106C320. Kind: call site (hook_call). Byte check at game+0x1075577: 4C 8D 45 C0 4C 03 C0 8B CF E8 9B 6D FF FF 85 C0 0F 94 C0. Status: proven in game (Director Mode, optional).
  • Signature: uint32_t ReadPad(uint32_t slot, uint64_t id, XINPUT_STATE* out); called for each of 8 slots a frame; 0 = read OK.
  • Lets a mod: see (or change) the raw 16-byte pad state before the game. Director Mode keeps a stamped copy per slot so a chord is never missed or seen twice; without the hook, read the controller's copy at ctrl+0xBC.

How the game keeps a controller

CControllerManager (vtable game+0x2E7A2E8), one instance at [game+0x365D7C8], holds 9 slots of 0x1300 bytes from +0x10 (0-7 pads, slot 8 handled separately at game+0x1075F12); +0xAB28 points at the slot in use. Per slot:

OffsetMeaning
+0x38input context deque {owner hash, mask}; base entry {0, 0xFFFFFFFF}
+0x70current reading (copied to the previous one at +0x128 each frame)
+0x78mask of held controls: bits 0-15 = XInput's buttons except 10 and 11 (the triggers); d-pad diagonals are controls 33-36; d-pad up also sets controls 30 and 32
+0x80the d-pad as one control (+0x10 direction, then 4 floats; idle = direction 8 and zeros). The radio reads this one
+0x94 / +0xA8left / right stick
+0xBCraw pad copy (16-byte XINPUT_STATE)
+0xC0the pad's raw button word (XInput bits)
+0x1E8mask of taken controls

Queries: press game+0x106EEF0 reads a control set in +0x1E8 as not pressed (that's how a button that opened a menu stops counting until let go); value game+0x106F040 reads +0x78 without checking +0x1E8; digital game+0x106E3E0. Offline only, except where the pad layer proved it.

Release taken controls — game+0x10768D0 (platform-owned)

  • Address: game+0x10768D0 (0x1410768D0), called right after each frame's reading (at game+0x1075AD5 for pads, game+0x1075F12 for slot 8). Kind: function the platform hooks for the pad layer: don't hook it. Status: proven in game.
  • How taking a button works (so you understand the pad layer): after the original, for each taken button clear it from +0x78 and +0xC0 and set it in +0x1E8; if all four d-pad directions are taken, also write the one-control d-pad at +0x80 idle (the radio reads that); keep a taken button hidden until it goes up; count presses only from the slot at +0xAB28. Clearing only the taken mask left the d-pad acting; clearing +0x78 stopped telemetry but not the radio; idling +0x80 fixed the radio.

Input contexts — PushContext game+0x1073090, PopContext game+0x1072F60

  • Addresses: PushContext(controller, uint32 mask, uint32 owner) game+0x1073090; PopContext(controller, uint32 owner) game+0x1072F60. Kind: direct calls, game thread only (no lock of their own). Status: proven in game.
  • Byte checks: push 48 83 EC 28 89 54 24 34 48 8D 54 24 30 48 83 C1 38 44 89 44 24 30 E8 05; pop 40 55 48 83 EC 50 8B EA 85 D2 75 2E 48 8B 41 58 48 85 C0 0F 84 0E 01 00.
  • Does: Analog game+0x106F040 and Digital game+0x106E3E0 test an action's context bit against the top mask. Contexts: 0 racing, 1 and 2 free cameras (1 also photo mode), 7 UI.
  • Lets a mod: stop the car and the game's cameras hearing the pad while menus still do: mask 0xC0 (79 of 79 samples blocked the car; Start still pauses; View/rewind, photo mode and the radio are off). Mask 0x00 also kills Start. Losing window focus pauses through any mask. Side effects: rumble stops and the H-shifter reads gear 0.
  • Owner: use a non-zero owner of your own (the game's name hash game+0x126DC20 of your mod's name is a good choice). Popping with owner 0 pops the front and can empty the deque and crash. Push and pop on all 8 controllers. Owners in use: PlayerCarControlWrapper 0x6109A895, PlayerCarControl 0x8D4D37FF, CMultiCam 0x8E6C3AE8, Director Mode 0xC7A24E5B.

Fixed action ids: Gas 0, Brake 1, Steer 2, Handbrake 3, ShiftUp 4, ShiftDown 5, Clutch 6, Look 9-0xD, Telemetry 0xE, PhotoMode 0xF, SwitchCamera 0x11, Rewind 0x14, Radio 0x17/0x18, MiniLeaderboard 0x19; free camera 0x1D-0x29.

Keys in menus

Pages get the pad as WPF key numbers from a table at game+0x2254390 (0x142254390; game control pressed, released, key). They reach the page's vtable +0x578 (the shared handler game+0xCEC3D0) through the input pump game+0x142CDC0. Proven in game (logged on a message box, press and release each; only presses are registered as handlers):

PadKey codePadKey code
A18 (Space)d-pad left / up / right / down23 / 24 / 25 / 26
B45left stick left / up / right / down78 / 82 / 80 / 76
X67LB19 (PageUp)
Y68RB20 (PageDown)

The table also maps shifts (116, 117) and controls (118, 119); they aren't the bumpers. One source logged 76 and 82 without naming them; the stick mapping above is from a run that logged every button. The base page plays the UI sounds itself (Select for A, ChangeTab for LB/RB, a move sound for the d-pad, Back for B).

Keyboard or pad prompts?

The game can't tell (it only sees what Azimuth feeds it). To show the right glyphs, poll Windows yourself: XInput (xinput1_4, else xinput9_1_0) on four pads, counting a button change, a trigger past 30/255 or a stick past 7849 (the game's dead zones are 7849 left, 8689 right); and any key down among VK 0x01-0x06 and 0x08-0xFE except modifiers, the Windows key and your own step keys, or the mouse moving more than a few pixels over two polls. Newest wins, with no switch back within 150 ms. DirectInput pads are invisible to XInput, so offer a forced choice. Proven in game. On the platform, ui_status and the HUD layer's "Button prompts" row do this for you.

8.8 What the platform doesn't offer yet

If your feature needs one of these, say so on the platform's issue tracker rather than building a private hook that will clash with someone else's later:

  • Camera control: no camera API. Today every camera mod hooks CMultiCam::PostUpdate and the near clip itself.
  • A frame callback on the game thread: mods use CControllerManager::Update. A UI-thread tick exists only inside the platform.
  • Game state (car, camera, world, pause, event context): every mod walks the chains in 8.2 and 8.10.
  • A full-screen page outside the pause menu: the title-screen redirect in 8.6 is a private hook.
  • Text input: nothing yet; the system keyboard prompt has no cancel signal.

8.9 Master address table

"Platform" in the last column means the platform owns the site: don't hook, patch or check it in memory. "Shared" means hook_instruction only. "EO" marks a site Extra Options hooks or patches.

RVAFull addressWhatKindStatusOwner / note
game+0x2268930x140226893call of CControllerManager::Updatecall siteproven in game
game+0x3FCD840x1403FCD84AchievementsModule tickinstructionproven in gameshared
game+0xFE61C00x140FE61C0CMultiCam::PostUpdateinline detourproven in gameDirector Mode, on-foot mod
game+0xFE2F600x140FE2F60near-clip forwarder (slot 40)inline detourproven in gameDirector Mode
game+0xFE57800x140FE5780CMultiCam::SetActiveCameradirect callproven in game
game+0xFC7C800x140FC7C80view reset (camera back to the player)direct callproven in game
game+0x9A82800x1409A8280XMMatrixLookToLHdirect callproven in game
game+0x103EF500x14103EF50ICamera slot 70 ground clampread onlyoffline only
game+0x12BB3120x1412BB312camera GetPolys query, flags 4read onlyproven in game
game+0xFAF8B00x140FAF8B0SetDynamicRenderModedirect callproven in game
game+0x71B8900x14071B890EntityWorld::FindEntitydirect callproven in game
game+0x4EAEA00x1404EAEA0GetComponentdirect callproven in game
game+0x4DA4D00x1404DA4D0CutsceneComponent Loaddirect callproven in game
game+0x4DBFA00x1404DBFA0CutsceneComponent Playdirect callproven in game
game+0x174DFE00x14174DFE0Cinematic::SetTimedirect callproven in game
game+0x11F9C800x1411F9C80CFileSys::Existsdirect callproven in game
game+0x13400220x141340022render view update call (cull views)call siteproven in gamerender thread
game+0x9636C00x1409636C0may open photo modeinline detouroffline only
game+0x9637400x140963740photo mode online block (je)byte patchproven in gameFH2MP (in progress)
game+0xDCF3E00x140DCF3E0PhotoModeScene::Updatepointer / detourproven in game
game+0x2C6C2F00x142C6C2F0photo mode limits (to +0x2C6C30F)dataproven in game
game+0x34B29CE0x1434B29CEdisablephotomodecollisiondetectiondataproven in game
game+0xAAED000x140AAED00MinorNotification status Createdirect callproven in game
game+0x51B520, 0x51B590, 0x51B4B00x14051B520 ...status Maintext, Subtext, IconName settersdirect callproven in game
game+0x777E500x140777E50HUDModule submitdirect callproven in game
game+0x7857B00x1407857B0HUDModule removedirect callproven in game
game+0x7553300x140755330HUD notification Showdirect callproven in gamenever patch
game+0x3233100x140323310MakeDisplayStringdirect callproven in gamenever patch
game+0x12398400x141239840wide display-string constructordirect callproven in game
game+0x73E0B10x14073E0B1notification constructorinstructionproven in gameshared
game+0x73F0460x14073F046notification destructorinstructionproven in gameshared
game+0x7549200x140754920minor-notification gateread onlyproven in gameplatform calls it
game+0x75542C, 0x7555A5, 0x750FB10x14075542C, 0x1407555A5, 0x140750FB1calls of the gatecall siteproven in gameplatform
game+0xB2BC800x140B2BC80profile option storedirect callproven in game
game+0x2DEF9C80x142DEF9C8Hud vtable, slot 0 destructorpointerproven in gameplatform
game+0x2DEFE500x142DEFE50Hud shown slot (+0x488)pointerproven in gameplatform
game+0x2DEFEC00x142DEFEC0Hud hidden slot (+0x4F8)pointerproven in gameplatform
game+0x34C0F400x1434C0F40WorldManager pointerdataproven in game
game+0x78B0F00x14078B0F0suspend HUDModuledirect callproven in game
game+0x78B1A00x14078B1A0suspend HUDModuleARdirect callproven in game
game+0x785CD00x140785CD0resume HUD moduledirect callproven in game
game+0x47DD40, game+0x18E1F600x14047DD40, 0x1418E1F60hide / show name tagsdirect callproven in game
game+0xFDBC200x140FDBC20SetRacingLineModedirect callproven in game
game+0x157FF600x14157FF60AVUI::Type::FindPropertyfunctionproven in gameplatform
game+0xCF9C600x140CF9C60raise PropertyChangeddirect callproven in game
game+0x4702D0, 0x336BA0, 0x3F59900x1404702D0 ...box int, bool, floatdirect callproven in game
game+0x14424E00x1414424E0AVUI allocdirect callproven in game
game+0x16633400x141663340AVUI String constructor (wide)direct callproven in game
game+0xB3A3E00x140B3A3E0HUD options scene record (factory 0xB0B990)functionproven in gameplatform
game+0xB467D00x140B467D0title message-box scene record builderinline detourproven in game
game+0xD09D000x140D09D00show message boxdirect callproven in game
game+0xDD88200x140DD8820message box help bardirect callproven in game
game+0xDD86F00x140DD86F0message box set handlerdirect callproven in game (A)
game+0xE01A600x140E01A60message box chosen itemdirect callproven in game
game+0x2E24F400x142E24F40PopupMenu buttons slotpointerproven in game
game+0x2E539400x142E53940Splash buttons slotpointerproven in gameplatform
game+0x2DF06C0, game+0x2DF07B00x142DF06C0, 0x142DF07B0HUD options loaded / buttons slotspointerproven in gameplatform
game+0xDC8A600x140DC8A60settings page tile wiringfunctionproven in gameplatform
game+0xDC6E300x140DC6E30pause menu tile wiringfunctionproven in gameplatform (EO also)
game+0xDBD635, game+0xDBF1850x140DBD635, 0x140DBF185Achievements tiles' callscall siteproven in gameplatform
game+0xDBD720, 0xDBDD00, 0xDBDD60, 0xDBFE400x140DBD720 ...Marketplace tile handlersfunctionproven in gameplatform
game+0xD78E500x140D78E50online Event Options row builderinline detourproven in game
game+0xD709F00x140D709F0make an Event Options rowdirect callproven in game
game+0xD6E6500x140D6E650add a rowdirect callproven in game
game+0xCE76CE0x140CE76CEloading video pickinstructionproven in game
game+0x365D7C80x14365D7C8CControllerManager pointerdataproven in game
game+0x10754900x141075490CControllerManager::Updateinline detourproven in gameDirector Mode, on-foot mod
game+0x10755800x141075580ReadPad callcall siteproven in gameDirector Mode
game+0x10768D00x1410768D0release taken controlsfunctionproven in gameplatform
game+0x10730900x141073090PushContextdirect callproven in game
game+0x1072F600x141072F60PopContextdirect callproven in game
game+0x22543900x142254390pad-to-key table for pagesdataproven in game

8.10 Structures and offsets for this system

Offsets are from the object's start; check the vtable before trusting any of them. The general object layouts, RTTI and the MSVC 2012 containers are in chapter 11.

CForza (global game+0x34ABA60, also [game+0x354F4F8]; vtable game+0x2C47AE0): +0x28 CRenderThread* (vtable game+0x2C65028), +0x48 CGameManager*.

CGameManager (vtable game+0x2C5F8C8): +0x10 ForzaSimulation* (also at +0x98), +0x28 paused byte, +0x29 "stop simulation" byte (clear it to run the world behind photo mode), +0x2C / +0x37 speed enabled / blocked, +0x40 game clock (double), +0x48 game speed (float), +0x4C fixed dt.

ForzaSimulation (vtable game+0x2C5FAE0): +0x2D0 / +0x2D8 views vector, +0x309 PausePhysics byte, +0x3CC render mode (0-12), +0x3DC frame counter, +0x480 time-of-day object, +0x488 WeatherManager.

Views (SplitView game+0x2C66188, SimulationView game+0x2E6F570, MultiCamView game+0x2E6E890): +0x20 the followed ForzaCar*, +0x40 the camera director (MultiCamView also holds it at +0xC0), +0xB2 a byte that makes UpdatePresentationCamera return early when the target is null.

CMultiCam / ForzaMultiCam (vtables game+0x2E70080 / game+0x2C6C840; the IMultiCam sub-object is at +0x180 on ForzaMultiCam)

OffsetMeaning
+0x188 / +0x190camera list: 0x40-byte entries {name, group, kind, inputFlag, ..., shared_ptr<ICamera> at +0x30}
+0x1B0..+0x1D0camera-index std::deque<int>: map +0x1B8, map size +0x1C0, offset +0x1C8, size +0x1D0
+0x1E8target car
+0x1F0player link
+0x208active camera
+0x219cut flag (u8)
+0x220..+0x2C7camera cache (8.2)
+0x2C8 / +0x2CC(ForzaMultiCam) camera chosen by the rolled-over check (game+0x3986A0), -1 if none / its timer
+0x2D0fade layer stack (GetFade game+0xFE2C80)

Camera class vtables: CCamFree game+0x2E78AF0, CCamFreeTargetCar game+0x2E78D98, CCamFreeTrack game+0x2E79040, CCamPhotoMode game+0x2C6C578, CTSCCamera game+0x2C6CB70, CinematicGameCamera game+0x2F3BAD0. ForzaCar's ICameraTarget sub-object is at car+0x20 (vtable game+0x2C5CE28).

CCamFree (0x270 bytes): +0x08 target, +0x10 controller, +0x190 position, +0x1A0 look direction (rebuilt each Update), +0x1B0 FOV (radians), +0x1B4 yaw, +0x1B8 pitch, +0x1BC roll, +0x20C speed multiplier, +0x22C input enabled, +0x22D old style, +0x22E fps, +0x22F invert pitch, +0x230 speed scale.

CPresentationCamera (constructor game+0x131E830: FOV 90, near 0.01, far 1000; offline only): +0x20 view matrix, +0x60 projection, +0x130 position (doubles), +0x160 near, +0x164 far, +0x170 velocity, +0x194 FOV in degrees.

PhotoModeScene (vtable game+0x2E16E20, 0x11E0 bytes): +0x1160 the page's camera, +0x1190 the camera index to restore, +0x11C5 keep-live flag, +0x11C9 other-camera flag. PhotoModeManager singleton game+0x34B3E70 (+0x10 photo save state).

Scene record: +0x00 id (dword), +0x28 page path std::wstring (inline when capacity <= 7), +0x38 size, +0x40 capacity, +0x48 factory. A page keeps its copy at page+0x228.

PopupMenu (message box) (vtable game+0x2E249C8, 0x4C0 bytes, constructor game+0xDF69B0)

OffsetMeaning
+0x298host page (the host keeps the popup at host+0x2A0)
+0x2C0registered key handlers (std::list)
+0x418 / +0x41Chelp bar layout / which help button closed it
+0x420calls queued before the page loaded
+0x460 / +0x468title / message
+0x490 / +0x498items
+0x4A0the element named Menu
vtable +0x578button handler (shared game+0xCEC3D0)

Hud page (vtable game+0x2DEF9C8): +0x410 shown (1) or hidden (0); +0x228 scene record copy.

HUD modules and the prioritiser

ObjectOffsetMeaning
World+0xF8module list head
HUDModule / HUDModuleAR+0x50lock
+0x68 / +0x70prioritiser weak pointer / control block
HUDStatusPrioritiserModule+0x60 / +0x68groups vector (stride 0x30, area dword at +0, queue +0x18/+0x20, entries {status, owner, int index} stride 0x18)
+0x78 / +0x80owner records (stride 0x48, at most 256)
+0xA8suspend byte
HUDStatus+0x10reference count
+0x110shows during a suspend
+0x111is shown
+0x118status type (name at [[+0x118]+8], may be null)
MinorNotification status+0x120 / +0x128 / +0x130main text / sub text / icon name
HUDMinorNotificationComponent+0x128+0x18TemplateName (std::string)
+0x198last shown notification object

HUD priority groups (media\ui\HUDPriorities.xml): 1 CenterExtremeTopScreen, 2 CenterTopScreen (MajorNotification, WrongWay), 3 LeftCenterScreen, 4 LeftCenterCenterScreen, 5 XPHudSkillsTiming, 6 CenterBottomScreen (RaceCountdown, RaceEncounter, MinorNotification/RivalsEverywhere, PressButton), 7 LeftTopScreen, 8 LeftBottomScreen. One status per group shows at a time.

AVUI

ObjectOffsetMeaning
Type+0x40property list {descriptor, next}
+0x80base type
Property descriptor+0x28 / +0x30getter (out, desc, obj) / setter (desc, obj, value)
+0x40name (char*)
+0x48value type
Boxed value+0x28payload
Object+0x10reference count
String+0x28 / +0x30UTF-16 text / length in UTF-16 units
CVariant (0x18 bytes)+0x08 / +0x10value / type (-1 empty)

UserInterface singleton: game+0x3684B90 (vtable game+0x2ECFB80; +0x180 top scene id, +0x1D8 show a popup over a host). WindowLayerManager: [game+0x3684B88], four layer windows at +0x118..+0x130.

CControllerManager ([game+0x365D7C8], vtable game+0x2E7A2E8): per-slot layout in 8.7.

“The FH2 Modding Guide” by Trinculo54 is licensed under CC BY 4.0; its code samples are under the MIT licence. This page is an unchanged copy (links point to this site) of 08-hooks-ui-camera-input.md at commit bb10508; corrections belong in the original repository.