ChassisProfile
public sealed class ChassisProfileNamespace Chassis.Api
Where occupants sit and hold on in one vehicle type, keyed by its vehicle code. Every point is in the space of the vehicle’s model frame: the transform at Frame under the vehicle, or the vehicle root when that is empty. Left-side points are the mirror of the right-side values stored here, about the seat’s own centre plane (through the seat root, turned by its yaw); in wheel mode the hands mirror about the steering column.
The same object backs the JSON file (UserData/Chassis/<code>.json) and the C# API, so a value set from code, from the file or from the debug console is the same value.
Points are Vector3 values in metres in the frame’s own axes: x to the vehicle’s right, y up, z forward. Angles are in degrees. Weights run from 0 (the animation decides) to 1 (the profile decides). In the JSON file a vector is [x, y, z] and a colour is [r, g, b, a] with each channel from 0 to 1.
Example
A profile for a vehicle a mod builds on a vanilla one, with the driver fitted to the vanilla seat:
var frame = vehicle.transform.Find("MyModel");var profile = new ChassisProfile { Code = "mymod_cart", Frame = "MyModel" };profile.Seats.Add(ChassisApi.FitSeat(vehicle, 0, frame, frame.Find("SteeringWheel")));ChassisApi.Register(profile);ChassisApi.Assign(vehicle, "mymod_cart");Fields
Section titled “Fields”public string Code = string.EmptyVehicle code (LandVehicle.VehicleCode) this profile belongs to.
Value Lower case, matched without case. The vanilla cars are “shitbox”, “shitbox_police”, “veeper”, “bruiser”, “bruiser_police”, “dinkler”, “hounddog”, “cheetah” and “hotbox”; the wheelchair from the mod Rollin is “rollin_wheelchair”. A mod vehicle can use a code of its own and get it with ChassisApi.Assign. ChassisApi.Codes lists every code that has a profile.
public string Frame = string.EmptyPath of the model frame below the vehicle root, or empty for the root itself.
Value Transform names joined with ”/”, as Transform.Find takes them, e.g. “Body/Model”. When that path does not exist, the first transform named like its last part is used. Rollin’s wheelchair uses “ChassisModel”; the vanilla cars leave it empty.
public List<SeatProfile> Seats = new List<SeatProfile>()Type: SeatProfile
One entry per LandVehicle.Seats index that should show a seated body.
public PushProfile PushType: PushProfile
Where a second player stands and holds on to push, or null when the vehicle cannot be pushed.
Steering
Section titled “Steering”public SteeringProfile SteeringType: SteeringProfile
The steering wheel that turns with the road wheels, or null when the vehicle has none.
public List<PartProfile> Parts = new List<PartProfile>()Type: PartProfile
Lids and wipers that move by themselves.
public LampProfile LampsType: LampProfile
Indicator lamps, or null when the model has none.
public HornProfile HornType: HornProfile
Horn and lock chirp sounds; null uses the built-in ones.
AutoLights
Section titled “AutoLights”public bool AutoLightsHeadlights switch on by themselves while the vehicle is driven between 17:30 and 06:00.
Interior
Section titled “Interior”public InteriorProfile InteriorType: InteriorProfile
The base interior Chassis builds into a vehicle without one, or null for none.
Gauges
Section titled “Gauges”public List<GaugeProfile> Gauges = new List<GaugeProfile>()Type: GaugeProfile
Added in 1.2.0
Needles, lamps and digit displays in the cockpit.
Controls
Section titled “Controls”public List<ControlProfile> Controls = new List<ControlProfile>()Type: ControlProfile
Added in 1.2.0
Switches a seated player can use in first person.
Methods
Section titled “Methods”Control
Section titled “Control”public ControlProfile Control(string name)Types: ControlProfile
Added in 1.2.0
The switch with this name (case ignored), or null.
public SeatProfile Seat(int index)Types: SeatProfile
The seat entry for this LandVehicle.Seats index, or null when the seat shows no body.
public PartProfile Part(string name)Types: PartProfile
The part with this name (case ignored), or null.
public ChassisProfile Clone()A deep copy, made through the same JSON the profile file uses.