Transport Fever 3 Wiki
Docs» Modding Manual» Infrastructure» Edge Addons

Edge Addons

Edge addons can be used by the player to decorate streets or tracks with functional addons, e.g. noise insulation walls.

Configuration

Edge addons are configured in a .edge.lua file. It's basic definition is:

function data()
  return {
    desc = {
        icon = "alley_old.tga",
        previewIcon = "alley_old_preview.tga",
        name = _("INFRA_EDGE_ADDON_ALLEY_NAME"),
        description = _("INFRA_EDGE_ADDON_ALLEY_DESCRIPTION"),
    },
    availability = { 
        yearFrom = 1900,
        yearTo = 1940,
    },
    menuCategory = {
        categories = {
            {
                category = "roads_tools",
                order = 500,
            },
        }
    },
    cost = { 
        price = 100,
        priceScale = 1,
    },
    maintenance = {
        runningCosts = 10,
    },
    builderAudioRes = "::/gui/construction/sound/tool_edge_alley.builder_audio",
  }
end

The desc struct contains:

  • name is the name of the edge addon type. It can be translated in a strings.json file.
  • description is the description text in the construction menu. It can be translated in a strings.json file.
  • icon is a reference to a ui @2x.tga icon which has a resolution of 240×150 pixels shown in the menu.
  • previewIcon is reference to a .tga image that is used as background image for the info box. It has a resolution of 720×405 pixels.

The availability range is set with:

  • yearFrom is the year from when the edge addon should be available. Unset or values below 1901 mean from start.
  • yearTo is the year until when the edge addon should be available. Unset or value 0 means unlimited availability, values below 1900 result in a never available railroad crossing.

The menuCategory is used to define the filter categories and order. See the construction menu for more details about them.

cost FIXME maintenance FIXME

The builderAudioRes reference points to a sound configuration for the construction sound of the edge addon.

The following functional properties are also part of the .edge.lua:

    requiredTags = {"withSidewalk"},
    incompatibleTags = {"track", "tunnel", "decorated", "bridge"},
    categoryList = {
        categories = {
            "alley"
        }
    },
 
    snapMode = "Side", -- "Side", "Center"
 
    preventParcels = false,
    modifiers = {
        noiseModifier = -0.10,
        pollutionModifier = -0.50,
        maxSpeedModifier = -0.25,
    },

To be able to place this addon on an edge, the edge must provide the requiredTags and may not have any of the tags from incompatibleTags. The following tags are available by default:

  • track is set for any track type
  • street is set for any street type
  • decorated is set for any edge with at least one addon
  • bridge is set for any edge that is a bridge
  • tunnel is set for any edge that is a tunnel

The categoryList.categories is a list of tags that are added when this addon is active on an edge.

The snapMode defines whether the addon can be placed on each Side individually or is applied to the Center of the edge.

With preventParcels set to true, the addon prevents town buildings from spawning (on this side).

The modifiers list is a list of modification factors to attributes of the edge:

  • noiseModifier affects the noise generated by vehicles on the edge
  • pollutionModifier affects the pollution generated by vehicles on the edge
  • maxSpeedModifier affects the maximum speed allowed on the edge.

The following properties in the .edge.lua define the visual representation:

    length = 10.0,
    repModel = "::/assets/vegetation/trees/mt_mpl_01/mt_mpl_01.mdl",
    offset = -2.0,
    modelRotation = "RandomXY",
    skipSameInParallelStrip = false,

Along the edge, there are segments with an interval defined by length. The repModel is the reference to the model that is placed in the center of each of these segments. Its orthogonal offset from the axis of the edge is defined by offset and the rotation of the models is either None or RandomXY which is a random rotation in the XY plane around the z axis.

skipSameInParallelStrip FIXME

Previous Next

Transport Fever 3 Wiki
Game Manual
●
Modding Manual
  • Introduction
  • General
    • Mod Definition
    • Syntax
    • Mod Parameters & Scripts
    • Resource Types & Structure
      • .mdl
      • .msh
      • .mtl
    • Guidelines & Requirements
    • Best Practices
    • Publish a mod
  • Tools
    • Model Editor
    • Terrain Generator Editor
    • External Tools
  • Vehicles
    • Vehicle Basics
    • Vehicle Types
    • Vehicle Advanced Topics
    • Repaint Mods
  • Constructions
    • Construction Basics
    • Construction Menu
    • Construction Types
    • Modular Constructions
    • Construction Templates
    • Ground Textures
  • Infrastructure
    • Tracks and Streets
    • Bridges and Tunnels
    • Signals
    • Railroad Crossings
    • Traffic Lights
    • Edge Addons
  • Environment
    • Climate Zones
    • Environments
    • Terrain Generators
    • Terrain Materials
    • Animals
    • Landscape Assets
  • Misc
    • Cargo Types
    • People
    • Sound Sets
    • Playlists
    • Names
    • Localizations
  • Scripting
    • API Reference
    • Missions

Table of Contents

Table of Contents

  • Configuration

Transport Fever 3 ● Urban Games © 2026