View Full Version : [HOW-TO]Setting up Custom Sounds
Darkbladecr
7th Nov 10, 2:38 AM
A while back Loran Korn made an excellent tutorial (http://forums.relicnews.com/showthread.php?233413-tutorial-sound-mods) for how to create sound mods for CoH. As I am a very big visual learner I have decided to compliment his tutorial with a video tutorial. It doesn't go into as much depth, with the information about hex editing the .bsc files, however you can still use his information on top of my tutorial.
When I use OE to locate the .bsc files you can do the same by taking a converted .rgo from Mod Studio, and using a custom .rgm to open the file. Please check here for how to do this:
I created a default *.rgm and that you can use for opening unburnt Relic *.rgo's and *.rga. The files are here: http://rapidshare.com/files/299889960/DataGeneric_files.zip
http://www.mediafire.com/?wmjlgzjyzqa
And the instructions are here: http://forums.relicnews.com/showpost.php?p=3563252&postcount=36
I will add a second part to this tutorial, which will be a written/thumbnail guide for how to properly edit .bsc files without the 'bythelenght' rule.
Anyway in the meantime I hope the video helps:
LINK (http://www.mediafire.com/?65qwseb8uohjsi5)
MIRROR (http://rapidshare.com/files/429368680/Setting_up_custom_sounds.mp4)
Santos
7th Nov 10, 6:41 AM
I did some research on this too, as BSC files are used in Dawn of War 2 as well. I even got some sounds to play in my editor but it later turned out that BSC files are more complex than I initially thought and like half of them were failing to load properly. :banghead:
If I manage to figure out the overall structure of this format, it will be possible to write some crude editor for creating\editing these files. There would still be many unknowns as I don't really have any means of finding out what all those numeric parameters stand for (other than trial and error), but it's really all about editing the sound paths and having some feedback on what you're doing.
Darkbladecr
7th Nov 10, 7:39 AM
If this helps:
I think you don't really get what my problem is. I'm trying to crack the format and not just change linkings or whatsoever ;). This is what I guess to know until know:
EA Shark b ?
0x04 - ascii string - easb
0x05 - ?? - 0x0000000000
used when there's more than just one PlayList in the file
BSC Format (Burnt Sound Container):
Header:
0x04 - ascii string -'sbhs'
0x04 - uint32 - Version, CoH version = 14 (0x0E)
0x01 - uint8 - PlayList count
PlayList:
0x04 - uint32 - index (only for Sub-PlayLists)
0x04 - uint32 - length of ModeName
0x^^ - ascii string - ModeName (either Normal, Random, RandomPlaylist or Sequential)
0x04 - uint32 - max. Instances (0 = infinite, 1-10)
0x04 - uint32 - Polyphony (min 1, max 10)
0x04 - uint32 - min. RepeatTime in ms (0 = infinite)
0x04 - uint32 - max. RepeatTime in ms (0 = infinite)
0x04 - uint32 - min. RepeatCount (0 = infinite)
0x04 - uint32 - max. RepeatCount (0 = infinite)
0x04 - uint32 - RandomWeight(min 1, max 100), weight in Random Playlist
0x04 - float - Length in ms (0 = normal)
0x04 - float - ReleaseTime in seconds (0 = no ReleaseTime)
0x04 - uint32 - number of EffectBehaviors
**^^
0x04 - uint32 - length of EffectBehavior name
0x^^ - ascii string - Name of EffectBehavior (see files from EffectBehaviors-directory)
//**
0x01 - bool - OverrideParentBehaivors
0x04 - uint32 - length of emitter name
0x^^ - ascii string - Emitter name (see emitters.ems for possible values, <none> is also a possible value)
0x04 - uint32 - number of SoundContainers contained in the playlist
**^^
SoundContainers
//**
0x04 - uint32 - number of Sub-PlayLists
**^^
Sub-PlayLists
//**
SoundContainer:
0x04 - uint32 - PlayList-Index of this Container
0x04 - uint32 - length of VoiceGroupName
0x^^ - ascii string - VoiceGroupName
0x01 - bool - Is3D
0x01 - bool - Looping
0x01 - bool - UseSoundSpeed/Volume Trigger
0x04 - uint32 - RandomWeight (min 1, max 100), weight in Random Playlist
0x04 - float - Amplitude factor
0x04 - float - Doppler ?
0x04 - float - PlayingFrequence
0x04 - float - Start ?
0x04 - float - End ?
0x04 - float - MaskSample ?
0x01 - uint8 - number of linked files
0x04 - uint32 - length of linked file's name
0x^^ - ascii string - linked file's name
0x04 - EffectContainer count
-- 010100000010 etc. <- THIS IS UNKNOWN!!
0x?? tables
0x?? Control Sources with parameters
ControlSource:
0x04 - uint32 - Control Source Name length
0x^^ - string - control Source Name
0x04 - uint32 - Number of param-tables
**^^
0x04 - uint32 - Number of Parameters
**^^
0x04 - float - Parameter condition
0x04 - float - Parameter modificator for value
//**
//**
I already _have_ edited lots of BSC by hand and it's perfectly possible to change the length of the names of the SMFs linked with the Playlist-entries of the BSC.
Also regarding BSC file editing:
http://img695.imageshack.us/img695/2903/bytess.th.png (http://img695.imageshack.us/i/bytess.png/)
Well, it's not like a code. It's basically the same as the decimal numbering system -- but instead of power-of-10s you're using power-of-16s (hexa - decimal). Thus there are 16 different numerals:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
As you can see, 'A' in the hexadecimal system is equivalent to the number 10 in the decimal system. For more information:
http://en.wikipedia.org/wiki/Hexadecimal
Little Endian just tells you the order of the bytes. Little Endian means that the lowest-value byte is at the first position (although 'Endian' implies that it is at the end of the number). http://en.wikipedia.org/wiki/Little_endian
Santos
7th Nov 10, 7:47 AM
Great! This is gonna help alot. :)
Kapp'n
8th Nov 10, 2:17 PM
Moved :)
Copernicus
14th Nov 10, 10:23 AM
Why didn't I notice this thread any earlier?
@Santos:
Keep in mind that DoW2 and CoH use different versions of the BSC format; the information I posted (originally posted elsewhere, reposted by Darkbladecr, see above) applies to the CoH version (but should also apply to the DoW2 version).
Edit [02/04/2011]:
easb is not part of the BSC-file format. It is merely some info for a so-called ByteStreamAdapterExt (see fs::ByteStreamAdapterExt from Filesystem.dll). I haven't quite figured out the five bytes following the easb yet.
Edit [05/26/2011]:
I found some notes I made earlier on SCN/BSC. The SCN file format is a LUA-format which can seemingly also be used to describe sound containers. I heavily suspect that it is analogous in structure to the BSC format.
My notes try to recreate a SCN file but they are in no way complete.
-- reconstruction of Lua-Container (.scn - file)
--[[
COH sound effect types
Distance
Time
TriggerTime
DeltaTime
FOV
OOV
DistanceY
PositionY
ApproachAngle
ReleaseTime
]]--
-- reconstruction of Lua-Container (.scn - file)
Container = {
-- something here which I haven't figured out just yet
-- these are the variables which are already known to be in the BSC files
sometable = {
Item = "",
}
Container = {
[1] = Container, -- these are the child-containers, they work the same way as any other container
-- more entries of that kind
},
Elements = {
[1] = ElementTable, -- also a table, see further below
-- more entries of that kind
},
}
-- note: this is a sample table, a real file should only contain a Container-table.
ElementTable = {
Sample = "Music\FrontEnd\opening_ambience_TG\opening_ambience_with_birds", -- only an example
Positioning = {
Start = 1, -- some number
End = 1, -- some number
},
Effects = {
[1] = EffectTable, -- also a table
-- more entries of that kind
},
}
EffectTable = {
Effect = "",
Parameters = {
[1] = { -- this is a parameter table
Parameter = "",
OperatorNode = {
Operator = "", -- operator type, one of these 4: *, /, +, -
Left = { -- another parameter table, optional
},
Right = { -- another parameter table, optional
},
EnvelopeNode = {
ControlSource = "", -- control source name
-- ONE of these three:
LinearSegments = {
[1] = {
Position = 1, -- some number, maybe a packed pos?
Ampliture = 1, -- some other number
},
-- more entries of that kind
},
RandomLfo = {
[1] = {
Period = 1, -- some number
Deviation = 1, -- another number
}
-- more entries of that kind
},
RandomConstant = {
Min = 1, -- some number
Max = 1, -- some number
},
},
},
},
},
}
--[[
Operators:
+ 0
- 1
* 2
/ 3
??_7NodeLoader@lua@shark@@6B@
??_7ElementLoader@lua@shark@@6B@
??_7EffectLoader@lua@shark@@6B@
??_7AttributesLua@@6B@
]]--
I suspect that the seemingly messed up part consisting of 0,1,2 at the end of BSCs relate to a tree of parameter tables.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.