Where to find the "id" for the actions?

I opened the “soundset.json” edited by other people and I see the followings:

{
“id” : “close_door”,
“variant” : “t_window_domestic”,
“volume” : 100,
“file” : “percy-duke_opening-curtains.wav”
},

I wonder where can I find the “id” and “variant” for the action that I want to add a sound to.

I wonder where can I find the "id" and "variant" for the action that I want to add a sound to.

Some are documented in doc/SOUND_EFFECTS.txt. Otherwise, you have to look at the source code.

Search the code for [tt]sounds::sound(…)[/tt] and [tt]sfx::play_variant_sound(…)[/tt]. The variant string is often a monster id ([tt]mon_[/tt]) or a item id or a terrain ([tt]t_[/tt]) or furniture id ([tt]f_[/tt]) or some other id of the involved object (e.g. for gun sounds, it’s the item id of the gun).

Btw. to avoid confusion, the first string parameter to [tt]sounds::sound(…)[/tt] is the displayed sound description, not the effect id. The next parameter can be ignored and after that comes the effect id and the effect variant. They are optional and don’t appear at most of the function calls.

[quote=“BevapDin, post:2, topic:10396”]

I wonder where can I find the “id” and “variant” for the action that I want to add a sound to.

Some are documented in doc/SOUND_EFFECTS.txt. Otherwise, you have to look at the source code.

Search the code for [tt]sounds::sound(…)[/tt] and [tt]sfx::play_variant_sound(…)[/tt]. The variant string is often a monster id ([tt]mon_[/tt]) or a item id or a terrain ([tt]t_[/tt]) or furniture id ([tt]f_[/tt]) or some other id of the involved object (e.g. for gun sounds, it’s the item id of the gun).

Btw. to avoid confusion, the first string parameter to [tt]sounds::sound(…)[/tt] is the displayed sound description, not the effect id. The next parameter can be ignored and after that comes the effect id and the effect variant. They are optional and don’t appear at most of the function calls.[/quote]

Thanks! that helps a lot!