Sound replacement
Posted: Wed May 06, 2020 5:40 pm
Hi, I've been trying to make a simple sound replacement mod, this is my first time modding in Lua so this might be trivial.
Here is my code
I've been trial-and-error:ing this for a few hours and at this point the mod doesn't give off an error code when launched anymore, it simply doesn't work however, the sounds do not get applied. My suspicion is that the problem lies in the first line, I'm probably trying to call a dictionary that doesn't exist. But as I don't know the proper structure, I have no way of knowing.
Any and all help is appreciated!
Here is my code
Code: Select all
data.raw.inserter["inserter"].sound = {
{
filename = "__Soundtest_1.2.1__/sound/inserter-basic-1.ogg",
volume = 0.3
},
{
filename = "__Soundtest_1.2.1__/sound/inserter-basic-2.ogg",
volume = 0.3
},
{
filename = "__Soundtest_1.2.1__/sound/inserter-basic-3.ogg",
volume = 0.3
},
{
filename = "__Soundtest_1.2.1__/sound/inserter-basic-4.ogg",
volume = 0.3
},
{
filename = "__Soundtest_1.2.1__/sound/inserter-basic-5.ogg",
volume = 0.3
}
}
Any and all help is appreciated!