LuaEntityPrototype sounds

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
AverseMoon
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 3:07 am
Contact:

LuaEntityPrototype sounds

Post by AverseMoon »

atm only EntityPrototype (data stage) has entity sounds (mining, mined, walking, etc) in it, i would like a way to access these at runtime for a specific LuaEntityPrototype
Donion
Factorio Staff
Factorio Staff
Posts: 479
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: LuaEntityPrototype sounds

Post by Donion »

Those sounds can be played using the SoundPath.
Or do you want to do something else with the sounds?
AverseMoon
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Oct 23, 2024 3:07 am
Contact:

Re: LuaEntityPrototype sounds

Post by AverseMoon »

i would like to get the mining sounds for any arbitrary entity but

Code: Select all

entity.prototype.mining_sound
will not work as entity.prototype is a LuaEntityPrototype (runtime prototype) and the mining_sound property is only available in EntityPrototype (data stage)
Donion
Factorio Staff
Factorio Staff
Posts: 479
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: LuaEntityPrototype sounds

Post by Donion »

Ah, I see what you mean.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16641
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntityPrototype sounds

Post by Rseding91 »

AverseMoon wrote: Wed Mar 11, 2026 6:59 pm i would like a way to access these at runtime for a specific LuaEntityPrototype
Why?
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”