Difference between revisions of "Documentation/Engine/Units/accessory truck data"
< Documentation | Engine | Units
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
!Description | !Description | ||
|- | |- | ||
− | | | + | |info |
|array<string> | |array<string> | ||
| | | | ||
− | |Two | + | |Two info members are typically defined for '''accessory_truck_data''': |
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
info[]: "@@brand_peterbilt@@" // The truck brand | info[]: "@@brand_peterbilt@@" // The truck brand | ||
Line 23: | Line 23: | ||
|Accessory types which should be required, regardless of the vehicle configuration, should be defined in '''accessory_truck_data'''. For more information, see [[Documentation/Engine/Units/accessory_data|accessory_data]]. | |Accessory types which should be required, regardless of the vehicle configuration, should be defined in '''accessory_truck_data'''. For more information, see [[Documentation/Engine/Units/accessory_data|accessory_data]]. | ||
|- | |- | ||
− | | | + | |behind_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use for the orbit (2) view. Typically <code>camera.behind.basic</code>. | |The unit name of the camera to use for the orbit (2) view. Typically <code>camera.behind.basic</code>. | ||
|- | |- | ||
− | | | + | |interior_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use for the interior (1) view. Typically <code>camera.interior.<brand>.<model></code>. | |The unit name of the camera to use for the interior (1) view. Typically <code>camera.interior.<brand>.<model></code>. | ||
|- | |- | ||
− | | | + | |interior_camera_oculus |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use for the interior (1) view when using a head-mounted display. Typically <code>camera.interior.<brand>.<model>.oculus</code>. | |The unit name of the camera to use for the interior (1) view when using a head-mounted display. Typically <code>camera.interior.<brand>.<model>.oculus</code>. | ||
|- | |- | ||
− | | | + | |window_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use in the lean-out (5) view. Typically <code>camera.window.basic</code>. | |The unit name of the camera to use in the lean-out (5) view. Typically <code>camera.window.basic</code>. | ||
|- | |- | ||
− | | | + | |bumper_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use in the bumper (6) view. Typically <code>camera.bumper.basic</code>. | |The unit name of the camera to use in the bumper (6) view. Typically <code>camera.bumper.basic</code>. | ||
|- | |- | ||
− | | | + | |cabin_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use for the cabin-top (4) view. Typically <code>camera.cabin.basic</code>, placed at the ''cam_cabin*'' locator of the active cabin accessory variant. | |The unit name of the camera to use for the cabin-top (4) view. Typically <code>camera.cabin.basic</code>, placed at the ''cam_cabin*'' locator of the active cabin accessory variant. | ||
|- | |- | ||
− | | | + | |wheel_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use in the wheel (7) view. Typically <code>camera.wheel.basic</code>. | |The unit name of the camera to use in the wheel (7) view. Typically <code>camera.wheel.basic</code>. | ||
|- | |- | ||
− | | | + | |top_camera |
|link_ptr | |link_ptr | ||
| | | | ||
Line 68: | Line 68: | ||
|Typically unused. | |Typically unused. | ||
|- | |- | ||
− | | | + | |tv_camera |
|link_ptr | |link_ptr | ||
| | | | ||
Line 88: | Line 88: | ||
|The unit name of the camera to use in wander mode. Typically <code>camera.wander</code>. The player typically won't encounter this mode as it is primarily used for testing. | |The unit name of the camera to use in wander mode. Typically <code>camera.wander</code>. The player typically won't encounter this mode as it is primarily used for testing. | ||
|- | |- | ||
− | | | + | |debug_camera |
|link_ptr | |link_ptr | ||
| | | | ||
|The unit name of the camera to use for the developer/fly camera (0). Typically <code>camera.debug</code>. | |The unit name of the camera to use for the developer/fly camera (0). Typically <code>camera.debug</code>. | ||
|- | |- | ||
− | | | + | |fallback |
|array<string> | |array<string> | ||
| | | |
Revision as of 13:29, 20 June 2017
The accessory_truck_data unit class defines basic information, cameras, fallback rules, and required accessories for the player's truck. Units of this type are defined in /def/vehicle/truck/<brand.model>/data.sii.
Attributes
Many common attributes are inherited from accessory_data. Required attributes are bolded.
Name | Type | Default Value | Description |
---|---|---|---|
info | array<string> | Two info members are typically defined for accessory_truck_data:
info[]: "@@brand_peterbilt@@" // The truck brand
info[]: "@@series_peterbilt_579@@" // The truck model
| |
require | array<token> | Accessory types which should be required, regardless of the vehicle configuration, should be defined in accessory_truck_data. For more information, see accessory_data. | |
behind_camera | link_ptr | The unit name of the camera to use for the orbit (2) view. Typically camera.behind.basic .
| |
interior_camera | link_ptr | The unit name of the camera to use for the interior (1) view. Typically camera.interior.<brand>.<model> .
| |
interior_camera_oculus | link_ptr | The unit name of the camera to use for the interior (1) view when using a head-mounted display. Typically camera.interior.<brand>.<model>.oculus .
| |
window_camera | link_ptr | The unit name of the camera to use in the lean-out (5) view. Typically camera.window.basic .
| |
bumper_camera | link_ptr | The unit name of the camera to use in the bumper (6) view. Typically camera.bumper.basic .
| |
cabin_camera | link_ptr | The unit name of the camera to use for the cabin-top (4) view. Typically camera.cabin.basic , placed at the cam_cabin* locator of the active cabin accessory variant.
| |
wheel_camera | link_ptr | The unit name of the camera to use in the wheel (7) view. Typically camera.wheel.basic .
| |
top_camera | link_ptr | The unit name of the camera to use for the overhead (3) view. Typically camera.top.basic .
| |
top_fixed_camera | link_ptr | Typically unused. | |
tv_camera | link_ptr | The unit name of the camera to use in TV (8) view. Typically camera.tv.basic .
| |
predefined_tv_camera | link_ptr | Typically unused. | |
side_camera | link_ptr | Typically unused. | |
wander_camera | link_ptr | The unit name of the camera to use in wander mode. Typically camera.wander . The player typically won't encounter this mode as it is primarily used for testing.
| |
debug_camera | link_ptr | The unit name of the camera to use for the developer/fly camera (0). Typically camera.debug .
| |
fallback | array<string> | Each member contains a specially-formatted string which defines an accessory type (token) and the relative path to an SII file with a safe fallback accessory defined. So a fallback rule for chassis may look like fallback[]: "chassis|4x2.sii" which would call on /def/vehicle/truck/<brand.model>/chassis/4x2.sii if there is ever a problem with the vehicle's currently assigned chassis accessory that makes it invalid or unloadable.
Accessories are handled differently. For example, a rule for Note: There is 8 mandatory fallback rules: chassis, cabin, interior, engine, transmission, f_wheel (or f_tire), r_wheel (or r_tire), paint_job and head_light. It is generally advisable to include a rule for steering_w if the truck has interchangeable steering wheels. |