OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Wolfrug on 20 Oct 2007, 13:45:34

Title: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 20 Oct 2007, 13:45:34
Wolfrug's Dynamic Sound AI (RUG DSAI).
Version: 0.3 BETA
Requires: ArmA v.1.08
Credits: ECP for Generic Sounds & Russian voices (and inspiration), Soldier of Fortune II demo for Spanish voices, COD4 demo for Arab voices, BIS for US voices. Armaholic for hosting me!
Beta thread: http://www.ofpec.com/forum/index.php?topic=30495.0

Download links:
(Look in the above thread for link to "full" version)
Filefront link: Beta 0.3 LITE (http://files.filefront.com/RUG+DSAIBetav03LITEIntrorar/;9152370;/fileinfo.html)
Armedassault.info mirror: Lite + normal (http://www.armedassault.info/index.php?cat=authors&id=222)
Armaholic mirror: Lite + normal (http://www.armaholic.com/index.php?m=single&id=2368)
Filefront mirror for EXTRA RUSSIAN VOICES (http://files.filefront.com/RUG+DSAIBetav03+RUSSIANIorar/;9159688;/fileinfo.html) : just unzip into the same directory as the full version (will only overwrite init.sqs).

Missions using DSAI:

Were We Soldiers (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=67;t=69861) by MrN (requires VTE mod - uses modified v.0.1)

Version history:

V0.1 BETA
- Initial release

v0.2 BETA
- Added two new scripts (UnderFireCheck.sqf & ContactCheck.sqf)
- Changed the scripts from group-centric to unit-array centric.
- Added Spanish sounds (SF2 demo)
- Removed Russian sounds (too big + no word from ECP)
- Added global variable RUG_DSAI_TerminalDistance to decide on range of scripts.
- Split into Lite and normal versions.

v0.3 BETA
- Added more functionality to RUG_DSAI_TerminalDistance (can actually terminate all scripts now).
- Added second global variable RUG_DSAI_CycleTime to decide loop rates of certain scripts.
- Added two new sound level defines to the description.ext, so that there are now three: normal, loud and quiet (GENERAL_SPEECH_SOUND_LEVEL, GENERAL_SPEECH_SOUND_LEVEL2, GENERAL_SPEECH_SOUND_LEVEL3)
- Minor fixes on some scripts.
- Added proper readme :)
- Added some minor elements to the demo mission...

Contents of readme (available in download packages for v0.3)):
1) Concept
2) Use (overall)
3) Guide on how to add to your own mission.

1)Concept:

This is a Dynamic Sound AI (DSAI) much like the one used in the OFP Mod Enhanced Configuration Project (ECP), from where the inspiration to make this came.

What it does is add voices to soldiers which are appropriate to the situation. It is a (in my opinion) easily enough editable package, that can be added to any mission with a minimum of hassle. There are currently two versions: Lite, which only has the default BIS voices, and "normal", which also contains the configs and sound files for Spanish and Arabic.

2)Use (overall):

Everything important is inside a folder named "RUG_DSAI", except the RUG_DSAIinit.sqf scripts (more on them later). The RUG_DSAI folder has within it the *.h files which define the various sounds (included or excluded from the description.ext using #include as wished by the mission maker).

It also has functions (named things such as DSAI_Behaviour.sqf, or DSAI_ArabBehaviour.sqf). These contain within them the LISTS OF SOUNDS used by the scripts withing the RUG_DSAI\Scripts folder. This is where the real "dynamicness" comes in. You can, for instance, make a list of sounds which only use ONE speaker (say Robert Polo, or "number 4", or whatever), and then use that list for that one character, to avoid having one person speak in many different voices. Alternatively, if you don't like certain sounds, you can simply edit them out of this list and they'll never be spoken. The current lists are (for standard English sounds):

DSAI_Behaviour.sqf -> sounds for Safe/aware/combat/stealth.
DSAI_EnemyKilled.sqf -> sounds for "normal" enemy kill (<1000 rating change) and "big" enemy kill (>1000 rating change)
DSAI_Fleeing -> Activated for units within the group that are fleeing.
DSAI_Generic -> not language bound. Contains sounds like "ahem", and "sneeze" and "laugh" (stolen from ECP). Dependant on the current behaviour of the group (i.e., no laughing while in Aware, etc).
DSAI_Misc -> miscellaneous sounds, such as for reloading, throwing grenades, firing weapons.
DSAI_OwnKilled -> Sounds for when someone in the group is killed and teammembers react.
DSAI_Wounded -> Sounds played when and while wounded.
DSAI_Contact -> Sounds played when in contact and out of contact (v0.2)
DSAI_UnderFire -> Sounds played when under fire (sometimes: rather iffy) (v0.2)

The RUG_DSAI\Sounds folder holds within it the sounds. Their paths are defined in the *.h files in the root RUG_DSAI folder. Don't move them around unless you also change their path in the *.h file!

The RUG_DSAI\Scripts folder holds within it the scripts used globally by each "list". Most scripts take two arguments: the name of the list and the name of the group it's to be applied on. Some scripts are run for each unit separately.

And finally: the RUG_DSAIInit.sqf files: these simply run all the scripts in their right folders for the group. It will first pre-compile the lists, then send them off to each script together with the group name.

3)Tutorial on how to add to your own mission:

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 (for instance the default RUG_DSAIInit.sqf and RUG_ArabDSAIInit.sqf). 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_LEVEL2 db-10
#define GENERAL_SPEECH_SOUND_LEVEL3 db-30

