Play sound on entity rotation - QoL

Post your ideas and suggestions how to improve the game.
Post Reply
Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Play sound on entity rotation - QoL

Post by Squelch »

TL;DR
Give audible feedback that the entity rotation action has been performed.
What ?
When the entity rotation key is pressed, play a sound to serve as feedback that the action has been performed.
Why ?
Audible feedback is important in games, so due to the proximity of the default E (properties) and R (rotate) keys on an English keyboard layout, it is very easy to accidentally press the R key instead of, or at the same time as the E key. Any entity under the pointer will then be rotated - usually unseen by the player - only to be discovered later when things stop working. Some entities, such as pipe to ground and some buildings, are difficult to spot that they are no longer connected.

Audible feedback on rotation should serve to alert the player that they have performed the rotate action.

This is a quality of life request.

Case example
Last edited by Squelch on Wed Jan 01, 2020 3:14 pm, edited 1 time in total.

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

The more I have looked at this, the more I'm convinced it must be an oversight, or there is a rationale against giving audible feedback for rotation that I've failed to find - yes I've searched extensively.

Almost every other [important entity] action has an accompanying sound, so why not rotation?

Is there an event for rotating an entity? I have thought about making a mod, but somehow cannot find an event to hook for it.

[Edited for semantics]
Last edited by Squelch on Mon Dec 23, 2019 2:06 pm, edited 1 time in total.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4050
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Play sound on entity rotation - QoL

Post by eradicator »

Squelch wrote:
Sun Dec 22, 2019 2:57 pm
Almost every other action has an accompanying sound, so why not rotation?
False, there's many things that don't.
Squelch wrote:
Sun Dec 22, 2019 2:57 pm
Is there an event for rotating an entity? I have thought about making a mod, but somehow cannot find an event to hook for it.
on_player_rotated_entity + LuaPlayer.play_sound()
Author of: Hand Crank Generator, Screenshot Hotkey 2.0, /sudo
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

eradicator wrote:
Sun Dec 22, 2019 3:16 pm
False, there's many things that don't.
Agreed, most dialog actions do not have a sound, but entity interaction has feedback for everything except rotation. Would you care to expand?
on_player_rotated_entity + LuaPlayer.play_sound()
Thanks, I had just found on_player_rotated_entity and came back to correct myself. :oops:

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

I strongly believe that there should be some feedback given for an action that has the potential to cease factory production, and then cause the player to go on a debug hunt to find that one pesky pipe to ground that was accidentally rotated unseen and unheard.

I've scratched my own itch and created a small Mod that adds audible feedback to the rotate action.

Mod Portal: Sound On Rotate

Hopefully, something similar will be added to the base game in future.

User avatar
MEOWMI
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by MEOWMI »

+1

I absolutely believe rotating entities should have a sound, even if it's the same one for everything.

PyroFire
Filter Inserter
Filter Inserter
Posts: 343
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Play sound on entity rotation - QoL

Post by PyroFire »

Squelch wrote:
Tue Dec 17, 2019 3:36 pm
Give audible feedback that the entity rotation action has been performed.
k

Code: Select all

script.on_event(defines.events.on_player_rotated_entity, function(ev) ev.entity.surface.play_sound({path="entity-build/wooden-chest",position=ev.entity.position}) end)
You're welcome.

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

MEOWMI wrote:
Sat Dec 28, 2019 4:10 pm
I absolutely believe rotating entities should have a sound, even if it's the same one for everything.
I seem to have a distant memory that rotation once had a sound, but that would need confirmation in an older version of Factorio. My little addition re-uses the large deconstruction sound which is familiar, but not too intrusive, and should alert you to having done something important.
PyroFire wrote:
Sat Dec 28, 2019 5:35 pm

Code: Select all

script.on_event(defines.events.on_player_rotated_entity, function(ev) ev.entity.surface.play_sound({path="entity-build/wooden-chest",position=ev.entity.position}) end)
You're welcome.
Thank you PyroFire. I had already thought of exploring the use of Surface as I thought it would be the correct route instead of using the Player Character. I believe this should be more multiplayer friendly too.

Mod updated with attribution.

User avatar
MEOWMI
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by MEOWMI »

I'm using the mod from now on. I'll reply here if I get any different thoughts about it as I use it, though I do feel pretty certain that this is a useful QoL change, period.

I mean, placing and removing entities have their own sounds, so I'm pretty sure rotating should as well. In fact, you can't place or remove an entity accidentally, but you can rotate one. And from a gameplay, lore, realism or physics perspective, all of the actions would qualify for having a sound effect.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4050
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Play sound on entity rotation - QoL

Post by eradicator »

Squelch wrote:
Sun Dec 29, 2019 4:12 pm
Thank you PyroFire. I had already thought of exploring the use of Surface as I thought it would be the correct route instead of using the Player Character. I believe this should be more multiplayer friendly too.
Are standard building sounds played to every force in vanilla?
Author of: Hand Crank Generator, Screenshot Hotkey 2.0, /sudo
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

eradicator wrote:
Tue Dec 31, 2019 12:18 pm
Are standard building sounds played to every force in vanilla?
That's a good question, and I honestly don't remember if building construction can be heard from or by other players in multiplayer - it's been a long while. I did check some videos of multiplayer games and thought I could hear other players interacting with buildings, but that may have been via the mixdown of the voice channel.

I would say, that intuitively, we would hear the actions of other players while in proximity, and the Surface location method should play the sound subject to the normal falloff with distance. It is afterall, a natural thing experienced in everyday life.

Is this a wrong assumption to make? Does the Surface location method offered by @PyroFire play globally regardless of distance to source?

PyroFire
Filter Inserter
Filter Inserter
Posts: 343
Joined: Tue Mar 08, 2016 8:18 am
Contact:

Re: Play sound on entity rotation - QoL

Post by PyroFire »

eradicator wrote:
Tue Dec 31, 2019 12:18 pm
...
Squelch wrote:
Tue Dec 31, 2019 2:30 pm
...
Defining position makes it not play globally for everyone on that surface/force/etc.
Distance falloff as you'd expect.


See also
PyroFire wrote:
Tue Dec 31, 2019 1:39 pm
*Edit

Gave it some thought and you could do the processing and conditions in lua and play it individually per player (if you really needed to):
https://lua-api.factorio.com/latest/Lua ... play_sound

Squelch
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sat Apr 23, 2016 5:31 pm
Contact:

Re: Play sound on entity rotation - QoL

Post by Squelch »

PyroFire wrote:
Tue Dec 31, 2019 3:00 pm
eradicator wrote:
Tue Dec 31, 2019 12:18 pm
...
Squelch wrote:
Tue Dec 31, 2019 2:30 pm
...
Defining position makes it not play globally for everyone on that surface/force/etc.
Distance falloff as you'd expect.
Thank you for confirming my understanding on that point.
See also
PyroFire wrote:
Tue Dec 31, 2019 1:39 pm
*Edit

Gave it some thought and you could do the processing and conditions in lua and play it individually per player (if you really needed to):
https://lua-api.factorio.com/latest/Lua ... play_sound
I had originally designed it as a player only audible feedback, but upon reflection, your Surface method seemed to be more suitable and would also allow other players to hear that something was happening that may affect what they were currently doing.

I think I'll add a Mod setting (default player only) that leaves the exact method up to the individual player just in case other players find it to be too intrusive - personally, I'd rather be aware of other player's actions while close by.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: BaggyK