Battle Brothers

Battle Brothers

View Stats:
turtle225 Dec 25, 2019 @ 8:08pm
BB Damage Calculator - Github Release - EDIT 3/27/20
Hey guys, many of you know that I've been working on a damage calculator for some time. I am happy to announce that the code is now available on Github.

https://github.com/turtle225/Battle-Brothers-Damage-Calculator

Instructions on how to set up your testing environment and use the code are provided in two text documents. I tried to make it as clear as possible for anyone who has never done a thing with code before. I also provided a few screenshots if you want to see what the output looks like. There is no gui, you have to edit and run the code. It is really easy once you do it a few times.

Why should you care about my calculator? The other existing calculators all have proven flaws in their calculations that make them unreliable. I carefully tested my script and had a lot of advice from Abel (who pulled the damage formula from the game code) to try and make sure that my script is as accurate as possible.

My calculator provides over 70 options to create almost any scenario you could imagine from unique weapon skills (like Split Man or Decapitate), Perks, Attachments, Race, and more. I even have Mushrooms in here. It returns average hits until death, injury, and morale, as well as the % chance to die at each hit number. You can also turn on % chance of first injury by hit.

There are eight variants of the calculator at this time:
-- A regular version that runs a given scenario.
-- A version that runs a scenario multiple times at varying hp levels from 60hp-140hp.
-- A version that runs a scenario using 12 different Nimble lines to see which Nimble works best.
edit:
-- A version that runs all top end 1Handers in a given scenario.
-- A version that runs all top end 2Handers in a given scenario.
edit:
-- A version that runs a given attacker against 26 different enemies.
edit:
-- A version that runs 31 different enemies against a given defender.
edit:
-- A version that factors in some basic hit chance.

For convenience, I also provided a document with enemy hp/armor values, relevant perks, and weapon data in case you want to reference that instead of opening up the wiki. The script is full of comments that can both help you understand how the damage formula itself works, as well as help make the script more user friendly.

Feedback and suggestions are welcome and appreciated. Thank you to anyone who gives it a whirl.

Edit:

I added 37 defender presets (hp, armor, defensive perks) for convenience, and so that you can easily test how your attacker fairs against different enemies in the game which just one simple switch.

Also added two new calculator variants to test a bunch of different 1handers and 2handers at once against a given defender.

Edit:

Added a new calculator variant to test your attacker against 26 different enemies.

Edit:

Added 31 attacker presets (weapon, perks, traits) for convenience, and so that you can easily test how your defender does against different attackers.

Also added a new calculator variant that tests 31 attackers against a given defender.

Edit: 03/27/2020
A number of folks had trouble making use of the calculator. I have created a much better installation and user guide this time with step by step instructions and pictures to go along with. Hopefully, more folks can make use of it now.
Last edited by turtle225; Mar 27, 2020 @ 11:31pm
< >
Showing 1-14 of 14 comments
suejak Dec 26, 2019 @ 2:30am 
Cheers! Love you Turtle. Good work!
turtle225 Dec 26, 2019 @ 7:14am 
I am working on a version of the script that will run all of the top line 1Handers in a provided scenario which would provide a similar dataset as what I put out in my Duelists vs Chosen post.

I will likely also make a version that runs a bunch of 2Handers in a provided scenario.

Originally posted by suejak:
Cheers! Love you Turtle. Good work!

Thanks Suejak, I appreciate it.
turtle225 Dec 26, 2019 @ 7:30pm 
I added two new calculator variants that will test a bunch of 1Handers and 2Handers against a given defender of your choosing.

I also added 37 defender presets so that you can easily test how a given attacker does against various enemies in the game with just a simple switch instead of having to manually type out enemy data.

With these two additions you can very easily test most top line weapons against a choice of most enemies in the game with just a few edits to the file. How do Duelists do against Orc Warriors? Easy to test. What if we take Duelist off, how does that effect it? Easy to test. And so on.

I changed 3Head output logic to divide it by 3 so that you see number of swings rather than number of hits.

Fixed a 3Head oversight where I had allowed it to proc Fearsome on every hit when in actuality it can only proc on the first of every 3.
turtle225 Dec 27, 2019 @ 4:15pm 
I added a new variant of the calculator that lets you test an attacker vs 26 enemies in the game all at once, giving a snapshot a bro's overall offensive potential.

Ever wondered what the general impact of adding a specific Perk or Trait on a bro's general offensive ability would be? This version can let you get an idea.

For example, I have a bro in game right now with Crippling, Executioner, Duelist, and Brute. I ran a test on the new calculator to see how useful adding HH would be for this bro (test is on Fighting Axe). There's a picture of this result on the Github page (left side is w/o HH, right side is with).

