Skip to content

About

Fix for Global Rescue Cheat Console v0.4.7: finds obfuscated game members by structure so it survives game updates

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

GR Cheat Console Fix

A BepInEx plugin that gets Global Rescue Cheat Console v0.4.7 working again on current Global Rescue builds (tested on game v0.5.13).

  • Download: latest release. Extract the zip into your Global Rescue folder (the one with GR.exe), which gives you BepInEx/plugins/GRCheatConsoleFix/GRCheatConsoleFix.dll.
  • Linux / Steam Deck (Proton): add WINEDLLOVERRIDES="winhttp=n,b" %command% to the game's Steam launch options so BepInEx loads.
  • Requires: BepInEx 5.4.x (win x64) and both Cheat Console plugin DLLs (GlobalRescueCheatConsole_Rebuild.dll, GlobalRescueEmployeeOnlyPatch.dll). Do not install the ProjectAssembly.dll that ships with the console; it's from an older game version.

Why the console broke

Global Rescue's code is obfuscated, and every game update scrambles its member names again (FinanceManager.PGPEPOJPPNB becomes FinanceManager.LHGLAMFKCIN, and so on). The console and its Employee Bridge hardcode about 130 of these names, so after an update most buttons silently stop doing anything.

How the fix works

Instead of names, the fix finds game data by structure: shapes that stay the same when names are scrambled. It uses Harmony to replace the broken console methods with versions that locate members this way:

Feature How the member is found
Money / Reputation / Research Each manager stores its value in its only private field of that type, multiplied by its only constant of that type (money double × 13.5, trophies int × 123, research int × 417). The fix writes the field, then raises the game's un-obfuscated onMoneyChanged / onTrophiesChanged / onResearchPointsChanged events so the UI updates.
Employees SaveMap.cs reads the IL of the game's own employee save method, which copies each member into EmployeeSaveData. That class's field names (salary, hunger, tiredness, ...) are not obfuscated, so this gives a name-to-member map that survives updates.
Employee lists / bases Every List<T> / HashSet<T> of Employee / Base on the relevant manager.
No Call Cooldowns MissionManager's only Dictionary<string, DateTime>, which holds recent mission-location spawns that are excluded from new calls.
Time The public TimeManager.SetTime(DateTime).
Staff resigning while "maxed" The original "Max Stats" set satisfactionLimit to 1, but that's the bar satisfaction must stay above (new hires get 0.15–0.35), not a skill. At 1 nobody could clear it, so the game's "unsatisfied since" timer ran until employees resigned (after 24 in-game hours, 48 at a desk). Max Stats, Free + Max + No Fatigue and Freeze now set the bar to 0 and clear the timer, which also repairs saves the old buttons affected. Max Stats now actually maxes reliability and XP too.
Freeze Employee Stats The console and the bridge each ran their own freeze loop, and the satisfaction they set fought the game's own recalculation. The employee UI redraws whenever these values change, so the game crawled. Now one loop runs once a second, skips values that are already right, and re-pins satisfaction right after the game recalculates it.
Free wages stay $0 The employee panel's wage slider is two-way bound with a minimum of MinSalary, which would clamp $0 back up. A postfix returns 0 for employees already at $0, and another keeps saved $0 wages through the game's load-time clamp.

If a future update changes a shape, the fix logs a warning to BepInEx/LogOutput.log and leaves the value alone. It never guesses.

What it patches (all at runtime, nothing on disk)

  • Cheat Console: SetMoney, SetResearch, SetReputation, MakeEmployeesFreeFromManager, ZeroEmployeeFatigueFromManager, GetEmployeeList, EnableAllBaseDepartments, ClearDictionary (only its CallManager use), FreezeEmployeeStatsTick
  • Employee Bridge: ApplyEmployees, ApplyEmployeeSkillsOnly, GatherEmployees, ForceCurrentDateTime, FreezeClockTickBridge (throttled to once a second), LogFirstEmployeeDiagnostic (disabled; it only logged broken lookups)
  • Game: EmployeeUIData.MinSalary getter and the Employee save loader (postfixes, only for $0 wages); EmployeeManager.UpdateSatisfactionOfEmployees (postfix, only while Freeze Employee Stats is on)

What it does not do

  • No network access, and no file reads or writes. It only logs through BepInEx.
  • Doesn't include or modify any game files or the original mod's files.
  • Doesn't unlock paid DLC. The console's "Unlock DLC Dictionary Flags" button is deliberately left unfixed.

Building and verifying

Requires the .NET SDK (releases are built with 8.0.425) and a Global Rescue install with BepInEx, which supplies the reference DLLs. No game code is included in this repo.

dotnet build -c Release -p:GameDir="/path/to/steamapps/common/GR"
sha256sum bin/Release/netstandard2.1/GRCheatConsoleFix.dll

Builds are deterministic: with the same SDK version and the same game/BepInEx reference DLLs, you should get the same SHA-256 as the DLL in the release zip (listed in each release's notes).

Credits

The Cheat Console and Employee Bridge belong to their original authors. This project only keeps them running on newer game versions.

License

MIT

About

Fix for Global Rescue Cheat Console v0.4.7: finds obfuscated game members by structure so it survives game updates

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages