Network Asset Creation

About

Networks consist of nodes and segments, they are used for roads, tracks, canals, walls, fences, powerlines etc.

Networks are arguably the most complicated type of assets (depends on what you are creating) so this article assumes you are familiar with basic asset creation such as props and buildings, so it skips basic concepts such as what is a mesh, pivot etc.

Template

The template you choose will be fully imported as the starting point of your network, so choose one that is closest to your desired result. You can change almost everything later in the asset editor itself, or using ModTools scene explorer Ctrl+E or running scripts in the console F7.

Elevations

Depending on the AI of your network, it may have elevations such as Elevated, Bridge, Slope, Tunnel, which are their own complete networks with their own properties, lanes, segments, and nodes, which are bundled together with the Basic network inside the same .crp file.

Elevations trigger at specific build heights, or when chosen by the player using Fine Road Tool. Slope is used for the basic to tunnel transition.

Deleting

If you don't need specific elevations, you can delete them by opening ModTools scene explorer Ctrl+E, going to Tool Controller > ToolController > m_editPrefabInfo > m_netAI and clicking Unset on the ones you don't need, then saving and loading the asset.

Adding

If your template didn't have elevations, but you need them, you may be able to add them, depending on what AI your network has. This can be done by copying any other network into one of the possible elevations.

You can find the base game networks in scene explorer Ctrl+E: Sunny (or North/Tropical/European/Winter, based on the theme environment you loaded for the asset editor) Collections > Road > NetCollection > m_prefabs. For example you could go to Basic Road > m_netAI, click Copy on m_bridgeInfo, and then go to Tool Controller > ToolController > m_editPrefabInfo > m_netAI and click Paste on m_bridgeInfo here, then save and load the asset.

If you would like to copy a custom network into one of the elevations, you can also find those in scene explorer: Custom Prefabs > ModTools.CustomPrefabs > m_nets.

Properties

The general properties are based on the AI the road has, that means for canals or cable car networks some of them might be different, this list is primarily based on the one for RoadBridgeAI, used for elevated networks of any normal road, but also contains properties which only appear on some other AI.

You can change the AI using Asset AI Changer by Snow_Cat & cerebellum .

Half-width

This is used to determine how roads of different widths connect - nodes of narrow roads will widen to meet wider roads.

Used to define the width of surface paint (such as pavement, gravel, or terrain clipping) but becomes very unreliable when lower than 4.

It's also the width of the area affected by flatten terrain, drawable/selectable area and affects how the road will snap to the grid.

The half-width should be wide enough to cover the entire mesh of the network, otherwise the LOD may display incorrectly.

Pavement Width

Defines the width of the pavement on each side of the road, used to properly connect curbs with other roads at nodes. For correct nodes when intersecting with other roads, the half-width and pavement width values must be set appropriately.

Segment Length

This needs to match the length of the mesh used for the segment (and node if used), otherwise, the road will overlap itself or have holes.

Min / Max Height

Defines collision area for water and building other roads over/under it.

Max Slope

Maximum slope angle allowed for building the road.

Max Build Angle

Maximum angle allowed for intersecting the road. Limited to 135° by the game.

An example 135° intersection

An example 135° intersection.

Max Turn Angle

When a node between 2 segments exceeds this angle, a node will be used, instead of a regular bent segment.

Example of 90° (left) and 89° (right) max turn angle

Example of 90° (left) and 89° (right) max turn angle.

Min Corner Offset

Increases corner smoothing, this is more noticeable for sharp turns at low angles. High values will make the road hard to use in tight situations.

Example of 0 (top) and 16 (bottom) min corner offset

Example of 0 (top) and 16 (bottom) min corner offset.

Build Height

When building the road, it will be created higher or lower than the player has chosen based on this value.

Surface Level

CO states this is the default height for vehicles and pedestrians, although it seems ingame the individual vertical offset for lanes is used instead.

Create Pavement / Gravel / Ruining

Applies surface paint based on the half-width of the road.

Flatten Terrain

Flattens terrain based on the half-width of the road.

Lowers Terrain

Lowers terrain based on the half-width of the road. Usually used for elevated roads to prevent the terrain from clipping into them.

Clip Terrain

Uses terrain clipping to create a hole in the ground, the actual hole is slightly smaller than the half-width, and it becomes very unreliable when half-width is less than 4. This also creates ruining around the hole.

Follow Terrain

Places nodes according to terrain when building the road. Usually disabled for elevated or tunnel networks.

Flat Junctions

Forces area around nodes to be completely flat. Note that the centers of intersections will be flat no matter what.

