-
Notifications
You must be signed in to change notification settings - Fork 5
Developer Setup
This page is the starting point for anyone who wants to build a pack, contribute to EmoTracker, or help improve the community service. It covers the tools we recommend, how to wire up JSON schema validation in your editor, and where to learn the two languages you'll actually write code in: JSON (for the data files) and Lua (for pack scripts).
If you're a pack author: the rest of the Developers section walks through authoring each piece of a pack. Start here, then read Authoring Items and work your way through the sub-pages.
- Most of a pack is JSON. Items, locations, layouts, and maps are all JSON files placed at known paths inside the pack. Editor autocomplete and validation against the published JSON schema save enormous amounts of time — set this up first.
-
Logic and glue are Lua. EmoTracker exposes a
Trackerglobal to Lua scripts (and some other helpers) that let you register items, react to memory changes from autotracking, and update state procedurally. -
Everything lives on GitHub. The tracker app is in
EmoTracker-Community/EmoTracker; the JSON schemas and community package index are inEmoTracker-Community/EmoTracker-Service. Forks and pull requests are how we take contributions.
| Tool | Why |
|---|---|
| Visual Studio Code | The best editor for pack authoring — first-class JSON schema support, a good Lua extension, and integrated Git. |
| Git + GitHub | Version control is not optional. Fork the repos, branch for your work, and open PRs against the originals. |
| Sumneko Lua (VS Code extension) | Language server, diagnostics, definitions, and autocomplete for Lua. Strongly recommended. |
| JSON / built-in JSON support | VS Code ships with JSON support — you don't need a separate extension unless you want extras like schema previews. |
| Pillow (if you're working with Python tooling) | Used by some community scripts for image processing. Not required for pack authoring itself. |
EmoTracker publishes JSON schemas for the three main pack file types in the EmoTracker-Service/sdk/schema directory:
| Schema file | What it validates |
|---|---|
items.json |
Arrays of items (see Authoring Items) |
locations.json |
Arrays of locations and their sections |
layouts.json |
The tracker layout tree |
all.json |
Aggregate schema — matches any of the above |
Wiring these up in VS Code gives you autocomplete, inline validation of required fields, and hover documentation for every property — which is a huge quality-of-life upgrade when authoring packs.
In the root of your pack repository, create .vscode/settings.json and map the schemas to the file globs in your pack:
Adjust the fileMatch globs to whatever your pack actually uses. Many packs split items into several files like items/common.json, items/keys.json, etc., and the **/*.json pattern covers all of them.
If you work on several packs and want the schemas active everywhere, put the same json.schemas block into your VS Code user settings. The trade-off is that the globs are applied globally — using a more specific glob like **/items/**/*.json helps avoid false positives on unrelated projects.
If you want to test changes against a modified local copy of a schema, replace the "url" field with a "url" that uses the file:/// scheme, or use $schema inside the JSON file itself:
{
"$schema": "../../EmoTracker-Service/sdk/schema/items.json"
}This is handy when you're contributing to the schema itself and want both files to update in lockstep.
Open any items JSON file in VS Code and:
- Type
"type": "inside an item object — you should get a drop-down of the valid type values (toggle,progressive,consumable, etc.). - Hover a property name — the description from the schema should appear in a tooltip.
- Remove a required field — VS Code should underline the object in red with an explanation.
If none of that happens, the glob didn't match. Check Output → JSON Language Server in VS Code for errors.
Pack data files are plain JSON. If you've never worked with JSON:
- json.org — the original spec in a single page. Skim it once and you'll know the entire language.
- MDN: Working with JSON — a gentle introduction with examples.
- JSON Schema — the spec EmoTracker's schemas are written against. Only needed if you want to modify the schemas themselves, but useful for understanding why the existing ones are structured the way they are.
A few quick tips:
- Trailing commas and comments are not allowed in strict JSON. VS Code's JSON mode will flag them — some editors' "JSON with comments" modes allow comments, but EmoTracker's loaders don't.
- Always save as UTF-8 without a BOM.
- When in doubt, copy a similar item from an existing pack (the official ALttPR pack is a good reference) and modify it.
Pack scripting is Lua (currently Lua 5.3/5.4 semantics via the embedded runtime). If you've never written Lua before, pick whichever resource matches your style:
- Programming in Lua (4th edition) — the canonical book, written by Lua's designer. Older editions are free online.
- Lua 5.4 Reference Manual — the definitive language reference. Terse but complete.
- Learn Lua in Y Minutes — a one-page whirlwind tour if you already know other scripting languages.
- Tutorialspoint Lua Tutorial — longer, more beginner-friendly walkthrough.
What you actually need for pack authoring is:
- Tables (both as arrays and as dictionaries)
- Functions and closures
- String manipulation
- The
require-like convention EmoTracker uses for loading other Lua files in the pack
You don't need OOP, coroutines, metatables, or the C API.
A typical pack looks something like this:
my_pack/
├── manifest.json # Pack metadata — required, at the root
├── scripts/
│ └── init.lua # Entry point — EmoTracker runs this when the pack loads
├── items/
│ ├── common.json # Items data files, loaded by scripts/init.lua
│ └── keys.json
├── locations/
│ └── ... # Location data files
├── layouts/
│ └── ... # Layout data files
└── images/ # Pack's icon/image assets referenced from JSON
-
manifest.jsonis the only file EmoTracker strictly requires at a known path — it tells EmoTracker the pack's name, game, variants, etc. See Authoring a Manifest for the full reference. - Everything else is loaded by your Lua code via
Tracker:AddItems("items/common.json"),Tracker:AddLocations(...),Tracker:AddLayouts(...), etc. - Files are always referenced relative to the pack root in the JSON paths you pass to those functions.
- EmoTracker Discord — the fastest way to get an answer, especially for pack-specific questions. There's a developer channel where other pack authors hang out.
- Existing packs on GitHub — the package repositories list links to dozens of community packs. Reading a working pack that targets a similar game is often the fastest way to figure out how to structure yours.
-
The EmoTracker source —
EmoTracker-Community/EmoTrackeron theavaloniabranch is authoritative. When a docs page disagrees with the code, the code wins — please open an issue so we can fix the docs.
-
Authoring a Manifest — the
manifest.jsonreference, including the JSON schema you can wire into VS Code - Authoring Items — the items JSON format, with links to per-type sub-pages
-
Authoring — Image Filters — the
img_mods/disabled_img_modsfilter spec used across all item types - Hosting a Package Repository — once your pack is ready, publish it
- Service Backend Reference — technical reference for the service JSON files
- Installation
- Installing and Loading Packages
- Item Types and Mouse Controls
- Map Locations
- Map Location Colors
- Saving and Loading
- Multi-Tab and Window
- Autotracking
- NDI Broadcasting
- Twitch Chat HUD
- Note Taking
- Voice Control
- Keyboard Shortcuts
{ "json.schemas": [ { "fileMatch": [ "items.json", "items/**/*.json" ], "url": "https://raw.githubusercontent.com/EmoTracker-Community/EmoTracker-Service/main/sdk/schema/items.json" }, { "fileMatch": [ "locations.json", "locations/**/*.json" ], "url": "https://raw.githubusercontent.com/EmoTracker-Community/EmoTracker-Service/main/sdk/schema/locations.json" }, { "fileMatch": [ "layouts.json", "layouts/**/*.json" ], "url": "https://raw.githubusercontent.com/EmoTracker-Community/EmoTracker-Service/main/sdk/schema/layouts.json" } ] }