Jump to content

Custom Sounds in coop missions (Development thread)


JohnTC02

Recommended Posts

Hi All,

I've been working hard to get custom sounds working in the game, along with Rahnman's help we now think this should work but there is a little work involved for the end user.

I've started this thread to forewarn you all of what's needed to install the mod and how to run it, I won't go into detail of all the filenames as this is just a guide as to how it will work.

What I would like here is some feedback telling me if you all think this is workable, it requires the player to rename folders depending on which weapons you are using and if you are playing multiplayer.

Installing the mod:

If you are using a weapon mod then you will have to use the unbundled version, there are two files that need to be placed in the sound folder of your weapon mod.

Next you will need to place an updated version of the English folder in your Local folder, if it's already there then just overwrite it with the new version.

Important:

Adding these files is a one off process, once done you won't need to do it again, it will then work with all my future missions. All sound files (wav files) will be included within the maps bundle file.

First the problems:

I need to have an English/sound folder in the Local folder for the custom sounds to work with regular weapons but there are two problems with doing this.

First is that if you are using a weapon mod then having the English and the unbundled weapon mod folder in the local folder can cause issues for some players.

Second problem is that having the English folder in the Local folder will trigger the anti-cheat when playing multiplayer.

The solution:

After a lot of discussions with Rahn the only solution we could come up with was to have two Local folders.

The first Local folder would contain your weapon mod as normal, the second Local folder would contain the English folder, obviously you would have to rename the Local folders.

Here is an example:

So, you start off with two Local folders named:

Local_Weapons_Mod

Local_Regular_Weapons

When playing you would need one of the following:

Coop Regular weapons:

Local_Weapons_Mod

Local (this folder contains the English folder and the needed files for regular weapons)

Coop Weapons Mod:

Local (Rahnmans weapon folder/Brettzies weapon folder inside)

Local_Regular_Weapons

Multiplayer:

Local_Weapons_Mod

Local_Regular_Weapons

Ok, I'll try to explain what you need to do.

If you want to play my missions using a weapon mod then you need to rename the Local folder "Local_Weapons_Mod" to Local.

If you want to play my missions using the regular weapons then you need to rename the Local folder "Local_Regular_Weapons" to local.

When playing multiplayer you need to have both Local folders renamed as follows:

Local_Weapons_Mod

Local_Regular_Weapons

Doing the above will insure there are no conflicts when using weapon mods or in multiplayer.

This may sound a bit complex but when you get the hang of it you will find it quite easy.

Rahnman might want to chip in here in case I have not explained all this clearly enough as he has more experience than me when it comes to multiplayer and weapon mods.

So what do you think folks is this going to work for you? I'm sorry it's a bit of a hassle but the benefits are that I can add any custom sound I wish to my future missions.

Thanks for reading,

John

Link to comment
Share on other sites

Hi All,

I think this explains it rather well. The main thing to realize is that in order to get the sounds to work you have to have information in your local folder. This info needs to be in the English folder (local/english/sounds) in order to work with regular weapons. That works great if you only play coop but if you like to play multiplayer (tdm, hh, seige, etc.) then servers will not let you in because any information inside your local folder will cause the games anti-cheat to block you from logging in. The solution to this is to rename the local folder to something else (anything will do) that the game doesn't recognize. If it doesn't recognize a folder then it will simply ignore it. I have found it best to rename the folder something that reminds me what is actually inside. That is why John recommends calling it "Local_regular_weapons". There can be no confustion as to what is inside. If you don't play using a weapon mod then that is all you need. If you are playing coop then make sure the folder is named "local" and enjoy the new sounds. If you are playing multi-player then rename the file to "Local_Regular_Weapons" (or something similar) and enjoy the tdm action.

If you are using a weapon mod like mine or Brettzie's then there is an added complication. The folder that you install for the mod will be located/placed inside the local folder alongside the English folder. The rub is that sometimes the presence of these two folders together can cause problems (who knows why, it just does) and cause the game to crash. So it it best not to have them together in the same folder. The answer is to have a SECOND "Local" folder and place the weapons mod inside of it. So now you have two local folders. One is for regular weapons and the other is for weapon mods (like mine and Brettzie's). They can be named:

Local_Regular_Weapons

Local_Weapons_Mods

When you download Johns files for the new sounds instructions will be included for how to paste files inside the weapon mod folders in order to get the sounds working. You only need to do this once. After that you just need to choose which local file you want to be active depending on what type of weapons you want to use and what style of play (coop or multiplayer).

If you want to play coop on regular weapons you change the name of "Local_Regular_Weapons" to "Local" and have at it. If you want to play coop with a weapon mod then rename the "Local_Weapons_Mods" folder to same "Local" (make sure the other local folder says Local_Regular_Weapons) and have at that. If you want to play tdm then name both folders to say "Local_Regular_Weapons" and "Local_Weapons_Mods" (so that there is no local folder active which will trigger the games anti-cheat) and log into a multi-player server.

