Sound modding

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Sound modding

Postby mvginda » Sun 4 Jun 2017 00:56

Can anybody help me with this part from the modding manual? I simply dont get it? Are theese files that need to be renamed or replaced or is it text within the SoundDescriptors NDF file maybe? I simply dont know and my mod is not working.

Here is the part i dont get:

To redirect an existing sound to your own sound, you need to replace its TSoundStream, Template_GlobalAcknow, Template_UnitAcknowor TemplateSoundDescriptorby the modded version :
TSoundStream-> SoundStreamModded Template_GlobalAcknow -> Template_GlobalAcknowModded Template_UnitAcknow -> Template_UnitAcknowModded TemplateSoundDescriptor -> TemplateSoundDescriptorModded

Where do i find those things i need to change?

Also just to be 100% sure. All work im doing i am doing in my mod folder right? no where else? Its just strange cause one would suppose that if i screwed something up the sounds would not play at all right? but its just vanilla sounds so its like nothing is working regarding my modding.

Please help :)

User avatar
The W:AB Noob
Lieutenant General
Posts: 4570
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: Sound modding

Postby The W:AB Noob » Sun 4 Jun 2017 03:27

Okay, it took me a long while to try and understand it, but I think I get it. (The guide does explain it correctly, but not very helpfully.) Remember that this is only for replacing a sound, not adding one.

Go to YourMod\GameData\Sound\Generated\SoundDescriptors.ndf. I'm going to use the 20mm cannon sound as an example.

Code: Select all

template Template_SoundDescriptor_CC_Autocanon_20mm
[
    UseSpecialLoop,
]
is TSoundDescriptor
(
    TheSoundStream          = TSoundStream ( FileName =  'GameData:\Assets\Sons\SFX_Normandie\CC\CC_Autocanon_20mm.wav' )
    SoundSettings           = $/SoundSettings/SFX_SoundSettings
    UseSpecialLoop          = <UseSpecialLoop>
)

Now if I want to replace it with my own sound file called My20Mm.wav, I have to put that file in the folder YourMod\GameData\Assets\SoundModding\. (Remember to set your .wav file to the very exact specifications that are listed in the guide.) Now replace the code above with this:

Code: Select all

template Template_SoundDescriptor_CC_Autocanon_20mm
[
    UseSpecialLoop,
]
is TSoundDescriptor
(
    TheSoundStream          = SoundStreamModded( FileName =  'my20Mm.wav' )
    SoundSettings           = $/SoundSettings/SFX_SoundSettings
    UseSpecialLoop          = <UseSpecialLoop>
)

Notice how I replaced TSoundStream with SoundStreamModded. I believe that is what the arrows mean. For example, you are modding a unit's voice acting, you want to replace the Template_GlobalAcknow with Template_GlobalAcknowModded. Lastly, note that the file name is now relative to the folder YourMod\GameData\Assets\SoundModding\.

Eugen or anybody else, if I messed up on something, please correct me. I hope this helps, mvginda. Feel free to friend me on Steam @ The W:RD Noob to ask more questions anytime.
W:RD Sandbox Mod 5.4.4 Click -> Image

User avatar
Aikmofobi
Lieutenant
Posts: 1363
Joined: Thu 12 Jul 2012 23:04
Location: Northern Sweden
Contact:

Re: Sound modding

Postby Aikmofobi » Sun 4 Jun 2017 10:13

Haven't read the modding documentation, but if the game handles ingame sound the same way as in previous games, any sounds you add must be in 44.1 kHz, 16 bit mono or you will face crashes.

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Re: Sound modding

Postby mvginda » Sun 4 Jun 2017 14:34

The W:AB Noob wrote:Okay, it took me a long while to try and understand it, but I think I get it. (The guide does explain it correctly, but not very helpfully.) Remember that this is only for replacing a sound, not adding one.

Go to YourMod\GameData\Sound\Generated\SoundDescriptors.ndf. I'm going to use the 20mm cannon sound as an example.

Code: Select all

template Template_SoundDescriptor_CC_Autocanon_20mm
[
    UseSpecialLoop,
]
is TSoundDescriptor
(
    TheSoundStream          = TSoundStream ( FileName =  'GameData:\Assets\Sons\SFX_Normandie\CC\CC_Autocanon_20mm.wav' )
    SoundSettings           = $/SoundSettings/SFX_SoundSettings
    UseSpecialLoop          = <UseSpecialLoop>
)

Now if I want to replace it with my own sound file called My20Mm.wav, I have to put that file in the folder YourMod\GameData\Assets\SoundModding\. (Remember to set your .wav file to the very exact specifications that are listed in the guide.) Now replace the code above with this:

Code: Select all

template Template_SoundDescriptor_CC_Autocanon_20mm
[
    UseSpecialLoop,
]
is TSoundDescriptor
(
    TheSoundStream          = SoundStreamModded( FileName =  'my20Mm.wav' )
    SoundSettings           = $/SoundSettings/SFX_SoundSettings
    UseSpecialLoop          = <UseSpecialLoop>
)

Notice how I replaced TSoundStream with SoundStreamModded. I believe that is what the arrows mean. For example, you are modding a unit's voice acting, you want to replace the Template_GlobalAcknow with Template_GlobalAcknowModded. Lastly, note that the file name is now relative to the folder YourMod\GameData\Assets\SoundModding\.

Eugen or anybody else, if I messed up on something, please correct me. I hope this helps, mvginda. Feel free to friend me on Steam @ The W:RD Noob to ask more questions anytime.


