Jump to content
Sign in to follow this  
Balschoiw

Dynamic sound ambience help needed

Recommended Posts

While working on a mission, I thought about having personalized enemies that do react verbally on the things that are going on around them. I had already experimented with such a system in OFP but it wasn´t really dynamic.

What I want:

Trigger covering a region with enemy forces that lists all enemy units.

1. When all is fine the units should randomly "say" some things when on their patrolways. The soundpool A for "safemode" patrolling sounds is about 20 sounds. They actually don´t talk but make noises, like whistling, coughing and such.

The sounds should be played randomly with various enemy units and at definable random time - intervals.

2. If they have a raised knowsabout level they should switch to soundpool B. Soundpool B contains things like : "I guess i´ve seen something over there" and such. Pool is about 10 sounds right now. Again all enemy units that are alive should randomly "say" that things.

3. They are aware of you and are actively engaging you. Soundpool C should kick in with the same attributes as above.

4. They are loosing comrades during the fight. At a certain level of kills in percent the Soundpool D should kick in that contains quite panicing and desperate sounds.

That´s the pattern for the ambient soundpool. Additionally I will implement deathsounds.

As I am not the uberscripter I need help with this. The code should be very efficient to keep load on CPU as low as possible.

Can someone who has an idea on how to set that up in a professional manner do some brainstorming on that ?

I intend to release the whole thing for mission editors as a standalone module that should be very easy to implement. One trigger, one script, the description.ext and the sounds.

Anyone willing to help ?

Sidenote: I have pools for 2 different sides right now in two different languages. Problem is that BIS Arma right now lacks a second language for different sides, so unless they implement a second voiceset for OPFOR it will sound stupid, but I have hopes that they will come up with a different voiceset, at least I hope so very much.

So basically the script should be checking the side aswell, even it´s not used right now.

Share this post


Link to post
Share on other sites
Problem is that BIS Arma right now lacks a second language for different sides, so unless they implement a second voiceset for OPFOR it will sound stupid, but I have hopes that they will come up with a different voiceset, at least I hope so very much.

That's the point.

(I think only the community would provide a second voiceset)

Also you should you see farther, this OPFOR voiceset would fit with BIS default OPFOR troop ? then how could we use your module when (reel and modern) Russian, or Iraki, Afghan, European, or any third OPFOR addon will be released...

Share this post


Link to post
Share on other sites
Quote[/b] ]then how could we use your module when (reel and modern) Russian, or Iraki, Afghan, European, or any third OPFOR addon will be released...

No problem as the addon will have to use the same BIS/Arma naming convention for the sounds as it wouldn´t work without. wink_o.gif

Share this post


Link to post
Share on other sites

Great idea smile_o.gif I'm considering using some russian "commands" (have no clue what they are though) from the game Civilization, for the missions I'm currently editing/playing with.

Just to give you an added idea wink_o.gif

Share this post


Link to post
Share on other sites
No problem as the addon will have to use the same BIS/Arma naming convention for the sounds as it wouldn´t work without. wink_o.gif
Ok but what I mean is : let's admit you will have a Russian voiceset just like CarlGustaffa suggested, if ever a mission-maker use... BWMod as OPFOR whistle.gif then he should not use your module on it, or if he does BWMod units will speak Russian.
I'm considering using some russian "commands"[...]
In my opinion it would have been a good idea for Operation Flashpoint, but not anymore for Armed Assault.

BIS default OPFOR live in Sahrani, and according to the billboards and village name, their language would seem close to Spanish (but it is not Spanish)

Remember William Porter blog ?

Quote[/b] ]The Sahrani guys, even if they’re not literate, which most of them are, usually speak at least three languages, a combination of their language (I don’t know what it’s called), French, Spanish, Portuguese, German, and English[...]
Well, I guess it's called "Esperanto" smile_o.gif

and the sweet thing is this language sound quite Latin.

- edited , find yourself

Share this post


Link to post
Share on other sites
Quote[/b] ]Ok but what I mean is : let's admit you will have a Russian voiceset just like CarlGustaffa suggested, if ever a mission-maker use... BWMod as OPFOR whistle.gif then he should not use your module on it, or if he does BWMod units will speak Russian.

Firts of all the side can be changed in the script. You can even apply one set for both sides. It´s no problem to change. You just have to change the lineheader. It´s no addon, it´s a script.

