IPB

Welcome Guest ( Log In | Register )

Silencing Commander Radio Spam, without muting it entirely
MasterChiefRulZ
post Mar 30 2013, 09:59 AM
Post #1


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,383
Joined: 31-December 03
From: Home
Member No.: 48



UPDATE:

The answer, posted by Void, is in reply # 11


Original post:

It's simple, right? No big deal, right? It's why I keep kicking myself over and over and over as to why this isn't working.

I've got a custom Common_client and a custom Common_server that I'm trying to mount on a per-map-basis. For some reason it's not working... uhm.gif

I've set up my Client and Server in the levels folder. I've checked and rechecked the file structure within the zips so that they match the original main Common_client.zip and Common_server.zip. I've went inside the Tunisia map (target map for my changes) and mounted my custom Common_client.zip and Common_server.zip within the respective ClientArchives.con and ServerArchives.con files. I run the map and no changes are there.

My goal is to reduce Commander and Squad leader voice spam on a per map basis. I've edited the VoiceMessages_AutomaticallyTriggered.con and VoiceMessages_ComAndSL.con files and am attempting to mount them.

I'm hoping a fresh pair of eyes can help me spot what oversight/error I have in my set up. I originally created additional .ogg files that were silent versions of the originals, paired with the originals, so at random the Commander would speak and sometimes not. When that didn't work I then remmed out the lines altogether to attempt perfect silence; still not working. I then tried editing VoiceMessages.con by remming out the run VoiceMessages_AutomaticallyTriggered.con line in the file, still not achieving anything.

I attempted mounting this first within the map folder, then thought it best to switch to the levels folder (like the ithh-mp_objects zips ) and mount that way but to no avail. This all leads me to believe I've mounted this wrong. Anyone got any ideas? See my mistake?









--------------------
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 12)
bobthedinosaur
post Mar 30 2013, 10:15 AM
Post #2


Dictator
******

Group: Soldiers
Posts: 2,228
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



I'd suggest you use a different zip name. I think having similarly name archives one by the mod files and one by map files might cause conflict and might just ignore your map files.


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Void
post Mar 30 2013, 06:05 PM
Post #3


Otaku
****

Group: Soldiers
Posts: 329
Joined: 7-June 10
Member No.: 7,463



The archive name doesn't matter, so long as you aren't overwriting one that already exists.

The content of the archive mounted first takes priority over the ones mounted after it. The files mounted in the map's server/client archives.con are mounted after the ones in the main mod. Easy to add things to the map, not so much to do overrides

What I just said above I'm pretty sure about, but if someone can prove me wrong I would be quite pleased.

Last night I posted a convoluted and hackish way to do it. It works to an extent, but has so many problems that I'm going to edit it away...

{SNIP}

This post has been edited by Void: Mar 31 2013, 05:34 AM


--------------------
Do what you want, just don't do it around me.

All my moddb stuff: http://www.moddb.com/mods/esai-enhanced-st...c-ai/downloads/
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Mar 30 2013, 06:54 PM
Post #4


Dictator
******

Group: Soldiers
Posts: 2,228
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



QUOTE
so long as you aren't overwriting one that already exists.


I think if the name is just "common_client.zip" and "common_server.zip" there is a name conflict and the version he wants might not be overriding the mod version. There is that priority in archives via the lists however if the archive themselves might not be loading. If the name is changed to something like mapAcommon_client.zip then the files in those archives might get loaded and override the same named files in the mod's archive version.

This post has been edited by bobthedinosaur: Mar 30 2013, 06:56 PM


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Void
post Mar 30 2013, 07:08 PM
Post #5


Otaku
****

Group: Soldiers
Posts: 329
Joined: 7-June 10
Member No.: 7,463



QUOTE
If the name is changed to something like mapAcommon_client.zip then the files in those archives might get loaded and override the same named files in the mod's archive version.


Thinking more you might be right about that. (I always rename my zips anyway). My line of reasoning was that since you can mount, say, an ObjectsServer.zip from your own mod and also mount an ObjectsServer.zip from vBf2, then it shouldn't matter.

Be nice if you were right though. Quick fix would be much better than my method, I'd be the first one to admit.

- [time passes] - .........

