Skip to content

Add in-game cheats menu - #233

Open
saulob wants to merge 1 commit into
OpenDriver2:masterfrom
saulob:feature/cheats-menu
Open

saulob wants to merge 1 commit into
OpenDriver2:masterfrom
saulob:feature/cheats-menu

Conversation

@saulob

@saulob saulob commented Sep 29, 2026

Copy link
Copy Markdown

Summary

Adds a dedicated Cheats submenu to the regular in-game pause menu

The menu exposes a small set of existing cheat/debug functionality without enabling the full Debug Options menu in Release builds

Current options:

  • Invincibility
  • Cop Immunity
  • Ghost Mode
  • Puppy Dog Cops
  • Flip Car Upright
  • Resume Game
  • Back

Toggle entries display their current ON/OFF state

Implementation

The new menu reuses the existing pause menu system and existing gameplay flags/functions rather than introducing a separate UI or cheat implementation

  • Invincibility uses the existing gInvincibleCar and ActiveCheats.cheat3 state
  • Cop Immunity uses the existing gPlayerImmune and ActiveCheats.cheat4 state
  • Ghost Mode uses the existing playerghost functionality
  • Puppy Dog Cops uses the existing gPuppyDogCop functionality
  • Flip Car Upright reuses the existing SetRightWayUp action

Invincibility and Cop Immunity keep their HUD bars visible while preventing Damage and Felony from increasing, matching the existing frontend cheat behavior

Flip Car Upright checks that the player is controlling a valid car before enabling the action, preventing an invalid playerCarId access when Tanner is on foot

Ghost Mode also uses the existing GetSeaPlane behavior in Release builds so its surface behavior is consistent with the existing Debug implementation

Pause menu behavior

The Cheats submenu is available from the normal gameplay pause menu between Quick Replay and Exit

It is intentionally not added to:

  • cutscene pause menus
  • multiplayer pause menus

The existing Debug Options menu remains unchanged and continues to be controlled by the existing debug build flags

Resume Game exits directly back to gameplay

Back returns to the main pause menu

Testing

Tested manually on Windows in a Release build

Verified:

  • Cheats submenu appears during normal gameplay
  • Cheats submenu does not appear during cutscenes
  • Invincibility prevents vehicle damage
  • Damage HUD remains visible while Invincibility is enabled
  • Cop Immunity keeps Felony at zero
  • Felony HUD remains visible while Cop Immunity is enabled
  • Ghost Mode disables player collision
  • Flip Car Upright is safe to select while Tanner is on foot
  • Resume Game returns directly to gameplay
  • Back returns to the main pause menu
  • ON/OFF labels reflect the current cheat state

Release build completes with 0 errors and 0 warnings

Screenshots

Normal pause menu with the new Cheats entry:

2026-09-29_20-03

Cheats submenu:

2026-09-29_20-03_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant