Diesel Locomotive Sound Replacement


Custom GEVO-style 4-notch diesel sounds with acceleration-based notching.

Content
12 hours ago
2.0
0
Transportation Trains
Owner:
trainman264
Source:
N/A
Homepage:
N/A
License:
Mozilla Public License 2.0
Created:
12 hours ago
Latest Version:
1.1.0 (12 hours ago)
Factorio version:
2.0
Downloaded by:
0 users

Diesel Locomotive Sound Replacement – GEVO Notching System
Bring real American diesel power into Factorio.

This mod overhauls the locomotive audio experience using a custom-built 4-notch GEVO-style sound system, complete with smooth transitions, bell control, and a full player-driven sound architecture.

Factorio’s world runs on automation… now your trains finally sound the part.

🚂 Features
✔ Authentic 4-Notch Diesel Throttle System

Your locomotive now responds like a real ES44AC-style GEVO:

Idle → Notch 1 → Notch 2 → Notch 3 → Notch 4

Each transition uses its own custom sound (1→2, 2→3, 3→4, etc.)

Downshifts have their own unique audio as well

Transition lengths are based on the actual duration of the audio files for smooth, natural behavior

✔ Automatic Notch Logic

The mod reads:

Player acceleration

Braking

Train speed

And smoothly “chases” the correct notch over time, without jumping or stacking sounds.

It behaves like a simplified version of real diesel-electric throttle control.

🔔 Functional Bell System

Press B in the cab to toggle the locomotive bell:

Loops continuously while ON

🎛 Diesel System Toggle (GUI Button)

A clean, integrated button appears in Factorio’s shared mod GUI bar:

Diesel: ON = Use the full GEVO sound system (all custom sounds)

Diesel: OFF = Revert to vanilla/working_sound audio

Toggle mid-game without needing to reload

This is perfect when testing, or if you want vanilla trains + custom trains in the same playthrough.

🌍 AI & Trackside Sound Support

Factorio does not allow modifying locomotive sounds dynamically at runtime, so we use a clever workaround:

When Diesel System is ON:

You hear the full GEVO notching inside the cab

When OFF or when AI trains pass by:

A quiet “working_sound” bed plays based on notch2_load

This gives consistent, trackside engine ambience even for trains you aren’t driving.

⚙ Limitations (and Why They Exist)

Factorio has a very strict sound API.
Because of this, we ran into several unavoidable limitations:

  1. You cannot change locomotive working_sound during gameplay

The engine does not expose a runtime working_sound_volume or working_sound field.
Trying to modify it crashes the game.

This is why:

We define the working_sound once in data.lua

When Diesel System is ON, we simply overpower it with custom cab audio

When OFF or outside the cab, the base bed is audible

  1. Sounds played through control.lua cannot “attach” to entities

player.play_sound and surface.play_sound cannot follow trains automatically.

Because of this, all custom notches and bells are tied to the driver, not the train entity.
This keeps the cab audio stable and consistent.

  1. Looping & transitions must be manually timed

Factorio has:

No built-in audio channels

No per-entity sound memory

No crossfade tools

So we manually control every notch, loop, and transition using timestamps and per-sound durations.

This actually produces very realistic diesel behavior—but it took clever tricks to work around engine limits.

🔊 Recommended Settings (Important for Realism)
Lower the vanilla “working_sound” volume for best results

Inside the mod’s files (data.lua), you can adjust:

volume = 0.10

This controls how loud the base locomotive hum is when:

The diesel system is OFF

AI trains are passing by

You are standing outside the locomotive

If you want a fully GEVO-dominant experience:

volume = 0.05

If you want more trackside diesel rumble:

volume = 0.20 – 0.30

Or turn the GEVO system OFF via the GUI toggle to return to vanilla train audio.

📦 What This Mod Is (and Isn’t)
This mod IS:

A highly immersive diesel sound simulator

A full 4-notch GEVO notching system

A dynamic audio layer that responds to your driving

A way to bring American mainline railroading to Factorio’s dieselpunk world

This mod is NOT:

A dynamic sound engine that overrides all Factorio limits

A per-entity 3D audio system (Factorio simply cannot do this)

A universal sound overhaul for all trains (unless you use it that way)

🔥 Final Notes

This mod pushes Factorio’s audio system harder than almost any existing train mod. Nearly everything here is handcrafted to work around engine restrictions without breaking stability.

The end result is a surprisingly realistic, responsive, and satisfying diesel locomotive experience—something Factorio has never had before.

Enjoy the ride, engineer. 🚂💨