Page 1 of 1

Sounds on windows 7

Posted: Sun Jan 08, 2012 6:01 pm
by MandeRek
I followed first Rends' tut and then the custom sound tut, and I'm sure my setup is okay. I also edited the soungmunges, as explained in both tutorials, but still my sound lvl isn't munged, and there seems to be no report file as well. Is this maybe because I'm having windows 7, and this problem before, fixed by replacing most bats, while the sound bats may have been forgotten?

How do I fix these so they work on Windows 7 as well?

Thanks in advance

Re: Sounds on windows 7

Posted: Sun Jan 08, 2012 6:04 pm
by Cerfon Rournes
The same thing happens to me.

Re: Sounds on windows 7

Posted: Sun Jan 08, 2012 6:08 pm
by Marth8880
Use the SWBF1 mod tools for munging sounds. Never fails for me, works every time.

Re: Sounds on windows 7

Posted: Sun Jan 08, 2012 9:06 pm
by MandeRek
Okay I got the munging working, and a lvl file with a proper filesize..

Still my sounds aren't loaded. These are hero sounds btw, for the Grievous.

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

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;


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"}



--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: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("ingame.lvl")


SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)

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("dc:sound\\htm.lvl;htmcw")
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


ReadDataFile("dc:SIDE\\lis.lvl",
"lis_hero_grievous")

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_hero_darthmaul",1, 1},
}
}

SetHeroClass(CIS, "lis_hero_grievous")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 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("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:HTM\\HTM.lvl", "HTM_conquest")
ReadDataFile("dc:HTM\\HTM.lvl", "HTM_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("dc:sound\\htm.lvl", "htm");
OpenAudioStream("dc:sound\\htm.lvl", "htm");
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_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)

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")
blabla
end

[/code]
And the htm.asfx:
Hidden/Spoiler:
[code]effects\grievousdeath.wav -resample xbox 22050 pc 22050
effects\grievousentry.wav -resample xbox 22050 pc 22050
effects\grievouswin.wav -resample xbox 22050 pc 22050[/code]
And the new_grievous.snd
Hidden/Spoiler:
[code]SoundProperties()
{
Name("new_grievous_entry");
Group("hero_vo");
Inherit("Hero_battle_chatter_template");
SampleList()
{
Sample("grievousentry", 1.0); // Time to entertain our guests!
}
}

SoundProperties()
{
Name("new_grievous_win");
Group("hero_vo");
Inherit("Hero_battle_chatter_template");
SampleList()
{
Sample("grievouswin", 1.0); // I only live, to see you die!
}
}

SoundProperties()
{
Name("new_grievous_death");
Group("hero_vo");
Inherit("Hero_battle_chatter_template");
SampleList()
{
Sample("grievousdeath", 1.0); // Deathsoundblaeeeeeeh
}
}[/code]
Reqs and stuff are setup correct.. I think the problem is in the snd file, but I hope someone with more exp can help me!

Re: Sounds on windows 7

Posted: Sun Jan 08, 2012 10:15 pm
by Marth8880
Set up your voiceovers as streams, and load the .stm file in your LUA as shown:

Code: Select all

OpenAudioStream("dc:sound\\htm.lvl",  "stmfilename");
Also, why would you want your voiceovers to be so low fidelity? There's nothing wrong with audio being at 44100 Hz. I cringe whenever I hear audio that has a sample size of 22050, it just sounds gross and muffled when it really doesn't need to be. It's even worse when streams are mono and low fidelity, it makes me wanna shave a pig or something, I dunno...

Re: Sounds on windows 7

Posted: Mon Jan 09, 2012 6:11 am
by MandeRek
So i should change the asfx to std file, and all 'Sample' lines from the .snd to 'Stream' lines? I just followed the tut from the tut, so I wonder why that wouldn't work.

Re: Sounds on windows 7

Posted: Mon Jan 09, 2012 12:09 pm
by Marth8880
If by .std, you mean .stm, then yes, do that. Make sure you have an OpenAudioStream for your LVL that references your .stm file, like so:

Code: Select all

OpenAudioStream("dc:sound//abc.lvl", "nameofstmfile");
Also, streams use SegmentList() rather than SampleList(), and Segment(soundfilejunkhere) rather than Sound(soundfilejunkhere).

Re: Sounds on windows 7

Posted: Mon Jan 09, 2012 3:18 pm
by MandeRek
MandeRek wrote:So i should change the asfx to std file, and all 'Sample' lines from the .snd to 'Stream' lines? I just followed the tut from the tut, so I wonder why that wouldn't work.
Heh, that looks like spanish! Yeah I meant stm file. I'll try what you said, also with higher Hz, and see how it works out!

Edit:

Okay changed it and all; still no succes. Clean munge didn't work either. Marth, can I maybe send the files I'm using to you, and would you like to check it for me? I must do something wrong, but I just can't seem to find anything. All file references to each other are correct, and the wav file is correct as well I believe..

Re: Sounds on windows 7

Posted: Mon Jan 09, 2012 6:54 pm
by Marth8880
Sure, PM them to me.