(FAQ) Tentative custom ambient music tutorial

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Tentative Custom Ambient Music Tutorial

Post by SBF_Dann_Boeing »

phazon_elite wrote:Hmm, looks fine to me. Maybe it's your // comments. I'm not sure if the mod tools can recognize // comments when munging sound files.

EDIT: Forget that, I found your problem. In your CW .snd file, you have start, start2, start3, and start4. In your CW .stm, you have start, start1, start2, and start3.
that didn't solve it.
User avatar
phazon_elite
Rebel Colonel
Rebel Colonel
Posts: 597
Joined: Tue Jan 16, 2007 9:10 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: I'm sorry Link, I can't give the location. Come back when you're a little...mmmh...RICHER!
Contact:

Re: Tentative Custom Ambient Music Tutorial

Post by phazon_elite »

Well, then I don't know what to tell you, other than I'd like to know where you installed your BF1 Tools to. Also, the cw req is totally messed up in the way it's typed. Those quotes are a space before the bracket...
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Tentative Custom Ambient Music Tutorial

Post by SBF_Dann_Boeing »

wha? the brackets look fine to me? D:\Program Files
User avatar
phazon_elite
Rebel Colonel
Rebel Colonel
Posts: 597
Joined: Tue Jan 16, 2007 9:10 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: I'm sorry Link, I can't give the location. Come back when you're a little...mmmh...RICHER!
Contact:

Re: Tentative Custom Ambient Music Tutorial

Post by phazon_elite »

Program Files has a space in its name, screwing up the munging process. I suggest using D:\LucasArts, and place BFBuilder in there.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Tentative Custom Ambient Music Tutorial

Post by SBF_Dann_Boeing »

well i mean the main parrt of it munges, its only the sound that doesnt. but ill try that.

EDIT: AHAAH! Bingo, its munging properly it seems.

EDIT 2:
Grrr... but its not working in-game in swbfII...

LUA
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Hippies Attacking (attacker is always #1)
local ALL = 1
local IMP = 2
-- These variables do not change
local ATT = 1
local DEF = 2

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}
cp9 = CommandPost:New{name = "cp9"}
cp10 = CommandPost:New{name = "cp10"}
cp11 = CommandPost:New{name = "cp11"}
cp12 = CommandPost:New{name = "cp12"}
cp13 = CommandPost:New{name = "gnome"}
cp14 = CommandPost:New{name = "demon"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)
conquest:AddCommandPost(cp9)
conquest:AddCommandPost(cp10)
conquest:AddCommandPost(cp11)
conquest:AddCommandPost(cp12)
conquest:AddCommandPost(cp13)
conquest:AddCommandPost(cp14)

conquest:Start()

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()

ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(350)
SetMaxPlayerFlyHeight(1200)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo


ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:sound\\lsd.lvl;lsdgcw")
ReadDataFile("DC:SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_officer",
"all_inf_wookiee")

ReadDataFile("DC:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper")

ReadDataFile("DC:SIDE\\lsd.lvl",
"lsd_inf_nixon",
"lsd_inf_beatles",
"lsd_inf_locals",
"lsd_hover_rubberbike",
"lsd_fly_rock",
"lsd_fly_yellowsubmarine")

ReadDataFile("DC:SIDE\\des.lvl",
"ewk_inf_trooper",
"tat_inf_jawa")

SetupTeams{
all = {
team = ALL,
units = 80,
reinforcements = 150,
soldier = { "all_inf_rifleman",60, 90},
assault = { "all_inf_rocketeer",5,16},
engineer = { "all_inf_wookiee",5,16},
sniper = { "all_inf_sniper",5,16},
officer = { "all_inf_officer",4,16},
special = { "ewk_inf_trooper",1,4},

},
imp = {
team = IMP,
units = 80,
reinforcements = 150,
soldier = { "imp_inf_rifleman",60, 90},
assault = { "imp_inf_rocketeer",5,16},
engineer = { "imp_inf_officer",5,16},
sniper = { "imp_inf_sniper",5,16},
officer = { "imp_inf_dark_trooper",4,16},
special = { "tat_inf_jawa",1,4},
},
}

SetHeroClass(ALL, "lsd_inf_john_lennon")
SetHeroClass(IMP, "lsd_inf_nixon")