#define GENERAL_SPEECH_SOUND_LEVEL4 db-35
#define GENERAL_SPEECH_SOUND_LEVEL5 db-10
#define GENERAL_SPEECH_SOUND_LEVEL6 db-10

(You really only need the top three, the others might be implemented in the future). 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 in meters at which all DSAI scripts shut off automatically. Default = 1000.
;Setting RUG_TerminalDistance to -1 automatically shuts off all DSAI scripts. Setting it to 0 pauses them.
;RUG_CycleTime is a relative number in seconds which determines how often certain sounds are played. Default = 5.

RUG_DSAI_TerminalDistance = 1000;
RUG_DSAI_CycleTime = 5;

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

NOTE 1: The global variable RUG_DSAI_TerminalDistance. If this is not defined anywhere, it will default to 1000. 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. Setting it to -1 will terminate all RUG_DSAI scripts, setting it to 0 will simply pause them.

NOTE 2: The global variable RUG_DSAI_CycleTime gives a relative amount of time that certain scripts cycle (BehaviourCheck, GenericCheck, WoundedCheck): you can experiment with it to get a quick and easy change on the intervals of those checks (10 is pretty good). It defaults to 5.

NOTE 3: In the description.ext you #defined some variables named GENERAL_SPEECH_SOUND_LEVEL(+ number). The first, unnumbered one, is used by most sounds. The second (GENERAL_SPEECH_SOUND_LEVEL2) is used by the more "shouty" sounds (Behaviour:combat, underfire and contact). The third, GENERAL_SPEECH_SOUND_LEVEL3 is currently only used by the Generic sounds. Basically they are supposed to represent three sound levels: normal, loud and quiet. By either lowering (db-10, for instance) or raising (db+10, for instance) these variables in the description.ext, you can decide how far the voices are heard. It won't raise/lower 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.

Thanks for testing!

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Mandoble on 21 Oct 2007, 00:55:40
As you are currently worried about performance hit, may you post a mission without sounds defined, or all defined pointing to a short beep or a default ArmA sound just for performance testing purposes?
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 21 Oct 2007, 10:29:24
 :D 25 mb too big for you, Mandoble?

