Transformice: Api
function eventChatCommand(name, command) if command == "!kill" then tfm.exec.killPlayer(name) tfm.exec.chatMessage("The API has smited you, " .. name) elseif command == "!tp me" then -- Teleport to the shaman local shaman = tfm.get.room.shaman() local pos = tfm.get.room.playerPosition(shaman) tfm.exec.movePlayer(name, pos.x, pos.y) end end Atelier 801 does not officially publish a REST API for third-party developers. However, the official website and launcher use several JSON endpoints. The community has reverse-engineered these.
if not profile_res.json().get('success'): return None player_id = profile_res.json()['player_id'] transformice api
{ "success": true, "player_id": 1234567, "nickname": "CheeseMaster", "registration_date": "2012-05-14", "is_vip": false } For retrieving total game stats. GET https://transformice.com/en/api/stats/player/[PLAYER_ID] function eventChatCommand(name, command) if command == "
# Step 2: Get Stats stats_url = f"https://transformice.com/en/api/stats/player/{player_id}" stats_res = requests.get(stats_url) The community has reverse-engineered these
Response (JSON):
If you are a streamer looking to let your chat control the game, a guild leader wanting to run statistics, or a developer building an external tool, understanding the Transformice API is your first step.