Skip to content
Pakabll13 edited this page Oct 10, 2026 · 4 revisions

🀝 Contributing to Modatorial.io

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.


πŸ“œ Before you start

Please read:

  1. Rules & Fair Play Policy β€” the hard line on cheating
  2. How It Began β€” the project's philosophy
  3. 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.


πŸ—ΊοΈ Ways to Contribute

You don't have to write code to help.

πŸ› Report a bug

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.

πŸ’‘ Suggest a feature

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.

πŸ“– Improve the wiki

Typos, missing info, unclear explanations β€” the wiki lives in the repo's Wiki tab. You can suggest edits by opening a Discussion.

🎨 Design

SVG icons, UI mockups, animation ideas, theme palettes. Post them in Discussions with the design tag.

🎧 Audio

Menu sounds, click feedback, ambient loops. Post in Discussions with the audio tag.

πŸ§ͺ Test

Try Modatorial.io on different browsers and OSes. Report anything that breaks.


πŸ› οΈ Writing a Mod

The easiest way to contribute code is to write a mod. See the Mod Development Guide in the repo root.

Short version:

  1. Create a folder in mods/<your-mod-id>/
  2. Add three files:
    • mod.json β€” metadata
    • main.js β€” mod logic
    • icon.png β€” optional cover
  3. Register the folder name in mods/manifest.json
  4. 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

πŸ’» Contributing to the Client

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

Code style

  • Plain JavaScript, no build step, no bundler
  • 2-space indentation
  • Single quotes for strings (except in HTML/CSS)
  • Semicolons always
  • Prefer const/let over var
  • 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

Naming

  • camelCase for variables and functions
  • SCREAMING_SNAKE_CASE for module constants
  • PascalCase for classes (rare in this codebase)
  • Prefix private helpers with _ if there's a real risk of collision

Logging

Every module logs through the loader's logger so users can grep:

[ModLoader] your message here

Clone this wiki locally