A minimalist bot in Python using a socket library:
tfm.exec.chatMessage() : Sends system alerts to the room chat.
: Many developers host ready-to-run scripts on GitHub , covering game modes from "Pacmice" to complex competitive variants. Getting Started
Discord bots are popular in the Transformice community. They use the API to: Display player stats in real-time. Announce map rotations. Track tribe activity. 3. Community Tools & Map Analyzers transformice api
By interacting with the game's engine, developers can manipulate almost any element within a map:
The API lets you write full-fledged room scripts (in Lua) that can redefine the game’s logic. Want gravity to flip when a mouse says “cheese”? Done. Need a trap that triggers only if someone steps on a specific tile? Easy. The API gives you event hooks, player data access, tile manipulation, and even custom HUD elements. It’s less “mod support” and more “make your own mini-game inside Transformice.”
aiotf is an asynchronous Python library designed to interact with the Transformice game servers. Built on top of asyncio , it allows developers to create stable, high-performance bots that can handle multiple events simultaneously. A minimalist bot in Python using a socket library: tfm
For web developers and Discord bot creators, Node.js wrappers are the most popular choice. These libraries allow you to log an account into the game and listen for events. javascript
: An asynchronous Lua runtime (using Luvit ) designed for creating standalone bots that can connect to the game servers.
For over a decade, the existence of an accessible API has transformed this simple platformer into a sandbox for developers, graphic designers, and community leaders. This article explores the architecture of the Transformice API, how it enables custom rooms, modules, and bots, and why it remains a gold standard for community-driven game design. They use the API to: Display player stats in real-time
When interacting with the API, you will likely work with JSON structures containing the following information: Description username The in-game name of the player. cheese Total cheese collected. firsts Total number of first places achieved. shaman_saves Total mice saved as a Shaman. bootcamp Completed bootcamp maps. tribe_name The name of the player's current tribe. Best Practices for Developers
Sites that archive the Top 1000 players globally, providing historical data that the game client doesn't store. How to Get Started
Paste the clean example code block provided below into the entry window:
However, one crucial point to note upfront is the distinction between the (which runs inside the game and is fully supported) and the various community-built external APIs (which are often reverse-engineered and may require encryption keys or special tokens).