Configuration
This page will guide you through the creation of your vehicle, ranging from cars to helicopters, including motorcycles, trailers, and boats.
Prerequisites
You must have exported the obj models.
Vehicle Configuration
Whether you want to create a car, a motorcycle, a trailer, a boat, or a helicopter, this part is common to all types of vehicles.
Create a folder with the name of your vehicle in your pack, and then create a file with one of the following names, depending on what you want to add:
Vehicle Type | Prefix | Example |
---|---|---|
Car, truck, or motorcycle | vehicle_ | vehicle_your_vehicle.dynx |
Trailer | trailer_ | trailer_your_vehicle.dynx |
Boat | boat_ | boat_your_vehicle.dynx |
Helicopter | helicopter_ | helicopter_your_vehicle.dynx |
Warning
It's the prefix that determines the type of your vehicle! If you put something different, it will be ignored.
Danger
Pay attention to the two formats of positions used: in Blender, the vertical axis is the Z-axis, while in Minecraft, it's the Y-axis, and Minecraft's Z-axis is in the reverse direction (coordinates multiplied by -1). We will specify which format to use each time it's necessary.
Blender Format: X Y Z
. Minecraft Format: X Z -Y
.
Here are the various properties to fill in:
Required Properties
Name | Type | Description | Example |
---|---|---|---|
CenterOfGravityOffset | Vector with 3 axes (X, Y, Z) | Vehicle's Center of Gravity (default: origin position of the chassis in Blender). The position is in Minecraft format. | - |
Description | String (can be used for naming or describing) | Item Lore | - |
DragCoefficient | Decimal number | Vehicle Air Friction Coefficient | - |
EmptyMass | Integer | Vehicle Mass (in kg) | - |
Model | ResourceLocation: path to a resource in the format modid:folder/resource. For example, with dynamxmod:model1/model1.obj , the model should be in assets/dynamxmod/models/model1/model1.obj |
Model Path OBJ | obj/name_of_vehicle/name_of_model.obj |
Name | String (can be used for naming or describing) | Item Name | - |
Optional Properties
Name | Type | Description | Default Value |
---|---|---|---|
AngularDamping | Decimal number | Angular Velocity Damping (air resistance), between 0 and 1. | 0.9 |
CreativeTabName, CreativeTab, TabName | String (can be used for naming or describing) | Creates a new page in the creative menu containing the item where this property is specified, with the defined name. None will hide the item from the creative menu. |
CreativeTab of DynamX |
DefaultEngine | String (can be used for naming or describing) | Default Engine Name, see below. If not specified, the vehicle will be a trailer (see "Trailer Configuration") | - |
DefaultSounds | String (can be used for naming or describing) | Default Sound Names, see below | - |
DefaultZoomLevel | Integer | Default Third-Person View Zoom Level when getting into the vehicle | 4 |
IconText | String (can be used for naming or describing) | Text drawn on the item's icon in menus | Block for blocks, Prop for props |
Item3DRenderLocation | Item rendering type (NONE or WORLD or ALL) | See Below | all |
ItemRotate | Vector with 3 axes (X, Y, Z) | Modifies the rotation of the item | 0 0 0 |
ItemScale | Decimal number | Item Rendering Scale | 0.9 |
ItemTranslate | Vector with 3 axes (X, Y, Z) | Modifies the translation of the item | 0 0 0 |
LinearDamping | Decimal number | Linear Velocity Damping (air resistance), between 0 and 1. | 0.5 |
MaxVehicleSpeed | Decimal number | Maximum Speed the vehicle can reach (in km/h) | infinite |
PlayerStandOnTop | Indicates if the player can stand on a vehicle. ALWAYS will allow them to always stand (recommended for buses and boats, for example), PROGRESSIVE will allow them to stand at speeds below 30 km/h (recommended for cars), and NEVER will not allow them to stand on the vehicle. |
Defines if players can stand on this vehicle. | ALWAYS |
ScaleModifier | Vector with 3 axes (X, Y, Z) | Allows modifying the model's size, all other parameters such as collisions, position (but not size) of wheels and steering wheel will be automatically recalculated. The wheel scale should be configured in the wheel config directly, see below. | 1 1 1 |
ShapeYOffset | Decimal number | Vertical Offset of the car's collision box (affects the center of gravity) | - |
Textures | List of strings accepting values in pairs (e.g., Value1 Value2, Value3 Value4, ...) | Deprecated. See multi-texture configuration. | - |
UseComplexCollisions | Value that can either enable (True) or disable (False) a property | Disables the collision box taking the shape of the 3D model: setting it to false uses player collision boxes for collisions with physical entities and terrain. Leaving it true uses the 3D model for collisions, which is more performance-intensive. | true |
Info
The translation of the vehicle name is automatically created with the value of "Name."
To modify the item rendering, go here: item configuration.
Configuration of collision boxes:
These collision boxes are used for collisions with other vehicles if the UseComplexCollisions
option is disabled. In any case, they are used for collisions with players and must be configured.
Cut your models into several cubes that represent the collisions to be done with players, and then, for each cube, add to the vehicle's configuration:
Shape_NomDuCube{
Position: x y z
Scale: x y z
}
Here's an example with the trophy truck (three collision cubes):
Info
The configuration of these collisions may be simplified in the future.
Wheel Configuration:
For each wheel on the vehicle (you can add as many as you want), add to the vehicle's configuration:
Wheel_NomDeLaRoue{
AttachedWheel: YourPack.default_wheel
IsRight: false
Position: x y z
IsSteerable: True
MaxTurn: 0.7
DrivingWheel: False
}
Required Properties
Name | Type | Description | Example |
---|---|---|---|
AttachedWheel | String (can be used for naming or describing) | Default wheel name, see below | - |
DrivingWheel | Value that can either enable (True) or disable (False) a property | If the wheel is a driving wheel (true) or not (false) | - |
IsRight | Value that can either enable (True) or disable (False) a property | If the wheel is on the right (true) or left (false) (Property named "isRight" on versions before 2.11.2 included) | - |
IsSteerable | Value that can either enable (True) or disable (False) a property | If the wheel can turn with the steering wheel (true) or not (false) | - |
MaxTurn | Decimal number | Maximum turning value (how much you can turn the wheel) | - |
Position | Vector in Blender format (X, Z, Y*-1) | Object Position | - |
Optional Properties
Name | Type | Description | Default Value |
---|---|---|---|
DependsOn | String (can be used for naming or describing) | Unused | - |
HandBrakingWheel | Value that can either enable (True) or disable (False) a property | If the wheel is braked when the handbrake is engaged (true), or if it can turn freely (false) (optional, if no wheel brakes, non-driving wheels will brake automatically) | - |
MudGuard | String (can be used for naming or describing) | Name of the object corresponding to the mudguard, in the vehicle model | - |
RotationPoint | Vector in Blender format (X, Z, Y*-1) | Wheel rotation point when turning the steering wheel | - |
Scale | Vector with inverted Y and Z axes (X, Z, Y) | Object Size | 1 1 1 |
SuspensionAxis | Quaternion (X, Y, Z, W) | Suspension axis rotation relative to the vertical axis | - |
Seat Configuration:
For each seat on the vehicle, add to the vehicle's configuration:
Seat_NomDuSiege{
Position: x y z
Driver: True
}
Here are all the possible properties:
Required Properties
Name | Type | Description | Example |
---|---|---|---|
Driver | Value that can either enable (True) or disable (False) a property | Indicates if it's the driver's seat (true) or not (false) | - |
Position | Vector in Blender format (X, Z, Y*-1) | Object Position | - |
Optional Properties
Name | Type | Description | Default Value |
---|---|---|---|
CameraPositionY | Decimal number | Vertical position of the third-person camera | 0 |
CameraRotation | Decimal number | Horizontal rotation of the camera, in degrees | 0 |
DependsOn | String (can be used for naming or describing) | Unused | - |
LinkedDoorPart | String (can be used for naming or describing) | Name of the linked PartDoor | - |
MaxPitch | Decimal number | Maximum vertical rotation of the camera, in degrees | -105 |
MaxYaw | Decimal number | Maximum horizontal rotation of the camera, in degrees | -105 |
MinPitch | Decimal number | Minimum vertical rotation of the camera, in degrees | 105 |
MinYaw | Decimal number | Minimum horizontal rotation of the camera, in degrees | 105 |
PlayerPosition | Player position, LYING : lying down, SITTING = sitting, STANDING : standing |
Player's position on the seat | SITTING |
PlayerSize | Vector with 3 axes (X, Y, Z) | Player size on the seat (1 1 1 corresponds to their actual size) |
1 1 1 |
Rotation | Quaternion (X, Y, Z, W) | Seat rotation | 1 0 0 0 |
Scale | Vector with inverted Y and Z axes (X, Z, Y) | Object Size | 1 1 1 |
ShouldLimitFieldOfView | Value that can either enable (True) or disable (False) a property | Defines if the player can rotate the camera all around them or not | true |
Configuration of texture variants:
This part is explained in multi-texture configuration.
Configuration of air friction points:
You can configure points where air friction forces will be applied, greatly improving your vehicles' handling, at the cost of longer configuration time.
These points are configured "by eye," but it's best to place one near the front of the vehicle, centered between the two wheels.
Example configuration, for the trophy truck from the base pack:
ForcePointNom{
Position: 0 -0.89534 0
Intensity: 0.4 1 0.4
}
Required Properties
Name | Type | Description | Example |
---|---|---|---|
Intensity | Vector with 3 axes (X, Y, Z) | Force factor (Force = Intensity * | Vehicle Speed |
Position | Vector in Blender format (X, Z, Y*-1) | Position of the friction point | - |
The "Name" can be replaced with any name (so you can have multiple friction points). These points are visible in the "Friction points" debug, and you will also see the applied forces.
Other Configurations:
Car or Trailer Configuration
Go here! This section is also valid for motorcycles and other two-wheelers.
Boat Configuration
Go here!
Helicopter Configuration
Go here!
Aircraft Configuration
Unfortunately, it's not possible yet :'(.
Conclusion
Congratulations, you have put your vehicle into the game! If you have any more questions, visit the DynamX Discord!