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.
Question on SoundPath
-
- Inserter
- Posts: 22
- Joined: Mon Jun 27, 2016 4:20 pm
- Contact:
Re: Question on SoundPath
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.
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.
-
- Inserter
- Posts: 22
- Joined: Mon Jun 27, 2016 4:20 pm
- Contact:
Re: Question on SoundPath
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?[...]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.