Home   Help Search Login Register  

Author Topic: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!  (Read 18275 times)

0 Members and 3 Guests are viewing this topic.

Offline Bracks

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #15 on: 20 Nov 2007, 04:00:23 »
Hi,
Had afew tests with your scripts for awhile and I think it really adds alot :)

I am still a noob scripting so I can't help you with any of that sorry, I will just add what i noticed on performance.
tested on (1GB ram,2.4ghz)
For the demo mission,
I did not experience any lagg at all, however I noticed the hard drive going abit more than usual, but as said, this was not noticeable on screen.

I also extracted the Spanish scripts/configs and ran them in one of my missions and all seemed well (not so much hard drive "clicking" this time though).

When I play LAN this weekend with 3 or 4 others I will let you know how it works in multiplayer (will edit this post).

Anyway, I think that script adds alot so please keep up the great work!
Thanks for your time and effort in developing it! :yes:

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #16 on: 20 Nov 2007, 09:39:51 »
Hey there Bracks!

Thanks for testing it! And I'm glad you didn't notice any lag, it actually seems to be pretty stable and un-lagging for most.  :blink: Wow. Regarding the coop-mission: if you want to post a link to it on this thread, feel free to! It's always nice for people to have actual missions to play with these voices, not just my demo one.  :D I might add it to the first post as well.

Comments always welcome, people!  :clap:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline yokhanan

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #17 on: 21 Nov 2007, 17:40:16 »
Hey, new guy here. I tried it out the moment I saw in on Armaholic. I just gotta say WOW. Loved the demo mission, though I do sorta share on the whole a wee bit too much coughing. But as you even said it's easily changeable.

However I do have a pretty retarded question. I'm pretty much a noob with all of this to be perfectly honest--haven't tried this nor do I have the OFP experience a lot of guys out there have with this. So my question is this. I was just tinkering around in the editor on the Sakakah co-op mission and was wondering how exactly do I get these great sounds work in it? I tried pasting from your sqf files into the current one for the mission at the bottom of the files, but just can't seem to get it to work at all. I know for a fact I'm probably doing something wrong--hence the noob part--and why I feel a bit foolish for asking, but can anyone help me out on how to get this to work?  :-[

Anyway, once again just wanted to say great job on this. I loved playing the demo mission. It really made the game come alive for me. I wanted to do something like this and tried asking for suggestions on the BIS forums but no one bothered really. So you have no idea how excited I was when I found out about it.  Thanks a bunch for making this! :good:

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #18 on: 21 Nov 2007, 21:16:52 »
Glad you like it!  :D I've noticed a big bunch of downloads both from my filefront page and from ArmAHolic, but surprisingly few have sneaked over here to give some comments. The "beta" in the name implies comments and suggestions for improvements are much appreciated!  :yes:

Anyway, I don't know the coop mission in question, but implementing the scripts in your own missions is fairly easy, dependant of course on how dynamic the mission is (i.e., does it spawn new units and groups all the time):

1) Make sure the mission file in question is "open" (i.e., not in .pbo format), and then copy over to it the whole RUG_DSAI folder, and the DSAIInit.sqf files you need (maybe for you the default RUG_DSAIInit.sqf and RUG_ArabDSAIInit.sqf, since I'm guessing they're the ones you're aiming for). You can remove any sounds you find unnecessary to make the file size smaller.

2) From the description.ext included in the demo mission, first copy over to the other mission's description.ext the top section that says:

Code: [Select]
#define GENERAL_SPEECH_SOUND_LEVEL db-0
#define GENERAL_SPEECH_SOUND_LEVEL5 db-10
#define GENERAL_SPEECH_SOUND_LEVEL2 db-10
#define GENERAL_SPEECH_SOUND_LEVEL3 db-30
#define GENERAL_SPEECH_SOUND_LEVEL4 db-35
#define GENERAL_SPEECH_SOUND_LEVEL6 db-10

(You really only need the top one, the other sound levels might be implemented in future version - good idea to have them there already though). If the mission doesn't have a description.ext, you can just copy the demo mission's as a whole.

