
CoordinatedPolice
Experimental IL2CPP police coordination: staggered nearby backup and interception with vanilla officer toughness. SP and co-op playtesting required.Coordinated Police
Experimental Schedule I IL2CPP / MelonLoader mod, version 0.1.2. More nearby officers and coordinated approaches, with vanilla health, armor, weapons, movement speed, and arrest rules. This build needs SP and multiplayer playtesting before a public release. Compilation does not establish game compatibility.
MVP behavior
The host recruits one available on-foot officer within 60 metres of a witnessing officer after five seconds of pursuit. Sustained pursuit changes the response:
| Pursuit duration | Recruitment ceiling per player | Backup interval |
|---|---|---|
| Under 25 seconds | 4 officers | 8 seconds |
| 25–59 seconds | 6 officers | 6 seconds |
| 60+ seconds | 8 officers | 4 seconds |
Each pursuit permits at most four successful backup calls, in bursts of two. After the second call, recruitment pauses for 30 seconds. After the fourth, no further officers are recruited until that pursuit ends. Calls without an available officer do not consume the allowance.
Active foot and vehicle pursuers targeting the same player count toward the ceiling, regardless of who dispatched them. A station dispatch request for that player pauses our recruitment for at least 30 seconds; another request extends that pause. This also gives incoming units time to arrive. A failed station request can still pause our backup because the hook observes requests, not successful arrivals.
These ceilings limit this mod's recruitment; vanilla dispatch can exceed them. We do not cancel station responses or remove existing pursuers. Only conscious, active, on-foot officers can be recruited. Officers pursuing another player are left on that pursuit. No officers are spawned or revived. Backup pauses when no pursuing officer can immediately see the player. Escape, arrest, death, and scene unload reset the response timer.
One in three pursuing officers keeps its vanilla destination. Other officers, when more than 12 metres away and directly seeing an on-foot target, try reachable positions along the player's smoothed horizontal movement, with four metres of lateral spacing. The lead is 1.25 seconds of movement, bounded between two and eight metres. Players moving below 0.75 m/s retain normal pursuit; invalid or implausible velocity above 12 m/s also falls back to normal pursuit. Facing direction does not affect the prediction. Unreachable intercepts retain the original destination. Cached intercepts are only reused for the same player and a nearby predicted destination. This is short-term movement prediction, not knowledge of the player's route. Path queries are limited to once per officer per second. Hidden targets retain vanilla search behavior.
The mod processes at most 16 players and 128 officers. The host alone dispatches and changes destinations, using the game's networked pursuit calls. Clients do not run a second dispatch loop. Cooldowns and allowances are keyed by player identity, so a different player leaving does not reset an ongoing pursuit. There is no custom network protocol or wanted HUD.
Install for testing
- Use an isolated mod-manager profile and a disposable copy of your save.
- Disable Police Response Overhaul and Hardcore Police in that profile.
- Install MelonLoader 0.7.3 and this ZIP through your mod manager's local import,
or put
CoordinatedPolice.dllin the profile'sModsdirectory. - For the first co-op test, install the same build on both computers.
- Fully restart the game after changing mods.
The mod disables itself if it recognizes either conflicting overhaul at scene load. It does not remove previously saved effects from another mod. A game API exception disables its behavior for that scene and logs the failure in MelonLoader's log.
Playtest acceptance
- SP: provoke pursuit near several patrols. Confirm delayed, staggered backup.
- After two backup calls, confirm a 30-second pause before another officer joins.
- After four calls, continue the chase: this mod must stop recruiting, even if officers fall behind.
- Trigger a station response: our extra recruitment should pause for 30 seconds after the latest station request, while vanilla units remain free to respond.
- With vehicle pursuers involved, check that fewer extra foot officers join near the ceiling.
- Strafe or run backwards while visible: interception should follow movement rather than facing. Stop moving and check that ordinary pursuit resumes.
- Start a fresh pursuit after escaping: the four-call allowance must reset.
- Break sight: no new recruitment until officers see you again. Escape normally.
- Arrest/death: start another pursuit and confirm the initial delay returns.
- Compare the same weapon against vanilla officers: damage and shots to defeat should be unchanged. Use a clean save/profile for the baseline.
- Co-op: have the joining Windows player become wanted while the host stays clear. Backup must target the wanted client, with the same officers visible to both.
- Make both players wanted, then let one escape. The other pursuit must continue.
- Disconnect one player while another remains wanted: the remaining allowance and cooldown should survive. Rejoin and load another save; confirm no stale targets.
- Watch distant officers approach different reachable positions. Check corners, stairs, and interiors for oscillation or path failures.
- Check both MelonLoader logs for exceptions and compare frame pacing with vanilla.
Build on Nix
Run from this repository:
MELONLOADER_DIR='/path/to/profile/MelonLoader' ./build.sh
The directory must contain net6 and generated Il2CppAssemblies from a successful
modded game launch. Game assemblies are local build references and are not shipped.
Output: dist/CoordinatedPolice-0.1.2.zip.
Format C# with dotnet format CoordinatedPolice.csproj inside a .NET SDK Nix shell,
with MelonLoaderDir supplied as an environment variable. Format package.py with Ruff.
Scope and release
Automated response and prediction checks:
nix-shell -p dotnet-sdk_8 --run 'dotnet run --project tests/Tests.csproj'
These checks cover timing, budgets, station backoff, and prediction math. Harmony hooks, vehicle membership, remote-player velocity, navigation, and multiplayer replication still require the in-game checks above.
This first slice has fixed tuning. Custom stars, configurable tuning, station-spawned reinforcements, vehicle waves, and extended search duration are not implemented. The ZIP contains the DLL, manifest, README, and a 256×256 PNG icon for Thunderstore. Before publication, complete the playtest checklist, choose the publishing team and public source URL, and update the manifest and this experimental status accordingly.
Inspiration: Babyhamsta's Hardcore Police and UncleTyrone's Police Response Overhaul. This is a new implementation against local game assemblies; neither mod's source or binary is bundled.