Every map in Transformice has a unique identifier (e.g., @200000 ). Developers can use map APIs to fetch XML data, which dictates the physics, ground structures, and spawn points of a map. This is incredibly useful for building external map viewers or editors. Technical Implementation: How to Connect
: Any custom script loaded by a player in their tribe house using the /lua command. Getting Started for Developers
(available upon request – over 200 commands exist, including tribe management, shop purchases, and event-specific flags)
For real-time data—such as creating an automated bot that sits in a room, counts cheese gathered, or reads live chat—developers must interface directly with the Transformice game servers. This involves establishing a TCP socket connection and encoding/decoding the game's custom packet protocol. Community-Maintained Databases & REST APIs transformice api
When building applications that interface with Transformice data, keeping your infrastructure optimized prevents your servers from being flagged.
-- Initialize player data table playerData = {} -- Event triggered when a player gets cheese function eventPlayerGetCheese(playerName, timeElapsed) playerData[playerName] = timeElapsed / 100 print(playerName .. " got cheese in " .. playerData[playerName] .. " seconds!") end -- Event triggered when a player enters the hole function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceCheese) print(playerName .. " scored! Total time: " .. timeElapsed / 100 .. "s") end Use code with caution. 5. Practical Use Cases for Developers
The official web API provided by Atelier 801 focuses primarily on forum data, player verification, and cross-game statistics. It is used to verify that a user owns a specific Transformice account or to fetch basic public profile summaries. Direct Game Socket Connection Every map in Transformice has a unique identifier (e
The Lua scripting language is at the heart of this system, allowing players to code everything from simple utilities to complex multiplayer experiences within their tribe houses.
Never hardcode your main account credentials into public open-source repositories. Use environment variables ( .env ) to store your passwords and API tokens securely.
The Atelier 801 servers employ strict anti-DDoS and rate-limiting measures. If your script sends too many packet requests or scrapes the forums too quickly, the server will temporarily or permanently block your IP address. Always implement delays (throttling) between requests. Account Security Technical Implementation: How to Connect : Any custom
The Transformice API ecosystem is surprisingly rich and accessible, offering official and community-driven paths for developers of all skill levels. The official Module API (Lua) is the best starting point for minigame creators, while experienced programmers can leverage Transfromage, aiotfm, caseus, or cheesy.js for bot development and server integration.
| | Key Features | Example | |--------------|------------------|--------------| | Events | eventChatCommand , eventKeyboard , eventMouse , eventNewGame , eventLoop , eventPlayerDied , eventPlayerGetCheese , eventPlayerWon , eventSummoningStart | Trigger on player actions | | Methods | tfm.exec.addImage , tfm.exec.addShamanObject , tfm.exec.giveCheese , tfm.exec.killPlayer , tfm.exec.movePlayer , tfm.exec.setGameTime , tfm.exec.setMap | Control game state | | Utilities | print() (debugging), file I/O, map XML loading | Manage game data |
If you are building a socket-based bot, you must create a dedicated in-game account. Ensure your bot complies with the official terms of service; malicious automation or spamming will result in a permanent IP and account ban. 3. Top Open-Source Libraries and Frameworks
The data collected from these endpoints can be turned into valuable community utilities.