Sound replacement

Place to get help with not working mods / modding interface.
Alstorp
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 06, 2020 5:27 pm
Contact:

Sound replacement

Post by Alstorp »

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

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
}
}
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!
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Sound replacement

Post by darkfrei »

Alstorp wrote: Wed May 06, 2020 5:40 pm Any and all help is appreciated!
There is no inserter.sound:


(used this info-mod)
Attachments
2020-05-08T18_53_03-Window.png
2020-05-08T18_53_03-Window.png (41.44 KiB) Viewed 689 times
Alstorp
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 06, 2020 5:27 pm
Contact:

Re: Sound replacement

Post by Alstorp »

darkfrei wrote: Fri May 08, 2020 4:52 pm
There is no inserter.sound:
Ahhh, that's very helpful, I can probably get it to work with the information from that screenshot, I had no idea info mod was a thing. Thank you!
Post Reply

Return to “Modding help”