Anyway, I realised why they're so big. The rus_idle folder has in it several songs that go up to 1.5mb in size, which I don't even use.  :dry: I'll delete those and re-upload a new version. I'll try to convert the COD4 .wavs to .ogg as well...should thin it down.

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Spooner on 21 Oct 2007, 13:54:15
COD4 didn't copyright their material, eh? Well, why do I have trouble believing that?
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 21 Oct 2007, 17:27:13
Fair use (http://en.wikipedia.org/wiki/Fair_use)

Besides, it's entirely non-commercial and for no personal gain what-so-ever. I personally think this goes under the clause of "the court is not interested in trifles, go away". However, if you feel I am infringing upon the rights of the developers of COD4, feel free to send them an e-mail that I've borrowed a couple of their voices, and I'll wait for word from their lawyers.  :scratch:

Crikey.  :D You are a touchy lot sometimes. And no, I'm not going to post up a version that has "beep" sounds instead of the actual sounds. That'd take literal ages to create. However, I -can- change it around so it only uses the sounds that came with the game by default, and remove everything else. This is just a beta version, not a finalized, finished product for everybody's enjoyment.

25 mb is still too much, eh.  :dry:

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: LCD on 23 Oct 2007, 01:51:05
Finaly had time 2 give it a run...  :P  :D

played da demo a lil... it seems nice but deres also some comments i can give from dis fast look

2 much coughing and laughing... b4 fighting starts... it seems some of my soldiers r very very sick... nd da oder 1s just have very special sense of humor (as in cant stop it :P) also it cud b nice 2 have some system datll prevent da repeating of da same sound twice in a row (i got da "Its very hot" or somin da like really close 2 each other)

also da arabic sounds r... interesting... but dey r in arabic :P ;) dey r put a lil 2 much in high language (arabic is complicated... dere r 1000s of difrent dialects... nd i know my areas dialect is difrent from dialects spoken in Iraq... but da language dat ppl write in... ike books nd stuff... is da same dialect... nd its used 2 much in da voices.... but hellz... no1 understands arabic nywayz ;) :D) also i cought som1 screaming "in da revenge of my sister"... interesting :P

LCD OUT
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 23 Oct 2007, 09:29:11
I'll try to add a little something that makes them not repeat the exact same phrase in the exact same voice twice, but keep in mind the original, English sound files came in a whole bunch of different voices who say the same thing. Presently I've only bothered to include two (Howard and RobertPolo), so it's still a bit monotone. Even with more voices however there's a limited amount of voices available.

Coughing/sneezing timeouts can be adjusted in the RUG_DSAI\Scripts\DSAI_GenericCheck.sqf -> it's presently a fairly random number, but yes: a longer pause would probably be good. It is, however, as I said, very easy to change.

What takes the MOST time in this system is in fact making the damned cfgSounds definitions for every single sound, and then also adding these to the various lists (although I think I found a way to read the description.ext's defined sounds using missionConfigFile (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=m#missionConfigFile). We'll see...).

But: anyone had any trouble with performance so far?  :)

And thanks LCD on the notes on Arabic. As you say...who understands Arabic anyway?  :cool2:

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: MattiusRochelle on 24 Oct 2007, 22:55:31
Would be nice a client side addon becuase it doesnt make the missions massive and we could play it in MP.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 25 Oct 2007, 09:52:40
Well, an addon made in the spirit of for instance the HULK_OggPlayer would probably be pretty good, yes, but there are some caveats:

1) I know nothing about addonmaking.  :dunno: If anyone wants to turn this into an addon, they're free to (not very complicated scripting at any rate), but I don't know how and I'm not planning on learning.

2) "Cheating" issue: if this addon for instance was used on Evolution, then those who have it installed could hear the AI shouting random things now and then, which would allow them to find them easier. Sure, it'd be more realistic (IMHO), and probably more "atmospheric". But it'd still be a bit of an unfair advantage.

3) I'm not too concerned with file sizes. These scripts are mostly meant for SP missions. Currently my downloaded addons folder is 1.49 GB, whereas my downloaded missions folder is a measly 256 MB. I understand that a multiplayer mission that has a 10mb+ filesize won't be muchly appreciated, but a SP mission that is 20mb + is something I see as a big bonus: means there're lots of custom resources, sounds and music used.  :cool2:

If someone could tell me how to access (and I mean an actual working, tested solution, not a "it could work like this" kind of thing - believe me, I've tried) the default voices in Sounds/Missions/ROBERTPOLO etc through for instance the description.ext without needing to copy them to the mission folder, then I could cut down on the default filesize with about 11MB (since that's the size of all the voices put together). However I doubt that's doable without an addon.

 :)

I've also sent a message to Zaphod over at ECP asking for use of the ECP DSAI russian/american voices. I do hope he consents.

I'll upload a new version soonish which has removed the ECP/COD4 voices and only leaving the default ones (boring, but what can you do), which will be smaller for you to test, as well as having the new functionality of "Contact!" voices for contact situations.

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Dobermann on 29 Oct 2007, 14:23:52
I´v also been working on something similar lately and have finished sounds in the pipeline for russian and american infantry units.
Mostly combat, taunts and injured sounds. Take this as an offer for cooperation.

