Custom Music doesn't work [Solved]

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

Post Reply
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Custom Music doesn't work [Solved]

Post by Anakin »

Hi,

i tryed to get custom music ingame. But there is no music ingame. Maybe you can tell me what the problem is.


rcm.req:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"str"
"align=2048"
"rcm"
"rcm_music"

}
REQN
{
"lvl"
"comSnd"
"sspSnd"
"music"
}
}[/code]
music.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"bnk"
"align=2048"
}

REQN
{
"config"
"rcm_music_config"
"rcm_music"

}
}[/code]
rcm_music_config.snd
Hidden/Spoiler:
[code]SoundStream()
{
Name("rcm_amb_start");
Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Bus("ingamemusic");
Looping(0);
Pan(0.0);
Mode3D(0);
Stream("rcm_music"); //.stm file
SegmentList()
{
Segment("rcm_amb_start_01", 0.25);
Segment("rcm_amb_start_02", 0.25);
Segment("rcm_amb_start_03", 0.25);
Segment("rcm_amb_start_04", 0.25);
}
}

SoundStream()
{
Name("rcm_amb_middle");
Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Bus("ingamemusic");
Looping(0);
Pan(0.0);
Mode3D(0);
CyclePlayback(1);
Stream("rcm_music");
SegmentList()
{
Segment("rcm_amb_middle_01", 0.25);
Segment("rcm_amb_middle_02", 0.25);
Segment("rcm_amb_middle_03", 0.25);
Segment("rcm_amb_middle_04", 0.25);
}
}

SoundStream()
{
Name("rcm_amb_end");
Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Bus("ingamemusic");
Looping(0);
Pan(0.0);
Mode3D(0);
Stream("rcm_music");
SegmentList()
{
Segment("rcm_amb_end_01", 0.25);
Segment("rcm_amb_end_02", 0.25);
Segment("rcm_amb_end_03", 0.25);
Segment("rcm_amb_end_04", 0.25);
}
}

SoundStreamProperties()
{
Name("shell_soundtrack");
Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Bus("shellmusic");
Looping(0);
Pan(0.0);
Mode3D(0);
CyclePlayback(3);
Stream("rcm_music");
SegmentList()
{
Segment("shell_soundtrack", 1.0);
}
}
[/code]
rcm_music.mus
Hidden/Spoiler:
[code]// ----- Republic Music -----

Music()
{
Name("rcm_amb_start");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(2.0);
SoundStream("rcm_amb_start");
}

Music()
{
Name("rcm_amb_middle");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("rcm_amb_middle");
}

Music()
{
Name("rcm_amb_end");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("rcm_amb_end");
}

Music()
{
Name("shell_soundtrack");
Priority(1.0);
FadeInTime(0.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("shell_soundtrack");
}


[/code]
rcm_music.stm
Hidden/Spoiler:
[code]streams\rcm_amb_start_01.wav rcm_amb_start_01
streams\rcm_amb_start_02.wav rcm_amb_start_02
streams\rcm_amb_start_03.wav rcm_amb_start_03
streams\rcm_amb_start_04.wav rcm_amb_start_04

streams\rcm_amb_middle_01.wav rcm_amb_middle_01
streams\rcm_amb_middle_02.wav rcm_amb_middle_02
streams\rcm_amb_middle_03.wav rcm_amb_middle_03
streams\rcm_amb_middle_04.wav rcm_amb_middle_04

streams\rcm_amb_end_01.wav rcm_amb_end_01
streams\rcm_amb_end_02.wav rcm_amb_end_02
streams\rcm_amb_end_03.wav rcm_amb_end_03
streams\rcm_vode.wav rcm_amb_end_04

streams\rcm_vode_voice.wav shell_soundtrack

[/code]

odf:
Hidden/Spoiler:
[code] OpenAudioStream("dc:sound\\rcm.lvl", "music")
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rcm_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rcm_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rcm_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)[/code]

first i had some nameing problems (middel and middle) but i checked this twice and all wav files listed in the stm file are in my stream folder. There are no munging problems, and the sounds (you see in the rcm.req file) are working, too. The lvl file raised from 7.026KB to 75.029KB. So there need to be something gone right. But there is no music ingame.
Last edited by Anakin on Sat Aug 16, 2014 7:44 am, edited 1 time in total.
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: Custom Music doesn't work

Post by JimmyAngler »

As far as I know, you only need one .req file.
Try combining this stuff together to make it look something like this:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"bnk"
"align=2048"
}

REQN
{
"config"
"rcm_music_config"
"rcm_music"

}
REQN
{
"str"
"align=2048"
"rcm" <--(Leave this only if it is your Voice Overs)
"rcm_music"

}
REQN
{
"lvl"
"comSnd"
"sspSnd"
}
}[/code]
And this :
Hidden/Spoiler:
[code]SoundStreamProperties()
{
Name("shell_soundtrack");
Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Bus("shellmusic");
Looping(0);
Pan(0.0);
Mode3D(0);
CyclePlayback(3);
Stream("rcm_music");
SegmentList()
{
Segment("shell_soundtrack", 1.0);
}
}[/code]
If you're trying to do menu screen music, you have to do that in the data_rcm\Sound\shell folder