I just looked at another JONES map I have (can you tell I like his work? Who doesn't...) But anyway, it uses an "objects_server.zip" specific to the map, and the game recognizes it just fine. Again, it's just adding content, not overriding anything.

Unless things are different for stuff in the\Objects tree of assets, I'm thinking the name isn't the issue. What I posted does work without problems, it just seems like there should be an easier way.

This post has been edited by Void: Mar 30 2013, 08:02 PM


--------------------
Do what you want, just don't do it around me.

All my moddb stuff: http://www.moddb.com/mods/esai-enhanced-st...c-ai/downloads/
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Mar 31 2013, 02:14 PM
Post #6


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,383
Joined: 31-December 03
From: Home
Member No.: 48



Tried the renaming the folders. Changes still not taking hold.


--------------------
Go to the top of the page
 
+Quote Post
Void
post Mar 31 2013, 02:42 PM
Post #7


Otaku
****

Group: Soldiers
Posts: 329
Joined: 7-June 10
Member No.: 7,463



I've actually been fooling with the concept for a little while trying to override some objects in a map.

Been working with an undocumented filemanager command:

filemanager.unMountArchive [archive name]

My idea was to unmount the mod archive, mount the one in the map, then remount the mod archive.

So far I know that the command at least works in the bf2 debug build...but I haven't figured out the precise usage yet. I've gotten close by wading through the debugger logs. If i figure that out I'll test it in retail ver.
----------

boo. Command is active in retail, but it just unmounts every archive in the map folder regardless of the argument you give it.

This post has been edited by Void: Mar 31 2013, 02:59 PM


--------------------
Do what you want, just don't do it around me.

All my moddb stuff: http://www.moddb.com/mods/esai-enhanced-st...c-ai/downloads/
Go to the top of the page
 
+Quote Post
Fastj@ck
post Mar 31 2013, 05:38 PM
Post #8


Major
****

Group: Soldiers
Posts: 252
Joined: 24-August 08
From: Germany
Member No.: 5,523



You have the zipfile directly in the levelsfolder. Never seen before. I saw only a levelsfolder and inside of it was the zipfiles.

Try this:
Create a folder named common_client and another folder called common_server and put it into levelsfolder.
Put your zips into the correct folders.

ClientArchives.con
fileManager.mountArchive Levels/common_client/common_client.zip Common

ServerArchives.con
fileManager.mountArchive Levels/common_server/common_server.zip Common

Maybe that helps you but i'm not sure. It's longtime ago i messed around with bf2.

This post has been edited by Fastj@ck: Mar 31 2013, 05:41 PM
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Apr 1 2013, 08:18 AM
Post #9


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,383
Joined: 31-December 03
From: Home
Member No.: 48



@Fastj@ck
Hmm. I tried that but not by putting the zips into folders of their own. Worth a shot.

It'd be great to be able to limit bot radio spam selectively without having to eliminate the radio chatter feature altogether. I may resort to using my "Multiple .ogg tracks" on the main Common.zips, unfortunately if it works that means on larger maps radio chatter would be very rare (I like the ambiance of it, when it's not in my ear every few seconds that is).


--------------------
Go to the top of the page
 
+Quote Post
M.Combat
post Apr 3 2013, 04:44 AM
Post #10


Mediocre animator and modder
******

Group: Soldiers
Posts: 2,089
Joined: 4-October 06
Member No.: 2,251



Try adding:

run clientarchives.con
run serverarchives.con

to the init.con file


--------------------
Go to the top of the page
 
+Quote Post
Void
post Apr 3 2013, 02:29 PM
Post #11


Otaku
****

Group: Soldiers
Posts: 329
Joined: 7-June 10
Member No.: 7,463



Solved

VoiceMessages.con runs these files:

VoiceMessages_AutomaticallyTriggered.con
VoiceMessages_ComAndSL.con
VoiceMessages_Help.con
VoiceMessages_PlayerTriggered.con

BF2 is hard coded to look for "VoiceMessages.con". It will take the first one it gets (according to the archive mount order). If it doesn't find it it will throw you an Assert.

Also, BF2 mounts all the archives specified in your mod's server/client archives.con files immediately after it starts...just after it initializes it's .DLLs. Putting a custom "VoiceMessages.con" in a level folder and mounting that with the map's files doesn't work.

