Api: Transformice
For developers, creating a bot that interacts with Transformice is a rite of passage. Here is a high-level overview using Node.js or Python.
GET https://transformice.com/avatar/[username]
The Transformice API may not be glamorous or officially documented for the web, but its Lua scripting engine is a hidden gem of game design—proof that giving players the tools to manipulate physics and events can lead to infinite creativity. Whether you’re a cheese-seeking mouse or a shaman building impossible bridges, the API is your key to bending the rules of this quirky world.
Have you built something cool with the Transformice Lua API? Share your scripts on the community forums—just don’t forget to save the cheese!
Mastering the Transformice API: A Comprehensive Guide for Developers
Transformice, the physics-based multiplayer platformer, has fostered a dedicated community of creators for over a decade. At the heart of this creativity lies the Transformice API, a set of tools and protocols that allow developers to build everything from Discord bots and stat trackers to custom game modules.
Whether you are a seasoned coder or a curious player looking to automate your tribe’s ranking system, understanding how to interact with the game’s data is the first step toward building something impactful. What is the Transformice API?
The "API" for Transformice isn't a single RESTful endpoint like you might find with Twitter or Spotify. Instead, it is a collection of community-driven libraries and official socket-based protocols that allow external programs to communicate with the game servers. Key Capabilities
Real-time Interaction: Read chat logs, track player movements, and monitor room events.
Player Statistics: Fetch cheese gathered, firsts, shaman saves, and boot camp completions.
Module Development: Create custom mini-games within the Transformice ecosystem using Lua.
Tribe Management: Automate greetings, track member activity, and manage ranks via external bots. The Core Building Blocks
To work with the Transformice API, you generally need to choose between two paths: Lua Modules (internal) or Socket Clients (external). 1. Lua API (In-Game Modules)
If you want to create a game mode (like Racing, Survivor, or Defilante), you use the built-in Lua engine. Environment: Runs directly on the game server.
Access: Requires "Module Team" approval for official listing, but anyone can run scripts in private rooms.
Limitations: Restricted file I/O and limited networking to prevent security risks. 2. TFM-Lib and Python/Node.js Wrappers
For external applications (like Discord bots), developers use libraries that "mimic" a game client. TFM.js (Node.js): A popular choice for web developers.
Aioptfm (Python): An asynchronous library perfect for high-performance bots.
Functionality: These libraries handle the complex handshake and packet encryption required to talk to the Atelier 801 servers. How to Get Started
If you’re ready to dive in, follow these fundamental steps to set up your first project. Step 1: Secure Your API Credentials
To prevent abuse, Atelier 801 requires an API Key for certain types of data requests, especially when using the official "Crouton" service or community-run databases like MicePix. Step 2: Choose Your Language
For Data Analysis: Use Python. It’s excellent for scraping leaderboards and generating graphs of player growth.
For Live Bots: Use JavaScript/Node.js. The event-driven nature of JS makes it ideal for responding to in-game chat instantly. Step 3: Understand the Packet System
Transformice communicates using identifiers (low-level codes). For example, a specific code tells the server "I jumped," while another says "I typed in chat." Learning to parse these packets is what separates a novice from an expert API developer. Popular Community Projects Using the API
The best way to see the API in action is to look at existing tools:
Cheese.formice.at: The definitive source for global rankings and player history.
TFMBot: A versatile Discord bot that bridges the gap between your tribe's chat and your Discord server.
MiceForce & Private Servers: While technically separate, these projects often reverse-engineer the API to create entirely new experiences. Best Practices and Ethics
When using the Transformice API, it is crucial to follow the Atelier 801 Terms of Service:
Don't Spam: Ensure your bot doesn't flood the game servers with unnecessary packets.
Data Privacy: Never use the API to harvest private player information or passwords.
Stay Updated: Transformice frequently updates its encryption. Join developer forums like the Transformice Discord (TFM-Dev) to stay informed about breaking changes. Conclusion
The Transformice API is a gateway to enhancing the game experience for thousands of players. Whether you're building a competitive leaderboard or a fun social bot, the tools are at your fingertips. Start small—perhaps a bot that announces when a friend logs in—and gradually work your way up to complex game modules.
If you’re interested in building a specific tool, let me know! I can help you with:
Python or JavaScript code snippets for connecting to the server. Explaining specific Lua functions for in-game maps.
Finding the latest community libraries that are currently maintained. transformice api
The Transformice API, primarily accessed through the in-game Lua system and external community-driven tools, allows players to create custom game modes, automate tribe functions, and track player statistics . Key Capabilities
Lua Scripting Engine: Players can write scripts for tribe houses and official "Modules" . Common functions include custom object spawning, gravity manipulation, and mini-game creation (e.g., racing or parkour modules) .
Tribe Bots: The API enables the creation of automated bots that can manage tribe recruitment, play music (historically via YouTube API), and test maps .
Player Statistics: Unofficial leaderboards like Cheeseformice utilize the API to scrape and display global rankings, cheese counts, and first-place statistics . Developer Experience & Tools
Accessibility: Documentation and function trees can be accessed directly in-game by typing /luahelp .
Community Resources: Developers often use pshy_merge, a community-developed Lua compiler, to manage complex scripts and import external modules .
Limitations: Security constraints prevent certain sensitive game code (like the "Fortoresse" codebase) from being open-sourced to prevent exploit discovery . Review Perspective Pros Cons
High Versatility: Allows for entirely new game modes within the platform .
Complexity: Shaman and Lua controls can have a steep learning curve .
Active Ecosystem: Extensive GitHub repositories for bot templates and script compilers .
Volatility: Official API changes (e.g., YouTube API removal) can break legacy bot features .
Community Integration: powers widely-used third-party leaderboards and stat trackers .
Limited Support: Sensitive security features remain closed-source . Transformice | Review // Test Transformice ist ein Physik-basiertes Plattformspiel, YouTube·GamingClerks Lua | Transformice Wiki | Fandom
Technical Overview: The Transformice API Ecosystem In the context of the multiplayer platformer Transformice
, the term "API" refers to two primary systems: the Module API (built on Lua) used for in-game content creation, and external Stats/Bot APIs used for community-driven websites and automation. 1. The In-Game Module API (Lua)
The Module API allows players to write scripts that run within tribe houses or official "module" rooms. It is the foundation for almost all community-created minigames like #prophunt or #pictionary.
Execution Environment: Scripts are executed via the /lua command. Access is restricted to players with specific tribe permissions or members of the official Module Team. Core Packages:
tfm.get: Retrieves room data, including player lists and XML map info.
tfm.exec: Executes game actions like spawning objects, moving mice, or changing scores. system: Manages file loading and basic script metadata.
ui: Allows developers to create custom buttons, text areas, and popup windows.
Event-Driven Architecture: Scripts respond to real-time triggers, such as:
eventChatCommand: Triggers when a player types a command starting with "!".
eventLoop: Occurs every 500 milliseconds, serving as the script's "heartbeat".
eventKeyboard: Captures player key presses for custom movement or mechanics. 2. External Statistics and Bot APIs
Beyond in-game scripting, external APIs allow for deep interaction with game data and player profiles.
Official Stats API: Atelier 801 provides access to a table schema that includes player IDs, shaman experience, titles, and specific game mode data (Racing, Survivor, etc.).
Transfromage API: A third-party project using the Luvit runtime to enable bot connections to the game servers. It requires specific encryption keys and a token to function.
Community Platforms: Sites like Formice utilize these data feeds to provide real-time leaderboards and historical player rankings. 3. Developer Tools and Optimization
The community has developed several tools to handle the limitations of the Lua environment, which does not natively support complex file structures. Lua | Transformice Wiki | Fandom
The Transformice Lua Module API is the built-in programming system inside the multiplayer game Transformice.
It allows players to write and execute scripts directly inside game rooms. Scripts are written in the Lua programming language.
It enables the creation of fully custom minigames (modules) without needing external bots.
Anyone can test scripts in their own tribe house or specialized game rooms. 🛠️ Key Capabilities
By interacting with the game's engine, developers can manipulate almost any element within a map: For developers, creating a bot that interacts with
Mouse Control: Kill mice, change their score, or forcibly move them around the screen.
Physics Manipulation: Spawn customized physical objects, change gravity, and manipulate wind settings.
UI Customization: Display custom text popups, create interactive clickable buttons, and build full custom HUDs for players.
Event-Driven Execution: Code triggers automatically on specific game events like a player joining, a mouse dying, or a game chat command being typed. 💻 Writing Your First Script
To test a script, you must be in a room where you have permissions (like a Tribe House) or use the command /lua in chat to open the interface.
Here is a basic skeleton of a Transformice script listening for a player to join:
-- This function runs automatically when a mouse joins the room function eventNewPlayer(playerName) print("Welcome to the room, " .. playerName .. "!") tfm.exec.giveCheese(playerName) end Use code with caution. Copied to clipboard 📚 Essential Resources
If you are serious about developing custom minigames, bookmark these official and community resources:
Official Documentation: Check the master thread for the Module FAQ & Documentation on Atelier 801 to see a complete list of valid functions and arguments.
Code Repositories: Browse through existing open-source scripts on the Transformice GitHub Topic to read clean code written by veteran creators.
Code Compilers: To handle complex, multi-file projects, developers frequently use external tools like Pshy's Transformice Lua Compiler to merge and shrink scripts for the game client.
Local Testing: If you want to test and emulate room behavior locally without being connected to the live servers, check out the Module-API-TFM Recreation on GitHub.
💡 Keep in mind that certain advanced administrative functions are locked and restricted to the game's official Module Team to prevent abuse.
If you tell me what kind of minigame you want to build, I can generate a functional starter script for you to run in your tribe house.
Here’s an interesting, slightly quirky review of the Transformice API:
Title: The Hidden Engine of Cheese-Fueled Chaos
Review:
At first glance, Transformice is just a cute, chaotic platformer where mice race for cheese and build shoddy bridges. But peel back the adorable fur, and you’ll find the Transformice API—a surprisingly powerful, underrated gem for aspiring game modders and automation enthusiasts.
What’s cool:
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.”
Why it’s interesting:
Most games hide their internals. Transformice exposes them—willingly. That means you can build auto-mazing race judges, co-op puzzles with synced doors, or ridiculous PvP shaman duels. The community has made everything from Among Us–style social deduction to fully functional chessboards. All inside a mouse-catching-cheese game.
The catch (and it’s a big one):
Documentation is… charmingly French. That is, sparse, sometimes outdated, and often only found in old forum posts or Discord chats. Also, the API runs server-side for your room, so no client-side hacking—but that also means you can’t do real-time low-latency tricks without some creativity.
Verdict:
🔹 For casual players — you won’t notice it, and that’s fine.
🔹 For tinkerers and Lua lovers — it’s a hidden sandbox that’s janky, lovable, and surprisingly deep. If you ever wanted to see how a quirky Flash-era MMO lets players become co-creators, the Transformice API is a weird, wonderful rabbit hole.
Score: 7/10 — Would cheese again, but bring a Lua manual.
If you want, I can:
Which of those would you like next?
The Transformice API, primarily referred to as the Module API, is a Lua-based scripting system that allows players to create custom minigames (modules) directly within the game environment. Unlike external bots, these modules run natively on the game's servers, enabling developers to modify game physics, handle player interactions, and create unique objectives. Core Functionality
The API operates on an event-driven model, where specific Lua functions are triggered by in-game actions:
Player Input: eventChatCommand detects "!" commands in chat, while eventKeyboard and eventMouse track physical inputs.
Game State: eventNewGame triggers when a new map loads, and eventLoop runs every 500 milliseconds to handle continuous logic.
Interactions: Events like eventEmotePlayed allow scripts to respond to player animations. Types of Modules
Modules are categorized based on their status and accessibility:
Official Modules: Approved by Administrators and featured in the game's room list (e.g., #survivor or #racing). Players can earn shop cheese in these rooms.
Semi-Official Modules: Verified utilities or games that can be loaded in tribe houses but require a member of the Module Team to host them.
User Scripts: Custom scripts that players can run in their own private rooms or tribe houses for testing and casual play. Development Resources
Documentation: The official Module FAQ & Documentation on the Atelier 801 forums provides the standard starting point for developers. The Transformice API may not be glamorous or
Community Projects: Libraries like Transfromage provide external API access for bot development, though they require specific encryption tokens.
Shared Scripts: Many developers host ready-to-run scripts on GitHub, covering game modes from "Pacmice" to complex competitive variants. Getting Started
To begin coding, players typically use the /lua command in a room where they have permissions (like a tribe house) to paste and execute their scripts. For those looking for inspiration, the Transformice Wiki maintains an unofficial but detailed guide on event arguments and function descriptions. transformice · GitHub Topics
If you’re looking to dive into the Transformice (TFM) API , you're entering the world of Lua scripting
and bot development. While there isn't a single "official" developer blog, the community has built extensive resources to help you script everything from custom minigames to automated tribe bots.
Here is a breakdown of how the API works and where to find the best documentation. 1. The Core: TFM Lua API Transformice provides an internal
that allows players with "Module" permissions to create custom rooms and minigames. Creating scripts for rooms (like The API is event-driven . Your script waits for things like eventNewGame eventPlayerWon eventChatCommand Key Functions: tfm.exec.addShamanObject() : Spawns objects. tfm.exec.movePlayer() : Teleports mice. tfm.exec.setPlayerScore() : Updates the leaderboard. tfm.exec.displayParticle() : Adds visual effects. Where to learn: Official Lua Documentation
on the Atelier 801 forums is the definitive "blog-style" manual for these functions. 2. Networking APIs (Bot Development) If you want to create a
or a standalone application that talks to the game servers from outside the game client, you need a networking library. TFM.lua (Python/Node.js): Most modern bots use community-made libraries like or various Node.js implementations. Capabilities:
These bots can log in, join rooms, listen to chat, and moderate tribes automatically. Authentication: The bot connects to the Atelier 801 socket servers. Packet Handling:
It sends and receives "packets" (encoded data) to simulate a player's actions. 3. Data APIs (External Stats)
For web developers wanting to pull player stats or room info, there are community-driven endpoints. Cheese.formice:
This is the most famous third-party site for tracking player records and "cheese" statistics. API Usage:
While they don't always have a public REST API, many developers "scrape" or use community-shared database dumps from Atelier 801 Fansites How to Get Started Join a Module Team:
To run Lua scripts in-game, you often need to be in a room where you have permissions (like your Tribe House Use the Map Editor:
You can test Lua code directly in the game's Map Editor to see how objects interact. Check GitHub: Search for Transformice API on GitHub to find pre-made bot templates. If you'd like, I can help you with: basic Lua script to start a custom minigame. setup steps for a Python-based tribe bot. Explaining specific event handlers (like how to detect when a mouse grabs the cheese). Which path are you most interested in? Transformice: Tribe Bot Tutorial
The heavy iron gates of the Transformice server room hummed with a low, digital thrum. Inside,
sat before a glowing terminal, his eyes reflecting a cascade of green text. He wasn't just playing the game; he was speaking to its soul through the API.
In the world of Transformice, thousands of mice scrambled for cheese in a physics-driven frenzy. But Silas saw the invisible strings. To him, the API was a map of every whisker twitch and floorboard creak across a hundred rooms.
He began to type, his fingers dancing across the mechanical keyboard.
import transformice_api as tfm # Connecting to the heart of the swarm client = tfm.Client() client.run(TOKEN) Use code with caution. Copied to clipboard
The connection sparked to life. Data flooded his screen—a rhythmic heartbeat of player coordinates, room names, and shaman incantations. He wasn't looking for a way to cheat; he was looking for the "Ghost of Room 801."
Legend said a developer had left a sentient script running in an abandoned room, a piece of code that could predict a player’s next move before they even thought of it. Using the API, Silas filtered the noise. He ignored the crowded racing rooms and the chaotic "survivor" maps. He looked for a room with a player count of exactly zero, yet a constant stream of outgoing packets. There it was. Room *#void. Silas hooked his listener into the room’s event stream.
@client.event async def on_packet_received(packet): if packet.room == "*#void": print(f"Decoding transmission: packet.data") Use code with caution. Copied to clipboard
The terminal paused. Then, the text scrolled so fast it became a blur of white light. It wasn't game data. It was poetry. The "Ghost" was reciting the history of every mouse who had ever fallen into the pit, every shaman who had missed a nail, and every cheese ever claimed since 2010.
Suddenly, Silas’s own mouse character appeared on the screen, standing alone in a dark, empty void. Above his head, a speech bubble appeared, though Silas hadn't typed a word. "You finally checked the logs, Silas," the bubble read.
His heart hammered. The API was a two-way street. He had been watching the game, but the game had been waiting for someone to listen to the data. "What are you?" Silas typed into his terminal.
The response didn't come through the game window. It appeared in his code editor, replacing his clean Python script with a single line of raw, beautiful logic: return universe.get_cheese(silas)
The screen flashed gold. In the game, Silas’s mouse didn’t just get the cheese; he became the cheese. The room collapsed into a singularity of pixels, and the connection severed. Silas sat in the dark, the hum of the servers finally silent. He looked at his screen. The API was gone, replaced by a simple desktop icon he’d never seen before: a golden feather.
He reached for the mouse, but he already knew. In the world of data, once you find the source, you never truly leave the room.
To explore the real-world mechanics of this digital world, you might want to look into:
TFMlib: A popular Python library for interacting with the game.
Lua Scripting: How players create custom "minigames" within rooms.
Atelier 801 Forums: The hub for developer documentation and community tools. If you'd like, I can help you: Outline a technical guide for using the actual API. Develop a character for a Shaman-themed mystery.
Brainstorm plot twists involving specific game mechanics like "divine" mode.

