Skip to content

Repository files navigation

Nifer's Logo

Download Twitter

Auto Death Counter (ADC)

Auto Death Counter is a Python script for OBS Studio (with a standalone CLI/CMD version) that watches your gameplay and counts your deaths on stream automatically. It spots a death two ways: by matching an on-screen death glyph/death screen, or by watching your health bar drain to empty with an optional "fade to black" check, then updates an OBS text source instantly.

Requirements

  • OBS Studio with Python scripting enabled (Tools > Scripts > Python Settings)
  • Python 3.x with opencv-python, numpy, mss, and dxcam
  • The standalone .cmd version will find or install Python and the packages for you if they are missing

Usage

  1. Download the latest release.
  2. In OBS, add a Text (GDI+) source to your scene for the death count.
  3. Go into Tools > Scripts, press +, and add auto_death_counter.py.
  4. Install deps into OBS Python using pip install dxcam opencv-python numpy mss. (Tools > Scripts > Python Settings. Open that specific Python into your CLI, and run the pip install command).
  5. In the script's Main Controls, point it at the text source you made.
  6. Add a tracker, choose a Tracker Type, and load your reference screenshot(s).
  7. Open the capture preview to frame the box over the glyph or health bar, then tune the thresholds.
  8. Press Start detection. Your deaths now count on their own.

ADC UI OBS

Detection Modes

To pick how a death is detected, set the Tracker Type:

  1. Glyph / Death Screen - matches an on screen icon or death message (like "YOU DIED"), with optional color and fake-death filtering.
  2. Health Bar / Black Screen - watches your health bar drain to empty, optionally requiring a fade to black, so rests and loading screens are not counted.

Standalone (CLI / CMD)

To run it without OBS:

  1. Double click Auto_Death_Counter_by_Nifer.cmd.
  2. On first run it finds or installs Python, installs the packages, then launches the counter.
  3. It writes the count to a text file that you can point OBS at with a Text (GDI+) source.

ADC UI CMD

Manual Correction

To fix a missed or extra death live:

  1. Go into Settings > Hotkeys in OBS.
  2. Search for Auto Death Counter and assign the +1 and -1 hotkeys.
  3. These adjust the currently selected tracker's count on the fly.

ADC UI OBS HotKeys

Support

For support and bug reporting, either submit an issue under the github repo - or personally DM me on twitter @NiferEdits with the issue.

About

Auto Death Counter is a python script that feature matches via edge or grayscale detection of the user's screen compared to a reference. Primarily built for OBS (Open-Broadcast Software), also includes standalone CLI and Python script.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages