Dead by Daylight Python – Killer Documentation
Lately I’ve noticed that my friends and I try to recount what all of the killers we faced in Dead by Daylight that night, which got me thinking. What if I wrote a lightweight application that would scan the screen every second for the end of match scoreboard. When detected, read what the killer was and log it to a database.
Example scoreboard:
This week I decided to give it a go using Python, and initially I had some success. Every second I’d take a screen capture of the left side of the monitor and run OCR on the top left. If it contained the word “SCOREBOARD” in all caps, it’d then search the image for the killer icon and read the text to the right of that icon and compare that text to a comma delimited text file containing all of the killer names.
I figured this would be a good chance for me to work with sqlite instead of full sql server since the database would be pretty small, and learn to make some basic UIs in python, since I’ve only ever made command line applications in Python before.
This is what I’ve come up with thus far:
The reset stats button is a basic delete all rows in the killer database. What I’d like to do is expand this functionality some with a couple of other buttons at the bottom.
First, I’d like to add a calendar button that will have “today” selected by default (on app launch, select today’s date and never change it automatically so that if I’m playing past midnight it won’t change). I want the default view to show the killers I faced *that day only* like in the screenshot above.
Next, I’d like to add a toggle box to switch between “date range” view and “all data” so I can see what the data is across many days. Later I can add graphs to show what killer trends I’m facing looks like. e.g. a new killer is released, it’d have a big spike for some time and then fall back down in frequency.
I’ve already added a “Reset Stats” button, but I’d also like to have a “Remove last” – There’s been some cases that I’ve had a duplicate show up because I left the end screen open for too long. In those cases I’ve removed it from the database file manually, but it’d be nice to have a remove last button as part of the application itself.