On the issue of implementing sounds from Arma pbo´s :
I´ve been in contact with Suma on that issue and while he said that a code like:
Code: [Select]
class voice1
{
name = "voice1";
sound[] = {"\ca\voice\alan\actions\activatebomb.wss", db+1, 1.0};
titles[] =
{
0,
};
};
should work but it doesn´t for me.
I´ve left it at that because if the lead programmer of the product doesn´t know, how am I supposed to argue ?  :)



Another thing. By checking the correspondent animation I have medics who talk to you while bandaging you. Feels nice
to get somw warm words while being treated  :D
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 29 Oct 2007, 15:06:19
 :D

Dobermann: I figured there are people out there working on this same thing, but clearly no-one has bothered to release their version yet (well, with the exception of the kind that's in for instance XAM, but I've not actually tested that one myself). Otherwise I would've simply used an already existing system.  :cool2:

I'll be glad to cooperate otherwise. My system is fairly...modular...in that you can freely add/remove sounds, and if you know your way around scripting, it's not too hard to modify the scripts themselves to suit: adding and removing conditions and so forth. As mentioned, what takes the most time is compiling the cfgSounds entries (and finding suitable sounds - could really use some spanish sounding ones!). ;)

Anyway, any method of cooperation you want is fine by me. Using the animation to figure out if the unit is healing is a nice touch, although I've found the "heal" animation is used quite a lot (for instance in Evolution to simulate building a FARP/MASH). Nonetheless, if it works it's excellent! Feel free to post your scripts/PM them to me, and we can compare. Alternatively we can simply share sounds. One thing I'm particularly eager to get to work would be a hassle-free way of finding out if a unit is being shot at: default BIS AI seems to get it somehow ("Under fire!" shouts), just not sure how.   :confused:

 :) I'll be publishing a slightly revamped version soonish, which should have the option of cutting off the sounds when the player is more than X meters from the groups/units using the scripts. I'm debating using a waitUntil or a continuos "while...do" loop with a pretty big "sleep" factor. Hm hm.

Oh, and as a btw: the below code doesn't work for me either. I in fact tried it for weapons as well, but no luck.  :(

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Dobermann on 30 Oct 2007, 10:37:40
First off, I didn´t think of releasing a scriptpack or addon first. I just wanted to add some more "drama" to the campaign I´m working on, but it somehow got out of control as the sound - effects folder got bigger and bigger over time  :)
Afaik Soldier of fortune had a nice set of hispanic sounds.
I didn´t play Evolution yet (shame on me) but to be honest I haven´t played Arma MP at all. I don´t have a good connection at home, so I concentrated on building SP missions and a campaign right when I got Arma.
I don´t think the animation issue is a big one though as you simply have to check at least two animations at the same time then that happen within a short radius. One for the medic, and one of the corresponding ones for the unit who´s getting healed. I guess there are 2 different healing animations for he healed unit. Checking if at least two of them are played in a certain radius should be working to check if a healing process unit-to-unit is going on.

For the start I will upload some of the stuff and send you the link via PM.  :good:

Update:
Just checked SOF2 for hispanic sounds and there is a complete set of them.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Wolfrug on 03 Nov 2007, 18:38:11
oooh! I haven't got SOF2 sadly, but a full set of hispanic sounds would be massively cool. If you happen to put them someplace someone might be able to download them...  :shhh:

Anyway, mah PM box is still empty.  :)

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta!
Post by: Dobermann on 04 Nov 2007, 12:16:35
Sorry, I´m ill atm :blink:
I already extracted the hispainc soundset. I will stuff it together with the other sounds and things and upload it to FTP most likely tomorrow.
From a look at your sounds I´d also say there is space for improvement sizewise as some of the sounds are quite big due to their format and quality.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug on 18 Nov 2007, 19:55:29
New version out! Pardon the crappy "version history".  :D

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Bracks 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:
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: yokhanan 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:
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: tedbell 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
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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. 
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: tedbell 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



Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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 (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a#18) number of something like 0.8 or so, and put them up against an overwhelming force. You'll start hearing them shitting their pants soon enough as they begin to flee :D

Communication with other groups: I've actually started thinking about a little Dynamic Radio Sound AI, which would work in roughly the same way as DSAI, except have more radio chatter between groups. This would also work in tanks and planes and helicopters and such, à la ECP.  :scratch: But that's just a possible future project, a lot depends on what kind of radio chatter I can get my hands on in the first place...

Thanks for the comments! Oh, and as a final note: There were some more f-words available in the sound files, but they didn't really fit properly into anything (except possibly Combat), so I didn't implement them. :dunno: Especially as the different voice actors used them so differently (for some it was like "f--k!" in the "you bastards!" kind of way, for others it was more like "f--k!" in the "oh shit!" kind of way). You can implement them yourself by first finding them (ArmA/addons/voice.pbo/missions/-> various people), extracting them to the correct DSAI\Sounds directory, giving them a proper entry in the BehaviourSounds.h file, and adding them to the Behaviour.sqf list of sounds under combat.  :)

