DBD Torte Optimization
5 min readContext

If you have no clue what Dead by Daylight is, in short it’s a multiplayer 1v4 asymmetric multiplayer game that has grown over the years to have a huge collection of licensed horror icons. It’s fun, it’s rage inducing, it’s annoying, but it’s the best game of it’s kind, and all this I have a feeling is in spite of BHVR. They have lighting in a bottle and each year they do something to piss of the community.
Dead by Daylight’s 10th anniversary event is on, and people are pissed. Rightfully so. For some time now it has been tradition that for the anniversary event, the blood web gets filled with a special limited edition offering called an anniversary cake, which can only be brought during the two week anniversary event. These cakes are great because you can spend 1 per match to get a 100%(110 this year) stacking blood point bonus to all other players in a match. So if all 5 players in a match burn such an offering that’s a 550% increase to the blood points awarded at the end of the match. They are sought after and most players want to fill their inventory with as many cakes as they can so they can use them throughout the whole year on matches.
This year, for some reason (greed?) BHVR have decided to make the cakes very rare in the blood web. We went from being able to get about 100 cakes per 1 000 000 blood points spent, to, in the first day of the event, 8-14 cakes per million BP. There’s no reason to do this besides artificially padding the game’s retention by making the grind unbearable. Blood Points are not premium currency, they are the points awarded after each match that are used to do only 1 thing: buy items/perks/offerings in the blood web and raise the prestige level of a character.
The BP economy is already stingy as it is. I’ve been playing DBD since there were like 16 killers in the game, now there’s 42 and 49 survivors, each must be prestige at least 3 times (out of a max of 100) to gat all the perks, which translates into 273 million blood points at minimum to unlock all the current available content. A daunting task were someone to buy the game just now. With an average match lasting 15 minutes and netting an average of 60k bp with bonuses that’s about 1137.5 hours of playtime. And having 1000 hours of playtime as a dbd player is kind of the norm, at 1000 hours you’re barely out of being a noob player. So yeah, the game can be pretty grindy as is, but BHVR has decided they want to make the experience worse, for no reason. There’s no other explanation besides greed, wanting to increase a arbitrary metric in some spreadsheet or sheer incompetence to sabotage your 10th damn anniversary like that.
Now, a few days in, they have slightly improved the cake spawn rate, but it’s still pretty abysmal. You get 14 guaranteed cakes by manually leveling up the blood web. However, you can generate extra cakes by using the game’s autobuy feature which generates cakes in bloodweb levels that you will never see a cake if you manually purchase through it.

Multiple redditors have confirmed that anniversary cakes spawn in very specific bloodweb levels like so: 3,5,10,12,15,20,25,28,30,35,40,42,45, and 50. So the optimal strategy is to manually buy the cakes in those levels (because the autobuy feature can and will miss/ignore the cakes), and the use the autobuy feature to skip through the levels that don’t have guaranteed anniversary cakes. Doing this nets you about 25 cakes on average per prestige level (50 blood web levels). Click here a more detailed breakdown.
Doing this by hand is very tedious, I started doing it today, and after some minutes I realized there’s a better way to do it: Use python to automate the whole process!
Using Claude, python, PyAutoGUI and a few cropped screenshots I’ve vibecoded a python bot that can automate the whole drudgery for you!
!!!DISCLAIMER!!!
This is for educational purposes and fun only! Using python to automate actions in the game is probably against some bullshit EULA or Terms of Use that no one bothers to read. If you choose to do this, it is at your own peril. This script is provided as is with no warranty, no liability, no support, nothing.Here’s a clip of it in action:
Python script available on GitHub: https://github.com/Zach-Calhoun/dbd-torte-optimizer
How it works
I’ve cropped screenshots of the buttons that need to be clicked in order to execute to optimized cake buy strategy. It uses OCR to detect the current blood web level and acts accordingly:
- If it’s one of the guaranteed cake levels - it searches for a cake icon using opencv and clicks it to buy it
- make sure if you’re at such an level the cake is not bought yet or else the script will fail
- If it’s not one of the guaranteed cake levels, it uses the autobuy feature to buy as many bloodweb levels as needed to reach a level where it can manually buy a cake
- Repeats untill it runs out of bloodpoints or the specified number of levels/cakes specified were bought (it does not account for bonus cakes that come out of the autobuy)
Comments