After that, in the other mission's description.ext you need to find a point where it says:

Code: [Select]
class CfgSounds
{
sounds[] = {};

There might or might not be a section like this: if there isn't one, just copy it from the demo mission's description.ext. If there is one, though, copy-paste all the #includes into it (just put them straight under the sounds[]= {}; to make sure they're within the curled brackets. Afterwards it should look something like this:

Code: [Select]
class CfgSounds
{
sounds[] = {};

// RUG_DSAI sounds

#include "RUG_DSAI\DSAI_BehaviourSounds.h"
#include "RUG_DSAI\DSAI_FleeingSounds.h"
#include "RUG_DSAI\DSAI_WoundedSounds.h"
#include "RUG_DSAI\DSAI_OwnKilledSounds.h"
#include "RUG_DSAI\DSAI_EnemyKilledSounds.h"
#include "RUG_DSAI\DSAI_MiscSounds.h"
#include "RUG_DSAI\DSAI_GenericSounds.h"
#include "RUG_DSAI\DSAI_ContactSounds.h"
#include "RUG_DSAI\DSAI_UnderFireSounds.h"

#include "RUG_DSAI\DSAI_RUSBehaviourSounds.h"

#include "RUG_DSAI\DSAI_ArabBehaviourSounds.h"
#include "RUG_DSAI\DSAI_ArabEnemyKilledSounds.h"
#include "RUG_DSAI\DSAI_ArabMiscSounds.h"
#include "RUG_DSAI\DSAI_ArabWoundedSounds.h"
#include "RUG_DSAI\DSAI_ArabOwnKilledSounds.h"
#include "RUG_DSAI\DSAI_ArabContactSounds.h"
#include "RUG_DSAI\DSAI_ArabUnderFireSounds.h"

#include "RUG_DSAI\DSAI_SPABehaviourSounds.h"
#include "RUG_DSAI\DSAI_SPAEnemyKilledSounds.h"
#include "RUG_DSAI\DSAI_SPAWoundedSounds.h"
#include "RUG_DSAI\DSAI_SPAOwnKilledSounds.h"
#include "RUG_DSAI\DSAI_SPAContactSounds.h"
};

Note that if you're not using any of the languages mentioned up above, you can just edit out them (i.e. SPA and RUS). Nothing changes though if you leave them in.

3) After this, it's just a matter of initializing the sounds themselves! This is best done from the init.sqs or init.sqf file of the mission. If the mission for some reason doesn't have an init.sqs or init.sqf, just copy-paste the one from the demo mission. The command is fairly simple:

Code: [Select]
;RUG_TerminalDistance is the distance at which all DSAI scripts shut off automatically.

RUG_DSAI_TerminalDistance = 1000;

RUG_DSAI= [(units aPgrp), (units bPgrp), units dudegrp] execVM "RUG_DSAIinit.sqf"