If mods do come with own voicesets the script can be adjusted to that in no time if the addon creators use the BI name convention. If not only the names of the string have to be adjusted.

Nothing a scripter couldn´t do in no time.

Quote[/b] ]In my opinion it would have been a good idea for Operation Flashpoint, but not anymore for Armed Assault.

BIS default OPFOR live in Sahrani, and according to the billboards and village name, their language would seem close to Spanish

What´s the problem ? I´m making it for vanilla Arma right now. I don´t care if someone uses japanese samples with his mod or russian ones or martian ones. If the mod is done right the new soundfiles will substitute the BIS ones but have the same name. Else automated conversations by AI would go totally wrong. It doesn´t matter what language pack you install as long as they keep the soundnamestructure.

If you´re just here to promote your addon, you´re at the wrong place. This is not an addon but meant to be a scripted solution for ambience and not just some sounds to be placed in editor.

So either you have something to contribute or not.

Share this post


Link to post
Share on other sites
What´s the problem ? I´m making it for vanilla Arma right now. I don´t care if someone uses japanese samples with his mod or russian ones or martian ones.

[...]

If you´re just here to promote your addon, you´re at the wrong place.

[...]

So either you have something to contribute or not.

easy would you ?

- vanilla ArmA: all right understood, nothing to say more.

- promotion: Sad you think so. I had an idea/suggestion about the default OPFOR language. Sorry I would not have to expose it, nor illustrate it. (previous message edited)

- contribution: Since now.....no chance anymore. bad karma, horoscope, who know why...

Share this post


Link to post
Share on other sites

I really like your idea Balschoiw. smile_o.gif

While examining the possibility of adding such an extensive feature to the game, I think it makes sense to closely examine similar work that's been done in the past (for OFP).

In this case, what you're suggesting sounds alot like the Dynamic Speech from ECP (for OFP), which for me anyway, had the biggest impact immersion-wise of any addon, hands down.  Wondering... If the ECP team is already working on an ArmA version (and I have no idea if they are), maybe joining forces is the way to go?  huh.gif

If you end up doing this from scratch, ECP is really a great reference on how to get it done right.  The speech was certainly situation sensitive.  i.e. Someone would yell "Armor!" when they identified a new tank.  Someone else might repeat this just to make sure everyone heard...  They would yell "Grenade!" when grenades were thrown... "Incoming" when an enemy shell was inbound... plus they had plenty of specific sounds and things to say while in "Safe" and "Aware" modes.  The best part was all the voice acting was very good (sounded just like men in battle), and none of it was overdone.  (i.e. they weren't yelling things out either too frequently or infrequently, it was all believable.)

One thing that you mentioned that ECP did not have was the panic mode stuff.  That would really be a tremendous addition I think... Great idea!  thumbs-up.gif

I'll add this request - Speech for when a unit undergoes a near miss (like frantic cussing or screaming, genuine fear required here).

As you mentioned, it would be really nice to (eventually) have four of five speech banks to choose from.  Here are the ones I can think of that would get a lot of use:

-English

-Russian

-German (for Nazi Germany, etc)

-Vietnamese (I seem to recall seeing a website where someone had created his own VC sound bank for ECP, maybe he would lend... anyone recall where to find this?)

-Spanish?

(Note - ECP was packaged with English and Russian only)

Perhaps most importantly, I feel it's very important to include the ability to apply any of them to any side, in any combination.  That way any future addons (not to mention scenerios) are covered.

And I'm not sure it's really necessary to wait for any additional official sounds from BIS for other sides.  Someone correct me if I'm wrong here, but weren't all the ECP dynamic speech sounds created by the mod team?  What I can envision is someone (maybe me, who knows) posting a request for dynamic speech sounds for the various behaviour categories (in different languages).  Then maybe voting on which ones sound the best (most real-life-like).  I betcha we could crank out a huge bank of high-quality samples in short order.  tounge2.gif

Anyhow, I've really been waiting a long time for this...

Glad to see you are enthusiastic about bringing this critical aspect of realism to ArmA.

Hopefully I've given you some ideas to chew on. Good luck!  biggrin_o.gif

Share this post


Link to post
Share on other sites

Very nice input.

I have already started with the script(s) and right now it looks like it can be done with a lot of parameters without too much stress for the engine. I´m actually surprised that BIS hasn´t done it smile_o.gif

Soundbanks should be coming with mods but I am trying to get one included with spanish samples. Of course right now it will be not a perfect solution without having them say their commands in spanish aswell, but I´m just waiting if BIS will contribute something there.

I don´t want to turn this into an addon that replaces Arma files. It should be a standalone thing that does not alter your Arma.

Quote[/b] ]I'll add this request - Speech for when a unit undergoes a near miss (like frantic cussing or screaming, genuine fear required here).