Clip Segment Ends

Enables the use of bent nodes on intersections, used for most normal roads. If disabled and the network has no nodes, the segments will connect directly, which is used for wall networks, or with an offset based on min corner offset.

Twist Segment Ends

Twists segment ends to align to the pillar, only used for power lines and cable car paths to make sure the wires connect to the pylon correctly.

Straight Segment Ends

Tries to prevent the segment ends from bending/skewing at intersections.

Enable Bending Segments

Automatically bends segments when building intersections at sharp angles.

Enable Bending Nodes

Use a bent segment instead of a node on sharp corners.

Can Cross Lanes

Allows traffic to cross oncoming lanes at intersections, disabled only for roads with medians.

Can Collide

Enables checking for collisions when building.

Block Water

Used for the dam, canals, flood wall, quay. Blocks water based on half-width and min/max height properties.

Auto Remove

Destroys the road when something else is built over it, if can collide is enabled. Used for pedestrian paths, walls, trench, and powerlines

Connect Group

Nodes of the current or other networks which match this connect group and have direct connect enabled will show up in intersections. For example - tram track nodes do this.

Enable Zoning

Creates the zoning grid based on the road half-width, but no closer than 8m to the center.

Double Length

Used for the large highway bridges, alternates between two types of pillars and allows building longer segments than usual. Only works with disabled bending segments.

Can Modify

Unknown, enabled for all elevated networks.

Traffic Lights

Enables the traffic lights node flag for intersections involving the road. The actual traffic light props themselves must be added as lane props.

Highway Rules

Unknown, involved in code related to lane routing and simulation. Enabled only for all highways.

Accumulate Snow

Allows for the snow to accumulate on the road on winter maps.

Noise Accumulation / Radius

Affects noise pollution simulation.

Center Area Width

Unknown.

Water Block Offset

Used for canal depth (negative) and flood wall height.

Pillar / Pylon / Power Pole

Allows embedding a building inside the network asset for use as a pillar which appears on nodes. Some AIs have specific pillars for different heights, corners, or intersections.

Middle Pillar

Only used for Double Length networks, used for the large highway bridges for alternating pillars.

Bridge / Middle Pillar Offset

Raises or lowers the pillars.

Hidden Properties

Some properties are not visible in the road editor UI, but can be changed by using ModTools scene explorer Ctrl+E and going to Tool Controller > ToolController > m_editPrefabInfo or running scripts in the console F7.

m_enableMiddleNodes

If this is disabled, every node will be an intersection. This is disabled for train or monorail station tracks so they always have the track cross node, and also for road slope(tunnel entrance) networks.

m_setVehicleFlags

Vehicles driving on the network will get these flags applied. Used for OnGravel flag which adds a dust effect on gravel roads, and Underground flag to make vehicles invisible in tunnels. This can be changed using a script .

m_setCitizenFlags

Same as m_setVehicleFlags but for citizens.

m_useFixedHeight

Used for networks which are specifically used inside buildings - such as station tracks or the harbor road. If enabled, makes sure the networks stay at the same level relative to the building, even on uneven terrain.

m_terrainStartOffset & m_terrainEndOffset

Used to force lowered or raised terrain at the start or end nodes of a network. Used for slope networks - tunnel entrances.

Lanes

Lanes are usually used for vehicles and pedestrians, but can also be used as a container for props.

Some lane properties have no official documentation, therefore some explanations might be inaccurate.

Position

Distance from the center of the road.

Width

The width of the lane.

Vertical Offset

The height position of the lane.

Stop Offset

Lane position offset used for pedestrian lanes with stop types, used for public transport stops such as bus and tram.

Speed Limit

1.0 equals 50 km/h speed limit signs on vanilla. Usually 0.25 for pedestrian lanes, 0.8 for vehicle lanes on basic roads, 1 or 1.2 for larger roads, 2 for highways.

Direction

Forward for right-hand lanes, backward for left-hand lanes. Automatically flips on left-hand traffic maps.

Lane Type

Determines the kind of traffic the lane is meant for.

Vehicle Type

If the lane type is set to vehicle, this defines which vehicle types can use the lane. Also used for dedicated lanes to define trolleybus left and right poles.

Stop Type

Used for pedestrian lanes, on which people will wait for public transport.

Allow Connect

Used to find road access for buildings. Likely used for spawning or visiting vehicles. Usually disabled on any slope, elevated and bridge networks, also disabled on blimp, monorail, and cable car paths.

Use Terrain Height