Using an empty "VoiceMessages.con" in the main mod and then running the exact same code that it does from inside a map doesn't work either.

The files in the common /sound/etc hierarchy correspond to the Language you specify in the map's init.con. The files you posted were under /English - this won't work because that language tree has already been mounted by the mod.

So what to do?

Create a new language:

Method 1 - No warnings in debugger log files

    1. From the bf2 common_client.zip, extract the language you want to use as your base - ALL the .oggs, because you need those for the other soldier sounds.

    2. Copy your silent .ogg files into the extracted directory and overwrite the ones already there.

    3. Rename the folder to something else. This name becomes the name of the new language you will specify in the map's init.con

    4. Zip it up and mount.


Method 2 - Easy way. Debugger complains but works fine in retail without crashes / instability.

    1. From the bf2 common_client.zip, extract the language you want to use as your base - ALL the .oggs, because you need those for the other soldier sounds.

    2. Delete the sound files that correspond to the radio messages you don't want to hear.

    3. Rename the folder to something else. This name becomes the name of the new language you will specify in the map's init.con

    4. Zip it up and mount.


The second method is much faster because you don't need to fool around with creating ogg files at all. In any case, you can delete the /Help_VO folder and save about 3MB of space. Don't think anyone needs help playing the game at this point.

You can mount the new language in your main mod. You can mount it from the map's clientArchives.con. You can name it whatever you want (including "common_client.zip"), and you can put it wherever you like. The name doesn't matter for beans. If it were me I'd just mount my "shut up CO" languages in the main mod to save time, but whatever. Either way works fine.

Here's a new language called "CustomUS". I used the first method to make it for you using the silent .ogg files you posted, and deleted all the vanilla VO_Help sound files.

Custom US Language

Init.con would be changed thus:

From this
CODE
gameLogic.setTeamLanguage 2 "English"


To this
CODE
gameLogic.setTeamLanguage 2 "CustomUS"


And that's that. I imagine you could dispense with the language assignments in init.con and assign them in each game mode's GPO instead if you wanted to go custom on a per-game-mode basis, but I didn't fool around with that.

Note based on the files you attached to your post:

- The ogg files only need to be mounted client side

Edit:

You can indeed add extra alternative audio files. Unfortunately the changes apply to all languages. You do it by mounting an archive containing VoiceMessages.con and the con files it runs. Here is an example for adding an extra sample to the CO attack order:

VoiceMessages_ComAndSL.con:
CODE
rem -=This assignment is from Vanilla =-
gamelogic.messages.addRadioVoice "commander"       "commander/filter/COMMSL_COMORDERS_attackthispos.ogg" COMMSL_COMORDERS_attackthispos

rem -= This is the extra assignment =-
gamelogic.messages.addRadioVoice "commander"       "commander/filter/sampleName.ogg" COMMSL_COMORDERS_attackthispos


You must mount the con files in your mod's ServerArchives.con file before any other archive that contains them is mounted. As stated, BF2 will go with whichever VoiceMessages.con it finds first, and it will stick with it.

To preserve the default languages after making the changes, you would need to add an audio file for each language with the same name as the one you added in the con file. Just dupe the proper audio file from the preexisting language, rename it, and then add it to the language folder.

Example based on the code above: For , say,the MEC language, copy the file COMMSL_COMORDERS_attackthispos.ogg, rename it to sampleName.ogg, then put that file in the \MEC\Commander\Filter folder. Repeat for each sample you added, then zip it up and mount it client side. Do this for all the default languages.

Adding in the "fixed" versions of the default languages should probably be done in the main mod. Since in this case you are adding content, the order you mount this particular file doesn't matter.

Notes on the audio:

You needn't bother to make a bunch of different silent ogg files to match the exact duration of the ones you are replacing in a custom language. Just make one, then copy/ rename . About two seconds of silence should be sufficient. "Generate Silence" (that is what Audacity calls it) inside your audio editor.

You don't need to use a 44.1 Khz sampling rate. The default files only use 8Khz. Make sure the file is mono. The bit rate can also be very low...I encoded one as a test using a nominal bitrate of 56kbs. And as far as encoding goes, use VBR (variable bit rate).

---------

Incidentally, if anyone wants to shut the bots up entirely, create a folder named "sound", copy into it the file "VoiceMessages.con", delete the 4 run lines at the bottom, zip it up, and mount it in Common at the top of your ServerArchives.con file.

