Skip to content

Oskar-Sterner/lock-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LockTimer

Speedrun timer plugin for Deadlock using the Deadworks managed plugin system.

Early Development Build -- This plugin is under active development and is constantly being updated. Expect breaking changes, bugs, and incomplete features. Use at your own risk.

Requirements

  • Deadlock (Steam)
  • Deadworks installed and configured in your Deadlock game directory
  • .NET 10 SDK for building from source

Installation

From source

  1. Clone this repository:

    git clone https://github.com/Oskar-Sterner/lock-timer.git
    cd lock-timer
    
  2. Set the DEADLOCK_GAME_DIR environment variable to your Deadlock installation path:

    # PowerShell
    $env:DEADLOCK_GAME_DIR = "F:\SteamLibrary\steamapps\common\Deadlock"

    Or pass it directly to the build:

    dotnet build -p:DeadlockDir="F:\SteamLibrary\steamapps\common\Deadlock"
  3. Build the plugin. It will auto-deploy to the Deadworks plugins directory:

    dotnet build
    
  4. Start deadworks.exe and launch Deadlock.

Manual install

  1. Build the project and copy LockTimer.dll to:
    <Deadlock>/game/bin/win64/managed/plugins/
    
  2. Copy the SQLite dependencies to the same plugins directory:
    • Microsoft.Data.Sqlite.dll
    • SQLitePCLRaw.core.dll
    • SQLitePCLRaw.provider.e_sqlite3.dll
    • SQLitePCLRaw.batteries_v2.dll
  3. Copy the native SQLite library to the process directory (not plugins):
    <Deadlock>/game/bin/win64/e_sqlite3.dll
    

Commands

All commands use the / prefix in game chat.

Command Description
/start Begin placing the start zone. Aim at one corner and shoot to lock it; a wireframe preview then follows your crosshair — aim at the opposite corner and shoot again to finish the zone.
/end Begin placing the end zone. Same aim-and-shoot workflow as /start.
/cancel Cancel an in-progress zone placement.
/savezones Persist the placed start and end zones for the current map.
/delzones Delete saved zones for the current map.
/zones Show pending zone status and re-render saved outlines.
/pb Show your personal best on the current map.
/top Show the top 10 times on the current map.
/reset Reset your current in-progress run.

How it works

  1. Set up zones: Type /start in chat — a yellow cursor dot appears where your crosshair is pointing. Shoot to lock corner 1. A wireframe box preview now follows your aim; aim at the opposite corner of the desired zone and shoot again to lock corner 2. Repeat with /end for the finish zone, then run /savezones to persist both. Use /cancel if you mis-clicked and want to abort the in-progress placement.

  2. Run: Walk into the start zone (green outline). When you leave it, the timer starts. When you enter the end zone (red outline), the timer stops and your time is recorded.

  3. Zone visualization: Zones are rendered as colored block outlines in the game world. Green = start zone, red = end zone. The outlines appear automatically when a player connects.

  4. Records: Personal bests are stored per Steam ID and map in a local SQLite database. Times persist across server restarts.

Database

SQLite database stored at <Deadlock>/game/bin/win64/LockTimer/locktimer.db. Contains:

  • zones -- Zone boundaries per map (start/end bounding boxes)
  • records -- Personal best times per player per map

License

MIT

About

Speedrun timer plugin for Deadlock built on the Deadworks managed plugin framework. Define start and end zones on any map, track run times automatically, and compete for personal bests with persistent. SQLite-backed leaderboards. Features 3D zone visualization, per-map records, and real-time in-game chat commands.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages