Skip to content

Server owner tutorial

WizardlyBump17 edited this page Jul 31, 2022 · 5 revisions

Creating a vehicle

You can create any vehicle you want.
Open the models.yml file to create/edit any vehicle.
You must create the vehicles under the models section.
Here is a sample vehicle:

models.yml
models:
  - ==: car
    name: Car 1
    max-speed: 1
    acceleration:
      0.5: 0.02
      1.0: 0.04
      1.5: 0.06
      2.0: 0.08
      2.5: 0.1
    damage:
      0.5: 10.0
      1.0: 20.0
      1.5: 30.0
      2.0: 40.0
      2.5: 50.0
      3.0: 60.0
    break-force:
      0.5: 2.0
      1.0: 4.0
      1.5: 6.0
      2.0: 8.0
      2.5: 10.0
    meg-model: car1
    rotation-speed: 3
    jump-height: 1
    damage-delay: 1000
    speed-timeout: 100

To add more vehicles, add them to the list.
Here is what it looks like with more than 1 vehicle:

models.yml
models:
  - ==: car
    name: Car 1
    max-speed: 1
    acceleration:
      0.5: 0.02
      1.0: 0.04
      1.5: 0.06
      2.0: 0.08
      2.5: 0.1
    damage:
      0.5: 10.0
      1.0: 20.0
      1.5: 30.0
      2.0: 40.0
      2.5: 50.0
      3.0: 60.0
    break-force:
      0.5: 2.0
      1.0: 4.0
      1.5: 6.0
      2.0: 8.0
      2.5: 10.0
    meg-model: car1
    rotation-speed: 3
    jump-height: 1
    damage-delay: 1000
    speed-timeout: 100
  - ==: motorcycle
    name: Motorcycle 1
    max-speed: 1.5
    acceleration:
      0.5: 0.02
      1.0: 0.04
      1.5: 0.06
      2.0: 0.08
      2.5: 0.1
    damage:
      0.5: 10.0
      1.0: 20.0
      1.5: 30.0
      2.0: 40.0
      2.5: 50.0
      3.0: 60.0
    break-force:
      0.5: 2.0
      1.0: 4.0
      1.5: 6.0
      2.0: 8.0
      2.5: 10.0
    meg-model: motorcycle1
    rotation-speed: 3
    jump-height: 1
    damage-delay: 1000
    speed-timeout: 100
  - ==: airplane
    name: Airplane 1
    max-speed: 1.5
    acceleration:
      0.5: 0.02
      1.0: 0.04
      1.5: 0.06
      2.0: 0.08
      2.5: 0.1
    damage:
      0.5: 10.0
      1.0: 20.0
      1.5: 30.0
      2.0: 40.0
      2.5: 50.0
      3.0: 60.0
    meg-model: airplane1
    rotation-speed: 0.3
    jump-height: 0
    pitch:
      min: -45
      max: 45
      speed: 0.4
    speed-timeout: 100

Config details

Universal configs

Config Description Example value
== The vehicle type. Available types (without addons) are: car motorcycle airplane military-airplane car
name The vehicle name. Used in commands and messages Car
max-speed The max speed of the vehicle 1
acceleration Data about how much the vehicle will accelerate, based on the speed. It is a Map<Double, Double> where the key is the current speed and the value is the acceleration See Map<Double, Double>
damage Data about how much damage the vehicle will do when an entity collides, based on the speed. It is a Map<Double, Double> where the key is the current speed and the value is the damage See Map<Double, Double>
break-force Data about how much the vehicle will reduce its speed, based on the current speed. It is a Map<Double, Double> where the key is the current speed and the value is the dividend, so if the value is 2.5 then newSpeed = currentSpeed / 2.5 See Map<Double, Double>
meg-model The ModelEngine model name car
rotation-speed How fast the vehicle will rotate 3.0
jump-height The maximum blocks the vehicle can jump 1.5
damage-delay The delay in milliseconds between the damage caused to entities when they collide 1000
speed-timeout The time in milliseconds until the vehicle's speed goes to 0. It is based on the last speed update (the last time the forward button was released) 100

Specific configs

Airplanes (all)

Config Description Example value
break-force Airplanes can't break. You can add this config but will take no effects
pitch Info about the pitch. See pitch See pitch

pitch

Config Description Example value
min The min pitch the airplane can have -45
max The max pitch the airplane can have 45
speed How fast the pitch will decrease or decrease 0.4

Military airplanes

Config Description Example value
tnt Info about the TNT See tnt for more info

tnt

Config Description Example value
fuse-ticks How many ticks the TNT will take to explode 80
use-driver-rotation If it should use the driver rotation to determine the TNT direction true
direction Data about how the direction axis must be multiplied. It is a Vector See Vector
min-pitch If use-driver-rotation is set to true, this config will limit the min pitch 0
max-pitch If use-driver-rotation is set to true, this config will limit the max pitch 90
delay Delay in milliseconds between each TNT 1000
set-fire If the TNT should fire the region it exploded true
break-blocks If the TNT should break blocks true
power The TNT power 30


Universal config options

Vector

Config Description Example value
== It MUST be Vector Vector
x The x axis. MUST have floating point 0.0
y The y axis. MUST have floating point 0.0
z The z axis. MUST have floating point 0.0

Map<Double, Double>

All numbers must have the floating point.

Max value (key) Description Example value
0.5 Any number between 0.0 and 0.5 1.0
1.0 Any number between 0.5 and 1.0 2.0
1.5 Any number between 1.0 and 1.5. If no more keys are specified, upper numbers will use this value 3.0

Clone this wiki locally