Stop factorio using vanilla ambient music

This is the place to request new mods or give ideas about what could be done.
SpacebladeofWTF
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun May 24, 2020 9:56 pm
Contact:

Stop factorio using vanilla ambient music

Post by SpacebladeofWTF »

i've seen a cool mod that add communist song but it will also play the vanilla music if someone could create a mod that prevent the game using the vanilla song (or know the lua command i know how to add song but this dunno mate)
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Stop factorio using vanilla ambient music

Post by darkfrei »

SpacebladeofWTF wrote: Sun May 24, 2020 10:12 pm a mod that prevent the game using the vanilla song
Place it into the data.lua in your mod (not tested):

Code: Select all

for ambient_sound_name, ambient_sound in pairs (data.raw["ambient-sound"]) do
  ambient_sound.sound.volume = 0
end
or

Code: Select all

for ambient_sound_name, ambient_sound in pairs (data.raw["ambient-sound"]) do
  data.raw["ambient-sound"][ambient_sound_name] = nil -- may be not stable
  -- probably at least one prototype with 
  -- ambient_sound.track_type = "main-track"
  -- and at least one prototype with 
  -- ambient_sound.track_type = "interlude"
end
Post Reply

Return to “Ideas and Requests For Mods”