Welcome to the Metruvia Content Creator Industries and Economy Guide to Transport Fever Custom Industries and Global Economy Logic. If vehicles are the lifeblood of Transport Fever 2, then industries are the vital organs that demand their movement. Creating a custom industry mod is perhaps the most ambitious undertaking for a creator, as it fundamentally alters the game’s mathematical simulation.
On the Steam Workshop, industry mods are often “set and forget.” However, on Mod.io, these modifications carry the highest risk of save-game corruption for console players. Because the game’s economy is a closed loop, removing an industry mod mid-save doesn’t just result in a missing model—it creates a logical vacuum that causes an immediate and permanent crash to the dashboard.
This masterclass will deconstruct the Transport Fever 2 economic engine. We will explore the architecture of cargo types, the scripting of production levels, the mathematics of supply-demand equilibrium, and the absolute technical mandates required to pass console certification without breaking the simulation.
1. The Economic Engine: Supply, Demand, and the “Sim”
To build a successful industry, you must first understand the game’s internal “Demand Logic.” Transport Fever 2 does not simulate individual items; it simulates Cargo Units moving through a directed graph.
1.1 The Cargo Chain Hierarchy
Every economy mod begins with a chain. A chain consists of:
Raw Producers: Industries that require no input (e.g., Coal Mines).
Processors: Industries that take Input A and convert it to Output B (e.g., Steel Mills).
Consumers: The final destination, typically Towns (Residential, Commercial, or Industrial zones).
In the game’s engine, the “Consumer” drives the entire chain. A Coal Mine will not produce a single unit of coal unless a Steel Mill is connected to it, and that Steel Mill is connected to a Town that demands Tools or Machines. This is a “Pull” economy, not a “Push” economy.
1.2 The Mathematics of Cargo Value
The profit generated by your custom industry is governed by the distance traveled and the “Cargo Value” defined in your script. The engine uses a base payment formula:
$$Payment = (CargoValue \times Units) \times (Distance \times SpeedFactor)$$
If you set your custom cargo value too high, you break the game’s difficulty balance; too low, and the player will go bankrupt trying to transport it. For Mod.io certification, Urban Games looks for “Vanilla-Equivalent Balance” to ensure your mod doesn’t trivialize the economic simulation.
2. Defining New Cargo Types (cargo_types.lua)
The foundation of your mod is the res/config/cargo_types.lua file. This is where the engine learns that “Lithium” or “Microchips” now exist in the world.
2.1 The Data Structure
Each cargo type requires a unique ID and a weight. Weight is critical because it affects the physics of the vehicles transporting it. A train carrying 100 units of “Lead” will accelerate slower than a train carrying 100 units of “Feathers.”
function data()
return {
id = “LITHIUM”,
name = (“Lithium”), weight = 1200.0, — Weight in kg per unit fictional = false, unitName = (“units”),
}
end
2.2 Transparency and Icons
For Mod.io users (especially on consoles), visual clarity is mandatory. You must provide a high-resolution, de-branded icon for your cargo.
Format: 64×64 pixel .dds (BC3 with Alpha).
Requirement: The icon must be legible on a 1080p TV from 10 feet away. Avoid thin lines; use bold, high-contrast silhouettes.
3. Industry Construction Scripts (.con Files)
The .con file is the most complex script in your mod. It defines the industry’s physical footprint, its 3D models, and its production logic.
3.1 The updateFn and Production Levels
Industries in Transport Fever 2 have five levels (0 through 4). As the player supplies more input, the industry levels up, increasing its production capacity. You must define this scaling in your updateFn.
$$Capacity_{Level} = BaseCapacity \times 2^{Level}$$
If Level 0 produces 100 units, Level 4 will produce 1,600 units. You must ensure your 3D models (Section 5) can handle the visual representation of this growth (e.g., adding more storage piles as the level increases).
3.2 Rule of the “Nav-Mesh”
When an industry is placed, it generates a “Nav-Mesh”—the invisible floor where trucks and trains drive. On consoles, a poorly configured Nav-Mesh will cause pathfinding loops that spike the CPU.
Mandate: Keep your industry’s internal road network simple.
Avoid: Placing sharp, 90-degree turns inside the industry boundaries.
4. The Mathematics of Production: Stocks and Slots
Transport Fever 2 uses a “Slot” system to manage inputs and outputs. If your industry requires 2 units of Iron Ore and 1 unit of Coal to produce 1 unit of Steel, you must define this ratio precisely.
4.1 Input-Output Ratios
In your .con script, the rule table defines the conversion logic.
{
input = { { 2, “IRON_ORE” }, { 1, “COAL” } },
output = { { 1, “STEEL” } },
capacity = 100
}
The Efficiency Factor: If you create a “Super Industry” with a 1:10 ratio, the Mod.io certification team may reject it for being “Game-Breaking.” Stick to realistic industrial ratios to maintain topical authority in the simulation community.
4.2 Stockpile Buffering
Industries have a “Stockpile” limit (typically 2x or 4x the current production level). If the stockpile fills up because the player isn’t transporting the goods fast enough, production stops. For console performance, avoid setting massive stockpile limits, as the engine has to track every “stored” unit in the unified memory pool.
5. Visual Optimization for Large Facilities
Industries are much larger than vehicles. While a train might have 40,000 triangles, a sprawling factory complex can easily hit 200,000 if you aren’t careful.
5.1 Draw Call Reduction (The Industry Challenge)
As discussed in Article 3, Draw Calls are the primary bottleneck on consoles. A factory with 20 different chimneys, 50 windows, and 10 storage tanks can trigger hundreds of draw calls.
Master Strategy: Use a single “Industrial Atlas” texture for the entire factory complex.
Mesh Merging: Merge all static buildings into one .msh file. Only keep moving parts (like fans or smoke emitters) as separate meshes.
5.2 Dynamic Smoke and Particles
Console OS limits the number of active particles. If your custom industry has 50 chimneys all emitting thick smoke, the console will strip the particles to save memory.
Constraint: Limit your emitters to 4 per facility.
Optimization: Use low-poly particle billboards and avoid custom shaders for smoke.
6. The “Critical Removal” Mandate (Saving the Console)
This is the most important section of this guide. On PC, if a player removes an industry mod, they can often use a “Save-Game Cleaner” tool to fix the errors. These tools do not exist on PlayStation 5 or Xbox Series X|S.
6.1 The severityRemove = "CRITICAL" Flag
If your mod adds a cargo type or a new industry building, your mod.lua must include: severityRemove = "CRITICAL"
This tells the Mod.io API and the console game engine: “Once this mod is active, it cannot be safely removed.”
If this flag is missing, your mod will be instantly rejected.
If a player tries to disable a “CRITICAL” mod, the game will present a massive red warning, preventing them from destroying their save file.
6.2 Industry Replacement Logic
If you want to update your industry mod (e.g., changing a texture), you must never change the internal id of the cargo or the building. If you change id = "MY_FACTORY" to id = "MY_FACTORY_V2", every console save game using that mod will crash upon loading.
7. Town Building Rules (Demand Injection)
Custom industries are useless if Towns don’t demand the product. You must modify the townbuilding logic to accept your new cargo.
7.1 Residential, Commercial, and Industrial (RCI) Demands
Commercial (C): Typically demands finished consumer goods (Tools, Food).
Industrial (I): Typically demands construction materials (Bricks, Steel).
Residential (R): In Transport Fever 2, Residential zones do not demand cargo directly, but they grow based on “Destination Reachability.”
7.2 Scripting the Demand
You must use a postRunFn in your mod.lua to inject your cargo into the vanilla town building templates.
— Adding custom cargo to all Commercial buildings
api.res.townBuildingRep.addModifier(“my_cargo_modifier”, function (fileName, data)
if data.type == “COMMERCIAL” then
table.insert(data.demands, “MY_CUSTOM_CARGO”)
end
return data
end)
Without this script, your industry will sit at 0% production forever, because no town in the world wants what you are making.
8. Audio and Ambience for Industries
A factory shouldn’t be silent. However, constant looping audio can be a memory drain.
8.1 Spatial Audio Boundaries
Industry sounds should use strict Mono .wav files at 22,050Hz. Since the player is usually zoomed out when looking at a factory, the high-frequency detail of 44.1kHz is wasted.
Boundary: Set the maxDistance for industry sounds to 300 meters. This ensures that the console isn’t processing “Factory Hum” for fifty different facilities simultaneously across the map.
8.2 Event-Driven Sounds
Trigger sounds based on production. For example, a “Clang” sound that only plays when the industry finishes a production cycle. This is much more memory-efficient than a 3-minute looping background track.
9. Summary: The Industry Certification Checklist
Before you publish your economy overhaul to Mod.io, ensure it passes this “Anti-Rejection” audit:
The Critical Flag: Is severityRemove set to "CRITICAL"?
The Ratio Check: Are your production ratios (Input:Output) balanced against vanilla standards?
The Town Hook: Have you used postRunFn to ensure towns actually demand your cargo?
Draw Call Audit: Have you merged your industrial meshes and used texture atlasing?
Nav-Mesh Integrity: Can a vanilla truck drive through your facility without getting stuck?
De-Branding: Did you remove real-world logos from the factory walls and cargo icons?
Creating a custom industry is an act of world-building. By mastering the mathematical logic and the technical guardrails of the Transport Fever 2 engine, you aren’t just giving players a new building; you are giving them a new reason to build, a new challenge to solve, and a more vibrant, living economy.