If you wanted to shut up the CO for the entire mod instead of doing it for certain maps only, you would only have to create a "VoiceMessages.con" that runs an altered "VoiceMessages_ComAndSL.con" file, where in the latter file you would merely rem out the audio file assignments for the commander clips you didn't want to hear. You would need to mount that early on, before any other "VoiceMessages.con" file gets mounted.

The moral to this post is that you cannot override predefined content from inside a map.

This post has been edited by Void: Apr 6 2013, 03:16 PM


--------------------
Do what you want, just don't do it around me.

All my moddb stuff: http://www.moddb.com/mods/esai-enhanced-st...c-ai/downloads/
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Apr 6 2013, 01:58 PM
Post #12


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,383
Joined: 31-December 03
From: Home
Member No.: 48



Void, you're a genius. I hadn't thought of creating a custom US language altogether. Brilliant! Learning several things here, and since Commander spam is a thing that plagues many a BF singleplayer I'm going to add this advice to Heady's "important threads" list. smile.gif

QUOTE
You needn't bother to make a bunch of different silent ogg files to match the exact duration of the ones you are replacing in a custom language. Just make one, then copy/ rename . About two seconds of silence should be sufficient. "Generate Silence" (that is what Audacity calls it) inside your audio editor.

Actually my goal was to just reduce how many times the Commander speaks. In the map "Tunisia" as flags turn so quickly, there can be instances of the Commander speaking sometimes 3 different phrases at once. I thought if I mounted some muted duplicates, then sometimes the Comm would speak, and sometimes not depending on which audio qued up.


--------------------
Go to the top of the page
 
+Quote Post
Void
post Apr 6 2013, 03:07 PM
Post #13


Otaku
****

Group: Soldiers
Posts: 329
Joined: 7-June 10
Member No.: 7,463



QUOTE (Sir Chief)
Actually my goal was to just reduce how many times the Commander speaks...{SNIP}...depending on which audio qued up.


Yeah, I noticed that after I upped my custom US language, which shuts the CO up altogether. I was working with the samples you upped though, so don't blame me tongue.gif

Seriously though, look again at the part of my post where I talked about customizing the cons that VoiceMessages.con runs. The bit that I edited in that starts with:

QUOTE (Baka)
You can indeed add extra alternative audio files. Unfortunately the changes apply to all languages. You do it by mounting an archive containing VoiceMessages.con...


That should help you do what you are describing. I will explain it more...or again...something like that.

All those con files that assign samples do so across the board, and every language in the game is affected. You can easily add new entries in those con files to point to extra samples. (See the last code snippet in my previous post).

The idea is to add pointers to new sample files for the same message id string. Because that assignment applies to all the languages in the mod, you would use a silent ogg file in your custom languages, and use a "sound filled" ogg for the other languages.

To repair the stock languages after adding your new entry, just copy a sound clip from that language that you want to hear. Rename it to whatever you specified in the con file, and then mount it client side in your mod.

Say you added a sample entry for the same ID string that goes with: COMMSL_COMORDERS_defendthispos.ogg

And you specified the filename as Shutup.ogg. In your custom language Shutup.ogg would be a sample of silence, for the stock languages you would copy and then rename COMMSL_COMORDERS_defendthispos.ogg to Shutup.ogg. After that you put it in the proper folder tree and mount it client side. You have to do this for all the languages in the mod in which you want to preserve the standard radio chatter.

If you do that you will, of course, have to use silent ogg files with unique names, but they can all be renamed copies of your silent sample.

I know all this works...when I was trying to crack this I messed about with extra entries for the English language and threw in some MEC audio...gave me a CO who spoke mostly in English but was prone to lapses of reason and would start speaking Arabic.

If you have more questions about this stuff feel free to ask.

-= Off Topic =-

Looks like I lied when I said I was leaving BFSP. If the Internet persona known as "Void" becomes too problematic I'll assassinate him properly this time.

-= Back to Topic =-

This post has been edited by Void: Apr 6 2013, 03:22 PM


--------------------
Do what you want, just don't do it around me.

All my moddb stuff: http://www.moddb.com/mods/esai-enhanced-st...c-ai/downloads/
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2017 - 04:23 PM