Making mods
Mod packages let you add new circuits, cars, liveries, and physics variants to LibreCorsa without modifying the game’s source code. Mods are played in the LibreCorsa desktop app (the offline launcher, launcher/README.md): drop an unpacked package into Documents/LibreCorsa/mods/, or import a .zip or folder in the game’s Mods panel (or get one there from a catalogue). The game on librecorsa.org takes no mods: like other sims, mods are files on the player’s own computer. When you make mods in a clone, the dev server (npm run dev) has the Mods panel too.
Data only, never code: Because LibreCorsa’s browser origin stores your driver identity key and saved data, mod packages are strictly data-only. Scripts, custom shaders, and HTML are never accepted or executed.
How mods behave in-game and online
Section titled “How mods behave in-game and online”- Leaderboards and weekly challenges: Laps driven on a mod circuit or in a mod car stay strictly local and are never submitted to online lap boards or the weekly challenge. A mod livery applied to a built-in car only changes textures, so those laps post normally.
- Local bests and ghosts: Mod circuits save personal bests and ghosts normally. Mod cars keep lap times for the current session only, because they share their base vehicle model’s ID, they start fresh each session and never overwrite the base car’s saved bests.
- Private multiplayer rooms: Hosts can run mod circuits; the room advertises the package ID and its content hash. Guests who do not have the exact matching version cannot ready up and sit out the race.
- Car visibility online: Remote clients render cars strictly by built-in vehicle model ID. In scheduled open races, any mod car is swapped for its base built-in car. In private rooms (including qualifying), any mod car with custom physics is likewise swapped for its base car. Weekly challenges always run in the built-in car.
Recovering from a broken mod
Section titled “Recovering from a broken mod”If a corrupted or heavy package prevents the game from starting, launch with ?mods=off (for example, /play?mods=off). Installed packages still appear in the Mods panel without loading their content, allowing you to disable or remove the faulty package and click the panel’s restart button to reload with mods enabled.
Package layout and limits
Section titled “Package layout and limits”A mod package is a directory containing mod.json at its root alongside the assets it references:
jdoe.monza-66/ mod.json README.md optional documentation for players monza/track_data.json circuit data generated by scripts/tracks monza/monza.glb circuit geometry monza/scenery/trees.glb scenery referenced by track_data.json skins/blue/… livery for a built-in car cars/gt-x/gt-x.glb custom car body cars/gt-x/thumb.webp car browser thumbnail (optional) cars/gt-x/audio/… custom sound bank (optional) cars/gt-x/skins/red/… liveries for the custom carPackage constraints enforced by the importer:
- Allowed file types:
.glb,.gltf,.bin,.json,.webp,.png,.jpg,.jpeg,.ktx2,.ogg,.wav,.mp3,.txt, and.md. - Paths: Must be relative, use forward slashes (
/), and contain no..traversal segments. - Case sensitivity: No two files may differ only in letter casing (to prevent collisions on Windows and macOS).
- No symlinks: Symbolic links are not followed; include actual files inside the package.
- Size limits: Up to
20,000files and2 GBuncompressed per package (whether imported as a.zipor a folder).
mod.json reference
Section titled “mod.json reference”{ "format": 1, "id": "jdoe.monza-66", "name": "Monza 1966", "version": "1.0.0", "description": "The 1966 road course with the banking.", "credit": { "author": "J. Doe", "url": "https://example.org/monza-66", "license": "CC BY-NC-SA 4.0", "licenseUrl": "https://creativecommons.org/licenses/by-nc-sa/4.0/" }, "tracks": [ { "id": "full", "name": "Autodromo di Monza", "layout": "1966 with banking", "country": "Italy", "city": "Monza", "lengthM": 10000, "turns": 9, "direction": "clockwise", "data": "monza/track_data.json" } ], "skins": [ { "car": "amg-gt3", "id": "blue", "name": "#7 Blue", "swatch": ["#1040c0", "#ffffff"] } ], "cars": [ { "id": "gt-x", "title": "GT X", "sub": "2024 · 4.0 L V8 · rear-wheel drive", "badge": "GT X", "classId": "gt3", "year": 2024, "physics": "amg-gt3", "model": "cars/gt-x/gt-x.glb", "sound": { "dir": "cars/gt-x/audio", "limiterRpm": 7500 }, "skins": [ { "id": "factory", "name": "Factory", "swatch": ["#111111", "#d0d0d0"] }, { "id": "red", "name": "Red", "swatch": ["#c00000", "#111111"] } ] } ]}Core fields
Section titled “Core fields”id: Uses the formatauthor.name, containing only lowercase letters, digits,-, and_, with each segment starting with a letter or digit (authormax 16 characters,namemax 24 characters). This also serves as the folder name inmods/. Never change a package’sidacross releases: LibreCorsa treats a changed ID as a completely separate package.version: Freeform string up to 32 characters (e.g.,1.0.0or2024-rc2). Displayed in the Mods panel and in multiplayer rooms when a guest has a version mismatch.- Internal item IDs (
tracks,cars,skins): Lowercase letters, digits,-, and_, starting with a letter or digit, up to 16 characters. At runtime, LibreCorsa namespaces every entry asmod:<package>/<id>, preventing collisions with built-in content or other mods. credit: Requiresauthorandlicense;url,authorUrl,licenseUrl, andnoteare optional. All URLs must usehttps://. Credits appear on each circuit and car (and in the main credits list for circuits). Individual circuits or cars can overridecreditwhen created by a different author.
Circuits (tracks)
Section titled “Circuits (tracks)”Point data at a track_data.json built by the track pipeline (see Porting circuits). Inside track_data.json, both metadata.mesh.url and metadata.mesh.scenery must use package-relative .glb paths (such as "monza/monza.glb") rather than /tracks/… URLs. External URLs, built-in site paths, cross-package references, or .gltf files (which can reference external resources) are rejected.
All other circuit data (surfaces, kerbs, DRS zones, racing lines, AI plans, and pit lanes) works identically to built-in circuits. Optional manifest fields include type (permanent, street, oval, or hillclimb) and defaultTimeOfDay (dawn, morning, noon, afternoon, golden_hour, dusk, or night).
Liveries for built-in cars (skins)
Section titled “Liveries for built-in cars (skins)”A livery is either a painted picture projected onto the car (atlas) or a set of texture files swapped onto the model’s materials. Which one depends on the car:
- Painted picture (
atlas, 5 cars):lc26(LC26 Prototype),lc25(LC25 Prototype),amg-gt3(Mercedes-AMG GT3 Evo),bmw-m4-gt3(BMW M4 GT3 Evo), andlc-lmdh(LC-LMDH). Painting liveries has each car’s 2048 × 2048 guide and overlay templates and how to paint one. - Texture files:
mtr-496r,nissan-r33-jgtc,nissan-r32-jtcc,bmw-m1-procar,vw-scirocco-gtx,chaparral-2d,chaparral-2d-67, andporsche-934-rsr(plusliana,amg-gt3,bmw-m4-gt3, andlc-lmdhfor older manifests, though those models have no texture slots to swap, so a texture-file livery leaves them in their factory paint).
For both kinds:
- Each entry requires
car,id,name, and aswatcharray of 2 or 3"#rrggbb"hex colours shown in the livery picker. - Its files live in
skins/<id>/by default (or a customdirpath), with an optionalthumb.webpthere for a livery picker preview.
For a painted picture:
atlasnames the picture inside the livery’s folder (.png,.webp,.jpg, or.jpeg), painted on the car’s template. It must be square, from 1024 to 4096 pixels;checkwarns if it isn’t 2048 × 2048, the size the game is made for.atlascan’t be combined withfiles, and the F1 cars take only this kind.finish(optional) is the paint’s finish:gloss(the default),satin,matte,metallic, orchrome.- An F1 livery shows up in that car’s livery picker under Installed mods; a livery made for
lc26doesn’t appear onlc25, or the other way round.
For texture files:
- The files must use the model’s exact texture filenames from
public/cars/<car>/skins/<skin>/. - Use
fileswhen overriding only a subset of textures (every listed file must exist in the folder; omitted slots keep the model’s default textures), andvariantto select a body variant on cars that support them (such as"sebring"onchaparral-2dandchaparral-2d-67).
Cars (cars)
Section titled “Cars (cars)”A mod car pairs a custom 3D body and audio bank with one of LibreCorsa’s built-in vehicle physics models (physics): lc26, lc25, f12026-car, amg-gt3, liana, mtr-496r, lc-lmdh, nissan-r33-jgtc, nissan-r32-jtcc, bmw-m1-procar, vw-scirocco-gtx, chaparral-2d, chaparral-2d-67, or porsche-934-rsr. By default, it inherits that base model’s handling, garage setup ranges, tyres, and AI.
model: Path to a GLB matching LibreCorsa’s car rig.scripts/cars/port_ac_car.pygenerates compatible models (see Porting cars).bodyPlan: Optional barrier-height outline polygon so wall collisions match your custom bodywork instead of the base car’s shape. Generate one withscripts/cars/measure-car-plans.ts.sound: Either a package-local audio bank with its recorded rev limiter ({ "dir": "cars/gt-x/audio", "limiterRpm": 7500 }) or a reference to any built-in car’s audio, includinglc26({ "car": "amg-gt3" }). In either case, the sound bank automatically scales to the car’s active rev limiter.skins: The first entry describes the default paint baked into the GLB; subsequent entries are file-based liveries stored in<model folder>/skins/<id>/by default.classId: One off1,gt3,proto,classic, orroad. Together withyear, this controls menu placement and, forf1cars, determines whether DRS or 2026 Overtake Mode rules apply.
Custom sound bank format
Section titled “Custom sound bank format”When a mod car uses its own audio ("sound": { "dir": "cars/gt-x/audio", "limiterRpm": 7500 }), LibreCorsa loads a multi-grid Web Audio sound bank (src/lib/sim/lc26-audio.ts) from sound.dir. The folder holds a manifest.json alongside the audio files it names:
cars/gt-x/audio/ manifest.json engine_int_on_2000.ogg interior on-load RPM anchor loops engine_int_on_4500.ogg engine_int_on_7500.ogg engine_int_off_2000.ogg interior off-load (overrun) RPM anchor loops engine_int_off_4500.ogg engine_int_off_7500.ogg engine_ext_on_2000.ogg exterior on-load RPM anchor loops … trans_on_160.ogg optional transmission whine loops trans_off_160.ogg turbo_on_16.ogg optional turbo spool loops turbo_off_16.ogg oneshot_gear_up.ogg optional shift, backfire, blow-off & limiter one-shots oneshot_gear_down.ogg oneshot_shift_cut.ogg oneshot_limiter.ogg oneshot_backfire_int_1.ogg oneshot_backfire_ext_1.ogg- Supported audio formats:
.ogg(Ogg Vorbis, used by all built-in banks for small file size; 48 kHz recommended),.wav, and.mp3. All files are decoded through the browser’s Web AudiodecodeAudioData. - Filenames: The loader reads every filename from
manifest.json(any safe relative filename inside the audio folder works); the built-in convention (scripts/audio/port_ac_bank.py) isengine_<int|ext>_<on|off>_<rpm>.ogg,trans_<on|off>_<kmh>.ogg,turbo_<on|off>_<boost>.ogg, andoneshot_<role>[_<n>].ogg. - Required
manifest.jsonfields:sampleRate(e.g.48000) andloopSeconds(typically2.0–2.4s of seamless equal-power crossfaded audio).engine.intandengine.ext: both arrays are required and must be non-empty (if either is absent, or any loop in the active camera view fails to decode, the bank falls back to the built-in engine audio). Each entry has{ "file", "layer": "on" | "off", "rpm", "channels": 1 | 2, "rms" }. Neighbouring RPM anchors are crossfaded with equal-power weights and pitched continuously from0.75 × minRpmup tomax(1.35 × maxRpm, limiterRpm × 1.05), so your lowest RPM anchor covers idle and low revs.
- Optional
manifest.jsonsections:throttleCurve:{ "ext": [[0, 0], …, [1, 1]], "int": [[0, 0], …, [1, 1]] }mapping effective throttle0..1to theon/offblend weight (defaults to linear when omitted).turbo: array of{ "file", "layer": "on" | "off", "boost", "channels", "rms" }, indexed by gauge boost in bar.transmission: array of{ "file", "layer": "on" | "off", "drivetrainSpeed", "channels", "rms" }, indexed by road speed in km/h. Add adrivelineobject (kmhPerRadS,torqueRefNm,coastTorqueRefNm,floor,gain) to drive pitch and load from the physics driveshafts instead of vehicle speed.oneshots: array of{ "file", "role", "channels", "seconds", "peak" }. Multiple entries with the sameroleare picked at random without repeating back-to-back. Supported roles:gear_up,gear_down,shift_cut: played on forward gear changes (skipped whenshift.styleis"manual").limiter: retriggered everylimiterRetriggerSseconds (default0.9) while held within 60 rpm oflimiterRpmabove 90% throttle.blowoff: played on throttle lift when gauge boost exceeds0.8bar.backfire_int,backfire_ext,pop_ext: played on throttle lifts, downshift blips, and coasting crackles abovelift.popMinRpm/lift.crackleMinRpm(pop_extfalls back tobackfire_extif omitted).
mgu:{ "file", "channels", "rms", "baseRpm", "fullKw", "gain" }for hybrid / electric motor whine.- Raw ambient / assist loops:
skid({ "int"?, "ext"? }),tractionControl,wind,tyreRolling, andbodywork({ "file", "channels", "rms" }). Any omitted loop leaves LibreCorsa’s built-in procedural layer active. - Mixing & shift tuning:
shift({ "style": "sequential" | "manual", "clutchS"?, "cutS"? }),lift({ "popMinRpm", "crackleMinRpm", "downshiftPopChance"? }),limiterRetriggerS,loadFilter({ "coastHz", "loadHz", "tauS"? }), andviewTone({ "int"?, "ext"? }withpeakHz,peakDb,peakQ,shelfHz,shelfDb).
Minimal manifest.json example:
{ "sampleRate": 48000, "loopSeconds": 2.4, "engine": { "ext": [ { "file": "engine_ext_on_2500.ogg", "layer": "on", "rpm": 2500, "channels": 1, "rms": 0.16 }, { "file": "engine_ext_on_5000.ogg", "layer": "on", "rpm": 5000, "channels": 2, "rms": 0.19 }, { "file": "engine_ext_on_7500.ogg", "layer": "on", "rpm": 7500, "channels": 2, "rms": 0.22 }, { "file": "engine_ext_off_2500.ogg", "layer": "off", "rpm": 2500, "channels": 1, "rms": 0.12 }, { "file": "engine_ext_off_5000.ogg", "layer": "off", "rpm": 5000, "channels": 2, "rms": 0.15 }, { "file": "engine_ext_off_7500.ogg", "layer": "off", "rpm": 7500, "channels": 2, "rms": 0.17 } ], "int": [ { "file": "engine_int_on_2500.ogg", "layer": "on", "rpm": 2500, "channels": 2, "rms": 0.16 }, { "file": "engine_int_on_5000.ogg", "layer": "on", "rpm": 5000, "channels": 2, "rms": 0.19 }, { "file": "engine_int_on_7500.ogg", "layer": "on", "rpm": 7500, "channels": 2, "rms": 0.22 }, { "file": "engine_int_off_2500.ogg", "layer": "off", "rpm": 2500, "channels": 2, "rms": 0.12 }, { "file": "engine_int_off_5000.ogg", "layer": "off", "rpm": 5000, "channels": 2, "rms": 0.15 }, { "file": "engine_int_off_7500.ogg", "layer": "off", "rpm": 7500, "channels": 2, "rms": 0.17 } ] }, "turbo": [], "transmission": [ { "file": "trans_on_160.ogg", "layer": "on", "drivetrainSpeed": 160, "channels": 1, "rms": 0.04 }, { "file": "trans_off_160.ogg", "layer": "off", "drivetrainSpeed": 160, "channels": 1, "rms": 0.03 } ], "oneshots": [ { "file": "oneshot_gear_up.ogg", "role": "gear_up", "channels": 1, "seconds": 0.15, "peak": 0.76 }, { "file": "oneshot_gear_down.ogg", "role": "gear_down", "channels": 1, "seconds": 0.20, "peak": 0.75 }, { "file": "oneshot_limiter.ogg", "role": "limiter", "channels": 1, "seconds": 0.80, "peak": 0.78 } ], "throttleCurve": { "ext": [[0.0, 0.0], [0.25, 0.55], [0.6, 0.88], [1.0, 1.0]], "int": [[0.0, 0.0], [0.25, 0.58], [0.6, 0.90], [1.0, 1.0]] }, "lift": { "popMinRpm": 5200, "crackleMinRpm": 5600, "downshiftPopChance": 0.45 }, "limiterRetriggerS": 0.85}- How
limiterRpmscales pitch:sound.limiterRpminmod.json(valid from1000to25000) records the top rev limiter of the audio bank itself. At runtime (src/lib/sim/CarAudio.ts), LibreCorsa scales the live engine RPM bysound.limiterRpm / physicsLimiterRpmbefore feeding it to the bank, wherephysicsLimiterRpmis your car’s active physics redline (config.gearbox.gears.redline_rpm, or the base model’s limiter). That ensures the recording sweeps its full RPM grid and hits itslimiterone-shot right at the physics rev limiter, even if the bank was recorded for a different redline. The same scaling applies when borrowing a built-in car’s sound with{ "car": "<id>" }. - Converting FMOD banks: In a clone of the repository,
scripts/audio/port_ac_bank.pydecodes Assetto Corsa FMOD.bank(FSB5) files directly into this folder layout andmanifest.jsonformat.
Custom physics patches
Section titled “Custom physics patches”Instead of inheriting a base model unchanged, a car can apply a partial physics override:
"physics": { "base": "amg-gt3", "file": "cars/gt-x/physics.json" }The patch file contains only the fields you want to override from the base model’s profile:
{ "format": 1, "profile": { "config": { "chassis": { "totalMassKg": 1180, "frontWeightFraction": 0.46 }, "gearbox": { "gears": { "redline_rpm": 8200 } } }, "turbo": true }}The patched profile runs in the exact same 500 Hz simulation worker as built-in cars, matching the structure of *_SIM_PROFILE and *Config.ts under src/lib/sim/*/. Patches are validated against strict safety invariants (src/lib/mods/mod-physics.ts):
- Existing keys and types only: Every patched key must already exist in the base profile and keep the same value type (numbers stay numbers, arrays stay arrays, objects merge recursively).
- Positive divisor guardrails: Any parameter the simulation divides by must remain strictly greater than
0when the base value is positive, including masses, inertias (the engine’s too), wheelbase, track widths, centre-of-gravity height, wheel radius and width, gear ratios, redline, shift points, steering lock, a tyre’s peak slip ratio (slip_ratio_limit), a turbo’s spool times and reference rpm, and fuel work constants (brakeThermalEfficiency,lowerHeatingValueMJPerKg). Other fields may be0(to disable a component) or negative (such as positions or camber angles). - Structured tables and arrays: Curve tables must keep
[x, y]pairs with strictly increasingx; suspension coordinates stay[x, y, z]; two-value ranges stay length 2. You may change the number of gear ratios (ratios), hybrid dial steps (deployStepsKw,regenStepsKw), or ride-height map breakpoints (frontRh,rearRh, strictly increasing), provided the map’scl,cd, andbalancegrids resize to match (rearRh.lengthrows ×frontRh.lengthcolumns). - Element-wise list validation: List items are checked position-by-position against the base list (for example, rear wing against rear wing). A list that is empty on the base car (such as aero wings on a road car) cannot be populated by a patch.
- Physical sanity checks:
frontWeightFractionmust stay between0and1, andtotalMassKgmust exceed the combined unsprung mass of all four wheels (2 × unsprungMassFront + 2 × unsprungMassRear). - Reserved and optional fields:
id,model, andbodyPlanare managed by the simulator (put custom collision outlines inmod.json). Optional top-level profile fields (steerRatio,fuelFlowKgS,fuelLPerS1000Rpm,setupPressureRefC,understeerRadPerMs2,aiMaxKerbRiseM) may be added even if absent on the base model, and must be strictly positive when set.
If a patch violates any rule, contains a typo, or uses the wrong type, that car is skipped (the rest of the package still loads) and the Mods panel pinpoints the failing field path. Updating gearbox.gears.redline_rpm automatically adjusts audio pitch scaling and the shift warning beep. Garage setup ranges, AI profiles, and HUD layouts remain inherited from the base model.
All base vehicle models support physics patches except lc26 and lc25.
Physics patch field guide
Section titled “Physics patch field guide”Every patch overrides fields on CarSimProfile (profile.*, defined in src/lib/sim/f12026-car/F12026CarSim.ts) and its nested CarPhysicsConfig (profile.config.*, defined in src/lib/sim/f12026-car/F12026CarConfig.ts). The most commonly tuned sections and units are:
| Section | Commonly tuned fields | Units / notes |
|---|---|---|
profile (top level) |
hasErs, hasDrs, turbo, coldPsiRange, frontCamberRange, rearCamberRange, tcMinSpeedMs, aeroPackagesDeg, braking (lowG, aeroG, refMs), padLateralMu, electronics (absLevels, tcLevels, absDefault, tcDefault, absRateHz, tcRateHz, tcMinSpeedKmh), plus optional steerRatio, fuelFlowKgS, fuelLPerS1000Rpm, setupPressureRefC, understeerRadPerMs2, aiMaxKerbRiseM |
Ranges are [min, max] (psi or deg); aeroPackagesDeg holds [front, rear] deg offsets per preset (low_downforce, balanced, high_downforce); turbo: true enables boost telemetry on the HUD |
profile.config.chassis |
totalMassKg, frontWeightFraction, wheelbase, trackWidthFront, trackWidthRear, cgHeight, inertia (pitch, roll, yaw), unsprungMassFront, unsprungMassRear, wheelInertiaFront, wheelInertiaRear, maxRoadWheelDeg |
Mass in kg (dry car + driver), distances in m, inertias in kg·m², lock in deg; totalMassKg must exceed 2 × (unsprungMassFront + unsprungMassRear) |
profile.config.engine |
powerCurve, coastCurve, throttleResponseCurve, idleRpm, inertia, limiterCutS, optional torqueResponseS (rise, fall), outputPowerCap.curve, ramAirGainPerKPa, airDensitySensitivity |
powerCurve: [[rpm, kW], …] steady-state crank power (strictly rising RPM); coastCurve: [[rpm, Nm], …] overrun braking magnitude; throttleResponseCurve: [[pedal, plate], …] on 0..1; inertia in kg·m²; times in s |
profile.config.engine.turbo |
maxBoost, referenceRpm, gamma, spoolUpS, spoolRefRpm, spoolDownS, displayMaxBoostBar, throttleInBoostLaw |
Available only when the base model already defines engine.turbo (e.g. porsche-934-rsr, nissan-r33-jgtc, nissan-r32-jtcc, lc-lmdh, f12026-car). Torque scales with 1 + boost; spoolUpS, spoolDownS (s) and referenceRpm (rpm) must stay > 0 |
profile.config.gearbox |
ratios, reverse, finalDrive, efficiency, shiftTimeS, downshiftTimeS, shiftTorqueFraction, upshiftCutS, upshiftNeutralS, gears (redline_rpm, upshift_rpm, downshift_rpm, brake_downshift_rpm) |
ratios is the forward gear list (variable length, all > 0); efficiency is 0..1; shift durations in s; RPM values > 0 |
profile.config.brakes |
maxTorqueNm, front_bias, ebbStep, brakeByWire, discMaterial, handbrakeTorqueNm |
maxTorqueNm is total brake torque (Nm) before the front_bias (0..1) split; discMaterial is "carbon-ceramic", "endurance-carbon", or "endurance-steel" |
profile.config.tyreCompounds.<compound> |
front / rear (width, radius, rimRadius, verticalRateScale), modelData (Dy0, Dx0, lsExpY, lsExpX, Fz0, friction_limit_angle, slip_ratio_limit, rollingResistance, verticalDamping), thermalData (thermalPerformanceCurve, optimalTempC), pressureData (optimalPsi, coldRefC, pressureSpringCurve), camberData (camberGain, dcamber0, dcamber1), rearOverride |
Replace <compound> with a key present on the base car (for example PhysicsTyreCompound_GT3_Soft or PhysicsTyreCompound_Road_Street, matched by compoundSlots). Lengths in m, Fz0 in N, angles in deg, temperatures in °C, pressures in psi |
profile.config.suspensions |
front / rear (staticCamber, springs.wheel_rate, arb, droopTravel, rollCentreHeight, bumpStop { range, rate, progression }, heave { rate, gap, packerGap, packerRate }, hardpoints), dampers_controller.front / .rear (base, heave, roll, pitch with slow_bump, fast_bump, slow_rebound, fast_rebound, plus fastThresholdMs) |
Spring and ARB rates in N/m, damping in Ns/m, travel and heights in m, camber in deg, damper knee in m/s, hardpoints as [x, y, z] m triples |
profile.config.aero |
front_lift, rear_lift, drag, front_target_height, rear_target_height, airDensity, wings (per element: area, positionZ, angleDeg, lutAOA_CL, lutAOA_CD, lutGH_CL_mult, lutGH_CD_mult), rhMap (clA, cdA, frontRh, rearRh, cl, cd, balance) |
Lift/drag terms are coefficient × area in m², heights and positions in m, airDensity in kg/m³; rhMap is present on map-aero base cars (lc-lmdh, f12026-car) |
Inspecting a base car and verifying your patch:
- Check
src/lib/cars/vehicle-models.tsto find the base model’s*_SIM_PROFILEand*_CONFIGfiles undersrc/lib/sim/(for examplesrc/lib/sim/gt3/AmgGt3Config.tsandAmgGt3Sim.ts,src/lib/sim/classic/Porsche934RsrConfig.ts, orsrc/lib/sim/road/VwSciroccoConfig.ts). Pick a base that already has the subsystems your car needs (such asengine.turbo,awd,wings, orrhMap). - Validate your package and patch guardrails with
npm run mod -- check <folder>. - Compare tyre curves, balance, and braking numbers against the reference benchmarks generated by
npm run physics:report(which writes charts and tables todocs/physics/) and test drive behaviour withnpm run race:headlessor thescripts/verify/verify-*.tssuites.
Checking, packing, and importing with the CLI
Section titled “Checking, packing, and importing with the CLI”The repository includes a CLI tool (scripts/mods/mod-tool.ts) that runs the exact same validation logic as the browser importer:
# Validate a package folder and print its multiplayer content hashnpm run mod -- check path/to/jdoe.monza-66
# Validate and write a compatible .zip archive (deflate, non-zip64)npm run mod -- pack path/to/jdoe.monza-66 [out.zip]
# Package a circuit already built in public/tracks/<id>/ (rewrites URLs & writes mod.json)npm run mod -- from-circuit <built-id> [--id <circuit-id>] [--package <author.name>]
# Package a converted car from a CarPackageOptions JSON specnpm run mod -- from-car path/to/spec.json
# List the importers, or run one (Speed Dreams, Assetto Corsa, Blender)npm run mod -- importnpm run mod -- import sd-track --fetch brno
# Write a catalogue from a folder of packed zipsnpm run mod -- catalogue path/to/zips [--base-url <url>]Converting content from another game, in the launcher or with npm run mod -- import, has a guide of its own: Importing mods from other games.
check verifies mod.json, confirms every referenced file exists (models, track data, physics patches, livery textures), ensures track_data.json contains no external paths, validates physics patches, and rejects forbidden paths, symlinks, casing clashes, or file types. Any standard zip utility also works for packing as long as mod.json sits at the archive root (or inside a single top-level directory) with no duplicate filenames.
Testing locally in a git clone
Section titled “Testing locally in a git clone”Because npm run dev does not run the production service worker, packages imported via the Mods panel cannot serve their files during local dev. Instead, place your unpacked package folder in public/mods/ (gitignored) and generate the local index:
npm run mod -- indexThis writes public/mods/_index.json so the dev server discovers your package immediately (npm run mod -- import and from-circuit refresh this index automatically when writing to public/mods/). Re-run npm run mod -- index after editing files so the content hash updates. A production build (npm run build, served from out/ on localhost) and the offline launcher run the service worker and support full in-browser imports through the Mods panel. The live site takes no mods at all.
Sharing packages through a catalogue
Section titled “Sharing packages through a catalogue”A catalogue is a list of packed packages that the game’s Mods panel offers to download. Each one shows its name, version, author, licence, size and what it adds, with a Get button. Get downloads the zip with a progress bar (Cancel stops it), checks it against the catalogue, and installs it as an import would. A package already installed with the same content shows Installed; one installed with other content shows Update, with the version the player has. One download runs at a time.
For modders
Section titled “For modders”Pack your package (npm run mod -- pack) and give the zip to whoever hosts the catalogue. A picture of it with the zip’s name (jdoe.monza-66.webp, .png or .jpg) is shown beside it. Once a zip is listed, don’t change it without writing the catalogue again: the game refuses a download whose size or SHA-256 differs from what the catalogue states.
For hosts
Section titled “For hosts”Put the zips in one folder and run:
npm run mod -- catalogue <folder of zips> [--base-url <url>] [--out <file>]It reads each zip with the game’s own zip reader, unpacks it into a temporary folder, checks it as npm run mod -- check does, and lists it with the zip’s size and SHA-256 and the package’s content hash. It writes catalogue.json in the folder (or --out), and nothing at all if any zip fails, a second zip holds a package already listed, the game would drop an entry, or a package’s credit (or a circuit’s or car’s) carries the importers’ “For personal use only” note. Links are --base-url followed by the file name. Without --base-url they are just the file names, so the catalogue must sit beside the zips.
The game reads catalogues from two places, only when the Mods panel opens, and gives each 6 seconds:
- This copy’s own,
/mods/_catalogue/catalogue.json(under the site’s base path). The launcher serves itsmods/_catalogue/folder there (onlycatalogue.json, zips and preview pictures, no subfolders). A clone’s dev server servespublic/mods/_catalogue/. A copy of the game on the web takes no mods, so it reads no catalogue at all. - The one the build names: set
NEXT_PUBLIC_MOD_CATALOGUE_URLat build time to anhttps://address or a path on the site.
If neither answers, or a catalogue lists nothing, the panel shows nothing about catalogues. If the one the build names can’t be reached (the player is offline), the panel says so and offers Try again. A package listed in both is taken from this copy’s own.
{ "format": 1, "packages": [ { "id": "jdoe.monza-66", "name": "Monza 1966", "version": "1.0.0", "description": "The 1966 road course with the banking.", "author": "J. Doe", "license": "CC BY-NC-SA 4.0", "licenseUrl": "https://creativecommons.org/licenses/by-nc-sa/4.0/", "url": "jdoe.monza-66.zip", "bytes": 48213775, "sha256": "<the zip's SHA-256, lowercase hex>", "hash": "<the package's content hash, as npm run mod -- check prints it>", "circuits": 1, "preview": "jdoe.monza-66.webp" } ]}formatmust be1; the game refuses any other whole.packagesholds at most 500 entries, and the file at most 1 MB (counted in UTF-8 bytes).id,name(80 characters),version(32),author(80),license(120): as in the package’smod.json.description(1000) andlicenseUrl(https://) are optional.url: the zip.preview(optional): a picture. A relative link is read against the catalogue’s own address. Either must lead to anhttps://address or to the game’s own site (the launcher’shttp://127.0.0.1), with no user name or password in it. A redirect is held to the same rule: a catalogue or a zip that a redirect takes anywhere else (plainhttp://on another host) is refused.bytesandsha256: the zip’s exact size (at most 2 GB) and its SHA-256 in lowercase hex.hash: the package’s content hash, the one online rooms compare. The game installs a download only when all three match, and when the zip holds that package id.circuits,cars,liveries(optional): how many of each it adds, shown in the list.
An entry that breaks a rule is dropped, and the browser’s console says why; the rest are listed. So is a second entry for the same id. Keys not listed here are ignored.
Serving it:
- A catalogue on another host than the game’s must send
Access-Control-Allow-Origin(*, or the game’s origin) with the catalogue and the zips, since the game reads them withfetch. Serve them overhttps://. - Serve each zip as it is. A compressed transfer is fine, as the size is counted after it is undone.
- The game’s service worker leaves
/mods/_catalogue/alone and never keeps a zip; the page asks the browser not to keep one either. The catalogue is checked with the server each time the panel opens. - To update a package, replace its zip and write the catalogue again. Players who have the old content see Update.
A catalogue lists data packages only: as with any package, nothing in one ever runs. Whoever hosts a catalogue chooses what it offers, so list only packages whose licence lets you share them.
Current limitations
Section titled “Current limitations”Mod packages cannot currently:
- Add physics features outside what LibreCorsa’s vehicle simulation already models (patches tune existing parameters rather than adding new physics subsystems).
- Define custom garage setup ranges, AI behaviour tables, or custom HUD layouts (inherited from the base car).
- Replace or override built-in circuits, cars, or liveries (mods are strictly additive).
- Execute scripts, shaders, or any other code.