Question on SoundPath

Place to get help with not working mods / modding interface.
Post Reply
ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Question on SoundPath

Post by ProfoundDisputes »

Just trying to play some sounds. I don't understand the documentation on SoundPath:

"It can be either the name of a sound prototype defined in the data or a path in the form "type/name". Supported types are."

Where are these sounds defined in the data? Where are the sound prototypes? I also don't know what "types" there are. I know its something like:

game.players[1].play_sound({path="SoundPath"})

I just don't understand how to know where these files are. I am trying to play this sound:

"Factorio\data\base\sound\programmable-speaker\bass-01.ogg"

Thank you in advance.

Bilka
Factorio Staff
Factorio Staff
Posts: 3230
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Question on SoundPath

Post by Bilka »

Moved to modding help.

The base game doesn't define sound prototypes.

The sounds that you can access with sound path are defined in a lot of different places. The utility sounds are defined in the utility sounds, the ambient sounds in the ambient sounds, any entity or tile sound in the individual tile or entity. Accessing those is what the type is for, you can find the available types in the documentation: https://lua-api.factorio.com/latest/Con ... #SoundPath. Here it becomes obvious that the sound that you want to play is not available via a sound path, because it is not under the listed categories. You could make a modding interface request to have the programmable speaker sounds added to the sound paths. Or you can create a sound prototype with the sound that you want.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

ProfoundDisputes
Inserter
Inserter
Posts: 22
Joined: Mon Jun 27, 2016 4:20 pm
Contact:

Re: Question on SoundPath

Post by ProfoundDisputes »

[...]You could make a modding interface request to have the programmable speaker sounds added to the sound paths. Or you can create a sound prototype with the sound that you want.
I don't know what it means to create a sound prototype. This concept of "prototype" is really confusing me. I see it mentioned all the time but I don't know what is meant by this and how these relate to the game. Is there a written summary of what a prototype is in relation to the game engine?

Post Reply

Return to “Modding help”