Skip to content

Sync broken on game version 145: method renames in IL2CPP metadata #114

@Mx4flav0r

Description

@Mx4flav0r

Description

After the STFC game updated to version 145 (build 1.000.47668), the Community Mod v1.0.0 sync functionality is broken. The mod loads and patches 14/14 hooks, but several critical methods fail to resolve.

Environment

  • macOS: 26.0.1 (Darwin 25.0.0, Apple Silicon M1)
  • Mod version: v1.0.0
  • Game version: 145 (&game=145)
  • Platform: macOS (arm64)

Errors from community_patch.log

[error] Unable to find method 'GameObject::SetActive'
[error] Unable to find method 'UnityEngine.Screen->get_resolutions'
[error] Unable to find method 'GameServerModelRegsitry->HandleBinaryObjects'
[error] Unable to find method 'SlotDataContainer->ParseSlotUpdatedJson'
[error] Unable to find method 'SlotDataContainer->ParseSlotRemovedJson'

Root Cause Analysis

I inspected the game's global-metadata.dat and GameAssembly.dylib for version 145 and identified the following changes:

Method Renames

Old Name (mod expects) New Name (game v145) Status
HandleBinaryObjects ParseBinaryObjects Renamed
ParseSlotUpdatedJson (removed) Slots moved to binary protocol
ParseSlotRemovedJson (removed) Slots moved to binary protocol

Unity icall Signature Changes

Old icall New icall
UnityEngine.GameObject::SetActive(System.Boolean) UnityEngine.GameObject::SetActive_Injected(System.IntPtr,System.Boolean)
UnityEngine.Screen::get_resolutions() UnityEngine.Screen::get_resolutions_Injected(UnityEngine.Bindings.BlittableArrayWrapper&)

Methods confirmed still present in metadata

  • GameServerModelRegistry class: ✅ exists in Digit.PrimeServer.Core
  • SlotDataContainer class: ✅ exists in Digit.PrimeServer.Services
  • ParseBinaryObjects / ParseBinaryObjectsHelper / ParseBinaryObject: ✅ present
  • ProcessResultInternal: ✅ present
  • SetActive_Injected: ✅ present
  • get_resolutions_Injected: ✅ present

Impact

  • SyncPatches (patch 13/14): HandleBinaryObjects hook fails → no game data sync
  • TestPatches (patch 9/14): SetActive hook fails → non-critical
  • ResolutionListFix (patch 12/14): get_resolutions hook fails → non-critical (macOS)

Suggested Fix

  1. Rename HandleBinaryObjectsParseBinaryObjects in mods/src/patches/parts/sync.cc
  2. Update slot data interception to use binary protocol instead of JSON parsing
  3. Update SetActive icall to SetActive_Injected with new signature (System.IntPtr, System.Boolean)
  4. Update get_resolutions icall to get_resolutions_Injected with BlittableArrayWrapper& return type

Note: The dev branch (2026-02-15) does not contain these fixes either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions