Repository navigation
Team
First off β thank you. Every bug report, feature request, mod, and pull request makes the client better for everyone.
This page explains how to contribute, what we expect, and how to get your changes merged.
Please read:
- Rules & Fair Play Policy β the hard line on cheating
- How It Began β the project's philosophy
- Roadmap β what we're working on right now
Cheating contributions are permanently banned. No exceptions. If your PR enables automation, ESP, packet forgery, or anything that breaks fair play, it will be closed and you will be blocked from the repo.
You don't have to write code to help.
Open an Issue with the bug label. Include:
- Client version (bottom-left of the chrome bar)
- Browser + OS
- Steps to reproduce
- Console output (any
[ModLoader]lines) - Screenshot if visual
Well-documented bugs get fixed fast.
Open an Issue with the enhancement label. Describe:
- What the feature does
- Why it improves the client
- Any reference screenshots, mockups, or prior art
Features with the most π reactions get prioritized.
Typos, missing info, unclear explanations β the wiki lives in the repo's Wiki tab. You can suggest edits by opening a Discussion.
SVG icons, UI mockups, animation ideas, theme palettes. Post them in Discussions with the design tag.
Menu sounds, click feedback, ambient loops. Post in Discussions with the audio tag.
Try Modatorial.io on different browsers and OSes. Report anything that breaks.
The easiest way to contribute code is to write a mod. See the Mod Development Guide in the repo root.
Short version:
- Create a folder in
mods/<your-mod-id>/ - Add three files:
-
mod.jsonβ metadata -
main.jsβ mod logic -
icon.pngβ optional cover
-
- Register the folder name in
mods/manifest.json - Test β open a PR
The window.TerritorialMods API gives you:
-
api.on(event, fn)β pub/sub events -
api.addHook(name, fn)β engine-level hooks (netSend,netRecv,preUpdate,postUpdate,preRender,postRender,keyDown,keyUp,mouseDown,mouseUp,mouseMove) -
api.showToast(msg)β on-screen toast -
api.addButton(text, onClick)β floating button -
api.readModFile(mod, 'assets/foo.png', 'image')β read files from your own folder -
api.setMenuBackground((ctx, w, h) => {})β draw behind the menu UI
Modatorial.io's client code lives in:
-
modLoader.jsβ the mod loader, client chrome, layout engine, patchers -
css/client.cssβ client styling and animations -
css/splash.cssβ splash screen -
index.htmlβ splash -
game.htmlβ the game wrapper with__TT__internals expose line
- Plain JavaScript, no build step, no bundler
- 2-space indentation
- Single quotes for strings (except in HTML/CSS)
- Semicolons always
- Prefer
const/letovervar - Prefer early returns over deep nesting
- Comment why, not what β the code says what it does; comments explain intent
- Keep functions small β under ~50 lines where possible
-
camelCasefor variables and functions -
SCREAMING_SNAKE_CASEfor module constants -
PascalCasefor classes (rare in this codebase) - Prefix private helpers with
_if there's a real risk of collision
Every module logs through the loader's logger so users can grep:
[ModLoader] your message here