Mods.Cyberpunk2077.ShootDodge
Mods.Cyberpunk2077.ShootDodge
A Cyberpunk 2077 gameplay mod that recreates Max Payne 2's Shootdodge in first person. Press Shift and Space together (sprint and jump): V dives in the direction you hold, time slows while V, your aim and your fire stay at full speed, V lands on their feet still shooting and still carrying the dive's momentum. It also has Max Payne 2's bullet-time hourglass and grants the matching outfit and twin pistols.
Everything is Lua for Cyber Engine Tweaks, plus one small redscript file that puts a text thread from Max Payne himself in V's phone. No archive files, no new meshes, no animation edits.
Status
3.0.0 is ready to publish: every gameplay ticket is implemented, dist/ShootDodge-3.0.0.zip is built, and the Nexus Mods page text, changelog included, is ready in docs/NEXUS_PAGE.md. It is not published yet (C2SD-T84 waits for the owner to create the page). Before uploading, play it once through docs/TESTING.md and note each result in its table: the build-up refactors (C2SD-T96, C2SD-T97, C2SD-T100) went into the 3.0.0 zip after its last in-game run. Design notes and the Max Payne 2 research live in docs/DESIGN.md; docs/USER_STORIES.md is the generated ticket log.
Scope
The complete mod, every feature built and still to build, is written down in SPEC.md. The finish line, ShootDodge 3.0.0 on Nexus, is in RELEASE.md: the gameplay is complete, so only the page and the upload remain.
Requirements
- Cyberpunk 2077 (PC).
- Cyber Engine Tweaks (CET): the whole mod.
- redscript: compiles the phone contact (
r6/scripts/ShootDodge/ShootDodgePhone.reds). - Phone Extension (by r457 and gh057), optional: needed only for Max Payne's text. It is the framework that lets that contact text V in the phone's Messages app. Phone Extension itself needs Codeware and redscript (Codeware needs RED4ext); ShootDodge does not.
- Input Loader (by jackhumbert, needs RED4ext), optional: gives Bullet Time mode its default key,
/(r6/input/ShootDodge.xml). Without it, bind the key in CET's Bindings tab instead.
That is all. ShootDodge's own code uses no TweakXL records, ArchiveXL, Codeware or RED4ext (Codeware and RED4ext are needed only if you install Phone Extension or Input Loader): the loadout gives vanilla items by their existing TweakDB IDs. The .reds file is guarded with redscript conditional compilation (@if(ModuleExists(...))), so without Phone Extension it compiles to nothing and no redscript mod is affected. Install order does not matter; without Phone Extension only Max Payne's text is missing.
Troubleshooting. A "REDScript compilation has failed" popup that names PhoneExtension means Codeware is missing: install Codeware or disable Phone Extension. Any redscript failure stops every redscript mod loading, ShootDodge's included.
Install
With Vortex
- Install Cyber Engine Tweaks and redscript, plus Phone Extension (which needs Codeware) if you want Max Payne's text and Input Loader if you want
/as the Bullet Time key out of the box (Vortex lists them as requirements on the Nexus page). - Download
ShootDodge-<version>.zipwith Mod Manager Download, or drag the zip into Vortex's Mods page (Install From File). Enable and deploy it. - Vortex's Cyberpunk 2077 extension recognises the zip on its own (a CET mod plus a redscript mod in their standard folders), so there is no manual-install or "fallback installer" prompt.
By hand
- Install the three requirements and start the game once so CET creates its folders.
- Extract
ShootDodge-<version>.zipinto the game folder (the one withbinandr6), so that<game>/bin/x64/plugins/cyber_engine_tweaks/mods/ShootDodge/init.luaand<game>/r6/scripts/ShootDodge/ShootDodgePhone.redsexist. From a clone of this repo, copy those two folders to the same paths instead.
First run
- Start the game. The CET console and log should show
[ShootDodge] loaded. - Open the CET overlay (its key is set in CET's first-run screen), find the ShootDodge window and tick Enabled. The mod starts disabled every session and does not remember the tick.
- A few seconds into your first session on each save, Max Payne texts V (see Text from Max Payne).
Uninstall
Remove the mod in Vortex, or delete <game>/bin/x64/plugins/cyber_engine_tweaks/mods/ShootDodge/ and <game>/r6/scripts/ShootDodge/. Nothing else is touched. The loadout items already in your inventory stay (sell or drop them). Three quest facts stay in your saves (shootdodge_mp2_loadout, shootdodge_bt_meter and shootdodge_intro_message); they are inert without the mod, and the Max Payne contact disappears from the phone with it.
How to use it
The Shootdodge
- Equip any ranged weapon (pistol, revolver, SMG, rifle, shotgun, sniper, LMG or HMG), or two pistols with Double Trouble (see below).
- Optionally hold a movement direction (forward, back, strafe left or right, or a diagonal). With none held, V dives straight forward.
- Press Shift + Space (either Shift; sprint and jump together). No aim is needed. V launches.
Shift is read from the vanilla Sprint (Right Shift, hold) and Toggle Sprint (Left Shift) actions, and from the mod's own Input Loader action ShootDodgeModifier (both Shift keys). Sprinting into a dive is the intended feel, and Shift has no competing vanilla action, so there is no input caveat.
What happens next:
- The leap is one push. V flies in the direction you were moving, relative to where the camera faced at launch. The mod gives V a single launch impulse and then the game's own jump arc takes over (C2SD-T61 to T63): per-frame impulses made V's movement jolt in game, so the mid-air glide, the slam and the direction lock were removed (C2SD-T63 switched them off, C2SD-T100 deleted them). The camera and aim stay free, and the camera stays first person the whole time.
- Time slows. The world drops to 0.05x speed (5%) while V is in the air. All of V stays at full speed (mouse look, drawing, raising and aiming the weapon, and its fire rate), so weapons are ready at once and you shoot at full pace while enemies and the world crawl. V's own dive arc therefore plays at full speed too (about 0.7 s in the air). The overlay can turn this off. The camera pulls back a little (+12 degrees of FOV), a whoosh plays, and the music and ambience are muffled (the muffle also plays in Bullet Time mode, C2SD-T67; there is no yellow screen tint, no CET lever for one is known).
- A low, flat leap, like Max Payne 2's (C2SD-T65). The one launch impulse folds in a lift of -1.5 m/s (
launchLift) with 8.5 m/s forward (launchSpeed), which cuts the stock jump's rise. Simulated, that is about 0.73 s in the air, about 6 m of travel and a peak of about 0.6 m on flat ground. Each dive prints[ShootDodge] dive arc: vz after launch ...; peak ... m; air ...stoscripting.logso the real arc can be checked. - V lands on their feet and keeps the momentum. Slow-mo ends when V lands. The earlier fake slide (camera dropped to crouch height, pushes along the dive line, a get-up speed cap) was removed (C2SD-T62): V's momentum now carries through the game's own landing, with control back at once. A landing counts only after V has come down (fallen) and stopped vertically, or after 0.1 s of stillness (ledges), so the arc's apex no longer ends the dive and its slow-mo mid-air (C2SD-T63).
- Optional: lie down and fire, like Max Payne 2 (C2SD-T68). Tick Max Payne 2 landing: lie down and fire until you move in the overlay and V lands prone (the camera drops to the floor) and stays there until a fresh direction press (release the key, then press it). Jump alone does not get V up. Off by default.
- A new combo can't start while a Shootdodge is still in progress (in the air, landing or getting up), and there is a 1 second cooldown between combos.
The combo only fires from the ground, on foot, with an allowed weapon. Plain Space is always a normal jump; Shift, aiming or moving on its own never triggers it either, except that Space alone dives in Bullet Time mode (below). Version 3.0.0 also has a session gate: the mod makes no game calls until a real save is loaded and has settled for 1.5 s (the main menu is a world with its own V).
In Bullet Time mode, Space alone is the Shootdodge. While the mode is on, press jump (Space) and V dives, no aim needed: in the direction you hold, or straight forward when you hold none. The weapon restriction, the on-the-ground check and the cooldown still apply, so with a disallowed weapon Space is a normal jump. Starting the dive ends Bullet Time mode (the dive's own slow-mo takes over, as in Max Payne 2), so after you land Space is a normal jump again until you switch the mode back on. Outside Bullet Time mode nothing changes: you need Shift + Space.
Weapon restriction
Every ranged weapon arms the combo: pistols, revolvers, SMGs, assault rifles, rifles, precision rifles, sniper rifles, shotguns, double-barrel shotguns, LMGs and HMGs, hip fire or aimed down sights (aim is never required). Melee weapons, fists, cyberware arms and having nothing equipped block it. The weapon is checked at the instant you press jump, so swapping weapons takes effect on the very next jump. The overlay's last-jump line says "weapon not allowed" when this was the reason.
Dual wielding. With the base game's Double Trouble perk (Cool tree, Update 2.5) V holds a gun in each hand, and the Shootdodge works with both: both guns must be allowed (Double Trouble only pairs power pistols and power revolvers, so any pair it gives you is), and both fire at normal speed during the slow-mo. If the off-hand gun is not allowed, the combo is refused with "weapon not allowed (off-hand ...)". Single-weapon play is unchanged.
Lethal headshots mid-dive
While V is in the air (the diving and airborne part of the dive), every headshot is lethal: the mod adds a +1000 bonus to V's own headshot damage multiplier, so a head hit kills an ordinary enemy outright. The bonus is removed the frame the dive ends (landing, abort, mod disabled or a CET reload), so on foot and after the landing headshots are normal. CET's log shows "lethal headshots on" and "lethal headshots off". Bosses with scripted invulnerability can still survive.
V and the weapon at normal speed
During the 5% slow-mo V and the weapon (draw, raise, aim down sights, fire, reload) run at normal speed. The exemption uses two levers: the time system's local-player-zero call (which did not take effect in game on its own) and a per-entity time dilation on V, the same one the weapon uses. Either succeeding is enough, and a failure is printed once to CET's scripting.log.
Dual pistols, the Max Payne way (recommended)
Max Payne's signature is twin pistols. For the full look, take Double Trouble in the Cool tree (Cool 9, one perk point; free, no Phantom Liberty needed) and equip the two granted Lexingtons, one in the primary weapon slot and one in the secondary slot that the perk adds to the inventory. Then Shootdodge as usual: both guns fire on the shoot input at full cadence while the world crawls. Independent Pistol Controls (left gun on left click, right gun on right click) is optional and untested with ShootDodge.
Bullet-time meter (the hourglass)
The hourglass follows Max Payne 2:
- A Shootdodge costs no meter and is always slow-motion, even with an empty hourglass.
- Bullet Time mode is a separate manual slow-mo toggle with its own depth (C2SD-T66): it starts at 0.35x world speed and deepens to 0.10x as kills turn the sand yellow (in 0.05 steps), like Max Payne 2's levels that deepen with kills. The dive stays at 0.05x. V and the weapon stay at full speed in both. It is the only thing that drains the hourglass: a full one lasts about 10 seconds. Aim and fire stay at normal speed in it too. It needs at least 2% sand to start, can't start mid-dive, ends on its own when the hourglass is empty, and also ends if you die, disable the mod or start a Shootdodge.
- Refill: passively while the mode is off (empty to full in about 80 seconds), and +15% for every enemy you kill (counted from the game's own death event, once per NPC, only when V is the killer). Capped at full.
- The sand turns yellow with each kill (+34%) and fades back to white (8% per second). The tint also sets Bullet Time mode's depth (above); the dive ignores it.
- The level is saved with your save game and restored on load. A save made before you installed the mod starts with a full hourglass.
- The hourglass HUD is drawn in the lower left of the screen (3.5% in from the left, 62% down, 64 px tall) at all times in game, with or without the CET overlay open. It is hidden in menus and while the game is paused. Switch it off with the overlay's Hourglass HUD tick.
The Bullet Time hotkey. / (the slash key, main keyboard or numpad) is the default when Input Loader is installed: the mod adds a game input action (r6/input/ShootDodge.xml) on that key, on foot only. No vanilla context binds / (checked against the game's inputUserMappings.xml), so it does nothing else. Without Input Loader, or to use another key, open the CET overlay, go to the Bindings tab, find ShootDodge and bind Bullet-time mode (Max Payne 2, toggle) (CET gives mods no way to ship a default key, so that binding starts empty; any other key nothing binds works too). Binding / there as well is harmless: one press toggles once. Do not bind it to V: V is the vehicle summon in the base game. See docs/DESIGN.md for how the key was chosen. Pressing it starts the mode, pressing it again stops it. The overlay's Start/Stop bullet-time mode button does the same. Like the dive's slow-mo, the mode refuses to start when the Bullet-time tick is off or the Time scale slider is at 1.00, since there would be no slow-mo to drain the hourglass for.
Max Payne 2 loadout
Once per save, 1.5 seconds after V appears, the mod gives V Max's Max Payne 2 look, built from vanilla items:
| Piece | Item |
|---|---|
| Twin pistols | 2 x Militech M-10AF Lexington (Items.Preset_Lexington_Default)
|
| Coat | Items.Coat_01_basic_01
|
| Shirt | Items.FormalShirt_01_basic_01
|
| Trousers | Items.FormalPants_01_basic_01
|
| Shoes | Items.FormalShoes_01_basic_01
|
It works for male and female V (every piece has both body appearances). Nothing is equipped for you: open the inventory and equip the pieces. The Lexington is a power pistol, so it passes the weapon restriction, and it carries the game's DualWield tag, so with Double Trouble the two Lexingtons pair up as twin pistols (see Dual pistols).
- It only grants once per save. A quest fact in the save records that, so reloading, restarting CET or selling a piece never re-grants it. If an item failed to arrive, the fact is left unset and the overlay says which, and Check loadout now (or the next load) gives only what is missing.
- Limits: Cyberpunk has no tie slot, so there is no tie. Without Double Trouble, "twin" means one Lexington in hand and one on the weapon wheel. The coat colour is a best match; see
docs/DESIGN.mdfor the research and the runners-up.
Text from Max Payne
Once per save, about 8 seconds after V first appears (after the loadout), V's phone buzzes with a real SMS: a new contact, Max Payne, in the phone's Messages app like any other contact. The thread is a string of texts in Max's own over-the-top noir narration that explains how to Shootdodge (Shift + Space, direction, the slow-mo, the landing, shooting, binding the Bullet Time hotkey and the hourglass), woven around 25 genuine lines from Max Payne and Max Payne 2, each checked word for word against its source (the list is in docs/DESIGN.md).
- The contact uses the phone's existing "unknown" avatar; no new art.
- The notification pops only once per save: a quest fact (
shootdodge_intro_message) records it, so reloading, restarting CET or loading an older save of the same playthrough never sends it again. The thread stays in the phone to re-read, and opening it marks it read in the save. - The overlay shows the result ("sent", "already sent for this save", ...) and keeps the whole thread under Texts from Max Payne, with a Re-send to phone button for testing (it pops the notification again without touching the save's fact).
- There is no on-screen fallback. If Phone Extension (or redscript) is missing, no text arrives and the overlay shows "Intro message problem: phone route missing ...".
The debug overlay
Open the CET overlay and find the ShootDodge window. It only draws while the CET overlay is open; the hourglass HUD does not depend on it. Settings are not saved between sessions.
| Control | Default | What it does |
|---|---|---|
| Enabled | off | Master switch for the Shootdodge combo and its state machine. Unticking it cancels any dive in progress. The hourglass and loadout work either way. |
| Max Payne 2 landing: lie down and fire until you move | off | Prone landing (camera drops to the floor, held until a fresh direction press). Off = land on your feet and keep the momentum (C2SD-T68). |
| Prone eye drop (m) | 1.30 (0 to 1.6) | How far the first-person camera drops in the prone landing. |
| Bullet-time | on | World slow-mo on (dive and Bullet Time mode). Off means the dive still happens at normal speed. |
| Time scale | 0.05 (0.01 to 1.00) | World speed during the dive's slow-mo (Bullet Time mode uses its own 0.35 to 0.10 depth). |
| Weapon at normal speed (fire rate) | on | Keeps V's weapon's fire cycle (both guns while dual wielding) at normal speed during slow-mo. |
| All of V at normal speed (pad look; fall not slowed) | on | Exempts all of V from the slow-mo: instant weapon draw, raise and aim, normal gamepad turning, and the dive arc at full speed. Untick to slow V with the world (only the weapon stays fast). |
| Start/Stop bullet-time mode | Toggles Bullet Time mode (same as the hotkey). | |
| Refill meter / Empty meter | Test buttons for the hourglass. | |
| Hourglass HUD | on | Shows or hides the on-screen hourglass. |
| FOV pull-back | on | Widens the camera while diving. |
| Pull-back (deg) | 12.0 (0 to 30) | How much it widens. |
| Whoosh on dive | on | Plays the whoosh once on dive entry. |
| Whoosh event | lcm_player_double_jump
|
The game sound event used. A Play button auditions it. |
| Muffle music/ambience | on | Ducks music while diving and in Bullet Time mode (C2SD-T67). |
| Music kept | 0.35 (0 to 1) | Fraction of your music volume kept while diving. |
| Low-pass on event / Low-pass off event | empty | Optional audio event names for a low-pass on and off. Blank by default, so only the volume duck happens. |
| Check loadout now | Re-checks the loadout and gives anything missing. | |
| Re-send to phone | Under Texts from Max Payne: re-pops the text notification (testing; the save's fact is unchanged). |
Read-outs: the current state (NONE, DIVING, AIRBORNE, PRONE, GETUP) with time in state, the last state change and last refused one, combo status and the reason the last jump was not a combo, the locked dive direction and air time, the landing log (one line per dive, movement held or not), prone and get-up status, world time (and whether the game is paused), how many weapons (2 while dual wielding) are exempted and whether V is, the exact meter value, mode, tint and kills counted, polish status, and the loadout result. Problems show as "... problem:" lines. The mod also prints state changes, combos, landings and get-ups to the CET console.
While music is ducked the original volume is also written to polish_restore.txt in the mod folder. If the game or CET dies mid-dive, the next load puts your music volume back.
Known limitations
- Prone is camera-only. CP77 has no prone stance, so the optional "lying down" landing is the first-person camera lowered near the floor. V's body and hitbox stay standing, so enemies still hit V as if standing. A real prone pose needs a custom animgraph (WolvenKit and REDmod), a future project.
- No dive animation. The leap rides the stock jump plus an impulse; in first person you see no body.
- The ambience low-pass events are blank by default. No safe low-pass audio event name is known, so only the music volume duck is active. If you know event names, type them into the overlay fields.
- Gamepad turn speed. Mouse look is unaffected by slow-mo. A gamepad's turn rate follows time dilation only if All of V at normal speed is unticked (it is on by default, which has the side effect that V's own dive arc plays at full speed while enemies stay slow).
- Max Payne 2's extra slowdown for a yellow hourglass is not implemented; the tint is only visual.
- Drain, refill and kill amounts are estimates (MP2's real numbers are not published) and are the values to tune after in-game testing; see
BulletTimeMeter.defaults. - No tie (see the loadout). Dual wielding needs the game's Double Trouble perk; it has not yet been checked in game with ShootDodge (see
docs/TESTING.md). - Settings are per session. Only the hourglass level and the loadout flag are saved (in the save file).
Building and packaging
There is no compile step: the mod is plain Lua plus one .reds file that redscript compiles at game start. To build the release zip, run from the repo root:
powershell -ExecutionPolicy Bypass -File tools/package.ps1
It writes dist/ShootDodge-<version>.zip, with the version read from version in init.lua (override with -Version x.y.z). The zip is rooted at the game folder:
bin/x64/plugins/cyber_engine_tweaks/mods/ShootDodge/init.lua bin/x64/plugins/cyber_engine_tweaks/mods/ShootDodge/modules/*.lua r6/scripts/ShootDodge/ShootDodgePhone.reds
Only git-tracked .lua and .reds files under those two folders go in (git-add a new file before building), so docs, dev files and runtime state like polish_restore.txt or CET's db.sqlite3 never ship. The script checks the result (forward-slash entry names, every entry under one of the two folders, init.lua directly in the mod folder) and prints the file list. dist/ is tracked in git: it keeps the released zip of every version, so commit each new dist/ShootDodge-<version>.zip. The runtime files are in .gitignore. A quick syntax check of each Lua file is luac -p <file>.
Testing
docs/TESTING.md is the full in-game checklist (male and female V where it matters), with a Results table.
Repository layout
bin/x64/plugins/cyber_engine_tweaks/mods/ShootDodge/init.lua: wires everything and draws the overlay..../modules/: the pure rules modules (StateMachine,ComboDetector,Dive,Prone,GetUp,BulletTime,BulletTimeMeter,DivePolish,WeaponGate,AimFireExemption,Loadout) and the CET glue next to each (*Driver.lua,Input.lua).IntroMessageholds Max Payne's text thread.r6/scripts/ShootDodge/ShootDodgePhone.reds: the "Max Payne" phone contact (redscript, through Phone Extension), filled and triggered byIntroMessageDriver.lua.r6/input/ShootDodge.xml+r6/scripts/ShootDodge/ShootDodgeBulletTimeKey.reds: Bullet Time mode's default key (/, through Input Loader), read byBulletTimeKeyDriver.lua.tools/package.ps1: builds the Vortex-ready release zip intodist/.docs/: design notes, Nexus page, testing checklist and the ticket log.
Pages in this repository
- Cyberpunk2077.ShootDodge — Project Bible — ShootDodge recreates Max Payne 2's Shootdodge and bullet-time hourglass in first person in Cyberpunk 2077: Shift + Space dives V while the…
- Code ledger: Mods.Cyberpunk2077.ShootDodge — Every tracked source file and the ticket in this repo's tree that accounts for it (MAT-T484; method:…
- Design notes — Inspiration: Max Payne 2: The Fall of Max Payne's Shootdodge — leap in the aim direction, time slows but aiming and firing stay sharp,…
- Nexus Mods page: ShootDodge — Not published yet (live link goes here once uploaded). Copy each field into the Nexus Mods upload form. The description is BBCode, which…
- Mods.Cyberpunk2077.ShootDodge — Release charter — A Cyber Engine Tweaks (Lua) mod for Cyberpunk 2077, with a little redscript, that recreates Max Payne 2's Shootdodge and bullet-time…
- Mods.Cyberpunk2077.ShootDodge — Product specification — In docs/ECOSYSTEM.md (the workspace's source), this repo is a product in the Mods family, a standalone Cyberpunk 2077 mod; no Cyberpunk…
- Testing in game — A checklist for confirming the mod works, one case at a time. Every expected result below matches what the code does today; if the game…