Hmm. I´m thinking about a way to detect such.

Can we detect fired ammo in a certain radius around the units ?

I guess this will be demanding on CPU though if you have a large number of units in a firefight.

I will definately have a look at the ECP stuff and maybe contact them. Both sides could benefit smile_o.gif

Quote[/b] ]Perhaps most importantly, I feel it's very important to include the ability to apply any of them to any side, in any combination.

This can be handled already.

Thx for input !

Share this post


Link to post
Share on other sites

Update and request for assistance.

All right, I moved away from the initial idea to have inbuilt Arma voicesamples used in this scriptset as they simply do not sound good enough and are unlike with OFP not that flexible.

So I decided to use own samples. Right now I have an english and russian set.

I have run into several problems though.

1. The script(s) is meant to determine if an enemy unit has a raised knowsabout value about either the player or a unit of the players side or an allied side of the player. How can this be done without explicitely adressing every unit on the map ? This goes for the enemy units aswell. Maybe put up 1, respectively 2 big triggers covering the units and listing them dependant on the side they are on ? How can I pass over the content of the trigger to the script and adress single units randomly from there to say things ?

2. If knowsabout is null enemy units should just carry on with their "idle" sounds, but as soon as the enemy units have a raised knowsabout (alerted either by player or enemy side in general) or a "suspecion" (is this detectable in Arma ?) they should switch to script 2 that sends them into "searchmode" and makes them use a different voiceset.

3. If there is direct enemy contact units should taunt enemy and communicate with their squadmates. Again, how can I determine wich soldiers are in combat and dynamically assign the sounds to them and from the array of soldiers involved have randomly picked units to speak ?

4. Unsolved riddle again. How can I detect if a projectile hits the area around a unit, so that I can switch it into panic mode if it´s skill is not very high ?

I definately need some help with the scripts here as I simply can´t get it to work with my knowledge.

Thx.

Share this post


Link to post
Share on other sites

Glad to hear you're making progress on this. smile_o.gif

Sorry about the gargantuan post here, but (just reread all this) apparently I’ve got a lot to say! tounge2.gif

I've spent a considerable amount of time contemplating about how the ECP guys accomplished everything they did with their dynamic speech.  So hopefully I can give you an idea or two…

First of all, good call on using alternate samples as opposed to the default things the BIS guys say.  It will be way more immersive that way and also users will be able to include their own preferred samples.  (I’m actually hoping to eventually replace the silly BIS speech, which is quite unrealistic imo)

1. The script(s) is meant to determine if an enemy unit has a raised knowsabout value about either the player or a unit of the players side or an allied side of the player. How can this be done without explicitely adressing every unit on the map ? This goes for the enemy units aswell. Maybe put up 1, respectively 2  big triggers covering the units and listing them dependant on the side they are on ? How can I pass over the content of the trigger to the script and adress single units randomly from there to say things ?

Do you really only intend to only implement the dynamic speech with respect to the player/his side, etc?  Given OFP/ArmA’s ability to swap out players for AI ad hoc, and ArmA’s new selectPlayer command, seems like it would be more versatile to have no requirements specific to the player per say.

Rather, the way ECP worked, you could “register" the desired units, on a case-by-case basis.  This way, if you need a specific unit to not say anything for one reason or another (i.e. a prisoner), you could simply just not register him.

To register a unit, you just call the registration script in his init line.  Then that script adds him to all the right global arrays, launches additional necessary scripts, etc.

It’s important to have a single registration script for units of all sides, that way you’re idea of mass activation via a trigger makes sense.  Again, this is how ECP did things.  A single trigger could get everyone (on all sides) registered, and it might look like this:

50000 X 50000 (the whole map), Anybody, Once, When present, Activation=â€[this] call registerSpeechâ€

