View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002953||The Dark Mod||Coding||public||29.12.2011 14:35||06.05.2013 20:47|
|Product Version||TDM 1.07|
|Target Version||TDM 2.00|
|Summary||0002953: Add _Propogated_ material-specific bounce sounds to ragdolls|
|Description||Right now regular movables can have different bounce sounds for each material, so a cup falling on carpet doesn't make the same sound as when it falls on stone (snd_bounce_carpet, snd_bounce_snow, etc).|
Ragdolls don't have this ability, so they are limited to a single snd_bounce.
It would be great if ragdolls could have material-specific sounds as well, particularly for AI ragdolls. The current collision sounds are great on hard surfaces, but they're overkill when the AI falls on grass or carpet.
It would also be a valuable thing to have if we want AI to hear these collision sounds (which actually works rather well...you can even grab AI and 'catch' them if you're fast enough so they don't make noise, just like we had in the early design docs!)
From Ishtvan: What you want is probably possible, but requires editing the source. A programmer could trace out where snd_bounce is played for AI, and make the same modifications as we did for rigid body physics (can't remember if it was on idMoveable or idPhysics_Rigidbody, think it was idMoveable actually, because entities generally play sounds). Hope that helps.
Reference thread: http://forums.thedarkmod.com/topic/13305-ragdoll-collision-sounds/page__pid__274084#entry274084
|Tags||No tags attached.|
Would snd_sliding be included with this? That would be useful for sound while dragging bodies.
"editor_snd snd_sliding" "Sound when this moveable slides on a surface"
Currently, I know of only entityDef atdm:moveable_hammer_stone_large that uses it, but it doesn't appear to work on ragdolls either.
|Routine GetSoundPropNameForMaterial() needs to be moved from idMoveable to idEntity so it is available for actors, too. Then AFEntity.cpp needs to have the same code that handles "snd_bounce_MATERIAL" as idMoveable has.|
|snd_bounce_MATERIAL seems to work, but propagated sounds not. Also look into snd_sliding.|
A ragdoll AI falling on the floor can generate these sounds, depending on whether the floor is hard or soft:
If you add more sounds to this list, make sure you include the following spawnarg in their definitions:
This allows friendly AI to hear the drop and to become alerted if the player was responsible.
Where are these sounds actually assigned to ragdolls? I can find where the player-heard sound is set, but not the propogated sound.
tdm_ai_base has this line:
is that not the one actually used?
Ragdolls don't have these sounds assigned to them.
When a ragdoll hits the floor, the code examines the floor's material and comes up with a sound to play, which is "snd_bounce_<floor material>". So we hear different sounds based on what the floor material is, as long as they're defined on the falling object.
For the propagated sound, the code uses three pieces of information:
1 - "spr_object_size" (defined on the falling object)
2 - "spr_object_hardness" (defined on the falling object)
3 - the floor material's degree of hardness
and it constructs a propagated sound called:
SprGS_bounce_<object size>_<object hardness>_on_<floor hardness>
If the first two items are undefined on the falling object, the defaults are "medium" and "hard".
In my tests, I dropped my ragdolls on stone and carpet, to see the difference, and that's where I saw the two propagated sounds mentioned in my previous note.
For your second question ...
Most audible sounds have propagated sounds related to them.
For example, "snd_foundOpenDoor" has "sprS_foundOpenDoor". When an AI barks the first sound, the second "sound" is propagated through the world to see if there's anyone who can hear it (and who cares).
For the case of ragdolls, this isn't the mechanism that's used. Rather than depending on the code to create "sprS_bounce" from "snd_bounce" and then find it, the code uses the mechanism I described above. I don't know why it's this way.
So my guess is that "sprS_bounce" "yell" isn't used.
When moveables collide, they use the same mechanism that ragdolls use.
"When a ragdoll hits the floor, the code examines the floor's material and comes up with a sound to play, which is "snd_bounce_<floor material>". So we hear different sounds based on what the floor material is, as long as they're defined on the falling object."
Where should this be set? I added the appropriate spawnargs to atdm:env_ragdoll_base, but they didn't work. Only the default bounce sound was played regardless of which surface the body landed on.
It's strange, because the ragdoll seems to get its player-heard sound from the ai entity, not the ragdoll entity. For example, the atdm:ai_builder_guard has a "sound_bounce" specified, and this is the sound the builder guard ragdoll plays when collapsing. However, the sound_bounce_[material] spawnargs are apparently ignored.
atdm:env_ragdoll_base is the correct place to define the bounce sounds.
Specifically, which ragdoll are you dropping?
And what surface material are you dropping it on?
And what "snd_bounce_*" material(s) have you added to atdm:env_ragdoll_base, and what is the specific syntax you're using?
And I see you're using "sound_bounce" when you should be using "snd_bounce". Are you really using "sound_bounce" or is that just a typo in your note?
I added the following to atdm:env_ragdoll_base:
However, when dropping a pagan that I had KO'd onto carpet or other surfaces, he only made the default "body_collapse" sound.
You don't get atdm:env_ragdoll_base sounds when you KO or kill AI. You get the sounds defined in atdm:ai_base.
You only get ragdoll sounds on entities that inherit atdm:env_ragdoll_base.
Since the pagan inherits from atdm:ai_base, and that has the material-specific bounce sounds defined, you should be hearing "body_collapse_soft" when he falls on carpet.
What is the specific pagan entity? I'm not seeing (hearing?) any problems when dropping a city watch guard on soft or hard surfaces. I'm getting "body_collapse_soft" on carpet, and "body_collapse" (default) on wood or stone.
|Well, I tried the two regular bugbears, deleting the old .dll and deleting the .cm file and re-dmapping. One of the two was causing the problem, because now I'm getting the correct sounds.|
|29.12.2011 14:35||Springheel||New Issue|
|29.12.2011 21:36||Springheel||Description Updated||View Revisions|
|30.12.2011 03:07||Springheel||Note Added: 0004216|
|01.01.2012 17:23||Springheel||Assigned To||=> tels|
|01.01.2012 17:23||Springheel||Status||new => assigned|
|13.01.2012 21:04||tels||Note Added: 0004243|
|13.01.2012 21:04||tels||Severity||normal => feature|
|13.01.2012 21:04||tels||Target Version||=> TDM 1.08|
|17.01.2012 06:42||tels||Note Added: 0004251|
|19.04.2012 13:12||Springheel||Summary||Add material-specific bounce sounds to ragdolls => Add _Propogated_ material-specific bounce sounds to ragdolls|
|19.06.2012 21:36||tels||Assigned To||tels =>|
|20.06.2012 22:33||Springheel||Assigned To||=> Springheel|
|20.06.2012 22:33||Springheel||Status||assigned => new|
|20.06.2012 22:33||Springheel||Assigned To||Springheel =>|
|14.08.2012 00:51||Springheel||Target Version||TDM 1.08 =>|
|17.08.2012 19:04||Springheel||Target Version||=> TDM 2.00|
|04.05.2013 01:30||Springheel||Relationship added||related to 0003394|
|04.05.2013 16:32||grayman||Note Added: 0005368|
|05.05.2013 11:58||Springheel||Note Added: 0005369|
|05.05.2013 12:51||Springheel||Note Edited: 0005369||View Revisions|
|05.05.2013 16:24||grayman||Note Added: 0005370|
|05.05.2013 16:33||grayman||Note Added: 0005371|
|05.05.2013 20:58||Springheel||Note Added: 0005372|
|05.05.2013 21:01||Springheel||Note Edited: 0005372||View Revisions|
|06.05.2013 03:10||grayman||Note Added: 0005373|
|06.05.2013 03:12||grayman||Note Edited: 0005373||View Revisions|
|06.05.2013 03:16||Springheel||Note Added: 0005374|
|06.05.2013 03:33||grayman||Note Added: 0005375|
|06.05.2013 20:34||Springheel||Note Added: 0005376|
|06.05.2013 20:47||Springheel||Status||new => resolved|
|06.05.2013 20:47||Springheel||Resolution||open => fixed|
|06.05.2013 20:47||Springheel||Assigned To||=> Springheel|