# Where to find the "id" for the actions?

**URL:** <https://discourse.cataclysmdda.org/t/where-to-find-the-id-for-the-actions/10396>\
**Category:** The Toolbox\
**Created:** [August 24, 2015, 9:41am UTC](https://discourse.cataclysmdda.org/t/where-to-find-the-id-for-the-actions/10396 "2015-08-24T09:41:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darkness13](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@Darkness13](https://discourse.cataclysmdda.org/u/Darkness13)\
**Post date:** [August 24, 2015, 9:41am UTC](https://discourse.cataclysmdda.org/t/where-to-find-the-id-for-the-actions/10396/1 "2015-08-24T09:41:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BevapDin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bevapdin/32/228_2.png) [@BevapDin](https://discourse.cataclysmdda.org/u/BevapDin)\
**Post date:** [August 24, 2015, 11:51am UTC](https://discourse.cataclysmdda.org/t/where-to-find-the-id-for-the-actions/10396/2 "2015-08-24T11:51:47Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Darkness13](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@Darkness13](https://discourse.cataclysmdda.org/u/Darkness13)\
**Post date:** [August 25, 2015, 10:13am UTC](https://discourse.cataclysmdda.org/t/where-to-find-the-id-for-the-actions/10396/3 "2015-08-25T10:13:38Z")

</div>

[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！
