Slots

The slot and slotType sections are used to define where a component fit’s within the vehicle’s parts tree. For more information on the basics of the parts and component system, you can read the introduction to the part/slot system

Each part also has a “slotType”, which identifies where in the vehicle it fits, and allowing multiple parts to act as alternatives to each other. One unique slot type is “main”, which refers to the “root”" component of the vehicle.

The slots section defines which components are the “children” of that component based on their slotType.

SlotType

Required argument

slotType
name
string
type
The slot type of the component
This should be defined as a slot in the parent component

Slots

Required arguments

type
name
string
type
The internal name of the slot
The parts in that slot should have this value as their slottype
default
name
string
type
The component that gets loaded by default if no part is defined in the car’s config file

string
type
type
default
The name of the slot in the part selector

Optional arguments

coreSlot
name
boolean
type
If enabled, the choice to have the part empty is removed from the part selector/garage
nodeOffset
name
XYZ
type
0,0,0
default
Offsets all the nodes on the YZ axis, and offsets nodes in a mirrored fashion on the X axis

Mostly interchangeable with node move. Mostly required when it comes to wheels, where the X offset will move the nodes on each side equally further/close appart from the centerline.

You cannot use nodeOffset if one of the slots of the component you’re offsetting has a nodeOffset, as the second one will overwrite the first one. In this sort of application, you’ll have to use nodeMove on either component.

nodeMove
name
XYZ
type
0,0,0
default
Offsets all the nodes on the XYZ axis.

Mostly interchangeable with node offset. This modifier will translate the nodes to the left or right on the X axis, and not move them in a mirrored fashion.

You cannot use nodeMove if one of the slots of the component you’re offsetting has a nodeMove, as the second one will overwrite the first one. In this sort of application, you’ll have to use nodeOffset on either component.

Simple Example

A component with only a single slot with no modifiers

"autobello_spring_F": {
    "slotType":"autobello_spring_F",
    "slots":[
        ["type", "default", "description"],
        ["autobello_shock_F","autobello_shock_F", "Front Shocks"],
    ],
},

Advanced Example

Chassis jbeam that makes use of both nodeOffset and nodeMove.

"pickup_frame_ext":
{
    "slotType" :"pickup_frame",
    "slots":[
        ["type", "default", "description"],
        //running gear
        ["pickup_ABS","pickup_ABS", "Anti-Lock Braking System"],
        ["pickup_ESC","", "Electronic Stability & Traction Control"],
        ["pickup_fueltank","pickup_fueltank","Fuel Tank", {"nodeOffset":{"x":0.0,"y":0.613,"z":0}}],
        ["pickup_engine","pickup_engine_v8_4.5","Engine"],
        ["pickup_muffler_ext","pickup_muffler_ext","Muffler"],
        ["pickup_suspension_R","pickup_axle_R","Rear Suspension", {"nodeMove":{"x":0.0,"y":0.613,"z":0}}],
        ["pickup_suspension_F","pickup_IFS","Front Suspension"],
        ["pickup_driveshaft_R_ext","pickup_driveshaft_R_ext","Rear Driveshaft"],
        ////bodywork
        ["pickup_radsupport", "pickup_radsupport", "Radiator Support", {"nodeOffset":{"x":0.0,"y":0.0,  "z":0}}],
        ["pickup_bumper_F","pickup_bumper_F","Front Bumper",           {"nodeOffset":{"x":0.0,"y":0.0,  "z":0}}],
        ["pickup_bumper_R","pickup_bumper_R","Rear Bumper",            {"nodeOffset":{"x":0.0,"y":0.613,"z":0}}],
        ["pickup_body_ext","pickup_body_ext","Body",                   {"nodeOffset":{"x":0.0,"y":0.0,  "z":0}}],
        ["pickup_bed","pickup_bed","Bed",                              {"nodeOffset":{"x":0.0,"y":0.613,"z":0}}],
        //misc
        ["pickup_towhitch","","Tow Hitch", {"nodeOffset":{"x":0.0,"y":0.613,"z":0}}],
        ["pickup_sparetire","pickup_sparetire_6l","Spare Tire", {"nodeOffset":{"x":0.0,"y":0.663,"z":0}}],
        ["linelock", "", "Brake Line Lock"],
        ["pickup_reversewarn", "", "Reverse Warning Beeper"],
    ],
},

Suspension component using nodeoffset with variables, along with a core slot.

"vivace_suspension_R": {
    "slotType" : "vivace_suspension_R",
    "slots": [
        ["type", "default", "description"],
        ["vivace_brake_R","vivace_brake_R", "Rear Brakes"],
        //To change the base track width, edit the trackoffset_R offset in the expression.
        ["wheel_R_5","steelwheel_16a_16x7_R","Rear Wheels", {"nodeOffset":{"x":"$=$trackoffset_R+0.3", "y":1.338, "z":0.32}}],
        ["vivace_wheeldata_R","vivace_wheeldata_R", "Rear Spindles", {"coreSlot":true}],
        ["vivace_spring_R","vivace_spring_R", "Rear Springs"],
        ["vivace_shock_R","vivace_shock_R", "Rear Shocks"],
    ],
},
Last modified: 22 September 2021, at 21:50

Any further questions?

Join our discord