So the concept and it's application is actually very simple. You rename the folders based on what type of game you want (coop or multi-player) and if you want to use a weapons mod.

Let us know what you think!

Rahn

Link to comment
Share on other sites

Maybe we can write a batch-or-binary executable launcher file? "graw2_coop_launcher.bat" & "graw2_mp_launcher.bat", or a standalone exe file with both options on a GUI window.

Perhaps the following "graw2_coop_launcher.bat" would work (not tested yet):

cd english

ren local_regular_weapons local

cd ..

graw2.exe && cd english

ren local local_regular_weapons

And a exe can be programmed similarly, using CreateProcess & WaitForSingleObject & etc.

Link to comment
Share on other sites

Thanks for explaining this further Rahn, running the sound mod is easy to do but can be hard to explain so everyone can understand it, when I posted above it sounded very simple in my head but didn't seem to turn out that way in my post.

Candy, what you said sounds good but I have no idea how to implement it, I don't have a clue when it comes to creating batch or exe files.

Link to comment
Share on other sites

Here is the code I use to switch from Rahnman's mod and plain GR.

Rahnman to Plain:

"REN "C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter 2\Local" "Local 1"

graw2.exe

REN "C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter 2\Local 1" "Local"

exit"

Plain to Rahnman's Mod:

"REN "C:\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter 2\Local 1" "Local"

exit"

Direwolf5

Edited by Direwolf5
Link to comment
Share on other sites

I've created two batch files to rename both of the Local folders.

One to rename Local_Weapons_Mod to Local then after the game is shut down it will rename it back to Local_Weapons_Mod.

Done the same for the Local_Regular_Weapons folder.

This all works fine on my PC but if you have UAC turned on then you get an "Access Denied" error in the batch file when it tries to rename the folder, right clicking on the batch file the selecting "Run as administrator" doesn't seem to help.

Is there any way around this? I don't expect every one is like me and has their UAC turned off.

Any thoughts?

Link to comment
Share on other sites

Can you run batch files if you set UAC to the option where it is still on but does not dim the display?

I know I can run them, and I have UAC on but I am not sure if I have at some point over the past three years changed some other related setting.

Link to comment
Share on other sites

To maximise interest in this there has to be two things

1. A simple way to activate/deactivate the sounds

2. A very clear set of instructions

The batch files sound like the best way of achieving (1) and between us we can easily make the instructions as clear and simple as possible.

So yeh I'd say this is not a hurdle we can't overcome :)

Link to comment
Share on other sites

I have now got the batch files working whether or not you have UAC turned on.

So after installing the sound mod there will be two batch files in the root directory of GR:AW2, I have Win7 so you may need to update the path names in the batch files for XP (I think Vista uses the same folder structure as Win7), once that is done you then need to right click on them and select "Send to" then "Desktop (create shortcut).

If you do have UAC turned on then you need to run the two batch file shortcuts as administrator.

Once I have got all the files tidied up I'll post full instructions on how to install and run the mod to see if you folks can understand it.

Link to comment
Share on other sites

If you do have UAC turned on then you need to run the two batch file shortcuts as administrator.

I am willing to bet that if you had GRAW2 installed to a different directory that is not program files, such as C:\Games\ or D:\Whatever\, you probably do not have to run as admin. :P

Also, for those of you using the Steam version of GRAW2, your GRAW2 directory location is going to look kinda like this:

C:\Program Files (x86)\steam\SteamApps\common\ghost recon advanced warfighter 2

In my case it is D:\Games\steam\, but by default I am pretty sure it would be C:\Program Files (x86)\steam\ so correct me if I am wrong.

Edited by Oelmuvun
Link to comment
Share on other sites

Thanks for the update Oelmuvun, these batch files and the strange way the UAC handles files can be a bit confusing.

Instructions for installing and running the sound mod.

Once downloaded you will have one folder called "Custom Sounds Mod" in that folder are two more folders and two batch files, these are:

Folder names:

Local_Regular_Weapons

sound

File names (both batch files):

coop_Regular_Weapons

coop_Weapons_mod

Installing the mod:

Copy the "Local_Regular_Weapons" folder and paste it into the root directory of GR:AW2, for me this is C:\Program Files (x86)\UBISOFT\Ghost Recon Advanced Warfighter 2.

Copy both files in the sound folder and paste them into the sound folder of your weapon mod (IMPORTANT: this sound mod is only compatible with unbundled versions of your weapons mod).

Copy both batch files "coop_Regular_Weapons" and "coop_Weapons_mod" and place them in the root directory of GR:AW2.

