Make your own TFS mod
A mod is a little file that changes the game: new paint, a sunset, rain, rings to fly through, a funny radio voice. You can make one in 5 minutes.
{
"id": "my-first-mod",
"name": "My First Mod",
"by": "me",
"time": { "hour": 6 },
"livery": { "paint": "#33cc66" }
}
That makes it sunrise and paints every airplane green. Turn it off again with TURN OFF, or the orange ALL OFF button while you fly.1. What a mod is
A mod is one file called mod.json. JSON is a way of writing lists of things: names in "quotes", then a :, then the value. Things are split with commas. Every mod needs:
| Part | What it is | Example |
|---|---|---|
id | a short name with small letters, numbers and dashes. It is also the mod's link name. | "sky-party" |
name | the name people see | "Sky Party" |
by | who made it (use a nickname, not your real name) | "PilotKid" |
blurb | one sentence about it | "Pink sky and balloons!" |
Then add any of the parts below. Before a mod turns on, TFS shows the player everything it can do, and they can say no.
2. The parts you can add
🎨 Paint (livery)
"livery": {
"aircraft": "*",
"paint": "#e0402a",
"parts": [ { "match": "tail|rudder", "color": "#ffffff" } ]
}
"*" means every airplane, or list some: ["us.c172sp", "us.b737"]. paint colors the light painted parts (not windows, tyres or the cockpit). parts colors pieces whose name has one of the words in match (split words with |). A part can also have "texture": "my-picture.png" next to your mod.json. Colors are written like #rrggbb (try a color picker online).
✈️ Your own airplane version
"variants": [ {
"id": "racer", "name": "Sunset Racer", "base": "us.c172sp",
"livery": { "paint": "#ff5a1f" },
"flight": { "power": 1.5, "roll": 1.4 }
} ]
A version is built on a hangar airplane, so it keeps that airplane's real cockpit. It shows under the Mods screen with a FLY IT button and a MOD tag. Hangar airplanes: us.c172sp, us.c172kr, gb.spitfire-mk9, us.p51d-max, su.an26, ca.q400, fr.a320, us.b737, us.b787, fr.a380, fr.concorde, us.f35b.
⚙️ How airplanes fly
"flight": { "aircraft": "*", "power": 2, "mass": 0.8, "drag": 0.7, "lift": 1.2, "roll": 1.5 }
These multiply the real numbers: 2 = twice as much. Limits: power 0.25–3, mass 0.5–2, drag 0.3–3, lift 0.7–1.5, roll 0.5–2.5.
🕒 Time of day
"time": { "hour": 18.8 }
Hours from 0 to 24 (18.5 is half past six in the evening), as the sun is wherever you fly.
🌦️ Weather and light
"weather": { "coverage": 0.9, "cloudBaseFt": 1200, "cloudThicknessFt": 3000,
"windFromDeg": 130, "windKt": 18, "precip": "rain", "precipIntensity": 0.8, "gloom": 0.6 }
coverage 0 (clear) to 1 (full). precip is "rain", "snow" or "none". gloom 0 to 0.72 makes the sky darker and greyer.
🧱 Objects and landmarks
"scenery": [ { "id": "big-ball", "shape": "ball", "lat": 40.6892, "lon": -74.0445,
"altFt": 500, "sizeM": 80, "color": "#ff33aa", "glow": true } ]
Shapes: box, ball, cone, cylinder, ring (a hoop to fly through), arrow. Or a 3D model: "model": "statue.glb". Find lat and lon by right-clicking a place in an online map. altFt is how high above the ground.
🏅 Challenges
"challenges": [ { "id": "storm-maho", "name": "Storm over Maho", "kind": "landing", "fromNm": 5,
"airport": { "icao": "TNCM", "name": "Princess Juliana", "elevationM": 4 },
"rwy": { "id": "10", "headingDeg": 100, "lengthM": 2300, "lat": 18.041, "lon": -63.1089 },
"wind": { "fromDeg": 130, "kt": 18 } } ]
The runway's lat/lon is where it starts. Mod challenges show on the Mods screen. Their scores say MODDED and do not go on the leaderboards, so everything stays fair.
📟 Boxes on the screen (HUD)
"hud": [ { "id": "speed", "label": "SPEED", "text": "{speedKt} kt" } ]
Words in { } are filled in: speedKt, altFt, aglFt (height above the ground), headingDeg, vsFpm, hour.
🎙️ ATC voices
"atcVoice": { "atc": { "pitch": 2, "rate": 1.3 }, "say": { "cleared": "totally cleared" } }
Pitch 0.1–2, rate (speed) 0.5–1.8, for atc, pilot or copilot. say swaps words in what is spoken.
⌨️ Keys
"keys": [ { "key": "Shift+1", "label": "Sunrise", "do": { "time": 6.3 } },
{ "key": "Shift+2", "label": "Snow!", "do": { "weather": { "precip": "snow" } } },
{ "key": "Shift+3", "do": { "toast": "Hello pilot!" } } ]
Mods only get Shift + 0 to Shift + 9, so they never take a flying key.
3. Scripts: make things happen
A script is a little JavaScript program that reacts to the flight. Put it in a file next to your mod.json:
"script": { "file": "script.js", "uses": ["scenery", "hud", "toast"] }
uses lists what your script wants to do (the player sees it). Here is a tiny script:
tfs.on('takeoff', (p) => tfs.toast('Wheels up at ' + p.speedKt + ' knots!'));
tfs.on('landing', (l) => tfs.toast(l.fpm < 200 ? 'Butter!' : 'Thud.'));
tfs.on('frame', (p) => tfs.hud('alt', Math.round(p.altFt) + ' ft', 'HEIGHT'));
| Your script can | Needs in uses |
|---|---|
tfs.on('start' | 'frame' | 'takeoff' | 'landing' | 'crash' | 'key' | 'aircraft', fn) | nothing |
tfs.player → lat, lon, altFt, aglFt, speedKt, headingDeg, vsFpm, onGround, crashed, gearDown, throttle, aircraft | nothing |
tfs.toast("text") | (always allowed) |
tfs.hud(id, text, label) | hud |
tfs.place(id, { shape, lat, lon, altFt, sizeM, color, glow }), tfs.remove(id), tfs.clearScenery() | scenery |
tfs.setTime(hour) | time |
tfs.setWeather({ … }) | weather |
tfs.setFlight({ power: 2 }) | flight |
tfs.distanceM(a, b), tfs.ahead(place, headingDeg, metres), tfs.memory | nothing (helpers) |
A key event comes from a key in your mod.json with "do": { "event": "boost" }; your script gets { key, name: "boost" }. frame comes 5 times a second.
See the full Ring Race script: /mods/ring-race/script.js.
tfs. If a script freezes or keeps crashing, TFS turns the mod off and the game keeps going. If something is ever weird, open TFS with ?mods=off at the end of the address and no mods turn on.4. Share your mod
- Put your
mod.json(and pictures, models or script) on GitHub. A free gist works too: gist.github.com. - Open the file and press Raw. Copy that address (it starts with
https://raw.githubusercontent.com/orhttps://gist.githubusercontent.com/). - In TFS, paste it in the Mods box and press ADD MOD. Then press SHARE LINK to copy a link for friends, like
tfs-vr.vercel.app/?mod=https://raw.githubusercontent.com/…/mod.json.
Mod files can come from this site, GitHub (raw files and gists) and jsDelivr. Use only pictures and models you made or that are free to share.
5. The example mods
- sunset-red: paint plus an airplane version
- golden-hour: time, weather, a HUD box and keys
- stormy-night: storm weather plus a challenge
- ring-race + script.js: a scripted game
- chipmunk-atc: a voice pack
Try one: tfs-vr.vercel.app/?mod=ring-race. If TFS says something is wrong with your mod, it tells you which part. Fix it and press CHECK IT again. Have fun!