-- Gnomes -------------------------------
SetTeamName (3, "locals")
AddUnitClass (3, "lsd_inf_gnome", 30)
SetUnitCount (3, 30)
SetTeamAsFriend(3,ATT)
SetTeamAsFriend(3,DEF)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(DEF,3)

-- Jabberwocks --------------------------
SetTeamName(4, "acklay")
AddUnitClass (4, "lsd_inf_demon", 15)
SetUnitCount (4, 15)
SetTeamAsEnemy(4, ATT)
SetTeamAsEnemy(4, DEF)
SetTeamAsEnemy(ATT, 4)
SetTeamAsEnemy(DEF, 4)

-- They want to kill each other ------
SetTeamAsEnemy(3, 4)
SetTeamAsEnemy(4, 3)
AddAIGoal(3,"Deathmatch",200)
AddAIGoal(4,"Deathmatch",200)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 5) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntityMusic", 512)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("AcklayData", 64)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:LSD\\LSD.lvl", "LSD_conquest")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("dc:sound\\lsd.lvl", "lsdgcw_music")
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetAmbientMusic(ALL, 1.0, "all_lsd_amb_start", 0,1)
--SetAmbientMusic(ALL, 0.7, "imp_PSF_amb_middle", 1,1)
--SetAmbientMusic(ALL, 0.4, "imp_PSF_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_lsd_amb_start", 0,1)
--SetAmbientMusic(IMP, 0.7, "imp_PSF_amb_middle", 1,1)
--SetAmbientMusic(IMP, 0.4, "imp_PSF_amb_end", 2,1)

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetVictoryMusic(ALL, "all_lsd_amb_victory")
SetDefeatMusic (ALL, "all_lsd_amb_defeat")
SetVictoryMusic(IMP, "imp_lsd_amb_victory")
SetDefeatMusic (IMP, "imp_lsd_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end[/code]
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Tentative Custom Ambient Music Tutorial

Post by Maveritchell »

Did you make sure to set up the sound in the right format? You can get something that munges properly but makes no noise if you don't.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Tentative Custom Ambient Music Tutorial

Post by SBF_Dann_Boeing »

1536kbs 16 bit 48 kHz Stereo PCM. I believe this is the format Phazon_Elite has been using for the sound LVL's of my past maps.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Tentative Custom Ambient Music Tutorial

Post by Maveritchell »

Maveritchell wrote:These music files need to be .wav files in 352 kbps, 16 bit, mono, 22 kHz PCM mode.
Did you read the tutorial through? It would help, since I covered a lot of the things you've had problems with, like this and making sure it's installed to C:/Lucasarts and not Program Files.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Re: Tentative Custom Ambient Music Tutorial

Post by SBF_Dann_Boeing »

yeah i read it, i missed the c:/LucasArts part. But I know for a fact that in the sound lvl's that Phazon_Elite have been doing for me have at least been in Stereo format. He said something about a range of format that you can have it within ranges from what you said to what I said.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: (FAQ) Tentative custom ambient music tutorial

Post by computergeek »

Sorry for the bump, but this is in the FAQ
Do you know what the kHZ would be in HZ?
*Edit*
Why didnt I just google it?
its 22000 in case someone needs to know
Never mind, and sorry for the bump
MasterFang1
Corporal
Corporal
Posts: 144
Joined: Sat Apr 05, 2008 4:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: (FAQ) Tentative custom ambient music tutorial

Post by MasterFang1 »

Hello, I'm one of the remaining SWBF1 modders. Is the process for adding sound to SWBF1 any different? If it is different please help a fellow modder and I will be very grateful :bowdown:. Well, reply when you get the chance.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: (FAQ) Tentative custom ambient music tutorial

Post by Maveritchell »

MasterFang1 wrote:Hello, I'm one of the remaining SWBF1 modders. Is the process for adding sound to SWBF1 any different? If it is different please help a fellow modder and I will be very grateful :bowdown:. Well, reply when you get the chance.
No - in fact this method actually uses the SWBF1 tools to add sound.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: (FAQ) Tentative custom ambient music tutorial

Post by computergeek »

I didn't see where to put the music file in the tutorial
Do I put them in the folder I downloaded (the EFX folder?)
*Edit*
I opened the sfxcw_music.stm and saw that they need to go into streams
You might want to add that to the first post Mav
He He, I just keep solving my own problems
User avatar
vampire_lord
Rebel Sergeant
Rebel Sergeant
Posts: 216
Joined: Thu Mar 20, 2008 7:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City
Contact:

Re: (FAQ) Tentative custom ambient music tutorial

Post by vampire_lord »

Sorry to revive this post, but I am getting this errors over and over...
Hidden/Spoiler:
[code]soundflmunge.exe : Error : Unable to open file Streams\music1.wav - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\music1.wav, format may be invalid - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\music1.wav - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\music1.wav, format may be invalid - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\victory.wav - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\victory.wav, format may be invalid - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\victory.wav - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to open file Streams\victory.wav, format may be invalid - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm
soundflmunge.exe : Error : Unable to read file list C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm - while munging C:\LucasArts\BFBuilder\DataEFX\Sound\worlds\EFX\efxcw_music.stm[/code]
I am following this tutorial, I didn't change any default name or instance in the scripts, my enconding tools are AVS Audio Editor and Super(c), the only possible detail I can figure is that no matter the compressor I use, in Hz it can only go for 22050 and bitrate always shows in winamp as 353kbps despite being 352 while converting.

BFBuilder.hta is located in C:\LucasArts\BFBuilder\

BTW, I am using all four files (Music1, Music2, Music3, Victory) but it looks like 2 and 3 doesn't even show up in the log...
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: (FAQ) Tentative custom ambient music tutorial

Post by computergeek »

Mav I know that you are working on this, but I want to figure out how to do it myself
Let's have a race shall we?
Anyway the real reason I revived this was to ask what goes in the effects folder?
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: (FAQ) Tentative custom ambient music tutorial

Post by Jaspo »

Well, I've munged my music in both the BF1 tools and the BF2 tools with no errors (I used Rend's soundmunge.bat for bf2...not sure if that is supposed to work wor custom music, but it seems like it did...) but I get dead silence instead of music either way. And yes, my format is fine.