Once again, thanks for your comments, and I'm glad you're enjoying them!  :good:

Wolfrug out.


   
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: yokhanan 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.  :)
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: tedbell 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: tedbell 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!
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Bracks 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 :)

Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug 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.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.2 out now!
Post by: Wolfrug on 29 Nov 2007, 23:46:08
Version 0.3 out. Also revamped the front page of this, looks a bit better now. Even has proper readme and version history now!  :D

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: tedbell on 30 Nov 2007, 04:34:42
Great update - thanks! Why are the first two groups - (units aPgrp), (units bPgrp) in parenthesis, while other units are not? Just curious.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 30 Nov 2007, 10:09:45
I guess just to show burgeoning mission-makers they don't need the parenthesises.  :D Or I forgot to write them there. No reason really, hehe.

@Bracks: How's that ArmA.rpt file coming along? This new update has a miiinor MP change, adding a if (isServer) exitWith {} at the beginning of the init scripts, since Spooner told me that'd be a good idea.  :blink:
Don't know if that's going to help though. :D

As always, feedback and such much welcome!

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Bracks on 30 Nov 2007, 11:36:49
Sorry, the server is at my friends, which is 3/4 of an hour away and sadly they have not responded to my email yet.  But I head up there Sunday (your Sat) so I will get them for sure then (and hopefully also test the new ones :)).

Will Pm you it when I get it, I just hope they are not errors in something else .. but I will test more when I have it in front of me with and without your scripts in afew different missions. :).... anyway, keep up the good work!
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Dobermann on 09 Dec 2007, 01:59:16
As strange as it may sound, but I haven´t forgotten you  :D
I was quite busy finding suitable samples for my own package and I guess I have a rather good collection right now.
This includes:
- english combat samples of any type (taunt, injured, afraid, combat directives, etc)
- russian combat samples of any type (taunt, injured, afraid, combat directives, etc)
- iraqui combat samples of any type (taunt, injured, afraid, combat directives, etc)
- kosovarian combat samples of any type (taunt, injured, afraid, combat directives, etc)
- sudanese combat samples of any type (taunt, injured, afraid, combat directives, etc)
- japanese combat samples of any type (taunt, injured, afraid, combat directives, etc)
- hispanic combat samples of any type (taunt, injured, afraid, combat directives, etc)
- ambient samples of any type ( off duty chatter, pissing, laughs, jokes in any language, whatever)
- aircraft and helo coms in english and russian

All files are unfied .ogg files with a small filesize, and are ready to use. Desc.ext extracts can be provided for
copy/paste.
Demomission (scripting only) is avail soon. When the combat demo is ready I´ll send you a PM.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 09 Dec 2007, 11:17:58
Ooh, nice!

See, the reason for having only X amounts of scripts in my package presently is just that: there're only so many different sounds to be had! If there's a big amount of new sounds, I could easily add another script-check that adds those sounds according to situation. :)

With the feedback I've gotten from the Addon version (http://www.ofpec.com/forum/index.php?topic=30702.0) I'm probably going to upgrade the scripts/addon to v.0.45 soon, which will hopefully lessen any possible CTDs and particularly make the addon-version more compatible and modular.

Send me 'em sounds and I can set 'em up!  :D Unless you want to make a competing DSAI, in which case...err...well, that'd just be silly, really. But if you have script suggestions and/or other such stuffies, I'm all ears.  :D

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Dobermann on 11 Dec 2007, 16:31:22
No, I´m not planning to do another DSAI. I´m just using my own stuff in the missions as they are mostly scripts I implemented over the time and I didn´t want to make the missions addon-dependant. That´s why I´m using different sets for different missions right now.
As soon as the demo is ready, I´ll ring the bell again.

