Page 1 of 1

Request for sound in scenarios

Posted: Sun Dec 26, 2021 5:22 pm
by ever_Lord
TL;DR
We would like to play a custom sound in a scenario.

Why ?
It's about Biter Battles Championships (bbchampions.org) where we use the Biter Battles scenario in which we are adding features.
And it would be nice to be able to play some custom sounds (like "welcome" or "Fight!")
What ?
As far as I know, it is not possible unless using a mod, but for now we prefer to stick to only scenario (so people don't have to restart their factorio to load mods).

Is there any way to do that, or is there any chance this functionality will be added to the game?

(we already can do that for images : player.gui.center.add{name = "logo_png", type = "sprite", sprite = "file/png/logo_100.png"})

Thanks!

Re: Request for sound in scenarios

Posted: Mon Dec 27, 2021 3:30 pm
by ssilk
Scenarios are generally just mods from the devs. So they can just be extended as you want. I'm not 100% sure, but it should be allowed to change that for free, at least for your own usage I'm sure it's allowed to add such sounds to the mod yourself.

I would simply ask support@factorio.com, to make that you can release your changes as "own mod".

So I move this to implemented.

Re: Request for sound in scenarios

Posted: Mon Dec 27, 2021 7:06 pm
by ever_Lord
I'm sorry, I don't understand what you said (me french xd)

Please be more explicit if you have a solution because afaik I can't play a custom sound in scenario (ie. not in a mod).
I asked on factorio discord and it was confirmed it is not possible (again in scenario).

Can you help me, please?

Re: Request for sound in scenarios

Posted: Mon Dec 27, 2021 8:17 pm
by NotRexButCaesar
ssilk wrote: Mon Dec 27, 2021 3:30 pm Scenarios are generally just mods from the devs …
So I move this to implemented.
Based on the Wiki, there are some important differences between mods and scenarios: a scenario can be part of a mod, but it can also be used without a mod.
According to https://lua-api.factorio.com/latest/Lua ... play_sound & https://lua-api.factorio.com/next/Conce ... #SoundPath there is no way to play a custom sound if you are only using a scenario (this would be the case in a vanilla multiplayer scenario, e.g. comfy, redmew &c.), so I would not put this in implemented.

I think it belongs in Modding interface requests.

Re: Request for sound in scenarios

Posted: Tue Dec 28, 2021 10:23 am
by ssilk
NotRexButCaesar wrote: Mon Dec 27, 2021 8:17 pm I think it belongs in Modding interface requests.
Exactly. Moved from suggestions to modding interface requests. I'm not 100% sure, if that's really an issue or already working and I just don't know how. Sorry.
And sorry for not checking this out earlier. But I learn every day new things of Factorio. :)