Thx mate. I am going to try it out and see if it works. I am having a hunch that something else is wrong also. Because like i wrote i would think that the sound in question should not work at all after me messing with it an activating the mod but its still just the vanilla sounds. I am going to take you up on you kind offer and add you to my steam because i think i will need your help definitely. I have never modded before :)

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Re: Sound modding

Postby mvginda » Sun 4 Jun 2017 16:32

Hmmm nothing is working. I dont know if i created the mod wrong or what because no matter what i do the game stays the same.

This is how my code is looking now but yeah no luck.


is TSoundDescriptorList
(
PlayInRandomOrder = True
Items =
[
TSoundDescriptor
(
TheSoundStream = TSoundStreamModded ( FileName = 'GameData:\Assets\Soundmodding\MG42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = TSoundStreamModded ( FileName = 'GameData:\Assets\Soundmodding\MG42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = TSoundStreamModded ( FileName = 'GameData:\Assets\Soundmodding\MG42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = TSoundStreamModded ( FileName = 'GameData:\Assets\Soundmodding\MG42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),

Hulor
Sergeant First-Class
Posts: 119
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: Sound modding

Postby Hulor » Sun 4 Jun 2017 19:27

Hi,

You use TSoundStreamModded, either you want SoundStreamModded (your new sound from your mod folder, note that there is no T at the beginning) or TSoundStream (the original sound).
Make sure to use the correct object your mod would generate properly and you would be able to activate it through the Mod Center ingame. :)

P.S. :
The W:AB Noob wrote:Eugen or anybody else, if I messed up on something, please correct me

You have it right, well explain. We will add an example for futur modding documentation.

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Re: Sound modding

Postby mvginda » Mon 5 Jun 2017 13:43

Okey so this is how it looks now. It still plays the original sound and not mine. What am i doing wrong? I am able to activate the mod ingame but nothing changes. Also this is what i do in the mod creation process (maybe something wrong here?):

1. I run Createnewmod.bat. in the original mod folder.
2. Then i run Generatemod.bat inside my new mod folder.
3. Then i run Updatemod.bat inside my mod folder.
4. Then i run UploadMod.bat and upload the mod.
5. Then i work with my mod.
- Do i need to do something everytime i have changes in my mod? Update it or something?


This is what i have changed for now which is not working, it plays the original sounds instead of my sound (i put in the same sound instead of the 4 original ones just for testing):


template Template_SoundDescriptorList_SD_MG42
[
UseSpecialLoop,
]
is TSoundDescriptorList
(
PlayInRandomOrder = True
Items =
[
TSoundDescriptor
(
TheSoundStream = SoundStreamModded ( FileName = 'mymg42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = SoundStreamModded ( FileName = 'mymg42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = SoundStreamModded ( FileName = 'mymg42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
TSoundDescriptor
(
TheSoundStream = SoundStreamModded ( FileName = 'mymg42.wav' )
SoundSettings = $/SoundSettings/SFX_SoundSettings
UseSpecialLoop = <UseSpecialLoop>
),
]

User avatar
The W:AB Noob
Lieutenant General
Posts: 4570
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: Sound modding

Postby The W:AB Noob » Mon 5 Jun 2017 15:40

Okay, this was confusing to me too because the name GenerateMod.bat sounds like a one-time initialization of the mod. Actually, this is more of a compiler, and so you have to run that .bat script every time you want to "save" your changes and see it in game. The other two are not necessary to test your changes unless Steel Division has been updated or you want the mod uploaded to the Steam Workshop.

And as a sidenote, try putting code in the

Code: Select all

[code][/code]
brackets. It keeps the indents and makes it easier to copy/paste.

PS:
Hulor wrote:
The W:AB Noob wrote:Eugen or anybody else, if I messed up on something, please correct me

You have it right, well explain. We will add an example for futur modding documentation.

Yay!
W:RD Sandbox Mod 5.4.4 Click -> Image

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Re: Sound modding

Postby mvginda » Wed 7 Jun 2017 19:51

The W:AB Noob wrote:Okay, this was confusing to me too because the name GenerateMod.bat sounds like a one-time initialization of the mod. Actually, this is more of a compiler, and so you have to run that .bat script every time you want to "save" your changes and see it in game. The other two are not necessary to test your changes unless Steel Division has been updated or you want the mod uploaded to the Steam Workshop.

And as a sidenote, try putting code in the

Code: Select all

[code][/code]
brackets. It keeps the indents and makes it easier to copy/paste.

PS:
Hulor wrote:
The W:AB Noob wrote:Eugen or anybody else, if I messed up on something, please correct me

You have it right, well explain. We will add an example for futur modding documentation.

Yay!


Thank you! Well if Eugen would have written that in the manual it would have spared me a lot of annoyance and hours :( But it works now thank you. FINALLY! :D

mvginda
Corporal
Posts: 24
Joined: Fri 7 Jun 2013 16:19
Contact:

Re: Sound modding

Postby mvginda » Sun 11 Jun 2017 07:08

Ookey

So my mod is out. Now im trying to make it not conflict with other mods. The game insists that my mod changes gameplay. But it does not. It only adds some sound files and makes changes to the sound texts in the sound folder. I also tried both settings in the ini file regarding it being cosmetic only or not without any luck

Any help guys? :)

Return to “Modding Tools”

Who is online

Users browsing this forum: No registered users and 1 guest