Btw, for reality reasons and atmosphere I use
36000 fadeRadio 0
in a GameLogic.
This mutes the onboard Arma radio coms that I find a bit confusing when having custom soundsets enabled.
Imo it adds more to ambience if you can only hear voices from live speakers.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: johnnyboy on 11 Dec 2007, 18:53:27
Two words:  Immersion and Chaos! 

I love immersion and chaos, and this resource really adds to both.  I'll definitely use it.

Thanks for all the hard work.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 11 Dec 2007, 21:58:49
@johnny

Suggestions for improvements and such always welcome.  :yes: I've been busy working on the addon version lately, but a bunch of those improvements will definitely make it to the script version too ;)

@Dobermann

Waiting for it :D Should be cool!

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Barbolani on 05 Jan 2008, 15:02:17
Man, Im having lots of trouble trying to implement your scriptset to my mission. The only thing I modified is the init.sqs, just with this:
Quote
;RUG_TerminalDistance is the distance in meters at which all DSAI scripts shut off automatically. Default = 1000.
;Setting RUG_TerminalDistance to -1 automatically shuts off all DSAI scripts. Setting it to 0 pauses them.
;RUG_CycleTime is a relative number in seconds which determines how often certain sounds are played. Default = 5.

RUG_DSAI_TerminalDistance = 1000;
RUG_DSAI_CycleTime = 5;

RUG_DSAI= [(units g)] execVM "RUG_DSAIinit.sqf"

Well, the problem appears just starting, a super - messy error message (seems of various lines) appears and script doesent seem to initialize.. .

The strange thing is that using your script + your demomission in rahmadi everything works fine...

Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 06 Jan 2008, 00:19:41
Hmm. I can't really help unless you give me the error messages (take a screenshot of it for instance and paste it to this post :)). The only thing I can see there that might be causing problems is that "g" might not be a proper group? If you've defined g as a group in the editor (written g = group this in any group member's init field), and it's still not working, I'm slightly stumped. Did you copy over the files properly? Are you using the Lite or the normal version (the Lite version doesn't have any of the description.ext entries of the other languages, for instance)?  :)

If the problem isn't g not being a group, then showing me an error message would be much appreciated! Thanks.

Wolfrug out. 
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Barbolani on 06 Jan 2008, 17:27:16
Hi,

Of course the group is created, and some more, but i attached the script to only one group trying to simplify the init and finding the error... but nope...

I think that giving you a screenshot maybe doesent solve nothing, because the error msg is very messy

If i send you the mission??????
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 06 Jan 2008, 18:28:23
Hm, this is entirely vanilla downloaded, nothing changed in the scripts or anywhere? ...
Well, if you want to send me the mission, feel free, but the error message might be useful nonetheless. :)

Strange stuff...

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Barbolani on 08 Jan 2008, 12:49:05
Wolfrug, i emailed you the mission.

Thnx in advance
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 21 Jan 2008, 19:27:42
I had all but forgotten about Barbolani when he PMd me today, and I thought I'd check it out. This is the PM I sent him back, just for future reference:

Quote
Hey there!

Admittedly, I had entirely forgotten about you, so sorry about that! Anyway, the problem didn't lie in RUG_DSAI at all, but in you overwriting important variables. You've named the player "leader", which is also an ArmA command which I happen to use in RUG DSAI, which is what causes all the errors since "leader" now applies to a unit. :)

All you need to do is rename the player to say leader1 or somesuch, and everything should work out fine again!

Good luck - the mission looked interesting. :good:

Wolfrug.

Lesson learned: watch your variable names!  :D

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Barbolani on 29 Jan 2008, 10:00:28
Hi Wolfrug,

Of course it works now. Thanx.

Few questions and suggestions:

- I tried to change he number that modifies the frecuency the AI talks... but it seems it doesent affect them when they are in safe mode. Is it true? Can be this modified?

- In stealth mode, my men tend to shout... its unrealistic, to be in "commando mode" and some guy shouts "ENEMY SPOTTED!!!!!!!" lol... how can i change that, so when the AI is in stealth mode they just shut up???