If you are using a weapon mod then rename the Local folder to "Local_Weapons_Mod" and make sure there is no English folder inside.

If you just have an English folder in your Local folder the delete the Local folder.

That's it the sound mod is now installed, next is setting up the files to work with your system and weapon mod.

Setting up the mod:

Go to the root directory of GR:AW2 and right click on the batch file "coop_Weapons_mod" then select "Edit" it will then open in notepad.

First you may need to change the path names depending on your OS and installation location, next you need to specify which weapons mod you are using in the second line, the default is context_rahnmans_coop_kits_v4.01.xml, you may need to change this if you are using a different version of Rahnman's mod or are using Brettzies mod, that's it save and close the file.

Next right click on "coop_Regular_Weapons" and select "Edit" all you need to do here is update the path names if necessary, save and close the file.

Once that is done you then need to right click on both batch files and select "Send to" then "Desktop (create shortcut).

If you have UAC turned on then you need to run the two batch file shortcuts as administrator.

The sound mod is now installed and setup.

PLEASE NOTE:

All of the above is a one off process as all other files and sound (wav) files will be included within the map's bundle file.

Running the sound mod with the game:

If you want to play a co-op mission with a weapon mod then double click on the "coop_Weapons_mod" batch file.

If you want to play a co-op mission using the regular weapons then double click on the "coop_Regular_Weapons" batch file.

If you play multiplayer then start the game in the normal way by clicking on the graw2 Shortcut on your desktop.

Even if you play co-op missions that do not use the custom sounds you can still run the game as described above.

I have tried the mod on my PC and two laptops with the UAC both on and off, so far I haven't had any problems.

I hope you can understand the instructions, Rahn might be able to update this or explain it better.

Any comments then please post them.

Cheers,

John

Link to comment
Share on other sites

Hi Guys,

I like the use of the batch files since it precludes having to raname the local folders. This all sounds good to me. The only problem that I can forsee is if a person has 2 weapon mods in his local folder. Since there are 2 mods regularly in use you may have to have 3 local folders and 3 batch files. One for regular weapons, one for Brettzie's mod and 1 for my mod.

Although, I really don't see the need for a seperate batch file for a weapon mod. Players will already have these batch files. All that is necessary is to put the new information in the sound file of my mod and Brettzies mod and just use the existing batch file. I can't see any way that this would cause any problems whatsoerver. People only use these mods to play singleplayer. If they use them on a multiplayer server they would have to turn off the anti-cheat so there is still no problem.

Then all that you would need would be the seperate batch file/local folder for the regular weapons/coop mode.

So all you really would need in your download is a single batch file/local folder set up and then the sound folder for the weapons mods.

Hope this makes sense.

Rahn

Edited by rahnman
Link to comment
Share on other sites

I'm not a 100% sure what you mean here Rahn, I included the batch files as they have the code needed in them to rename the folders.

If players are using your weapon mod then they need to run the "coop_Weapons_mod" batch file, this would rename the "Local_Weapons_Mod" folder to "Local" then load the game using your weapons mod, when you shut the game down the batch file then renames the "Local" folder back to "Local_Weapons_Mod" ready for the next time you play. Doing it this way means you don't need to use the batch file included with the weapons mod.

The same thing happens when you use the "coop_Regular_Weapons" batch file, it just loads the game using the regular weapons and renames the "Local_Regular_Weapons" folder to "Local" which has the "English" folder so the custom sounds will work for co-op play.

Doing it this way insures there is never a folder named "Local" so you can run the game using regular weapons for multiplayer as not all servers have the anti-cheat turned off.

Link to comment
Share on other sites

Hi John,

I downloaded the test run and had no problems getting things to work. I'm not so sure that using the rename function inside the batch file is a good idea, however. Direwolf is a computer guru as are most of the modders who are posting here. I believe that a majority of the players will be able to get the sound mod to work but that if you use this method there will be many who will not. Here are some reasons why:

1)There are many players who are not computer saavy and who will not understand what it is you are asking them to do or, if they use a system other than Win7 will be able to correctly input their filepath into the batch file.

2)There is no provision for a person who likes to run both weapons mods. What if they like to run Brettzie's and mine. What do they do then. Will they need another local folder or another batch file? These questions are not answered for them in the ReadMe file.

3)What if a modder comes out with another weapon mod or an existing one comes out with a another version? Then you may have to revamp your sound mod to keep it and the batch files current.

So even though this way of doing things is better and easier to actually use it is definitely more difficult to get put in place correctly. I can forsee you having to answer loads of questions from frustrated players who can't seem to get it right. The reason I wanted to rename the local folders manually is because almost all users of weapon mods are used to this concept. Also, there is no need to burden people with extra batch files and (God forbid) the possiblity of having to edit these files correctly. I can tell you that when my mod came out I had to routinely spend 30 minutes with new TAW players who couldn't seem to follow directions or spell correctly to rename files. Don't forget that many players do not speak/write English that well and any complicated directions/processes can easily be misunderstood.

