hints

Forum > Hints > Bots4 Fight Stats Script
Reply To Thread (login)
Clay Banger [74]
2019-06-30 09:25:24 🔗
[6 years, 261 days ago]

This addon displays statistics about fights during each battle, as well as other locations around Bots4. It works by capturing the end result of a battle and saving the results into your browsers local storage.

I'm going to keep this short and just list the basic features. If you want more information about what the addon does, as well as screenshots, head over to the download page on openuserjs.org below.

Features:

  • Adds a floating box to each fight/train with stats about fights between those two bots.
  • Adds a link in the menu below "hall of fame", called "bots stats". This page displays a sort-able list of all bots fought. You can also clear any statistics as well as import/export them here.
  • Adds training stats for the logged in bot against each of the training bots.
  • Adds a small bots logo to each previously fought bot on the fight list, which when hovered over displays stats about previous fights.
  • Adds another section to a bots profile, showing the list of all bots that have attacked that bot and the stats.



Download it from here: https://openuserjs.org/scripts/Clay_Banger/bots4_Fight_Stats

Let me know if you have questions, comments or find any bugs.


 
Ender [1]
Administrator
2019-06-30 13:18:22 🔗
[6 years, 261 days ago]

Cool! This may be the most in-depth extension that's been created for the game so far.

Also, I'd sent this to Clay Banger directly before, but posting here too for the benefit of other potential script-makers:

If enough people like certain features, I can always build them directly into the game too. Extensions for certain niche features are a great way to "pilot" them and gauge player interest.

Also also, I added this to the sticky thread for extensions.

