Custom Server Stats

I’m hard at work ripping things apart for the 1.5 update I mentioned in my last post, but in the meantime I wanted to mention some fun new stuff in the smaller 1.4.139 update that just went out: account IDs and server stats buttons.

Account IDs

Some server modders have started to log persistent stats for players on their servers, which I think is AWESOME (stuff like total kills, win/loss percentage, etc).  I think this is a good way to differentiate custom servers and give people a reason to come back to custom servers instead of just playing on default ones.

The only issue here is that I haven’t provided server modders with a good way to identify player accounts consistently in order to store stats for them.  People have been using things like account-display-strings for this purpose (‘Android0301031‘, ‘MyGooglePlayGamesName‘, etc).  While this works, it has a number of problems.  For one, it is possible to link multiple logins together in one account, and this display string will change depending on the login the player is using, even though they are technically all the same account.  Another issue is that some platforms allow changing the displayed name for an account, which would cause the server to lose your previous progress in this case.  Lastly, login names are not guaranteed to be unique, and it would be not be hard for someone to impersonate another player by using their login name.

So in 1.4.139 I’ve provided a better solution for server modders: a bs.Player object now has a get_account_id() method.  This call will return a unique account-id string for any player that will remain consistent no matter which of their linked logins they are using or what their display-names are.  As an added bonus, the game does verification with the bombsquad master-server to ensure a player’s account-id is legit, so it should not be possible to spoof another player.  (Note that the get_account_id() method may return None if the game has not yet been able to verify a player’s identity or if they are not signed in; the server mod should handle this case by ignoring their stats, attempting to fetch their id again later, or simply kicking them from the game).

Server Stat Buttons

The second fun bit of this update is server-stats buttons.  Being able to store player stats consistently is great, but its not terribly useful if nobody can see them.  To help solve this, I’ve added the option in the 1.4.139 dedicated server builds to specify a stats URL for your server which will show up in the server browser as a stats button next to your server name.

If you set up an html page to show your server’s custom stats, (Today’s top kills, etc.), you can use this button to provide a link to it.  Furthermore, if your URL contains ${ACCOUNT}, it will replaced with the account-id of the currently-signed-in account.  This way your server can show stats tailored specifically for the current account.

At the time of this writing, I’ve set up the “FFA US West 1” server with a sample page to show how this all works.  Feel free to locate it in the list and click its stats button.  You should see something like this:

This server specified the following string in its

config['statsURL'] = '${ACCOUNT}'

When we click on it in the game, our account-id gets substituted into that address, and a browser window is opened to a URL such as this:

Then, as you can see in the results, our stats server can make a call to to fetch information about that account.  (a display string for it in this case).   I can expand this call to include other account information, so please let me know if there’s anything else you’d like access to.

Anyway, that’s about it.  I’m looking forward to seeing some interesting stats pages!   (though please note that I will curate the list and hide any stats buttons that are hijacked for any purpose other than server stats).

Also a special shout out to Panagiotis Giannoulis, who I worked with to get this system up and running.  Check out his Godfather servers if you get a chance (with nice stats pages coming soon).



25 thoughts on “Custom Server Stats”

  1. Kind of a technical question.
    What DDS codecs BombSquad supports? I know about two of them (DXT1 4bit with/without 1bit alpha), but some textures, like the BombSquad logo doesn’t use 1bit alpha. What codec the BombSquad logo uses for its textures?

    1. For Mac/Win/Linux builds the game supports DXT1 for RGB textures (I’m not using the 1-bit alpha option) and DXT5 for RGBA textures. Hope that helps!

      1. For some reason the game keeps crashing whenever I use DXT5, which is kinda bad. Especially when I wanted to edit the icons. I’m using the NVidia Texture Tools for Photoshop to export the textures.

          1. Good to know. If you run into something crashing, feel free to kick one of the files my way to test. Even if the problem is on the file end I’d like to harden the binary to spit out a clean error message instead of crashing.

  2. Can I add external texture to my server?? I tried Putting files in Models folder but it’s not working! Please tell me if anything is possible

    1. I was hoping to make a tutorial on this but haven’t had a chance yet. Basically you could add some code to the server’s game scripts to grab whatever values you want during or after games (perhaps in TeamScoreScreenActivity.showPlayerScores() in and then dump those to a local json file or push them to a server or whatever. Then your webpage could read and display those values. Hope that helps!

      1. One thing you know is that,I still have to use display strings to as my Account ID,because you only can pick users with player object,which means to those who are in my server but haven’t join yet I can’t Identify them.I hope you can help by adding the Identify String to the Roster…You know what I mean.

  3. Dear Eric,
    How can I made bombsquad to show the account id of a player if one type a chat command…
    Should the syntax be like bs.player.get_account_id()??

  4. Eric Sir ,
    1st Request

    Please make sure that you this time you let BS open, then that terminal come…
    Sometimes it didnt occur… We had to open Telnet and connect it to our game. Errors came in windows BS.

    2nd request
    In BS 2.0, you should take stuff from modpacks.. Powerups effects, not simply copy… You can add more effects.
    Hope you reply ASAP…

  5. And one more. ..
    Will you add the feature that the servers would send textures to the player’s device?
    Well for the first time there should be limits of 500 KB or 800KB as it lags the game…

    Thanks !
    Hope you reply ASAP.

  6. Suggestions-
    What we want in Bs 2.0
    1. Voice chat
    2. Stop stop stop hacking things like copying ids, spamming in servers and copying server names! Popular and consistant servers like Tornadoes should be offical and should host by you.
    3. Whenever we send a message it comes in front of screen and it covers almost all the screen and it is problematic. Change the position and size of the reflecting messages and there should be restriction in which no-one can send blank messages in server.
    4. Fix glitches there are many glitches in the maps
    5. Manual search option for public servers.
    6. There should be kills rank system or anything which can calculate how much proness a pro player have. According to that one can fix solo solo match in public according to his pro rank.
    7. Orignal keyboard of bs is totally waste , it need to be improved a lot and should add emojis in it.
    8. Map and background and character editing option and there should be option of making of 3-teams and 4-teams server
    9. Need more maps and more characters and more icons
    10. These things should be inbuilt in bombsquad script or game apk
    – ADMIN SYSTEM so admin can kick everyone
    – BAN SYSTEM so that admin can ban somone manually on the spot in the server.
    -CONNECTOR.PY-which saves public servers ip port and we can directly join by just clicking on that saved info

  7. Hello I am a server owner when I make people admin they don’t have admin tag. Please tell me how to fix ir”they have admin powers” also custom tag not working help me

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.