Playtime Protector is a UE4SS Lua mod that adds:
- God Mode (blocks damage based deaths)
- No Attack (best effort enemy pacify, UE4 safe)
This is for single player use and testing. Use at your own risk.
This repo contains the mod files and a sample mods.txt you can copy a line from.
README.md
.gitignore
Mods/
PlaytimeProtector/
scripts/
main.lua
mods.txt.example
This repo does not include UE4SS.
Note: UE4SS uses a scripts folder (lowercase). On Windows, Scripts often still works, but for consistency and fewer surprises, use scripts.
- UE4SS installed for the chapter you are playing
- Install per chapter (each chapter has its own game folder and
Binaries\Win64)
- Find the chapter’s
Binaries\Win64folder.
Tip: In Steam, right click the chapter, Manage, Browse local files. Then locate the folder that contains the chapter’s *-Win64-Shipping.exe.
-
Install UE4SS into that folder so UE4SS files sit next to the chapter’s
*-Win64-Shipping.exe. -
Copy this repo’s mod folder into the chapter.
Copy:
Mods\PlaytimeProtector\
To:
...\Binaries\Win64\Mods\PlaytimeProtector\
After copying, you should have:
...\Binaries\Win64\Mods\PlaytimeProtector\scripts\main.lua
- Enable the mod in the chapter’s
mods.txt.
- If
...\Binaries\Win64\mods.txtalready exists, do not overwrite it. Open it and add:
PlaytimeProtector : 1
- If it does not exist, create
mods.txtin...\Binaries\Win64\and add:
PlaytimeProtector : 1
A sample file is included at:
mods.txt.example
- Launch the game normally.
Open UE4SS.log in the same Win64 folder and confirm the mod starts. You should see something like:
Starting Lua mod 'PlaytimeProtector'
Note: on screen messages are not guaranteed to display in shipping builds. The log is the reliable signal.
- F1 Toggle God Mode
- F2 Toggle No Attack
- F3 Toggle Block Damage (damage hook behavior)
- F7 Dump likely enemies to UE4SS.log
- F8 Dump AI pawns to UE4SS.log (best way to learn real enemy names per chapter)
- F9 Toggle Aggressive No Attack (can break puzzles and scripted sequences)
Uses SetCanBeDamaged(false) plus Unreal damage hooks to zero damage. This helps when the chapter uses the normal Unreal damage pipeline.
If a death is a scripted fail state (cutscene kill, forced game over trigger), God Mode may not help.
Best effort pacify:
- disables enemy collision
- disables overlap events on root and capsule components
- tries to stop controller movement and unpossess
This UE4 version is intentionally conservative to reduce Chapter 1 crashes. It avoids touching helper actors like triggers, volumes, sequences, tracks, and lights, even if their names contain enemy keywords.
Works when the “attack” is driven by an actual enemy pawn and overlap or collision logic. May not stop cutscene driven kills or trigger driven deaths.
Treats most AI controlled pawns as enemies. Useful when enemy names differ across chapters, but it can also hit puzzle actors or non hostile NPCs.
Use it only if F2 does not catch the enemy and you are ok with potential side effects.
The UE4 version uses keyword matching. If No Attack does not catch a Chapter 2 enemy:
- Load the chapter
- Press F8
- Open
UE4SS.logand find the AI pawn list - Add a tight, distinctive substring from the enemy pawn name into
ENEMY_KEYWORDS
Avoid super generic keywords like BP_, Pawn, Character, AI, Controller.
Check UE4SS.log for mod load lines. If UE4SS did not load, verify you installed UE4SS into the correct chapter Win64 folder. Each chapter has its own.
That death is likely scripted, not damage. This UE4 build does not include a fail blocker.
The killer may be a cutscene trigger or a separate pawn not matched by keywords. Use F8 to find the real pawn names, then tighten ENEMY_KEYWORDS.
If Chapter 1 crashes, disable No Attack and keep it off. Chapter 1 has several scripted sequence helpers that can break if you interfere with them.
- Remove:
...\Binaries\Win64\Mods\PlaytimeProtector\ - Or set:
PlaytimeProtector : 0inmods.txt - Remove UE4SS files if you want a completely clean install