This part:
Hidden/Spoiler:
[code]// ----- Republic Music -----

Music()
{
Name("rcm_amb_start");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(2.0);
SoundStream("rcm_amb_start");
}

Music()
{
Name("rcm_amb_middle");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("rcm_amb_middle");
}

Music()
{
Name("rcm_amb_end");
Priority(0.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("rcm_amb_end");
}
Delete if menu screen music.
Music()
{
Name("shell_soundtrack");
Priority(1.0);
FadeInTime(0.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(5.0);
SoundStream("shell_soundtrack");
}
[/code]
Pretty sure you want to change the all the Priority(0.0); to 1.0 or something..

I think that's it.. Post back if it doesn't work. Don't forget to copy over the .lvl file
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Custom Music doesn't work

Post by Marth8880 »

What JimAng said.

Code: Select all

OpenAudioStream("dc:sound\\rcm.lvl", "music")
Also, the second argument (in this case, "music") needs to be the name of your .stm file.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Custom Music doesn't work [Solved]

Post by Anakin »

seams to work now. Now i need to figure out if there are always the same sounds, or if the random thing is working :D


==EDIT==

can someone tell me what these lines are good for??
I want to set up the music a bit better, so i thought some of these lines are good for the time how often it is played, how long,... But i don't know exactly, and i thought it is much easyer to aske instead of trying different values and play the map all the time.

Priority(1.0);
FadeInTime(1.0);
FadeOutTime(1.0);
MinPlaybackTime(20.0);
MinInactiveTime(2.0);

Pitch(1.0);
PitchDev(0.0);
Gain(1.0);
GainDev(0.0);
ReverbGain(0.0);
Looping(0);
Pan(0.0);
Mode3D(0);

and what are these values good for:
SetAmbientMusic(REP, 1.0, "rep_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_amb_end", 2,1)
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: Custom Music doesn't work [Solved]

Post by JimmyAngler »

Priority(1.0); <-- A higher priority increases the likeliness of the music track to play. Very helpful when juggling multiple tracks.
FadeInTime(1.0); <-- How long the fade in time of the music is.
FadeOutTime(1.0); <-- How long the fade out time of the music is.
MinPlaybackTime(20.0); <-- You music will only play for 20 seconds (I think) with this setting on 20.
MinInactiveTime(2.0); <-- The minimum time between tracks that the music doesn't play.

The only other one I know is Looping(0); which will play the music/sound effect continuously when set to 1.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Custom Music doesn't work [Solved]

Post by thelegend »

And I think Mode3D(0) to 1 (a BIG Maybe) allows 3D soudn box user to hear the music in 3D. Dont know everything but I think that should it be.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Custom Music doesn't work [Solved]

Post by Marth8880 »

thelegend wrote:And I think Mode3D(0) to 1 (a BIG Maybe) allows 3D soudn box user to hear the music in 3D. Dont know everything but I think that should it be.
No, Mode3D needs to be set to 0 for ambient and music streams. Setting Looping to 0 should fix your problem.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Custom Music doesn't work [Solved]

Post by Anakin »

JimmyAngler wrote: MinPlaybackTime(20.0); <-- You music will only play for 20 seconds (I think) with this setting on 20.
So if there are tracks longer than 20 sec only the first 20 sec will be played?? Makes more sense, if every track is played 20+ sec.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Custom Music doesn't work [Solved]

Post by Marth8880 »

Anakin wrote:
JimmyAngler wrote: MinPlaybackTime(20.0); <-- You music will only play for 20 seconds (I think) with this setting on 20.
So if there are tracks longer than 20 sec only the first 20 sec will be played?? Makes more sense, if every track is played 20+ sec.
No, MinPlaybackTime determines the absolute minimum number of seconds the track can play before the track is allowed to switch. The track automatically switches after MaxPlaybackTime elapses. Track switches only occur when the MaxPlaybackTime elapses and when other music such s vehicle, hero, victory or defeat music is triggered.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Custom Music doesn't work [Solved]

Post by Anakin »

Ok thank you. In mav's example music files were no maxplaybacktime. So what is the default value??
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Custom Music doesn't work [Solved]

Post by thelegend »

I think it's MaxPlaybackTime(value)
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Custom Music doesn't work [Solved]

Post by Anakin »

i wanted to know what the default value is, when i haven't set anything for MaxPlaybackTime();
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Custom Music doesn't work [Solved]

Post by Marth8880 »

I typically use the longest track's duration in seconds multiplied by 5.
Post Reply