Page 1 of 1
Adding custom music and disable original music
Posted: Sun Feb 28, 2016 12:06 pm
by GaXyLa
Hey,
So i want to add my own custom music to the game.
With this lua code it is possible:
https://github.com/db48x/original-music ... c/data.lua
but there is one problem. It ADDS music, but doesnt disable the old original music.
So how can i disable the original music that allows me to play only my custom music.
it would be nice if anyone has a solution

Re: Adding custom music and disable original music
Posted: Sun Feb 28, 2016 5:10 pm
by Choumiko
This in front of the data:extend should do it, i think:
Re: Adding custom music and disable original music
Posted: Mon Feb 29, 2016 1:34 pm
by Yaua
Choumiko wrote:This in front of the data:extend should do it
So,
should be :
Code: Select all
data.raw["ambient-sound"] = {}
data:extend(
.....
?
(I'm sorry, I don't know a lot in this kind of things, but would be very interested too)
Re: Adding custom music and disable original music
Posted: Mon Feb 29, 2016 1:46 pm
by Choumiko
Yes, exactly.
Re: Adding custom music and disable original music
Posted: Mon Feb 29, 2016 1:55 pm
by Yaua
Ok ! Thank you !
May I ask what are the differences between "early-game" and "main-track" ?
Re: Adding custom music and disable original music
Posted: Mon Feb 29, 2016 1:57 pm
by Choumiko
Yaua wrote:Ok ! Thank you !
May I ask what are the differences between "early-game" and "main-track" ?
Not sure, my guess would be that songs under "early-game" are only played for a certain time after the start of the map?
Re: Adding custom music and disable original music
Posted: Thu Mar 03, 2016 9:06 pm
by Yaua
Choumiko wrote:Yaua wrote:Ok ! Thank you !
May I ask what are the differences between "early-game" and "main-track" ?
Not sure, my guess would be that songs under "early-game" are only played for a certain time after the start of the map?
So, I tried to add the line at the beginning as you advised :
It seems to works, but the musics added by the custom file seems disabled too. Except when you just load your save or start a new game, here you have one track playing, but after, that's silence.
This will may be be a dumb remark, but... can't this be related to the fact the track specified in custom file are labelled ""ambient-sound" ?
Example :
Code: Select all
{
type = "ambient-sound",
name = "Original Factorio Haluzsqua (HD)",
track_type = "main-track",
sound =
{
filename = "__original-music-hd__/FactorioHaluzsqua.ogg"
}
Re: Adding custom music and disable original music
Posted: Thu Mar 03, 2016 11:13 pm
by Choumiko
I'm not sure how Factorio decides what to play. In the data file i noticed 3 different track_types:
early game
main-track
interlude
Maybe try making it interlude for all. Or wait for someone to answer who knows it

Re: Adding custom music and disable original music
Posted: Wed Mar 16, 2016 9:19 pm
by Yaua
Choumiko wrote:
Maybe try making it interlude for all. Or wait for someone to answer who knows it

Ahah, thanks !
Well, unfortunately, it didn't solved the problem. So for now, I simply disabled the music, and I'm using winamp in random and repeat mode (not the ideal but well...). Thank you very much for your help !
But if someone has the answer, please tell us !

Re: Adding custom music and disable original music
Posted: Thu Feb 15, 2018 11:55 pm
by Pascali
where do i have to copy the lua code?