[1.1.68] Sound attribute in prototype type="explosion" stopped working.

Bugs that are actually features.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 05, 2017 1:35 am
Contact:

[1.1.68] Sound attribute in prototype type="explosion" stopped working.

Post by heyqule »

What did you do?
I'm working on a firework mod. I noticed sound in explosion prototype stopped working in the latest version of the game.

What happened?
Sound specified with sound attribute in explosion prototype don't play as expected.

I check my other mod's sound that used same way to specify the sound. That one stopped working as well.

What did you expect to happen instead?
The sound specified in explosion prototype should play as intended.


Step to reproduce the bug
1. Download this firework mod. Place it in 1.1.68
https://drive.google.com/file/d/1x8C7Ey ... sp=sharing
2. Create a new game with "Firework Rocket / Firework Effect Debug ".
3. Walk over to the firework explosion. The sounds don't play.
4. Copy the mod to 1.1.61 instance
5. Create a new game with "Firework Rocket / Firework Effect Debug ".
6. Walk over to the firework explosion. The sounds play without problem.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: [1.1.68] Sound attribute in prototype type="explosion" stopped working.

Post by heyqule »

I noticed another sound bug. I tried to workaround the above bug by spawning the sound in target_effects of the firework projectile. The sound played at the source location. Instead of target (explosion) location. :lol:

Code: Select all

                    target_effects =
                    {
                        {
                            type = "create-entity",
                            entity_name = data['firework_explosion']
                        },
                        {
                            type = "play-sound",
                            sound = {
                                variations = {
                                    {
                                        filename = '__firework_rockets__/sound/explosion2.ogg',
                                        volume = 1
                                    },
                                    {
                                        filename = '__firework_rockets__/sound/explosion3.ogg',
                                        volume = 1
                                    }
                                },
                                audible_distance_modifier = 1,
                            }
                        }
                    }
Rseding91
Factorio Staff
Factorio Staff
Posts: 15527
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.68] Sound attribute in prototype type="explosion" stopped working.

Post by Rseding91 »

When I test; the sounds play just fine. But I have to be within audible distance to hear them (40 tiles by default). This can be changed in the sound definition as well as the utility-constants values if you want your sounds to be heard from further away.
If you want to get ahold of me I'm almost always on Discord.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: [1.1.68] Sound attribute in prototype type="explosion" stopped working.

Post by heyqule »

OK Thanks. I just re-tested on my steam copy and it did work.

It seems something odd with the standalone instance I use for dev. I had to re-download it and it worked.
Post Reply

Return to “Not a bug”