Uses terrain instead of lane vertical offset or surface level. Used for ground pedestrian paths.

Center Platform

Used for pedestrian lanes for tram stops in the middle of the avenue.

Elevated

Used for elevated pedestrian lanes which are not accessible from the regular roadside pedestrian lanes. Used only for the medium road monorail station stop lanes.

Lane Props

You can add props to lanes, such as hydrants, manholes, arrows, traffic lights, signs etc. except terrain conforming props such as fences. Lane props don't get embedded into the road asset .crp file, so you must add published workshop props.

Flags

Required and forbidden conditions which determine when the prop will appear.

Start and End flags refer to the direction of the lane, as it goes in one direction from start to end.

Read more about flags.

Color Mode

Determines state of traffic lights and level crossing props.

Position

Prop XYZ offset relative to the lane position.

Angle

Rotation of the prop.

Segment Offset

Pushes the prop towards the end of the segment

Repeat Distance

When set to 0, repeats once per segment.

Min Length

Minimum segment length required for the prop to appear.

Corner Angle

1 Means the prop will rotate to match the intersection if it's near it. The value 0.5 is used for traffic lights to not be perpendicular to the road at angled intersections.

Probability

Percentage chance of the prop appearing.

Segments

Segments can be the main mesh of your network, or also used for specific segments, like a bus stop on one side, bus stop on both sides.

Flags

Required and forbidden conditions for each direction which determine when the segment will appear.

Read more about flags.

Disable Bend Nodes

Disables using the segment as a node on turns which exceed the Max Turn Angle.

Road Color

The upward road (asphalt) texture will get multiplied by this color.

Shader

Basic

Used for ground-level roads. Instead of alpha being used for making the mesh transparent, it shows the underlying terrain such as grass or ruined. Will have weird normals/shading in many situations. Doesn't display normal maps.

Bridge

Used for elevated roads and bridges.

Rail

Same as bridge but shows gravel instead of pavement.

Wire

Used for power lines, tram wires, and cable car cables. Has specific mesh requirements .

Fence

Conforms to terrain, used for Parklife fences. Can't be used for nodes. Can't be used in combination with segments/nodes which have other shaders. Lane props may not match the terrain conforming network depending on the AI and other settings.

Nodes

Nodes can be used for intersections, sharp turns, transitions, dead-ends.

Flags

Required and forbidden conditions for each direction which determine when the node will appear.

Read more about flags.

Connect Group

Limits the node to connect to networks which have this connect group. Works only when direct connect is enabled.

Direct Connect

Instead of splitting a node mesh in half and connecting each side separately, connects each segment in an intersection to every other segment. This is used for train tracks.

Shader

Same as for segments.

Flags

There are many node, segment, and lane flags, and some of them might have different uses and results in different situations, so their descriptions might be incomplete or not relevant in all cases.

Node

Node flags are used to determine when certain nodes or lane props appear.

Created

Active for all created nodes.

Deleted

Unknown.

Original

Active for nodes of networks which were on the map originally, not created by the user.

Disabled

Unknown.

End

Active for a dead end - where the road ends.

Middle

Active for nodes between 2 segments of the same network.

Bend

Active for nodes for sharp corners where a road changes direction suddenly and nodes where an asymmetric network changes direction.

Junction

Active for nodes which are intersections and transitions between 2 different networks.

Moveable

Possibly related to nodes which will be automatically moved when creating an intersection which splits a segment into two.

Untouchable

Active for nodes of networks which are placed within buildings, and therefore can't be deleted or upgraded under normal circumstances.

Outside

Active for nodes which are at the edge of the map and connected to the "outside world".

Temporary

Unknown.

Double

Active for the "middle" node of a double length network. For example - the node where the big pillar for highway suspension bridges is.

Fixed

Related to public transport line stops, unlikely to be related to normal networks created by the player directly.

OnGround

Active for nodes which are on the ground, as opposed to being part of an elevated, bridge, or tunnel network. Likely to be based on the AI of the network.

Ambiguous

Unknown. Likely to be related to automatically generated "transport lines" from the "outside world".

Water

Related to water/sewage pipes.

Sewage

Related to water/sewage pipes.

ForbidLaneConnection

Related to invisible networks such as pedestrian paths, ship dock or busway networks.

Underground

Active for nodes of networks which are tunnels.

Transition

Active for nodes between networks which have different "levels". For roads - dirt road is level 1 and the other roads have level 2 - 5 based on their UI category.

LevelCrossing

Active for nodes which are train/road intersections. But also could be used for other things such as the canal lowered end node.

OneWayOut

