Creating a vehicle
From the pack's model to a vehicle on the road, through the editor.
The path in six steps
- The model in the pack. Each body is an object of the resource pack with a
custommodeldata. The vehicle file must use the same material as the pack (for examplePAPER). - Open the editor and import the model's
.jsonfiles (even without textures, or several models if the body is long). - Place the parts. Move the body, seats, wheels and everything else with the mouse; set the material and
custommodeldataof each body part. - Fill in the specs (prices, speed, tank, hitbox, fuel) and check the warnings in the File tab.
- Download the file and put it in
plugins/EndlessVehicles/vehicles/<type>/, for examplevehicles/cars/offroad_black.hjson. - Run
/veicolo reload, then/veicolo give <player> <id>or try/veicolo spawn <id>.
Where the offsets start from
The xoffset, yoffset and zoffset of each part are measured from a point on the vehicle, not from the ground. The default values draw every model the way it would render on an armor stand's head, so offsets written for that rendering stay valid:
| Setting (config.yml, display section) | Meaning |
|---|---|
origin-height (0.8) | Height above ground of the point the offsets start from. Raise it if the body is sunk into the ground, lower it if it flies. |
seat-offset (0.5) | Moves every seat up or down. |
scale (0.625) | Scale factor of the models (the same one an armor stand applies). |
item-transform (HEAD) | Which display settings of the JSON model are used. |
The editor has the same four values in the View tab: match them to the server's config.yml and the preview matches the game.
The axes
| Axis | Direction |
|---|---|
| Positive Z | Towards the front of the vehicle. |
| Positive X | Towards the right of the vehicle. |
| Positive Y | Upwards. |
rotationOffset | Rotation of the part around the vertical axis, in degrees. |
The front of the model
A Blockbench model with the front facing north (-Z) comes out facing the vehicle's front. If the vehicle drives "backwards", rotate the part 180 degrees with rotationOffset.
Part types
| Type | What it is | Main fields |
|---|---|---|
skin | Body. There can be more than one (for example a tow truck). | item.material, item.custommodeldata, name (for doors) |
bikeskin | Body of a motorcycle. | same as skin |
wheel | Wheel separate from the model. | rimDesignId, steering |
seat | Seat. The driver is the one with steer: true. | steer, identifier |
bikeseat | Motorcycle seat. | wheelieAngle |
turretseat | Gunner seat. | identifier (same as the turret's) |
turret | Turret that follows the gunner's look. | item, explosionSize, ammo, cooldown (ticks), identifier |
rotor | Rotor that spins with the engine on. | item, spin |
Wheels included in the model
If the pack's model already has wheels (as in some ready-made packs), do not add wheel parts: they would show up as separate objects.