Page 1 of 1

Expose "pick_sound" and "drop_sound" to item prototypes retrieved at runtime

Posted: Tue Jan 27, 2026 2:11 am
by bunshaman
Howdy,
I am requesting that "pick_sound" and "drop_sound" are accessible from an item prototype that was retrieved at runtime.

Here is how it pertains to my use case. I have several entities (plants) which are not plantable by any item, however they are spawned depending on the quality of a seed that was planted. This means that I cannot pipette the plants like usual to get seeds, so some scripting workarounds are required. Not difficult, however this means that sounds are not played unless I use `play_sound`. However there is no way to play the correct sound outside of hardcoding the filepaths to a list of seeds etc.

With how many fields of an ItemPrototype are visible, it feels odd that the sounds are not something we can access.

EDIT: This is possible via SoundPaths. I will leave this up just because it may still be an idea that benefits someone else

Re: Expose "pick_sound" and "drop_sound" to item prototypes retrieved at runtime

Posted: Thu Jan 29, 2026 2:13 pm
by Bilka
The only intended way to access sounds at runtime is via the soundpath, so since it's available there this already exists.