My suggestion: This script is GREAT to give innmersion in Arma. I think it needs improving with some more voices for OPFOR and RACS (spanish) sides. I`m spanish, so if you need help....
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 29 Jan 2008, 10:36:34
Frequence of AI talks:

This is, as mentioned, a relative number. If you open up RUG_DSAI\Scripts\DSAI_BehaviourCheck.sqf, you'll find this line under each behaviour:

Code: [Select]
sleep (random (RUG_DSAI_CycleTime * 2));
The *2 there means that the cycle will happen every CycleTime (in seconds) * 2. For Stealth it's *4, for Combat it's *1. Feel free to change these around to suit your needs!

Stealth mode:

A lot of people use Stealth mode as an alternative to Combat when fighting; the AI simply seems to understand a bit better to keep their heads down then. That's why I didn't make it so that the AI is entirely quiet during stealth; they'll still say stuff like "follow me!" and "reloading!" and "frag out!" even when in stealth. The "Contact!" shout I can understand though :D Especially when setting up an ambush. You need to go to RUG_DSAI\Scripts\DSAI_ContactCheck.sqf, where you'll find this line:

Code: [Select]
if (_unit !=Player && !_sameGrp && vehicle _unit == _unit) then {_unit say (_Sounds select _random2)};
Change it to:

Code: [Select]
if (_unit !=Player && !_sameGrp && vehicle _unit == _unit && behaviour _unit !="Stealth") then {_unit say (_Sounds select _random2)};
That will make the unit shut up while in stealth. You can add the same check (behaviour _unit !="Stealth") in any of the scripts you deem it to be necessary to get some more shutting up.  ;)

Spanish voices:

I grabbed the voices used there from the Soldier of Fortune II demo, but there weren't really all that many. :( If you know of any game though that has a bunch of good Spanish voices in them, feel free to contact me. ;) And if you decide to start recording them yourself, I'd be happy to check them out!  :good:

Glad you're liking the scripts. :) There's a self-initializing addon version out there too, which is soon to be updated as well...

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Barbolani on 29 Jan 2008, 12:24:45
Mmmmm I remember that Tony Montana game, "Scarface, the world is yours".... it had LOTS of angry-spanish voices that could be used in combat mode....

I could make a spanish "DAN version".... mmmmm, could be a good idea that the RACS speak european spanish and the OPFOR south american spanish (or Cuban etc..)...
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Vultar on 14 Feb 2008, 17:01:56
Hi Wolfrug,
Great addon, though.
But there is one problem, one day I installed some addons and this addon was working without any scripting, also working in campaigne or ever QG! Now it doesn't work. Do you know why? Maybe you can explain me. And what is correctly needed to make this works without any scripts?

I got

Extended Init Event Handlers 1,26  and bisign
Extended Fired Event Handlers 1,26  and bisign
RUG_DSAI
RUG_DSAIRUS
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 14 Feb 2008, 17:28:38
Questions about the addon version should really be directed towards the Addon Beta Testing (http://www.ofpec.com/forum/index.php?topic=30702.0) boards, but for the sake of brevity I'll answer here:

Usually, there are two reasons why the voices don't work.
1) Wrong version of the Extended Init Eventhandlers mod (doesn't work with the latest version right now - next version will however). If you haven't changed versions inbetween, though, it's probably not this.
2) You're using an addon unit that -doesn't- use the Extended Init Eventhandlers, and already has an eventhandler defined. These include RHS Marines & VDV, Zabrak aliens, REBUS Italian Units (I think) and some others (haven't tested 'em all!). In that case, the only thing you can do is contact the authors of these addons and ask them nicely to make use of XEH in future releases. :)
3) Something else! Hard to tell!

Anyway : more questions, go to the thread linked above please :)

Wolfrug out.
 
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Bracks on 30 Mar 2008, 13:32:06
Hi,
Have been using your scripts for awhile now and enjoying them very much (still).

I have one small questions I wondered about if you wouldn't mind?

If so,
1/ During a cutscene in multiplayer (aka not using the intro/outro bit in the SP editor) you can often hear all the voices on full, even though you are .. for example 300 metres in the air watching a harrier :). 
I think I remember the same thing happening to ECP though.

So is there a variable that I can set to false, or do you have any suggestions to stop them saying stuff while the cut scene is running?

2/ Is there any reason you didn't add .lip files for the spanish voices (and maybe others as have not checked)?  Does it have a large effect on performance or did you decided it wouldn't be worth it? 

We always have two scripts now that we run in every mission we play, this being one of them, so thanks again for adding all that extra enjoyment that your script adds :).
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 30 Mar 2008, 13:47:34
I'm glad you're enjoying them! They're getting a bit outdated now though, to be honest, but there you go. :) I keep promising a new version but so far it hasn't happened :D I'll get there though...

1) Yes, this is an ArmA/OFP bug : all "say"'s are made into "playSound" sounds whenever you're in a cutscene, for some god-awful reason. To solve this, simply change the global variable RUG_DSAI_TerminalDistance to 0 (RUG_DSAI_TerminalDistance = 0) when the cutscene starts (or preferably a bit before, since it might take a second or two for the scripts to realise they should pause), and then change it back to whatever you've been using afterwards (for instance 500 or 1000).

2) I can't make wavtolip work.  >:( No matter what I do, following the instructions exactly...no cigar. No .lip files. IF you or someone else would want to go through all the trouble of converting the .oggs to .wav and then creating .lip files and sending them to me, that'd be wonderful and much appreciated! But yeah, a lot of work for some moving lips. :)

Glad you're enjoying the scripts!

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Bracks on 30 Mar 2008, 14:10:09
Great thanks!
Have you played/owned the game hidden and dangerous 2?
If not, it's a ww2 game made by illusion softworks which features a huge array of good voices (imo).  Currently i'm slowly working through them all and based off what they sound like... am throwing them into an aware/combat and safe folder.
I didn't bother with the british but am working on the others.. there is around
~700 good german ones.
~100 italian ones and about ~200 jap ones. 

Just incase it helps, I found these two programs which make naming/configing them 100X tmes faster. 
I used this one for the file names.
http://www.albert.nu/default.asp?sub=programs/default.asp?sub=renamer/main.htm
 With it you can select as many files as you want and rename them with an added number or varaible.. like for example
germanstealth_1,germanstealth_2 ect. 
To do this go edit>insert number then put           %ld       in the formatting spot.  Then choose your start number and position in name and away you go.

Second program, which I used to name them in the configs is just notepad ++
http://notepad-plus.sourceforge.net/uk/site.htm
I put each class on its own line then just copy pasted it for 100 or so lines with the numbers missing, e.g
"gerStealth_"
"gerstealth_"
Then I followed this tut and added all the numbers onto the ends.
http://sourceforge.net/forum/message.php?msg_id=4379320

About wave2lip.  I had massive troubles with it to start with as well.  However I have it working perfect now and can drag as many files onto it as I like at a time. 
I know this sounds silly, but the thing that fixed it for me was to put it as close to the route C:\ as possible.  For example C:\wave2lip\here.  I think I read that from Suma somewhere, can't remember exactly though..

I could do them if your still having trouble, the only problem being that I would have to convert them back to .wav first as you said, and my trail of gold wave is near the end of its use count :D .  Do you use a different program for your converting?

Regardless, thanks the solution to the cut scene problem.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: Wolfrug on 30 Mar 2008, 14:23:30
Ooh, nice. Looks useful. I'll look into those programs, since yeah : the most time-consuming part of it all is configging all those darned sound files :D The scripts are already there, after all.

So you use them for MP? Good to know you've gotten 'em to work without too much of a hassle :) You might want to check out the addon version (http://www.ofpec.com/forum/index.php?topic=30702.0) as well if you want to avoid having 100mb + mission files :D It basically works the same at the moment, with some minor wiggles. And there really is a newer version of it available, but not publicly so yet.

Thanks for the feedback! And the tools.

Wolfrug out.
Title: Re: Wolfrug's Dynamic Sound AI (RUG DSAI) -> beta 0.3 out now!
Post by: johnnyboy on 30 Mar 2008, 20:50:35
Regarding wav2lip...

Quote
I know this sounds silly, but the thing that fixed it for me was to put it as close to the route C:\ as possible.  For example C:\wave2lip\here.  I think I read that from Suma somewhere, can't remember exactly though..

...I think the problem was if you had an embedded space anywhere in the directory names, wav2lip would not work.

For example this would NOT work:

C:\my sound files\wav2lip.exe

But this would work:

C:\mySoundfiles\wav2lip.exe