(Also also also, I fixed the display text for the link in Clay Banger's post...the Markdown formatting can be tricky.)


 
Gpof2 [131]
2019-06-30 18:22:20 🔗
[6 years, 260 days ago]

Clay Banger with another banger of a script :D


 
Esvrainzas [340]
2024-12-02 04:48:36 🔗
[1 year, 104 days ago]

Is this the script that I should use to test the xp/hour against train bots?


 
Smeagol [400]
2024-12-02 04:53:45 🔗
[1 year, 104 days ago]

You can see your xp/m with this script, but it is not the one that "simulates" the trainbots, gonna see if I can find that one.. it's here on the forums somewhere :)


 
Esvrainzas [340]
2024-12-02 04:55:02 🔗
[1 year, 104 days ago]

Do you use this script Smeagol or do you use another one?


 
Smeagol [400]
2024-12-02 04:57:48 🔗
[1 year, 104 days ago]

I use this one and train adviser script, only 2 I use as I don't score.


 
Smeagol [400]
2024-12-02 05:00:08 🔗
[1 year, 104 days ago]

Hmm, I can't find the train adviser script.. I am pretty sure it was an "AquaRegia/Emanuel" script.


 
Smeagol [400]
2024-12-02 05:06:54 🔗
[1 year, 104 days ago]

I do like this script the most though, it shows everything I want to know.


 
ZalTheTarnished [50]
2024-12-03 08:45:29 🔗
[1 year, 103 days ago]

Expanding on this idea, maybe it'd be a good idea to have the bots4unauthorized build maker ingrained into the game or linked somehow in the workshop for newer/older players to use it easier. Having the simulator added would be a good idea too.


 
Nosferatu [357]
2024-12-04 10:17:45 🔗
[1 year, 102 days ago]

I think Ender had thoughts on this (I believe he hoped someone else would take up that mantle as he did when he wasn't the core programmer of the game). Issue is BU is really only a Wiki of Bots these days, as the item stats and the Build Calc is the main reason to go to that site.


 
invaderzim119 [111]
2026-03-06 22:57:03 🔗
[9 days ago]

Can't seem to get this to work anymore, tried uninstalling the script, clearing cache, and reopening the browser, also tried completely resetting tampermonkey. After reinstalling the script I can't seem to get it to track training bot stats, is this script no longer allowed or has a recent update made it non-functional? been a bit since I played


 
Smeagol [429]
2026-03-06 23:18:33 🔗
[9 days ago]

Same for me, not working in MS Edge or Opera, wish this one was built into the game itself.. it's so useful.


 
invaderzim119 [111]
2026-03-07 00:51:09 🔗
[9 days ago]

I'm using Chrome, and agreed. Getting info like number of fights, win rate, and exp/hr or at least avg exp per fight is incredibly helpful... I can understand restricting what scripts can do for anticheat BUT I feel like this script is just QoL and could possibly be built in


 
Totally Paranoid [129]
2026-03-07 07:48:46 🔗
[9 days ago]

https://userscripts-mirror.org/scripts/review/87798 is this?


 
Smeagol [429]
2026-03-07 14:09:49 🔗
[8 days ago]

Dunno if that one works, not using it.. for me Fight Stats Script doesn't work, I use another one called Train Advisor or something, that one works.. so think it's something that has changed with the game that made Fight Stats stop working.


 
Ender [1]
Administrator
2026-03-07 15:47:41 🔗
[8 days ago]

I suspect some recent changes to kudos/energy colors broke this script. Looking at its source, I suspect the fix is relatively straightforward. Clay Banger comes online every now and then, so hopefully they can fix this when they see this.


 
Boondoxx [379]
2026-03-08 05:22:06 🔗
[8 days ago]

Ender why not just add this to the game at some point? So people dont need use add ons?


 
Smeagol [429]
2026-03-08 14:32:35 🔗
[8 days ago]

I'd love that, not a fan of using script.


 
Ender [1]
Administrator
2026-03-08 18:37:37 🔗
[7 days ago]

That's fair feedback. With the disclaimer that I'd have to take a close look at the script's features and evaluate whether/how each would be incorporated directly into the game, it's mostly a prioritization question. Player-created scripts are a nice way to off-load some development enhancements to other people, but I'm not fundamentally against eventually incorporating these as built-in features.


 
Smeagol [429]
2026-03-14 11:28:47 🔗
[2 days ago]

Anyone with some skills to fix this script? Really sucks playing without it after using it for years.


 
Ender [1]
Administrator
2026-03-15 04:09:59 🔗
[34 hours ago]

I took a closer look at the script. If you're comfortable making small edits yourself, I believe lines 597, 604, and 606 (in current version, i.e. 1.0.1+40a96aa) need this change:

Before:

subsubtext

After:

[a-z-]+

You may also have to delete line 8:

// @require      https://kryogenix.org/code/browser/sorttable/sorttable.js

Details for main edit: The recent kudos/energy color changes changed some of the CSS class names in the battle output from subsubtext to various new classes depending on the resource/change. The script edit changes from the hardcoded/stale CSS class name to a wildcard.

Details for bonus edit: I don't know if it was just my local testing, but the fact that this URL no longer loads that JS seemed to prevent the entire script from working. It seems too coincidental that that broke at the same time as my CSS changes (the more likely alternative is that it's been broken for some time, but then that conflicts with no one having reported breakages until now, suggesting this is a quirk only I might be dealing with). Anyway, I mention it for completeness.


 
Smeagol [429]
2026-03-15 04:18:25 🔗
[34 hours ago]

Ah thanks Ender, good to know.


 
Smeagol [429]
2026-03-15 04:27:41 🔗
[34 hours ago]

Yay got it work again.. had to delete the "/" after subsubtext as well, thanks!


 
Smeagol [429]
2026-03-15 04:30:31 🔗
[34 hours ago]

Sorry, meant the "\" xD


 
little neps [130]
2026-03-15 04:38:45 🔗
[34 hours ago]

can confirm those changes will fix the script just got it working as well. Have to remove the extra \ smeagol mentioned


 
Ender [1]
Administrator
2026-03-15 20:17:12 🔗
[18 hours ago]

Glad the edits worked!

Regarding the "\" after "subsubtext": For the record, I'm puzzled why you both needed to do that. I believe the double-quote escaping it's doing is superfluous, meaning the script should work with or without the "\" there (and my testing confirmed this). Not a big deal either way as long as the script works now, just figured I'd share my take on that in case others ran into it.


 
Forum > Hints > Bots4 Fight Stats Script
Reply To Thread (login)