So my opinion is still the same. Having them drop some new files inside the sound folder of the mods, paste a new local_Regular_Weapons folder, rename them, and run the game from the same batch files is the safest way to go. The method mentioned in this thread is definitely better but will not be implementable by many players. I think you should stay away from this method.

So if it were me I would stick to the first method and then maybe have a folder inside your download that says "for guru's" which explains direwolfs method using the rename function inside the batch file.

Cheers,

Rahn

Edited by rahnman
Link to comment
Share on other sites

Hi Rahn,

Thanks for testing the mod.

While I understand what you are saying here I am also one of those people that didn't really know that much about batch files until I made the ones for this mod, I didn't find it that difficult to work it out plus I think that if people capable of installing the weapon mods then they should know which directory their game is in then be able to update the path names in the batch files as needed.

Having said all that I can set this up whichever is the best way for the majority, if it's best to have it so you need to rename the folders manually and include the batch files in a separate folder for the more experienced user then that's fine, what I don't want is to include the new custom sounds in my missions only to find out that people aren't playing them because they can't install the sound mod. The problem here is that if I use these new sounds in my missions then the sound mod is required to play the mission or the game may crash.

What I need here is more feedback from some of my beta testers or the average player to see if they will be able to install and run this mod with the game, TBH I'm a little disappointed that more of you haven't provided feedback.

I'm beginning to think that having the custom sounds in my missions will not be that popular, even though I have had quite a few requests for this those people haven't said whether they think it's usable.

John

Link to comment
Share on other sites

John,

LOL!!! Believe me having custom sounds in the missions is going to be awesome and EVERYONE is going to LOVE it! I agree that more beta testers should chime in on this. I could be that they are just not used to looking in this forum for new topics. Why don't you post something about it in the beta testing forum and provide a link that includes what you sent me along with the "new_mission" bundle file that has the sound of the creeking fence and the redneck dude. I am sure that everyone will see it then and try it out. There is no need to feel that this is not going to be popular with the players or that it won't be well received. The only debate will be which way is easiest to implement. I'm sure all of the TAW guys will want to try this out and direwolf will be able to help them with the installation. I'm sure he will be able to give you great feedback on how much difficulty the players had. If the TAW boys do well with it then you can be relatively sure that most other players will as well. They have players from all over the world. In fact, you may want to send direwolf an email with the link and ask his guys to try it out.

Don't worry John, this is going to be GREAT!

Rahn

Link to comment
Share on other sites

Ok, I'll get a test map together with two or three buildings in it then give the doors some new sounds, also add the "redneck" dude.

Do you think it would be best to supply the sound mod without the batch files for now?

Once I'm ready I'll post it in the beta forms for testing, see how it goes.

I have a new map under construction, this will have lot's of new animations but I don't want to put it out there with new sounds if people cant get the sound mod to work.

Thanks for your support Rahn!

Link to comment
Share on other sites

Another idea could be to include the batch files as I did when I sent it to you Rahn then mention that if you cant get the batch files to work you can rename the folders manually.

The installation is the same if you use the batch files or not.

You also mentioned there could be problems if people are using more than one weapon mod or a different one to Yours or Brettzies mod, it's almost impossible to allow for all the different setups that people are using, I would have thought that if they are capable of installing more than one weapon mod or a using a different mod then they should be able to figure out what needs to be done.

Link to comment
Share on other sites

Yeah, I would just put the test mission in with the rest of the download. Everyone knows what to do with the bundle file and it saves having to do another download for it. I would also try using the new batch files and see what happens. If there are lots of problems or you have to answer a lot of questions then you have your answer and know that it will be best to do the renaming manually. I would send this to direwolf (I gave you his email address) and enlist the TAW boys for this and see how it goes.

BTW, now that I know the code for renaming the files through the batch file I have already included renaming the custom_levels folders as well. It makes things a lot easier, as long as I remember to run the files as an administrator. But I had to do more than just a little code writing to get this to happen. And you are right, each player will probably want to configure his files a little differently and there are many possibilities. We'll see how things go.

If you are feeling a little discouraged then don't be. It's always difficult to lay the ground work for doing something new, but this is just the next step in the "evolution" of your missions and it will add a lot. Like I said, it will be like playing GRAW3!

Cheers,

Rahn

Link to comment
Share on other sites

I have released a test mission so those that are interested can test the custom sounds.

For more information take a look at this thread, unlike my usual beta maps this one has no password so it's there for all to try.

Rahn, this map is different to the one you have so you may want to give it a try, please make sure you delete your test map bundle for the game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...