So using this method, you can register in mass, but you can also get any new units registered (individually) as well. smile_o.gif

2. If knowsabout is null enemy units should just carry on with their "idle" sounds, but as soon as the enemy units have a raised knowsabout (alerted either by player or enemy side in  general) or a "suspecion" (is this detectable in Arma ?) they should switch to script 2 that sends them into "searchmode" and makes them use a different voiceset.

3. If there is direct enemy contact units should taunt enemy and communicate with their squadmates. Again, how can I determine wich soldiers are in combat and dynamically assign the sounds to them and from the array of soldiers involved have randomly picked units to speak ?

imo, it might be better to keep the dynamic speech and the “searchmode†as separate systems.  That way everyone can use the dynamic speech if desired, even if they don’t need the “searchmode†for their purposes.

First of all, for the dynamic speech, I see two distinct types, and to really go all out, I think we need both:

Ambient – General things that units say based on their current behaviour (randomly selected from the associated sample pool.)

Event Driven – Specific things that units say based on specific events that occur.  (i.e. yelling “Armor!†to identify a newly detected tank, “Incoming!†the moment a tank fires, “Grenade!†when they see one fly.)  These are also selected randomly from a specific sample pool.

As far as the Ambient speech goes, probably you’re best bet here is to monitor the unit’s behaviour.  The nice thing about behaviour is, it changes automatically based on the situation and all you have to do is monitor it.  For example, if the units are in idle mode (“SAFEâ€) and they get ambushed, they will automatically go into combat mode.  If they kill all of the enemy, after some period of time they will revert to “SAFE†mode.

So, while they are in “SAFE†mode, use the idle samples.  Same idea for “AWARE†and “COMBAT†modes.  Perhaps units in “CARELESS†mode shouldn’t say anything?  [i think the only way they end up in “CARELESS†mode is if you put them there... and they never leave that mode under any circumstances unless you tell them.  Note that you can force a higher level of behaviour (for as long as desired via setBehaviour), but that’s the speech you want anyway at that point.]

Best part about this method is, it’s all automatic with no complex knowsabout matrix comparisons required.  Plus all that knowsabout stuff has the potential to get processor-heavy, especially as you increase the number of units, depending on the frequency of your loops.

I do think knowsabout has its place though… For example, you probably would need to use knowsabout for any new “searchmode†stuff.  Also, one thing to consider- there are already a few “searchmode†type scripts out there, such as grouplink2 and the upcoming DAC for ArmA.  I’ve no doubt you could put together another good one, but just the speech pack project may be a whopper as-is!

4. Unsolved riddle again. How can I detect if a projectile hits the area around a unit, so that I can switch it into panic mode if it´s skill is not very high ?

As far as the Event Driven speech goes, eventhandlers are the way to go.

Trapping the “firedâ€, “hitâ€, and to a lesser degree “killed†events was one of the vital mechanisms that made ECP DSAI tick.  All their Event Driven speech relied on eventhandlers.  

Not sure if you were able to check out ECP for OFP yet, but they really did nail all this stuff.  Playing with their DSAI pack for all this time has allowed me to start thinking in terms of just how exactly to bring this concept to ArmA.  For instance, what all sample pools are required for a given side?  Here’s a starter list:

Ambient Pools:

Safe

Aware

Combat

Event Driven Pools:

New Armor Identified

Grenade Inbound

Near Miss

Taking Heavy Fire

Retreat

Suspicion

Hit

Killed (different than hit?)

Then there’s the little touches that ECP captured, like units will only talk if there’s someone to talk to (i.e. they won’t talk to themselves tounge2.gif ).

As far as nearby misses goes, off the top of my head, the only way I can think of to detect them would be to trap all fired events (from all units), and then follow them to their destination…then check the impacts distance from each unit that has been registered.  This would need to be highly optimized or it would likely get processor heavy.  [Note there is a set of supression scripts that I'm assuming must already do this, but I haven't had time to check them out yet.]

You mentioned suspicion… not sure how much you know about knowsabout (hahaha pardon the pun smile_o.gif ), but here’s my understanding on the way it works:

Bob approaches an enemy unit Ted.  Although in-game Ted has not visibly detected Bob yet, his knowsabout level with respect to Bob rises.  If Bob withdraws, eventually Ted’s knownsabout level to Bob will slowly drop to zero.  However, if Bob continues to approach Ted, Ted’s knownsabout level to Bob eventually passes some threshold, and then suddenly Ted will become “aware†of Bob ingame, and takes evasive action.  (I’m sure someone has documented the knowsabout threshold for ArmA somewhere.)  Be aware that some people are reporting that there is an issue with knowsabout in ArmA, where the level does not gradually drop off like it did in OFP.

OK, having said all that, perhaps for suspicion, you could check and see if a unit’s knowsabout to another has surpassed a REDUCED threshold.  Then kick them off into suspicion mode (which will most likely need to suspend the behaviour-based-ambient-speech functionlity).  If they find anybody, your script will need to detect that and stop saying the suspicious remarks (and reenable the behaviour-based-ambient-speech functionlity, so that the "COMBAT" samples will kick in automatically).

I'm fairly sure that some of the group-link type scripts others have created have already implemented "reduced-knowsabout-value" based searching.  Maybe all you'd need to do is monitor these existing scripts with the dynamic speech stuff, simply tracking who's in "searchmode" and who's not, and setting your speech-modes appropriately.

I definately need some help with the scripts here as I simply can´t get it to work with my knowledge.

Thx.

I'd love to help in a more hands way... I've no doubt I could make all this happen given enough time (I'm thinking a considerable amount here).  Unfortunately though, I'm getting hammered by RL atm (including 2 weddings in 2 weekends back-to-back)  confused_o.gif

Anyhow, there's my brain dump on how I'd get started... hope some of this is helpful in your endeavor.  I’ll keep an eye out for this one indeed! biggrin_o.gif

(Also, if you'd like me to elaborate on any of this, I'll be more than happy to... good luck.) wink_o.gif

Share this post


Link to post
Share on other sites

Hey Balschoiw,

well last few week's i tryed the same thing giving the Soldiers a Voice ( Scream ) if they are hit by a bullet and some other thing's.

I also use the ECP's Voices for this and created a Addon with about 30 Hit Voices 30 injured Voices 20 Screams some Medic and Help Scream's and of course i use the detected Voice's of ECP which i also used for ArmA Group Link II smile_o.gif

So i don't have the very best knowledge in Scripting but i really would join your team to help you smile_o.gif

Share this post


Link to post
Share on other sites

hi guys, the dynamic speach aspect of ecp was great its really good to see you guys trying to recreate it , i cant script but i can create sounds for arma if needed , ,you should also ask permmision of cameron mcdonald he created a russian and english sound pack extension for dsai last year and its great i still use it. i was wondering how you are thinking of releasing this the @mod folder ,way seams best if when you use it all standard bis missions get the dynamic speach. @ snkman i would love to try out your beta mod biggrin_o.gif have you uploaded it yet?

one other great aspect of ecp was the wounded guy screaming for help medic!! , it was really disturbing this should be intergrated in your mod it would really add atmosphere along with snkemans hit screams , and mapfacts blackout script for arma alongwith the script coup de grace script ect.. ithink i got a bit ahead of myself then sorry about that , just think its a great idea . Before i found this disccusion i msg'ed cameron mcdonald about the same thing here is what he had to say:

Quote (NeilReed101 @ May 15 2007,19:48)

Hi Cameron i was wondering if its possible to adapt dsai for arma and since you redid the amazing voices with your extension last year , i thought you would be the man to ask since ecp died years ago what do you think?

Hey mate. Well, it's possible, I suppose, technically difficult, but possible. The only problem: I didn't really have anything to do with the DSAI system. I only added sounds, if you get my drift. However, if DSAI was all that one wanted to add, I think it could be done, it would just be an operation to sort DSAI links, scripts etc from the rest of the ECP backbone. I don't think any of the commands related to DSAI have actually changed, so, yeah.

However, one would have to ask Zayfod or an ECP member for permission to do so, of course.

Anyway mate, hope that helps,

Kind regards,

Cameron McDonald.

well hope that has given you guys a few words of encouragement , i think i will start work on them medic yells....MEDIC!!....

p.s are the shouts gonna play randomly?

Share this post


Link to post
Share on other sites

Nice one Blaschoiw.

I was wondering why Arma didnt give me that feeling OFP or ECP gave and i think this might be the thing to fill the gap.

Go for it. smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×