[0.17.66] Beam sounds emanate from target, not source

Bugs that are actually features.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[0.17.66] Beam sounds emanate from target, not source

Post by Deadlock989 »

A few months back I had a long PM conversation with someone who couldn't get beam sounds working for laser turrets. Nothing they did got it working, they claimed, but I wrote it off to being new to modding and asked them to ask the forums for help (they didn't).

I have had other conversations with people who are adamant that lasers don't have any sound at all. They do. It's right there in the vanilla laser beam prototype - but it's incredibly quiet in the original .ogg and then it's given a volume of 0.7 on top of that. I've given laser beams (imo) much nicer and louder sounds but noticed that whether or not the beam sound actually plays is still very erratic. Have finally figured out why.

It seems that the sound emanates from the beam target, not the source. You can't extend the audible_distance_modifier of a sound past 1, and in this case, that audible range is well below maximum laser turret range. So to hear the sound, you have to be in literal melee with the objects of the laser turret's attention, and it helps if the combat is taking place in a library and the biters are tiptoeing. This explains why you get to hear it quite often in god mode testing but much less often in real play.

You don't have any other options that I can find. Giving an electric turret a working_sound results in it playing the sound continuously, whether it's firing or not. Turrets do have a range of other sound parameters such as starting_attack_sound but these are only used by worms in vanilla and seem to be heavily geared towards projectile fire - in tests with a laser turret, the results were horrible. You don't seem to be able to put a sound in BeamAttackParameters despite it inheriting the sound property from BaseAttackParameters - it works for projectiles but not for beams.

So the sound has to be defined in the working_sound of the beam prototype and it's currently rigged so that you can't hear it in most normal game situations. In my view, the machine actually producing the beam should be the source of the sound so that it stands a better chance of actually being heard.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1425
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.17.66] Beam sounds emanate from target, not source

Post by Twinsen »

Beam sound actually emanates from the middle of the beam. You can see this by turning on show-environment-sound-info debug info.
The pink square is the sound playing location.
Untitled.png
Untitled.png (1.98 MiB) Viewed 904 times
Being able to specify a sound for the target and the source could be very useful, but that belongs in modding api requests.

Also the reason why it's so quiet is because the sounds can stack a lot and it would be too loud. But I changed it to use max_sounds_per_type and increased the volume to 1.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [0.17.66] Beam sounds emanate from target, not source

Post by Deadlock989 »

I stand corrected.

What is the maximum range of the sounds? Because if it's coming from the middle of the beam, and the beam is firing at range, you still won't hear it if you're standing right next to the turrets.
Twinsen
Factorio Staff
Factorio Staff
Posts: 1425
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.17.66] Beam sounds emanate from target, not source

Post by Twinsen »

Not sure, but it's slightly better with the increased volume now.

Also arguably it's a nice effect when you start walking in the path of the beam and then you notice the sound much clearer.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [0.17.66] Beam sounds emanate from target, not source

Post by Deadlock989 »

Well, arguably ... How often is the player walking through a laser beam?

How often are they in melee with biters being fired on by laser beam turrets?

How often are they standing safely behind their walls, right next to their bank of turrets, watching the carnage?

Increasing the volume on the vanilla beams won't help my case, because I already increased it to 1, and the sound file I'm using is already louder, and it's still inaudible more than 75% of the time.

Edited to add: I see that this has been moved to "not a bug" even though a change was made. Turrets which are inaudible unless they're firing at short range is bizarre and erratic. But if it's working as intended, I guess that's the end of it.
User avatar
invisus
Filter Inserter
Filter Inserter
Posts: 284
Joined: Fri Sep 21, 2018 5:33 pm
Contact:

Re: [0.17.66] Beam sounds emanate from target, not source

Post by invisus »

I'd noticed something odd about the sounds of beams before, but wasn't able to pinpoint what exactly was "off" about it.

The noise coming from the _center_ of the beam seems a little... counter intuitive.

Just throwing in my two cents for thinking the noise should come from the turret that is emanating the beam, rather than arbitrarily half way down the beam itself.
Post Reply

Return to “Not a bug”