Road - sk-zk/md155 GitHub Wiki
Item ID: 0x03 (3)
The item has a base part and a data part.
Field(s) | Description |
---|---|
struct kdop_item
|
See k-DOP item. Flags: Bits 0-1: Left -> terrain noise Bits 4-5: Left -> terrain transition Bits 8-9: Left -> sidewalk size Bit 12: Right -> vegetation collision |
u32 road_flags
|
Bit 0: Low poly vegetation Byte 1: DLC guard Bit 17: Smooth detail vegetation |
token road_look
|
Unit name of the road, as defined in /def/world/road_look.sii (legacy)
or /def/world/road_look.template.sii (template).
|
token right_lanes_variant token left_lanes_variant
|
Traffic rules. |
token right_tmpl_variant token left_tmpl_variant
|
Road variant on the right and left side. On single carriageways, only the right variant is used and the left side is ignored. |
token right_edge_right token right_edge_left token left_edge_right token left_edge_left
|
Edge models, as defined in /def/world/road_edge.sii .
|
token right_profile float right_profile_coef token left_profile float left_profile_coef
|
Terrain profile and coefficient on the right and left side. |
token right_tmpl_look token left_tmpl_look
|
Road look on the right and left side. On single carriageways, only the right variant is used and the left side is ignored. |
token road_material
|
Road material for legacy roads. Has no effect on template roads. |
token right_railing s16 right_railing_offset token left_railing s16 left_railing_offset
|
Unit names of the railings, as defined in /def/world/railing.sii , and their offsets, multiplied by 100. This is repeated three times because there are three models per side.
|
s32 right_road_height s32 left_road_height
|
Road height offsets, multiplied by 100. For single carriageways, the left offset only affects the left terrain. |
u64 node0_uid u64 node1_uid
|
The UIDs of the backward and forward nodes of the road. |
float length
|
Cached length of the road item. See Polyline item. The minimum length of a road is >0.4 m for Superfine, 1.25 m for High Poly, and 3.75 m for normal resolution. The maximum length of a road is 1000 m. |
Field(s) | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
token overlay_scheme
|
Road overlay. | ||||||||
The following parameters are repeated for the right and left side: | |||||||||
token right_model s16 right_model_offset s16 right_model_dist
|
Unit names of the models as defined in Appears twice because there are two models per side. |
||||||||
u16 right_terrain_size
|
Terrain size multiplied by 10. Maximum size is 6500. | ||||||||
array_struct right_vegetation
|
Vegetation settings, see Vegetation struct. Repeated three times. | ||||||||
token right_sidewalk
|
Sidewalk for legacy roads. | ||||||||
struct quad_info
|
Terrain data. See Quad Info struct. | ||||||||
End of repeated section | |||||||||
token center_material
|
Material for the center terrain. | ||||||||
u32 center_material_color
|
Center mat color as RGBA. | ||||||||
u16 center_material_rot
|
UV rotation of the material texture. | ||||||||
u32 rnd_seed
|
The seed used for placing vegetation. | ||||||||
float previous_length
|
Sum of the lengths of all preceding road items. | ||||||||
token center_vegetation
|
Vegetation type for the center. | ||||||||
u16 center_veg_density
|
Vegetation density, multiplied by 10. | ||||||||
u8 center_veg_scale
|
Scale of vegetation models. See Vegetation struct for possible values. | ||||||||
u8 center_veg_offset
|
Offset from the road, multiplied by 10. | ||||||||
u16 left_dvdm u16 right_dvdm u16 left_dvd u16 right_dvd
|
No Detail Vegetation From and To settings, multiplied by 10. | ||||||||
u32 veg_sphere_count array_struct veg_spheres
|
List of vegetation spheres. See Vegetation sphere struct. | ||||||||
u32 left_add_part_count array_token left_add_parts u32 right_add_part_count array_token right_add_parts
|
List of enabled additional parts. | ||||||||
u32 left_edge_override_count array_struct left_edge_override u32 right_edge_override_count array_struct right_edge_override
|
Places edge models along the specified section of the road rather than its entirety. The length of these segments matches the width of three road quads.
|
||||||||
u32 left_variant_override_count array_struct left_variant_override u32 right_variant_override_count array_struct right_variant_override
|
Applies a model variant to the specified sections of the road rather than its entirety. The length of these segments matches the width of three road quads. On single carriageways, only the right override applies to the road.
|
The resolution of a road segment and associated terrain quads can be changed with the High-poly Road and Superfine flags.
For legacy roads, a road without either flag set has a maximum quad size of 15 m. High-poly flag it to 5 m, and the mutually exclusive Superfine sets it to 1 m.
With template roads, only the terrain quads are affected; the road geometry does not change. In addition, Superfine is not available. If set, it has the same effect as High-poly.