SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-13-12, 12:49 PM   #1
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default Adding audio to a command

I want to add .ogg files, which I will record myself, to the commands to fully raise and/or lower the attack and observation scopes.

I need to know how to connect the keystroke to the audio file in game.

I've located the proper keystrokes in commands_en, but am unsure what, if anything, to edit there.

Could someone please point this novice in the right direction?
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-14-12, 08:49 AM   #2
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

That's what I was afraid of.

Evidently it is more difficult than I had hoped.
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-14-12, 10:02 AM   #3
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

In SH5 the commands can have a line with a sound in the commands.cfg itself...an absent feature on sh3...but I guess that niobody have tried it yet.
So go on!
Here an example:

[Cmd66]
Name=Toggle_radio_messages
Contexts=1,15
Key0=0x4d,,"M"
Sound_0=ELO_Weapon,Mission_order <== seems that the sound needs to be on the sound\speech folder. You need to figure out the syntax first.

here another example with various sounds:

[Cmd192]
Name=Dive
Contexts=1
StringID=1030
Key0=0x44,,"D"
HasDelayedExecution=Yes
CommandClass=Depth
Sound_0=ELO_Helm,MC_CR_CHIEF_32,1030;Dive
Sound_1=ELO_Helm,MC_CR_CHIEF_34_A,7646;Deeper!
Sound_2=ELO_Helm,MC_CR_CHIEF_34_B,7647;Take Her Deeper
Sound_3=ELO_Helm,MC_CR_CHIEF_35,7648;Deeper Goddamit
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-14-12, 10:37 AM   #4
Missing Name
Seasoned Skipper
 
Join Date: Oct 2010
Location: Westun New Yahk
Posts: 748
Downloads: 131
Uploads: 0
Default

My tinkering efforts have been for naught as well.

Quote:
Originally Posted by Rubini View Post
Sound_3=ELO_Helm,MC_CR_CHIEF_35,7648;Deeper Goddamit
That's an actual line?
__________________
Largest target sunk with deck gun: Japanese auxiliary cruiser, 15000 tons
Largest engaged: HMS Nelson. Results inconclusive.



Read Brag's stuff
Missing Name is offline   Reply With Quote
Old 03-14-12, 11:25 AM   #5
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Missing Name View Post
My tinkering efforts have been for naught as well.



That's an actual line?
From SH5 commands.cfg. As some new mod addtions on sh3 comes from sh4/sh5 i guess that could be a good idea to see if this also works on sh3.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-14-12, 12:38 PM   #6
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

Here's a sample of an SH3 command from command_en.
The example has a sound associate with it.

[Cmd432]
Name=Man_the_deck_and_flak_guns
Ctxt=1
MnID=0x3F2D0004
Str=2946

As you can see, there is no obvious sound file associated with it, but we all hear the command when the guns are manned.

Ctxt=1 means the command onlyexecutes within the unpaused game itself, not in the museum, for example.

Str=2946 is the text displayed when the command executes. Found in Data/Menu/en_menu file.

Which leaves MnID=0x3F2D0004.

MnID = menu item ID associated with this command. Unfortunately, I cannot find the menu file/folder to which the command points.

I've located the .DAT files which sync voices with the animations, but that is it.

The number looks like a hex address, but I am unable to even find that string anywhere.

I know I'm missing something obvious, but am currently lost.
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-14-12, 01:42 PM   #7
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Osmium Steele View Post
Here's a sample of an SH3 command from command_en.
The example has a sound associate with it.

[Cmd432]
Name=Man_the_deck_and_flak_guns
Ctxt=1
MnID=0x3F2D0004
Str=2946

As you can see, there is no obvious sound file associated with it, but we all hear the command when the guns are manned.

Ctxt=1 means the command onlyexecutes within the unpaused game itself, not in the museum, for example.

Str=2946 is the text displayed when the command executes. Found in Data/Menu/en_menu file.

Which leaves MnID=0x3F2D0004.

MnID = menu item ID associated with this command. Unfortunately, I cannot find the menu file/folder to which the command points.

I've located the .DAT files which sync voices with the animations, but that is it.

The number looks like a hex address, but I am unable to even find that string anywhere.

I know I'm missing something obvious, but am currently lost.
AFAIK the MnID isn't associated to sounds anyaway.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-14-12, 06:39 PM   #8
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

The MnID is found in the menu_1024-768.ini

The voices played are controlled by the Phrases_whatever.dats as far as I remember.


They may also connect to the actual anim files but I'm not home so can't check everything.
  Reply With Quote
Old 03-15-12, 09:32 AM   #9
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
AFAIK the MnID isn't associated to sounds anyaway.
Yeah. As Privateer points out, it points to the menu_1024-768.ini file which appears to control the gui animations. Button presses, switches thrown, etc.