Also for the following part Mav made it sound like we should put it above the old set, but actually it's necessary to delete the old set. It shouldn't matter that it's labeled for cw instead of gcw, should it? The sound files are set to be these names in the STM file, after all. Also it's possible to throw in custom defeat music as well; Mav just didn't do it.

SetAmbientMusic(ALL, 1.0, "rep_kam_amb_start", 0,1);
SetAmbientMusic(ALL, 0.99, "rep_kam_amb_middle", 1,1);
SetAmbientMusic(ALL, 0.1,"rep_kam_amb_end", 2,1);
SetAmbientMusic(IMP, 1.0, "cis_kam_amb_start", 0,1);
SetAmbientMusic(IMP, 0.99, "cis_kam_amb_middle", 1,1);
SetAmbientMusic(IMP, 0.1,"cis_kam_amb_end", 2,1);

SetVictoryMusic(ALL, "rep_kam_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "cis_kam_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")

Hmm, does calling two music streams at once cause problems do you suppose?

OpenAudioStream("dc:sound\\sda.lvl", "sdagcw_music")
OpenAudioStream("sound\\global.lvl", "gcw_music")

or is it just my sound files being stupid?

I used the dB poweramp music converter to make them the right type.

It's back to the testing for me I guess...
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: (FAQ) Tentative custom ambient music tutorial

Post by Maveritchell »

Any time you use music that shares the same name as something from any default .lvl file being loaded you will have problems. These problems manifest themselves as music not being heard. All I can recommend is that you go through, carefully, every one of your files and make sure nothing is being duplicated in name anywhere.
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: (FAQ) Tentative custom ambient music tutorial

Post by Jaspo »

Do you know whether Rend's soundmunge.bat works for music munging in BF2 though? I really don't like having the BF1 tools hogging disk space when I don't even have the game. Also, where could I get bg music files that are KNOWN to work so that I can test to see if it's the sound files that are the problem? Or is there a way to find the game's music files?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: (FAQ) Tentative custom ambient music tutorial

Post by Frisbeetarian »

It shouldn't work because the file structure is different. Did you try the BF2 munge with the soundmunge.bat fix on psyc0fred's site?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: (FAQ) Tentative custom ambient music tutorial

Post by Maveritchell »

Frisbeetarian wrote:It shouldn't work because the file structure is different. Did you try the BF2 munge with the soundmunge.bat fix on psyc0fred's site?
Rends's soundmunge.bat is for SWBF2; you should download psych0fred's, though, it's newer and better.

And sound munging works fine in SWBF2 if you set everything up correctly; it's easier to set up (and explain for SWBF1), though.
Post Reply