Skip to content

Vehicle Packs ​

A vehicle pack is the main way to make a vehicle: a folder or a zip in <game dir>/vettura/packs/, with no code and no mod to compile. Vettura reads every pack as the game starts; their vehicles appear in the Creative tab "Vettura · Vehicles".

The server and its players need the same packs. On joining, Vettura compares both sides' packs and says in chat which are missing or of another version.

Template: examples/packs/example in the Creator Kit (a white-box coupe, example:whitebox_coupe). Copy the whole folder and rename it: that is a new pack.

Layout ​

mypack/                                        a folder, or mypack.zip (pack.json at the zip's root)
├─ pack.json
├─ vehicles/my_coupe.json                      one file a vehicle; its id is mypack:my_coupe
├─ assets/mypack/
│  ├─ meshes/my_coupe*.vxmesh.json             from the export script (see Export & Hit Hull)
│  ├─ geo/my_coupe*.geo.json                   from the export script
│  ├─ textures/entity/vehicle/my_coupe*.png    the atlases (see Textures)
│  ├─ textures/item/my_coupe.png               the spawner's icon (optional; the T15's without)
│  ├─ my_coupe_key* in geo, meshes, textures/item   the key's model (optional; the T15's key without)
│  ├─ sounds.json, sounds/                     your own sounds (optional)
│  └─ lang/zh_cn.json, lang/en_us.json         the vehicle's and the key's names
└─ data/mypack/vehicle_hulls/my_coupe.bin      the hit hull (see Export & Hit Hull)

pack.json:

json
{"id": "mypack", "name": "My Pack", "version": "1.0.0", "author": "Your name", "description": "One line about it"}

id: lower-case letters, digits and underscores only; it is also the resources' namespace (assets/<id>, data/<id>). Change version with every change to the pack, so players and servers can tell whether they have the same one.

vehicles/<name>.json ​

SectionWhatNeeded
formatthe format's version, now 1no
physicsthe physics, fields as in the Physics page's table; any left out keeps the T15'syes
layoutthe frame: body boxes, seats, steering wheel, doors, hood, filler; see The Frameyes
enginethe engine's sounds, belowno; the T15's diesel
sounds{"handbrake": [set, let off] or null, "shift": a sound or null, "horn": a sound, "doors": [open, shut]}no; the T15's
fuel"diesel" or "petrol"no; diesel
keylesstrue: push-button start, the key carried, the start key heldno
paintsfactory colours: [{"id": "my_red", "main": "#A51616", "second": "#A51616"}, ...], at least twono; the T15's
hudPanesthe four panes on the damage screen (windshield, rear, left, right)no
gauges screens fontsinstruments: the needles' scales, the screens' pagesno

A misspelt field or a value of the wrong kind is an error naming the file and the field; nothing is ignored silently.

Units: physics uses metres, kilograms, newtons, seconds and rpm as the Java API does, except these, in units easier to fill in: maxSteer steerRate steerReturn slipPeak in degrees, topSpeed fourWheelSpeed lowRangeSpeed in km/h, steerGrip in g.

Hit shape physics.hull: a list of points [x, y, z, x, y, z, ...] (model frame), or a car shape of two boxes {"box": [half width, front z, rear z, bottom, belt, cabin half width, cabin front z, cabin rear z, roof]}.

Frame: a box is [forward0, forward1, right0, right1, up0, up1] (metres, the vehicle frame, each pair low to high); a seat is {"forward": -0.15, "right": -0.37}, with cushion (its height), yaw, look if wanted; the first seat is the driver's.

Engine sounds, either form:

json
"engine": {"ladder": {"on": [[1170, "mypack:v10.on_1"], [1410, "mypack:v10.on_2"]], "off": [[1170, "mypack:v10.off_1"], [1410, "mypack:v10.off_2"]]},
           "crank": "mypack:v10.starter", "start": null, "stop": "mypack:v10.stop", "at": [-1.0, 0, 0.6]}
"engine": {"idle": "...", "mid": "...", "load": "...", "coast": "...", "rpms": [770, 1830, 1830, 1300], "crank": "...", "start": "...", "stop": "..."}

A sound id is <pack id>:<event>, the events in the pack's assets/<id>/sounds.json, as in a resource pack. What each sound should be: the Sounds page.

Lang (assets/<id>/lang/zh_cn.json and en_us.json together): entity.<id>.<name> the vehicle's name (the spawner's too), item.<id>.<name>_key the key's, tooltip.<id>.vehicle_key.<name> the key's tooltip, screen.vettura.vehicle_spawner.paint.<paint id> a colour's name.

Check, install, share ​

  1. Before the game, run the checker: python tools/check_vehicle.py <pack folder> <name>, and deal with every FAIL and WARN.
  2. Put the folder in <game dir>/vettura/packs/ (for a modpack, vettura/packs/ in the instance folder) and restart the game. Packs are read only at start-up.
  3. On an error the log names the pack, the file and the field, and the screen says so once in a world; the pack's other vehicles still load.
  4. To share it, zip it: python tools/make_pack_zip.py <pack folder> writes <id>-<version>.zip (pack.json at its root, no Blender files). Zipping by hand, select pack.json with vehicles, assets and data and compress those, not the folder around them.
  5. Share only models, textures and sounds you have the right to give out.