Quote:
Originally Posted by Privateer
The voices played are controlled by the Phrases_whatever.dats as far as I remember.
I thought so too, but Silent 3ditor lists them as Lip sync managers for the NPCs. Although, it may buried in there somewhere.

Many near misses, but no direct hits as yet. Keep shootin' guys! I'm loading as fast as I can!

The mechanism which tells the game "when X occurs play sound Y" remains elusive to my novice eye. I can see why they changed it for SH5.
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-15-12, 07:57 PM   #10
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by Osmium Steele View Post
..... it points to the menu_1024-768.ini file which appears to control the gui animations. Button presses, switches thrown, etc.
.....
hi Osmium Steele,

not only this , it also determines the area at which ,when you clic with your mouse, will 'activate' the command (otherwise you will have to use ONLY your keyboard buttons for executing the commands). now, if you can add a sound line and work...fine (just have to try it) .

ps: the allready existed commands that have sounds (but you don't see a sound line at the specific command entry) means ,afaik, that the sound is hardcoded attached to the command
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 03-16-12, 07:37 AM   #11
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

The more I look, and the more I think on it, the more convinced I become that you are correct. I cannot think of any voice command that is not attached to an NPC, and I think it must be hardcoded.

Perhaps I am going about this the wrong way. Treat it more like an environmental sound, since my mod would simulate the kaleun's voice command, not another officer, it need not be attached to an npc.

I'll keep cogitating on it. Cdr. Shephard is calling me bad names for taking time out to check Subsim!

Cya Monday.
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-16-12, 09:06 AM   #12
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
You must not forget that the game has user commands and crew commands...
For sound of crew commands you can use StateMachineControl system and files like in ..\data\Sound\Speech\ folder and for mimic like in ..\data\Library\ folder (Phrases_Voice_*.dat files)...
For sound of user commands, IIRC, SH3 game has no special sound system, therefore you can try use ambient/environment sound system... as in Sh3.sdl file.
Raise periscope (and similar) is user command.
...
Example for UZO Officer StateMachineClass (crew command):

__________________
Alex ®


Moses said: "Don't create yourself an idol"...

Last edited by Anvart; 03-16-12 at 11:56 AM.
Anvart is offline   Reply With Quote
Old 03-16-12, 01:39 PM   #13
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

Anvart, YOU are the man!

With your hint, I managed to locate the command strings for fully raising and lowering the scopes.

Believe it or not, it is located .cam files. For example:

c:\ubisoft\silenthunteriii\data\Interior\NSS_Uboat 7_CR.cam

It appears I will be able to append a new chunk to each command to play the proper .wav file.

Of course, I'll have to add the new chunk to every .cam file for every turm on every class of boat.

Now, the work begins in earnest. Cross your fingers!
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Old 03-16-12, 01:47 PM   #14
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Good!
Please Osmium, also add sounds to the snorkel up/down. it´s completely absent on Sh3 and an old request from comunity. A lot of ppl (me included) have tried to found a solution but never acheived. With this new Anvart´s tips is now easy to see that will be possible to do using the snorkel commands. I made a mod some years ago (IIRC "Snorkel for all") that adds fx&RWR to all snorkel and installations. it uses Anvarts state machine controls and then the sounds can be finally added!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-16-12, 02:38 PM   #15
Osmium Steele
Ace of the Deep
 
Join Date: Apr 2011
Location: Upper midwest USA
Posts: 1,101
Downloads: 22
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
Good!
Please Osmium, also add sounds to the snorkel up/down. it´s completely absent on Sh3 and an old request from comunity. A lot of ppl (me included) have tried to found a solution but never acheived. With this new Anvart´s tips is now easy to see that will be possible to do using the snorkel commands. I made a mod some years ago (IIRC "Snorkel for all") that adds fx&RWR to all snorkel and installations. it uses Anvarts state machine controls and then the sounds can be finally added!
If it works, I currently see no reason it could not be added.

I ran into a bit of a snag, but all hope is not lost. I am unable to edit the actual chunk defining the raise/lower commands, but I can add a sister chunk alongside it under the parent. Hopefully that will do it.

Never having done this sort of thing before, I'm leery of making changes to my only instance of SH3/GWX. I have not setup another specifically for testing, though with JSGME's ability to roll back any change I make it should be OK. (famous last words )

I'll check back in Monday with a progress report. Commander Shephard and the Reapers are just is going to have to wait.
__________________
In the month of July of the year 1348, between the feasts of St. Benedict and of St. Swithin,
a strange thing came upon England...


My U297 build thread
Osmium Steele is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.