Bloons TD Battles

Bloons TD Battles

Not enough ratings
Use any FPS [BTD Battles]
By Walter
Tutorial and explanation on how to change the game's FPS to any value you want.
   
Award
Favorite
Favorited
Unfavorite
Change your FPS
Hello, yesterday i found out how to change the game's fps to any value you want, some common values you might want:
75 fps: 111111111111913F => 4F1BE8B4814E8B3F 90 fps: 111111111111913F => 176CC1166CC1863F 120 fps: 111111111111913F => 111111111111813F 144 fps: 111111111111913F => 1CC7711CC7717C3F 240 fps: 111111111111913F => 111111111111713F 1000 fps: 111111111111913F => FCA9F1D24D62503F
To apply these hex edits:
  • Download HxD or any other hex editor
  • Open Battles-Win.exe (or BTDB-Steam on mac) in the hex editor
  • Do CTRL+R or find a replace button
  • Replace the first value: 111111111111913F with the second
Notes:

V-sync should be on, so any FPS higher than your monitor supports should default to your monitor's max refresh rate.

Also there is a bug in the game engine where the game's FPS is slightly higher than the set value.
Stock 60 fps value becomes 64 fps, 240 fps becomes 250.

There is also a specific quirk in BTD battles compared to the others in that it actually respects accuracy of the mantissa, so if you mess up the mantissa (like the 144fps edit from widescreen forums) then you will end up with something like 166 fps in BTD Battles.
Create your own values
You can now create your own FPS values easily.

I made a python tool and have posted it to Github.

The .exe file:
https://github.com/Walter-o/BTD-fps-tool/releases/tag/1.0

The source code:
https://github.com/Walter-o/BTD-fps-tool
How i found it
Now what is the story behind me finding out how this works?

I once asked in a forum how to mod BTD5's fps from 60 to 144 and i got this answer as response:
11 11 91 3F => C7 71 7C 3F
I thanked him and asked how he did it and he never responded.

Well a few days ago someone named Andrew added me and asked me if i knew how to mod the game to 240 fps.
And i didn't, i have tried reverse engineering the 144hz hex edit before but never managed to.

Yesterday i did another attempt and went to the location where the value was used in IDA disassembler, and i noticed tons of weird instructions happening, a lot of which that ended with `sd` and `ds`.

So i googled what those instructions mean and basically they are only used on "Double-precision floating point numbers".
And that was basically the answer, they are double-precision floating point numbers, they include an exponent and mantissa which goes way over my head for now but i at least know how to recreate the things in the Python programming language.
How it works
So the formula is basically this:

Take the fps you want, eg:
144
then divide 1 by it:
1 / 144 = 0.006944444444444444
then create a hexadecimal representation of the exponent and mantissa of that floating point number:
3F7C71C71C71C71C
then reverse the endianness of that hex string:
1CC7711CC7717C3F

And thats the entire process, i made python tool to automatically do this and it is now available in the "Create your own values" section.
Ending
To end this post i'd like to say ninjakiwi should add the option to change FPS ingame, it does not affect gameplay integrity whatsoever and would be a lot more user-friendly than opening a hex editor.

This post will be cross-posted across other BTD games that have the same engine and will be edited slightly if needed (This one is edited the most since it behaves a bit different than the other games)

Use any FPS [BTD5]
Use any FPS [Bloons Monkey City]

Good luck everyone.
5 Comments
Auto Turret Jul 30, 2023 @ 10:13pm 
nvm it works
Auto Turret Jul 30, 2023 @ 10:07pm 
yo bro it don't work anymore anyone got a fix?
PigR May 16, 2023 @ 2:44pm 
absolute legend
dxxxxy Oct 12, 2021 @ 5:34pm 
+1. works as intended. no bugs. life saver dude.
𝗬𝘃𝗻𝗴𝗙𝗿𝗮𝗽 Aug 23, 2021 @ 6:47pm 
Choose the one that's on the list and write in my profile, I will answer the same!
+Rep best
+Rep killer
+Rep Good player
+Rep Top Player
+Rep Clutch King
+Rep 300 iq
+Rep ak 47 god
+Rep SECOND S1MPLE
+Rep relax teammate
+Rep Killing Machine
+Rep AWP GOD
+Rep ONE TAP MACHINE
+Rep add me pls
+Rep very nice and non-toxic player
+Rep nice flicks
+Rep king deagle