Active for nodes which have literally only one way out - only one network with lanes which lead "out" from the current node.

TrafficLights

Active for nodes which have traffic lights.

OneWayIn

Active for nodes which have literally only one way in - only one network with lanes which lead "in" from the surrounding nodes.

Heating

Related to water/sewage/heating pipes.

Electricity

Related to power line networks.

Collapsed

Unknown. Likely related to Natural Disasters DLC.

DisableOnlyMiddle

Related to ship paths.

AsymForward

Active for nodes where an asymmetric network changes direction from backward to forward, related to the direction in which the player draws the road.

AsymBackward

Active for nodes where an asymmetric network changes direction from forward to backward, related to the direction in which the player draws the road.

CustomTrafficLights

Active for nodes for which the player has toggled traffic lights.

Segment

Segment flags are used to determine when certain segments appear or how they appear.

Created

Active for all created segments.

Deleted

Unknown.

Original

Active for segments of networks which were on the map originally, not created by the user.

Collapsed

Unknown. Likely related to Natural Disasters DLC.

Invert

Active for every other segment of a continuously drawn network. Can be used to prevent the segment mesh from flipping every other segment.

Untouchable

Active for segments of networks which are placed within buildings, and therefore can't be deleted or upgraded under normal circumstances.

End

Active for a dead end - where the road ends.

Bend

Used to display a bend segment mesh where a Bend node is.

WaitingPath

Related to transport lines and combustion engine ban district policy. Unlikely to be related to normal networks created by the player directly.

PathFailed

Related to transport lines and pathfinding. Unlikely to be related to normal networks created by the player directly.

PathLength

Related to transport lines and pathfinding. Unlikely to be related to normal networks created by the player directly.

AccessFailed

Related to pathfinding.

TrafficStart

Related to traffic light state. Also active for some "end" segments of networks using decoration wall AI.

TrafficEnd

Related to traffic light state. Also active for some "end" segments of networks using decoration wall AI.

CrossingStart

Related to traffic light state. Also active for some "end" segments of cable car networks, canals, or decoration walls.

CrossingEnd

Related to traffic light state. Also active for some "end" segments of cable car networks, canals, or decoration walls.

StopRight

Active for segments with a bus stop on the right side based on the direction the road was built.

StopLeft

Active for segments with a bus stop on the left side based on the direction the road was built.

StopRight2

Active for segments with a tram stop on the right side based on the direction the road was built.

StopLeft2

Active for segments with a tram stop on the left side based on the direction the road was built.

HeavyBan

Active for segments inside a district which has the heavy traffic ban policy.

Blocked

Unknown. Likely related to traffic simulation when a building fire blocks nearby segments.

Flooded

Active for segments which are flooded with water.

BikeBan

Active for segments inside a district which has the bike ban policy.

CarBan

Active for segments inside a district which has the old town policy.

AsymForward

Used to display an asymmetric segment mesh where an AsymForward node is.

AsymBackward

Used to display an asymmetric segment mesh where an AsymBackward node is.

CustomName

Active for segments which have a custom street name assigned by the player.

NameVisible1

Active for segments which display the street name.

NameVisible2

Active for segments which display the street name.

YieldStart

Active for segments which have a player assigned stop sign at the start of the segment based on the direction it was built.

YieldEnd

Active for segments which have a player assigned stop sign at the end of the segment based on the direction it was built.

Lane

Lane flags can be used to control when lane props are visible.

Created

Active for all lanes of created networks.

Deleted

Unknown.

Inverted

Active for all lanes on left side traffic maps.

JoinedJunction

Related to very short segments, with intersections on both sides. Used to hide traffic lights on such segments.

Forward

Likely active for all "forward" lanes based on the direction the road was built.

Left

Used for arrow decal lane props.

Right

Used for arrow decal lane props.

Merge

Likely active for lanes which continue to merge to a lower amount of lanes.

Stop

Active for lanes which are bus stops. Used in combination with Stop2 for sightseeing bus stops.

Stop2

Active for lanes which are tram stops. Used in combination with Stop for sightseeing bus stops.

YieldStart

Active for lanes of segments which have a player assigned stop sign at the start of the segment based on the direction it was built.

YieldEnd

Active for lanes of segments which have a player assigned stop sign at the end of the segment based on the direction it was built.

StartOneWayLeft

Likely active for lanes which begin after splitting off from the right side of a one-way road at a significant enough angle, the same angle required for the previous lane to get the Right flag.

StartOneWayRight

