Skip to content

ConnectionDefinition

public sealed class ConnectionDefinition

Namespace MapExpansions

A drivable and walkable link between the main world and an expansion. The route runs along the road surface’s centre line, from the main-world end to the expansion end. The framework builds the stretches, clears what stands in their way, joins the vehicle graphs and the NPC navigation at both ends, and keeps every collider the route depends on active.

public string Name { get; set; }
public List<RoutePoint> Route { get; }

Type: RoutePoint

public float RoadWidth { get; set; }

Width of the drivable deck between the curbs.

public float WalkwayWidth { get; set; }

Width of each walkway beside the deck.

public float CurbHeight { get; set; }
public float WallHeight { get; set; }

Height of the straight tunnel wall above the walkway.

public float CrownHeight { get; set; }

Height of the vault’s crown above the road.

public float GuardHeight { get; set; }

Height of the guard walls on RouteStyle.Road stretches.

public float MedianHeight { get; set; }

Height of the barrier between the two directions where a route point gives it a width.

public float ShellThickness { get; set; }

Thickness of the rock shell around a tunnel, which closes holes cut into hills and rock.

public float PortalMargin { get; set; }

How far the facade around a tunnel mouth reaches beyond the shell, to the sides and above. The facade closes what the clearing cut out of the slope or a portal around the mouth. 0 builds none.

public float? StartPortalMargin { get; set; }

PortalMargin at the route’s first portal only, for a portal whose surroundings already close the slope, such as a rock mantle. Unset uses PortalMargin.

public float? EndPortalMargin { get; set; }

As StartPortalMargin, at the route’s last portal.

public float LightSpacing { get; set; }

Metres between two tunnel lights.

public float LightRange { get; set; }
public float LightIntensity { get; set; }
public Color LightColor { get; set; }
public MaterialRef RoadMaterial { get; set; }

Type: MaterialRef

public MaterialRef WalkwayMaterial { get; set; }

Type: MaterialRef

public MaterialRef WallMaterial { get; set; }

Type: MaterialRef

public MaterialRef ShellMaterial { get; set; }

Type: MaterialRef

public PathPoint? VehicleJoin { get; set; }

Type: PathPoint

Main-world point where the vanilla vehicle graph and the expansion’s graph overlap. The framework joins the two there across the road’s width.

public List<ObjectRule> Keep { get; }

Type: ObjectRule

Objects that stay although they stand in the route’s way. Everything else that intersects the inside of a built stretch is switched off, or cut where it is too large to switch off as a whole.

public List<ObjectRule> ClearApproach { get; }

Type: ObjectRule

Objects of the existing world that reach over the road in front of the built range, such as a rock face over the lanes before a portal. Over the last ApproachLength metres of road at both ends they are cut across the road’s width, from its surface to the crown; the rest of them stays. Other objects there stay whole. The rules select by name, parent and area; their effect is not read.

public float ApproachLength { get; set; }

Metres of existing road before and after the built range that count as its approach: terrain above the road becomes a hole there, and ClearApproach objects are cut.

public WingWalls StartWingWalls { get; set; }

Type: WingWalls

Sides on which the tunnel’s walls run on in front of the portal at the start of the built range, over ApproachLength metres, as thick as the shell and as high as the portal frame. For a rock face beside the approach: it ends behind the wall instead of in a cut edge, and ClearApproach objects are cut up to the wall on that side.

public WingWalls EndWingWalls { get; set; }

Type: WingWalls

As StartWingWalls, at the portal at the end of the built range.

public float StartCover { get; set; }

Metres of tunnel behind the route’s first portal that lie under a rock mantle on upright sides. At its far end it is as wide and high as the facade, and it narrows to the portal’s frame. For a tunnel that leaves its hill before the portal: seen from the side, its last metres lie in rock instead of standing free. The mantle should end inside the hill. 0 builds none.

public float EndCover { get; set; }

As StartCover, behind the route’s last portal.

public ConnectionDefinition Add(PathPoint point, RouteStyle style)

Types: PathPoint, RouteStyle

public ConnectionDefinition Add(
PathPoint point,
RouteStyle style,
float roadWidth,
float medianWidth = 0f)

Types: PathPoint, RouteStyle

Adds a point with its own road width and median, see RoutePoint.RoadWidth.