(note that if you're pasting this into an init.sqf file, you need to delete the commented line that starts with ; up above, and put a ; after each line). What you're seeing above is the standard way of initializing the English-language version for three different groups, named aPgrp, bPgrp and dudeGrp. Most groups in the coop mission should hopefully be named already; you probably need to go into the mission to check out their names (they will have something like "group1 = group this" in their init fields; if they don't, just name the groups using that piece of code (without quotes). Remember to name each group differently!). After you've got the names of each group you want to add, just add them using the same syntax as above. I.e.,
Code: [Select]
RUG_DSAI=[(units NameOfGroup1), (units NameOfGroup2), (units NameOfGroup3)] execVM "RUG_DSAIInit.sqf";
Do the same for the groups you want to have Arab/other language sounds. Find them in the editor, and name them if they aren't already, and then run the same script as above (except with RUG_ArabDSAIInit.sqf, or whichever is applicable). Do note however that if the mission maker has enemy groups (or friendly for that matter) spawn dynamically, you might have to do a lot more work to get the sounds to work with each group. For most standard missions however it should work just fine.  :)

NOTE 1: The MANDATORY global variable RUG_TerminalDistance. This has to be defined somewhere, preferably in the init.sqs (see example above). If it's not, the scripts will probably return an error. This will decide the distance in meters around the player that the sounds will be played and the scripts run - mess around with it to see what suits you best. Having a lot of groups far outside of earshot that still have the scripts running is a bit unnecessary, and in cities especially sound occlusion makes it hard to ear very far - so you might want to limit it to something like 500 meters or so. But that's up to you.

NOTE 2: In the description.ext you #defined a variable named GENERAL_SPEECH_SOUND_LEVEL as having a value of db-0. By either lowering (db-10, for instance) or raising (db+10, for instance) this variable in the description.ext, you can decide how far the voices are heard. It won't raise their -volume-, but they will be heard longer/shorter distances. If you're not happy with 0 (no change), just raise or lower it as you see fit. :) In future version, I'll try to add it so that you can fiddle more with this. I.e., separate volumes for combat/contact/grenade/under fire shouts and safe chit-chat or coughing or stealth and so forth. But for now it's just that one variable.

I hope this was clear enough for you! It may sound complicated, but I thought it was better to give clear instructions than to assume too much.  :) It's really just a matter of copy-pasting some stuff over, and writing in some group names. If you get it to work, feel free to upload the mission somewhere and send me a link, and I'll add it to the post!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline tedbell

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #19 on: 22 Nov 2007, 18:50:30 »
I just wanted to say that this is FANTASTIC! I have been looking for more ambient sounds, chatter and more immersiveness in ArmA, and this is IT!

I hope that you continue to develop this, it really adds depth - and humor - to the mission!

thanks

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #20 on: 22 Nov 2007, 19:13:38 »
Thank you for your encouraging words, tedbell! I'll be sure to work on it some more - if you have any suggestions for improvements, feel free to tell me!  :D

And yes, those were the reasons I created the scripts, to add more feeling to the game. Glad you're enjoying it :) If you create any missions or want sounds added etc, feel free to contact me!

Wolfrug out. 
"When 900 years YOU reach, look as good you will not!"

Offline tedbell

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #21 on: 22 Nov 2007, 22:20:17 »
One of the features that made the Killzone E3 video so amazing was the chatter and ambient battle talk. If you haven't seen it, check it out - it is exactly what your scripting has brought to ArmA. I am going to re-read your directions again and try to add DSAI to my existing mission.

This post was just another excuse to tell you how kickass your DSAI is. Off to the editor now to try to incorporate it into my mission....

THANKS WOLFRUG!

Just added it to my mission in Sarani. It works great, it adds a lot of ambience and it will now be included in every mission. More swearing and screaming would be nice, but that is personal preference. Man, this is great!

Here are a few throwaway suggestions:

'enemy spotted' - would be nice to have a rough idea of distance - i hear this phrase a lot. something like 'enemy spotted - close', 'enemy spotted - 500 meters', 'enemy spotted - 1000 meters'

some scared voices - freaking out - shitting pants type stuff

communication with other groups - so that they respond with 'affirmative', 'negative' or some nonsense



« Last Edit: 23 Nov 2007, 03:56:28 by tedbell »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #22 on: 23 Nov 2007, 11:25:18 »
Glad you got it to work!  :D It's never easy to write instructions to your scripts, as Spooner can attest to, so it's always equally fun when someone manages to follow your instructions and actually implement the scripts.  ;)

Spotting enemies: Hmm. I -guess- this could work somehow, by taking the default voices' distance shout-outs and applying them after it. However the game already sort of does that, when you spot enemies normally, together with a useful little compass and everything. The DSAI "contact" voices are mostly there to add ambience. I can -try- to see what I can find, but I think it might be a little bit too much work.  ;)

Scared voices: Try giving your group of units an AllowFleeing
"When 900 years YOU reach, look as good you will not!"

Offline yokhanan

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #23 on: 23 Nov 2007, 17:53:05 »
Wolfrug,

I just wanted to show my personal gratitude for your taking the time and effort to explain to brain dead me on the "how-to". Very much appreciated man, for sure.  :good:

Sorry for the late response, between getting sick and the holiday yesterday I just now had a moment to respond and show much needed gratitude for your help. Thanks again.  :)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #24 on: 23 Nov 2007, 22:50:39 »
No problem.  :D If you have any other problems or questions about the scripts, feel free to ask!

I think next I'm going to, just for fun, try to see how they work in a campaign environment...I'm pretty sure I can get it to work without having to copy the scripts into every mission separately.

Just need to find a campaign that doesn't mind getting edited a bit...hmhm.  :cool2:

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline tedbell

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #25 on: 24 Nov 2007, 21:27:32 »
Ok, Wolfrug, this may actually be a legitimate suggestion...

Is there a way to make the voices from your addon quiet when they are coming from a vehicle?

For example, some guys inside a tank chatting it up sound just as loud as if they were standing outside. I guess they probably shouldn't be heard at all if they are inside a Tank, BMP, Striker or other enclosed vehicle. I don't know if that it is possible or too much trouble, but it would be nice to do a check to see if they are inside an enclosed vehicle.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #26 on: 24 Nov 2007, 22:41:39 »
Yes, well...that's the thing. When people are turned out or in open vehicles (for instance sitting inside a truck) they should still be speaking normally (I think :D haven't tested much). I don't think there's any easy way to figure out if a vehicle is open or not, and it's probably not worth it anyway.  :)

Then again, I assume that people don't mix together infantry and armor THAT often. I think what I'll do is add an option for people: so they can decide whether each instance run has voices inside vehicles or not. I'll see how I can manage that...

If you want to edit it yourself, there's a line that looks a bit like this in almost every script:

Code: [Select]
private ["_Sounds", "_random2", "_unit"];
_Sounds = (call _Array) select 0;
_random2 = floor (random (count _Sounds));
_unit = _curUnit;
[b]if (_unit !=Player) then {_unit say (_Sounds select _random2)};[/b]

If you change that to:

Code: [Select]
[b]if (_unit !=Player && vehicle _unit == _unit) then {_unit say (_Sounds select _random2)};[/b]
The vehicle _unit == _unit bit means the script checks if the unit is inside a vehicle or not, and if it's in one, it won't say anything. Just add that to each script and no vehicles will say anything any more :) But I'll see about getting out a new version in a while with some new stuff.  :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline tedbell

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #27 on: 25 Nov 2007, 02:13:48 »
Perfect. I know it's a minor tweak and I thank you for the code! I was hoping there would be an easy logic check. This tweak, combined with your cutoff distance and sound levels give the user great control over the effects. Thanks!

Offline Bracks

  • Members
  • *
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #28 on: 25 Nov 2007, 07:04:46 »
hi again,

Had a chance to test the mission and everything seemed to go fine... however the server got afew Arma.rtp entries which it does not usually. 

I wrote them down, but lost the bit of paper they were on so I will not be able to get them to you until next time I am sorry :confused:

Going to have to take a rain check on my mission sorry, for two reasons
1/ I use coverted addons for OPF, which I coverted for private use after not being able to get in touch with the orginal aurthor.
2/ Compared to the rest of the missions here on opec, they suck :D (have no hidden objectives or much interesting things)

But on the bright side, thanks to Seven's Setpos entry, I had abit of an idea that I am working on which will use your scripts, which I think will work out quite well :)  If you wish to read about it, I listed down my basic mission ideas in this thread..
http://www.armaholic.com/forums.php?m=posts&p=12036#12036

Anyway, will post again when I get hold of the servers RTP file :)

« Last Edit: 25 Nov 2007, 10:37:48 by Bracks »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
« Reply #29 on: 25 Nov 2007, 23:09:39 »
That mission sounds great indeed!  :good: Once again, if you do finish it, feel free to contact me  :yes:

Regarding the .rpt file: if you can find it and post it (or better yet, PM it) to me, that'd be great. I know nearly nothing about multiplayer editing, but I can try to look at it and see if there's anything there I can fix. Or I can ask other more knowledgeable people about it  :D

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"