BombSquad Modding Guide Episode 1: Hello World

Alright let’s do this.  Its time to mod the squad.

In this first tutorial we’re going to learn how to issue commands to BombSquad as it is running, which is very useful for modding and tinkering purposes.

What you’ll need:

  • BombSquad version 1.3.15 or newer (the version number is visible at the bottom right of the screen when you launch the game) Grab an update from the Mac/OUYA/etc app store if you’re out of date.
  • Python scripting knowledge.  BombSquad’s game logic is written in Python, so you’ll need to be familiar with the language. It’s pretty nifty and useful outside of the game too; go to python.org to learn about it.  BombSquad uses Python 2.7.

Option 1: The In-Game Console

If you are running BombSquad on Mac, Windows, or Linux, you can simply press backquote (`) or F2 to bring down the system console which will let you issue Python commands directly to the game. This is convenient, though functionality is a bit basic at the moment (no copy/paste, etc). For that reason you may still want to opt for option 2 even on these OSs.

Option 2: Telnet

The second option for talking to BombSquad is via a telnet client from your Mac/PC/etc. This is handy when you’re running BombSquad on a machine without a keyboard attached, such as an OUYA. Macs and Linux machines should have command-line telnet clients installed already; on Windows you may have to download a client such as ‘Putty’. Note that BombSquad’s telnet support is pretty rudimentary, so you may need to configure your client to connect in the most simple way possible to avoid strange errors.

Telnet Step 1: Find the game host’s IP address

We’ll need to know where to connect our telnet client to.  If you’re running BombSquad on an OUYA, go to MANAGE->SYSTEM->CONSOLE INFO to find its IP Address.  If you’re running BombSquad on the same machine you’ll be telneting from, you can just use ‘localhost’ as your address.

Telnet Step 2: Connect

Make sure BombSquad is running on your OUYA/Mac/etc, and then open a terminal on your computer and type the following to connect to the game, replacing ‘192.168.1.5’ with the address you found in the previous step:

telnet 192.168.1.5 43250

This will attempt to establish a telnet connection to the game on port 43250.  If this works, you should see a message pop up on your BombSquad game asking if you want to allow the telnet client to connect.  Hit ‘Allow’.

You should now see a prompt such as this:

bombsquad>

Ok, you’re connected; now say hello.

At this point you can enter python commands for the game to run.  As an example, type the following and hit return:

dir(bs)

This will print a list of everything in the ‘bs’ module, which contains bombsquad’s core functionality.  To learn more about something, you can use the builtin Python help.  For instance, type the following to learn about the ‘bs.screenMessage’ function:

help(bs.screenMessage)

As you can see via help, this function lets us print stuff to the screen.  Let’s give it a whirl by typing the following:

bs.screenMessage("HELLO WORLD!")

When you hit return you should see that message pop up in BombSquad.  Ta-da!

And that’s it for our first tutorial.  In the next tutorial we’ll build on that by looking at BombSquad’s internal scripts and starting to modify them for our nefarious purposes.  Cheers!

30 thoughts on “BombSquad Modding Guide Episode 1: Hello World”

  1. Why is the actual version of BombSquad in Mac App Store 1.3.8 instead of 1.3.12(I suppose it’s being approved by Apple.)? I really want to test this out.

    1. I’ll update it soon to the latest.. though most recent changes have just been bug-fixes for the new OUYA version. Also the telnet stuff is not really necessary on Mac at the moment since you can just hit ‘~’ to bring down a console (that being said it’ll be available when I get the update done)

  2. I tried these steps on my 1.3.20 version of BombSquad on my Ouya. I immediately get a prompt in the telnet session, but I do not get a message to authorize the connection on the console. I have tried connecting while the game was in the main menu as well as in the game.

    Is there a forum somewhere I should put this?

    Thanks!

    $ telnet 192.168.4.101 43250
    Trying 192.168.4.101…
    Connected to 192.168.4.101.
    Escape character is ‘^]’.
    bombsquad> dir(bs)
    ERROR: user has not granted telnet access.

    1. The prompt only appears once per session so perhaps it got accidentally dismissed or something? Can you try quitting the game, relaunching, and trying again?
      If somehow that doesn’t work you can hard-wire the game to always accept telnet access: just create a file called “foo.py” (or whatever you want to call it), add the following text to it, and drop it into the BombSquad user-scripts directory (/sdcard/BombSquad). It will then run on launch and telnet access should just go through. Hope this helps!

      import bs
      bs.setTelnetAccessEnabled(True)

      1. You are right, I did have to exit and start again. I am not sure how I canceled it the first time.

        I will try the script as well.

        Thanks for the quick response and wonderful game!

        1. Glad that worked 🙂
          Don’t hesitate to let me know if you have any questions about scripting/modding or anything else.. I know the docs are still a bit basic/sparse. You can email me at support@froemling.net if that’s easier.
          Cheers!
          -eric

  3. Hi Eric, thanks for your quick replies! I´m going to post my problem here, so others can benifit from a solution:

    To use the ingame console you need to press the ~ key. Unfortunately this key isn´t a own key on most European Mac-keyboards.
    British keyboard: http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT2841/Great%20Britain%20%28English%29.gif
    German keyboard: http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT2841/German.gif
    You can create the ~ symbol by pressing Alt+N (and the space), but this doesn´t work for the console. Even changing the systemconfiguration on your Mac to the US keyboard doesn´t fix the problem unfortunately.

    So if there is a Mac-Crack out there who knows how to make the ~ Symbol availible on a German-keyboard, we are more than grateful!

    1. I should clarify that the key the game looks for is actually backquote (`); I always just refer to it as ~ for some reason (that’s the shift version of the key). Do European keyboards have backquote anywhere? If not I can assign another key to bring down the console as well.. what would work well? I chose backquote/tilde because its up near the escape key and its what quake used 😉 I could go with F2 or something?…

      1. The key position (right under escape) is totally fine and every quake player knows this is the console 😉

        Do you mind adding ^ and ° also as keys to activate the console (Those are the Germna Quake-console Buttons)? Tab would also be fine, ´cause that´s a worldwide key I assume.

        Our 12 Player local-Multiplayer Party is on the 28th Feb., so take your time 😉

      2. Oh yes, F2 should also be fine. There is a backquote key on the german keyboard (see link above) but you need to shift it (i ll soon test if it works)

      3. you can access the backquote by pressing shift+backquote or activating caps lock +backquote, but it doesn’t work for the console

  4. Hi there! First… It’s an amazing game !!! An inspiration, it allows you to do your stuff and more! Now, I have some problems with the telnet option, and I really wish to remove the player limit, at my terminal, I can’t type anything because it launches the next errors: ERROR: exception in Python call: call: [any letter typed without hit enter] context: realtime ….

    If you could help me I am going to appreciate too much.

    Thanks!!!

    1. A few folks have run into that issue.. BombSquad’s telnet server is pretty simplistic and some clients enable fancy modes that confuse it. I should fix things on BombSquad’s end at some point, but other people have gotten it working by flipping options on the telnet client so that it connects in the most simple bare-bones way possible.. hope that helps (sorry I don’t have more specifics at the moment)

  5. I’m sorry Eric, but I have a question, how can I do the telnet part in an android device? Please, I need your answer.

    1. If you want to use an android device as the telnet client, you’ll just need to find a telnet app. I’m sure they’re out there but I haven’t looked into it :-/

  6. Hello Eric,
    How do i add mods (such as remove player limit) on Fire TV. Do i need to sideload a telnet app? Also my Bomb Squad game on Fire TV will not recognize controllers of the same type. For example, 2 xbox or 2 snes controllers (all wired controllers) will not work but 1 xbox and 1 snes controllers will. I tried to connect my wii controllers as well but didn’t know if i need a mod or something for those to work. Anyway, great game! Looking forward to playing it with a big group of friends.

  7. Hello again,

    Just to update, I side loaded a telnet apk to my fire tv and i tried to remove the player limit. Had to switch back and forth between the game and telnet. I was able to play 5 players in a co-op game so i guess it worked. Also after restarting the game i was able to get both my snes controllers to work but still have issues with multiple xbox controllers. I can only get one to work at a time. I watched your video of 24 controllers and my settings doesn’t have a discover wii remote tab under controller settings. Is there another way to link them?

    Thanks!

  8. First of all i don’t about python..
    But i will learn it,that is not problem
    But in start to told us to edit python in pc,what that means????

    And after coding what to do to take that cod e in mobile??

    Which editor i need to coding???

    I liked ur work about bomb squad and i m surely going to read that all.

    I hope u will answer my quetion!!!

Leave a Reply to Eric Cancel 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.