Also have two fixes that I caught while making the new calculator. When I added the presets I accidentally wrote Steelbrow instead of SteelBrow and this caused it to not apply properly. I also had a typo on the Footman preset. These are fixed now.
Last edited by turtle225; Dec 27, 2019 @ 4:48pm
Hykal Dec 27, 2019 @ 10:42pm 
Awesome! Unfortunately I'm too tech inept to actually run this calculator. I downloaded the zip file and have no idea how to operate it.
turtle225 Dec 28, 2019 @ 7:39am 
Originally posted by Hykal94:
Awesome! Unfortunately I'm too tech inept to actually run this calculator. I downloaded the zip file and have no idea how to operate it.

Did you read the Readme? There are instructions in there for how to set it up. You need to have Python set up on your computer and preferably a code editor to make it look pretty and easier to edit.

You'll have to move the files out of the zip. Put them somewhere you can find, Downloads, Desktop, wherever you like.

Running the calculator you have to call it with "python BBCalcYouWantToUse.py" while in the same directory as where the .py files are located. when you first open a terminal it will default you at your users directory. If you put it in Downloads for example, then type "cd Downloads/Battle-Brothers-Damage-Calculator" and hit enter. Then you will be where your .py files are.

When you call one of the .py files, it will run what is currently written into the code. To change the scenario you need to edit the .py file you are working with and there are sections at the top of each calculator with instructions on how to use/edit them. Then save the file and call it again in the terminal. This is where VSCode comes in, it makes this process a lot easier.

I'll help you get it going, but where are you stuck? Did you download Python?
Hykal Dec 28, 2019 @ 8:07am 
Guess I'll need to download Python.
turtle225 Dec 28, 2019 @ 9:26am 
Yeah Windows doesn't come with it, assuming you have Windows.

Sorry that I don't have a user friendly gui to use. I basically self taught myself Python and haven't had the same drive to learn web development.

That's why I made alternate versions of the calculator that can run a bunch of tests at once, because that is the main advantage I have over the other calculators other than accuracy.

If you have any trouble getting it working then let me know.
turtle225 Dec 28, 2019 @ 9:05pm 
Added 31 attacker presets for more convenience, so that you can easily switch between attackers quickly.

These presets were added to the main BBCalc file, NimbleBattery, and Raising HP.

Also added a new variant of the calculator which automatically runs a given defender against 31 enemies, giving an overall snapshot of a bros defensive abilities. This is a good calculator to use if you want to see how a specific defensive add on will impact you in an overall sense.
Hykal Dec 29, 2019 @ 3:26am 
After some fiddling I've yet to figure out how to do it. Maybe I'm just completely programming-phobic but I'm still unsure how to do it. Sorry, turtle, would love to learn how to use it, and I probably could given time, but unfortunately I just don't have enough of that.

Regardless, I think you should ask a mod if you can pin this thread. It IS extremely useful and someone more capable than I would surely make use of it.
turtle225 Dec 29, 2019 @ 7:35am 
I was afraid that this might happen. From my perspective it is really easy but that isn't fair to others who may have never done something like it.

Which part are you stuck at? Setting the Python path variable? Setting up VSCode? Running the script? I want to try and improve the set up guide so that people don't get frustrated and quit.

Edit:

Fixed an oversight in the automated calculators that caused Nimble values above 40% to drop down to 40% after the first iteration. EnemiesVsDefender, RaisingHP, 1HanderBattery, and 2HanderBattery were updated with this fix.
Last edited by turtle225; Dec 29, 2019 @ 1:22pm
dave_d Dec 30, 2019 @ 7:24am 
Turtle, I added you as a friend, I wanted to ask you some questions about your calc, I couldn't find you on Discord
Last edited by dave_d; Dec 30, 2019 @ 7:27am
turtle225 Mar 27, 2020 @ 7:47pm 
UPDATE.

I have created a new and much better installation and user guide with step by step instructions and pictures that should make it easier for more people to use the calculator who may have shied away last time. I still do not have a gui nor the knowledge atm of how to create one, but with this new guide hopefully anyone who wishes to try the calculator can get it going regardless of their computer knowledge.

I've also made various improvements and a few bug fixes to the calculator since I first released it that I haven't posted about. If you have an old version of the calculator, you may want to check out the newest version.

Thank you.
suejak Mar 27, 2020 @ 8:36pm 
Thanks Turtle. I'll put on my hardhat, goggles, surgical gloves, and ventilator and give it a try.
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Dec 25, 2019 @ 8:08pm
Posts: 14