Likely active for lanes which begin after splitting off from the left side of a one-way road at a significant enough angle, the same angle required for the previous lane to get the Left flag. Also used for "no right turn" signs.

EndOneWayLeft

Likely active for lanes of a one-way road which is about to merge with another one-way road from the left side at a significant enough angle, the same angle required for the other one-way road to get the Left flag. Also used for "no left turn" signs.

EndOneWayRight

Likely active for lanes of a one-way road which is about to merge with another one-way road from the right side at a significant enough angle, the same angle required for the other one-way road to get the Right flag.

Mesh

The mesh for segments and nodes usually is an extruded profile, but some also have railings or other details. The mesh itself is usually 64 meters long, and it will always stretch for the entire segment, so it's not recommended to rely on the segment mesh for anything else other than the extruded profile, and use lane props for other details (like fence beams) instead.

The mesh is also subdivided multiple times, usually 16. The more subdivisions, the smoother it will look when bending.

Node meshes used for intersections require a cut through the middle, so the game can split it, also the center vertex will be placed in the middle of the intersection.

Vanilla six-lane road segment mesh

Vanilla six-lane road segment mesh.

UV Mapping

Normally you only have control over the horizontal (U) UV mapping (horizontal/vertical is called UV when talking about the texture image itself) because the game will automatically tile it along the segment approximately every 20 meters depending on how long the segment is.

You may have details for which you want to disable this automatic tiling, this can be done using vertex paint - by setting the green channel for those parts to 0, which means those parts would be 255,0,255 (magenta). This will make sure the texture is exactly as you UV map it, so it will stretch together with the segment.

A road mesh, its uv mapping, and how it appears ingame using tiling or vertex color

A road mesh, its uv mapping, and how it appears ingame using tiling or vertex color.

You can use the Network Tiling mod to change how much the texture is tiled along the segments and nodes. Tiled textures with alpha mapping will cast shadows which will not have the tiling.

LOD

For the LOD mesh, the UV mapping must be within the 0-1 area (main tile) of the UV map, no tiling is allowed. This is because ingame all the LOD textures are combined into a single texture called an atlas, so having incorrect uv mapping will end up putting the texture of some other random network on your LOD.

Wire Shader

The wire shader requires a specific kind of mesh - each "wire" should be a vertical plane, which can be subdivided and curved like the vanilla powerlines.

It should be UV Mapped horizontally from -1 to 1 but the height of the uv mapping depends on the height of the mesh, for example - on the vanilla powerline mesh each wire is 4m high, so the UV mapping vertically goes from -2 to 2.

The vertex paint green channel must be 0. The blue channel controls the amount of sway in the wind, 0 means no sway. The red channel controls the phase of the sway.

The vanilla powerline wire mesh showing vertex paint and uv mapping

The vanilla powerline wire mesh showing vertex paint and uv mapping.

LOD Mesh

The LOD mesh should not be outside the half-width, otherwise it might display incorrectly.

Textures

Diffuse

Just like any diffuse texture, defines the main color of the network.

Defaults to white.

An example diffuse texture for an expressway

An example diffuse texture for an expressway.

Alpha

When black, on the basic shader, it displays the terrain underneath, on other shaders it works like an alpha map usually would.

Black means invisible, white is visible. Defaults to white.

Pavement

Usually displays the map theme pavement texture, but for the rail shader - it shows gravel instead.

Black means no pavement, white means pavement. Defaults to black, unless no diffuse is imported.

Road

Displays the map theme upward road (asphalt) texture, which also is multiplied by the segment color.

Black means no asphalt, white means asphalt. Defaults to black.

Normal

Works similarly to any other normal map.

Doesn't require any inverted channels for parts which are vertex painted magenta, but it does require the green channel to be inverted for parts using the automatic tiling.

Read more in the normal map article .

Defaults to flat.

Specular

Just like any specular.

Defaults to black.

LOD Textures

Even if you don't need a diffuse texture (because the network uses only asphalt and/or pavement), you should still import a diffuse texture for the LOD, otherwise the LOD will import incorrectly.

Save & Update

Saving, loading, and resaving a network asset which has elevations (elevated, bridge, slope, tunnel) may rename the elevations. This can result in previously placed networks disappearing from a savegame, or even breaking the savegame.

A script can be used to rename the elevations based on the asset name. You should only run this script when the asset is finished, saved with the final name it should have, loaded again, but not yet placed in a save game. And when updating a network which was saved with this script, the script should be reapplied every time before it is resaved.

Adaptive Roads

Adaptive Roads by kian.zarrin is a mod which extends the capabilities and UI of the network editor