Some Shell Questions

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

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 :)

Some Shell Questions

Post by thelegend »

Hey all,
I was working on a custom shell.lvl mod and was looking for some textures. But I cannot find them:

Code: Select all

1. The Loading Lights-You know when you start a map and at the bottom there are these red balls. I found them, but I only got the option "balls" changed. When you change the game difficulty or something else. 

2. Is it possible to change the stock/default textures (when you play a stock map) without replacing any of the original files? If no then it's not a problem either.

And then I was looking for a tutorial how to change the sound effects and music streams in the background while switching between the windows. There was a tutorial, but I can't seem to find it again.

Thank you for reading this and taking the time to help me.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Some Shell Questions

Post by [RDH]Zerted »

I don't understand your #1. There's no question...

For #2, yes that's possible. You can use a custom user script (added by v1.3) to inject code that intercepts the stock map's resource loading function calls and instead calls whichever resources you want loaded. As complicated as that might sound, it's not that difficult. Just a few if statements once the user script is working.
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: Some Shell Questions

Post by Anakin »

#1 Do you want to change the loading points the way i did it for the RC-Mod?? If yes, take the lvlExtractor and open the stock loadscreen lvl. You'll find the name and texture in there. And if you got it, you continue with #2 like Zerted told you
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: Some Shell Questions

Post by thelegend »

1st. Thank you Zerted. I am sorry there was no question. But Anakin already answered me. Now I know how to add custom user scripts but I was also looking for the .lua file that reads the music files in the background (e.g. imperial march, battle of the heroes etc.).

2nd. Thank you for the tip but where can I find this program. I was looking for it and found one of gamefront. It's over ten years old. I downloaded and installed it next to the _lvl_pc folder but the .exe doesn't start. It just pops up a black window and then it quickly disappears.
And since filefront closed all links I have found on gametoast for the .lvl extractor are broken now. Maybe I found the right one, but where do I have to install it?
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: Some Shell Questions

Post by Anakin »

You needn't to install the program. It's a stand alone exe. You need to give the program the lvl file. You can do it with drag and drop (drag it on the exe) or you run a cmd, browse to the Folder and type extract Name.lvl where name is the lvl file name (with path if it's not the same)

The Music is somewhere in the shell scripts. i found it somewhere, but not sure where it was. So look trough the whole ifs_menu,... lua scripts.
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: Some Shell Questions

Post by thelegend »

Ok Thanks. I extracted the common.lvl and found radiobutton_off and _on or something. These are the files I did mean. Now there are many lub, dds, tex..files. I could replace both files with mine from my common.lvl. But how would I get these files back to the default common.lvl? So that my edited textures would appear in-game?
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: Some Shell Questions

Post by Anakin »

You can remunge a new common.lvl (not recommended)
or
you do what Zerted told you:
- munge own loadscreen.lvl
- custom userscript that put an wrapper around all stock common.lvl calls.
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: Some Shell Questions

Post by thelegend »

Ok i am going to test that out. But first I wanted to get custom music working there with the method Zerted told me. I did create a shell.lvl that contains only one script (user_script_1.lua) and copied/pasted it into _lvl_pc folder (name: user_script_1.lvl).

Right before I did make a new sound.lvl with your fixed munge.bat files (I believe everything seems to work with it) and placed it in Gamedata /_lvl_pc /data /sound. I named it ShellMusic.lvl.

But there's still the old Star Wars Music. If the Sound File was incorrect then there should be (obious) no sound anymore. So something was wrong with the user_script.lvl.
I hope you know what could be wrong.

Here are all required files:
Shell.req:
Hidden/Spoiler:
[code]
ucft
{

REQN
{
"script"
"user_script_1"
}
}
[/code]


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

-- Master include for StarWars: Frontline ingame interface, lua
-- component. The game should be able to include this file and nothing
-- else.

-- Read in some globals for what platform, online service will be in use
gPlatformStr = ScriptCB_GetPlatform()
gOnlineServiceStr = ScriptCB_GetOnlineService()
gLangStr,gLangEnum = ScriptCB_GetLanguage()

-- set model memory
SetPS2ModelMemory(2000 * 1024)

-- Josh's utility stuff
ScriptCB_DoFile("globals")

-- shell movie stream to use
if(gPlatformStr == "PS2") then
if (ScriptCB_IsPAL() == 1) then
gMovieStream = "movies\\shellpal.mvs"
else
gMovieStream = "movies\\shell.mvs"
end
elseif (gPlatformStr == "PC") then
local shellMovie = {
english = "movies\\shell.mvs",
spanish = "movies\\shellsp.mvs",
italian = "movies\\shellit.mvs",
french = "movies\\shellfr.mvs",
german = "movies\\shellgr.mvs",
}
gMovieStream = shellMovie[gLangStr] or shellMovie["english"]
else
gMovieStream = "movies\\shell.mvs"
end

--
--
-- Load interface utility functions, elements (ifelem_*)
ScriptCB_DoFile("interface_util")
ScriptCB_DoFile("ifelem_button")
ScriptCB_DoFile("ifelem_roundbutton")
ScriptCB_DoFile("ifelem_flatbutton")
ScriptCB_DoFile("ifelem_buttonwindow")
ScriptCB_DoFile("ifelem_segline")
ScriptCB_DoFile("ifelem_popup")
ScriptCB_DoFile("ifelem_listmanager")
ScriptCB_DoFile("ifelem_AnimationMgr")
ScriptCB_DoFile("ifelem_helptext")
ScriptCB_DoFile("ifelem_shellscreen")
ScriptCB_DoFile("ifelem_titlebar")
ScriptCB_DoFile("ifelem_borderrect")
ScriptCB_DoFile("ifelem_hslider")
ScriptCB_DoFile("ifelem_form")
-- And utility functions for just the shell.
ScriptCB_DoFile("ifelem_mappreview")
ScriptCB_DoFile("ifelem_titlebar_large")
ScriptCB_DoFile("ifelem_iconbutton")

if(gPlatformStr == "PC") then
ScriptCB_DoFile("ifelem_tabmanager")
ScriptCB_DoFile("ifutil_mouse")
ScriptCB_DoFile("ifelem_editbox")
end

ScriptCB_DoFile("ifs_movietrans")
ScriptCB_DoFile("ifs_attract")
ScriptCB_DoFile("ifs_mp_lobby_quick")
-- Pull in list of missions.
ScriptCB_DoFile("missionlist")

if(gPlatformStr == "PC") then
ScriptCB_DoFile("pctabs_options")
ScriptCB_DoFile("ifs_pckeyboard")

--ScriptCB_DoFile("ifs_missionselect_pcMulti")
--ScriptCB_DoFile("ifs_missionselect_pcSingle")
end
--
--

-- Load all the screens, which'll self-register themselves into C/C++

-- Utility stuff first.
ScriptCB_DoFile("popups_common")
if(gPlatformStr == "XBox") then
ScriptCB_DoFile("popup_ab")
ScriptCB_DoFile("ifs_dvd_or_game")
end
ScriptCB_DoFile("popup_ok")
ScriptCB_DoFile("popup_yesno")
ScriptCB_DoFile("popup_tutorial")
if(gPlatformStr ~= "PC") then
ScriptCB_DoFile("popup_loadsave")
end
ScriptCB_DoFile("popup_loadsave2")
ScriptCB_DoFile("error_popup")
ScriptCB_DoFile("popup_yesno_large")
ScriptCB_DoFile("popup_ok_large")

ScriptCB_DoFile("ifs_vkeyboard")

ScriptCB_DoFile("ifs_boot")
ScriptCB_DoFile("ifs_legal")
ScriptCB_DoFile("ifs_start")
ScriptCB_DoFile("ifs_login")
ScriptCB_DoFile("ifs_main")
ScriptCB_DoFile("ifs_saveop")

-- MP (shared) files
ScriptCB_DoFile("ifs_mp")
ScriptCB_DoFile("ifs_mp_main")
ScriptCB_DoFile("ifs_mp_sessionlist")
ScriptCB_DoFile("ifs_mp_lobby")
ScriptCB_DoFile("ifs_mp_maptype")
if(gPlatformStr == "PS2") then
ScriptCB_DoFile("ifs_mpps2_netconfig")
ScriptCB_DoFile("ifs_mpps2_dnas")
ScriptCB_DoFile("ifs_mpps2_eula")
ScriptCB_DoFile("ifs_mpps2_patch")
ScriptCB_DoFile("ifs_mpps2_optimatch")
end

if(gPlatformStr == "PC") then
ScriptCB_DoFile("ifs_mp_gameopts")
ScriptCB_DoFile("ifs_mp_heroopts")
ScriptCB_DoFile("ifs_mpgs_pclogin")
ScriptCB_DoFile("ifs_missionselect_pcMulti")
else
ScriptCB_DoFile("ifs_mpgs_login")
end

ScriptCB_DoFile("ifs_mp_autonet")

ScriptCB_DoFile("popups_lobby")
ScriptCB_DoFile("popup_busy")

--ScriptCB_DoFile("ifs_split_main")
ScriptCB_DoFile("ifs_split_map")
ScriptCB_DoFile("ifs_split_profile")
if(gPlatformStr == "XBox") then
ScriptCB_DoFile("ifs_split2_profile")
end

ScriptCB_DoFile("ifs_sp")
ScriptCB_DoFile("ifs_sp_campaign")
ScriptCB_DoFile("ifs_difficulty")
ScriptCB_DoFile("ifs_sp_era")
ScriptCB_DoFile("ifs_sp_briefing")
ScriptCB_DoFile("ifs_spacetraining")

ScriptCB_DoFile("ifs_instant_top")
ScriptCB_DoFile("ifs_instant_side")
ScriptCB_DoFile("ifs_instant_options_tags")
ScriptCB_DoFile("ifs_instant_options")
ScriptCB_DoFile("ifs_instant_options_overview")

ScriptCB_DoFile("ifs_missionselect")

-- Freeform screens
ScriptCB_DoFile("ifs_freeform_init_common")
ScriptCB_DoFile("ifs_freeform_init_cw")
ScriptCB_DoFile("ifs_freeform_init_gcw")
ScriptCB_DoFile("ifs_freeform_init_custom")
ScriptCB_DoFile("ifs_freeform_start_cw")
ScriptCB_DoFile("ifs_freeform_start_rep")
ScriptCB_DoFile("ifs_freeform_start_cis")
ScriptCB_DoFile("ifs_freeform_start_gcw")
ScriptCB_DoFile("ifs_freeform_start_all")
ScriptCB_DoFile("ifs_freeform_start_imp")
ScriptCB_DoFile("ifs_freeform_start_custom")
ScriptCB_DoFile("ifs_freeform_main")
ScriptCB_DoFile("ifs_freeform_sides")
ScriptCB_DoFile("ifs_freeform_ai")
ScriptCB_DoFile("ifs_freeform_menu")
ScriptCB_DoFile("ifs_freeform_load")
ScriptCB_DoFile("ifs_freeform_cheat")
ScriptCB_DoFile("ifs_freeform_purchase")
ScriptCB_DoFile("ifs_freeform_purchase_unit")
ScriptCB_DoFile("ifs_freeform_purchase_tech")
ScriptCB_DoFile("ifs_freeform_fleet")
ScriptCB_DoFile("ifs_freeform_focus")
ScriptCB_DoFile("ifs_freeform_battle")
ScriptCB_DoFile("ifs_freeform_battle_mode")
ScriptCB_DoFile("ifs_freeform_battle_card")
ScriptCB_DoFile("ifs_freeform_result")
ScriptCB_DoFile("ifs_freeform_summary")
ScriptCB_DoFile("ifs_freeform_end")
ScriptCB_DoFile("ifs_freeform_rise_newload")
ScriptCB_DoFile("ifs_freeform_pickscenario")
ScriptCB_DoFile("ifs_freeform_customsetup")

-- Campaign screens
ScriptCB_DoFile("ifs_campaign_data")
ScriptCB_DoFile("ifs_campaign_main")
ScriptCB_DoFile("ifs_campaign_menu")
ScriptCB_DoFile("ifs_campaign_load")
ScriptCB_DoFile("ifs_campaign_turn_intro")
ScriptCB_DoFile("ifs_campaign_battle")
ScriptCB_DoFile("ifs_campaign_battle_card")
ScriptCB_DoFile("ifs_campaign_battle_intro")
ScriptCB_DoFile("ifs_campaign_summary")
ScriptCB_DoFile("ifs_campaign_end")

-- Options screens
ScriptCB_DoFile("ifs_opt_top")
ScriptCB_DoFile("ifs_opt_general")
ScriptCB_DoFile("ifs_opt_sound")
ScriptCB_DoFile("ifs_opt_mp_listtags")
ScriptCB_DoFile("ifs_opt_mp")
if(gPlatformStr == "PC") then
--ScriptCB_DoFile("ifs_opt_pckeyboard")
ScriptCB_DoFile("ifs_opt_pccontrols")
ScriptCB_DoFile("ifs_opt_pcvideo")
else
ScriptCB_DoFile("controller_presets")
ScriptCB_DoFile("ifs_opt_controller_mode")
ScriptCB_DoFile("ifs_opt_controller_common")
ScriptCB_DoFile("ifs_opt_controller_vehunit")
end

-- unlockables
ScriptCB_DoFile("ifs_unlockables")
ScriptCB_DoFile("ifs_tutorials")
ScriptCB_DoFile("ifs_credits")

-- career stats page
ScriptCB_DoFile("ifs_careerstats")

-- Pull in XBox-only pages (with mpxl in the name)
if(gOnlineServiceStr == "XLive") then
ScriptCB_DoFile("ifs_mpxl_login")
ScriptCB_DoFile("ifs_mpxl_silentlogin")
ScriptCB_DoFile("ifs_mpxl_optimatch")
ScriptCB_DoFile("ifs_mpxl_friends")
ScriptCB_DoFile("ifs_mpxl_feedback")
ScriptCB_DoFile("ifs_mpxl_voicemail")
ScriptCB_DoFile("ifs_mp_leaderboard")
ScriptCB_DoFile("ifs_mp_leaderboarddetails")
else
if(gOnlineServiceStr == "GameSpy") then
ScriptCB_DoFile("ifs_mp_leaderboard")
ScriptCB_DoFile("ifs_mp_leaderboarddetails")
end
ScriptCB_DoFile("ifs_mpgs_friends")
end

ScriptCB_DoFile("ifs_fonttest")

-- Set the first screen shown on entry
if(gXBox_DVDDemo) then
-- DVD demo always goes to dvd-or-game screen.
ifs_movietrans_PushScreen(ifs_dvdorgame)
elseif (ScriptCB_ShouldShowDemoPostscreen() and (not gE3Demo)) then
-- Demo is over. Show the "please buy our game" screen
ifs_movietrans_PushScreen(ifs_postdemo)

-- already in a campaign game?
elseif ScriptCB_IsCampaignStateSaved() then

-- remove legal textures to make room for loading
ifs_legal:ClearTextures()
-- preload campaign
ifs_campaign_main:OneTimeInit(false)
-- go directly to campaign
ifs_movietrans_PushScreen(ifs_campaign_main)

-- already in a galactic conquest game?
elseif ScriptCB_IsMetagameStateSaved() then

-- remove legal textures to make room for loading
ifs_legal:ClearTextures()
-- preload galactic conquest
ifs_freeform_main:OneTimeInit(false)
-- go directly to galactic conquest
ifs_movietrans_PushScreen(ifs_freeform_main)

else

-- standard sequence
ifs_movietrans_PushScreen(ifs_boot)
end


-- read sound data
ReadDataFile("sound\\ShellMusic.lvl")

-- open voice over stream
gVoiceOverStream = OpenAudioStream("sound\\shell.lvl", "shell_vo")
-- open music stream
gMusicStream = OpenAudioStream("sound\\sound.lvl", "Shell_music")
-- open movie stream

gMovieTutorialPostFix = ""
ScriptCB_OpenMovie(gMovieStream, "")
ScriptCB_SetMovieAudioBus("shellmovies")


[/code]
(Note: I just edited the Sound Stream Parts at the bottom; I copied the whole shell_interface.lua into my script)



Shell_Music_config.stm:
Hidden/Spoiler:
[code]
//Intro Music - Pirates Of The Caribbean At Worlds End - Game Theme
SoundStreamProperties()
{
Name("Shell_Menu_Intro");
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("Shell_music");
SegmentList()
{
Segment("Shell_Menu_Intro", 0.167);
}
}
[/code]
I hope this helps.
Thank you all for reading and taking time.
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: Some Shell Questions

Post by Marth8880 »

Simply loading the LVL file and opening the stream in a script isn't enough, you have to actually tell the game to play the sound stream property somewhere in the script, too (somewhere after the stream's been opened, though).

The function you'll want to use is one of these, not sure which:

Code: Select all

ScriptCB_PlayInGameMusic(musicID);

musicID : ID of the music to play in game

Code: Select all

PlayAudioStream(
    streamFilename, 
    streamID, 
    segmentID, 
    gain, 
    busname, 
    streamIndex);

streamFilename : File containing the audio stream
streamID       : ID of stream within the file
segmentID      : ID of segment within the stream
gain           : Initial gain of the stream 
busname        : bus stream is assigned to (default = "Root")
streamIndex    : Index of the open stream to play, streamFilename can be "" 
                 if this is specified.  (NOTE : This is an optional argument)

Returns ID of the opened stream, streamIndex if it was specified or 0 if the 
function fails.

Code: Select all

PlayAudioStreamUsingProperties(streamFilename, soundStreamID, noOpen);

streamFilename : File containing the audio stream specified in the sound stream 
                 properties
soundStreamID  : ID of the sound stream properties to play
noOpen         : Set to 1 to play using a previously opened stream. (NOTE : 
                 this is an optional argument)
Returns ID of the opened stream (this may not be the stream that's playing).
My best bet is the first one. :p

Alternatively, you could probably get away with simply renaming your sound stream property to "shell_soundtrack" as it is in the stock shell.snd file and hope that the game calls it properly by itself. :o
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: Some Shell Questions

Post by thelegend »

Hm still no result.
Here is how I think the system behind it works. Maybe I am totally wrong, so thanks in advance of going to tell me what I exactly do wrong :P

1. Making a sound.lvl. Mine is exactly like the sound.lvl's I did before. The only difference is I let the .mus file empty. Reason: I didn't find any .mus files in the Sound/ Shell folders. I am going to post my Sound folder. Maybe some files interrupt this from working.

2. Making a user_script file. I called mine user_script_1 (Slot 1...because I like this number). I guess the patch 1.3 reads user_scripts from zero-10. I have no real knowledge how patching this game works, but I think that's one more reason why many mods need this patch to work. Anyway I made one and added these lines:

Code: Select all

ReadDataFile("sound\\ShellMusic.lvl")

ScriptCB_PlayInGameMusic("Shell_Menu_Intro");

The Name of the Sound.lvl is ShellMusic.lvl. And the name of the Sound Stream (I kept all names the same; it's a bit easier for me in my opinion).


I munged my shell.lvl and renamed it to user_script_1.lvl.
That's all. The old Soundtrack is still there. Maybe I need to reinstall the patch properly. But if this will not help then it's certainly because of my user_script.lvl.

And here's my sound folder. I tried to make it look like the shell sound files.

http://www.mediafire.com/download/2mf47 ... ELL%29.rar


I still believe it's because of my script. Or I didn't install the patch properly.

I am very grateful that you take time to read this and to help me.
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: Some Shell Questions

Post by Marth8880 »

Here's your problem.

Code: Select all

ReadDataFile("sound\\ShellMusic.lvl");
ShellMusic.lvl contains a sub-lvl called Shell, but you're not loading that sub-lvl in your script. You must either load it in your script (so ReadDataFile("sound\\ShellMusic.lvl;Shell"); ), or not bother including a sub-lvl in the first place, since honestly, there's no need to include it anyways. (You'd just replace the entire "lvl" header section in ShellMusic.req with the entire "config" header section in Shell.req.)
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: Some Shell Questions

Post by thelegend »

Thank you for the reply, but even with this line:

Code: Select all

ReadDataFile("sound\\ShellMusic.lvl;Shell");
it is still not working.
Is there still anything else I have to do, except of making a sound and user_script .lvl files?

Edit: If I currently cannot any custom music tracks then is it possible to disbale the current soundtracks (e.g. imperial march..)?
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: Some Shell Questions

Post by Marth8880 »

Did you try changing the sound stream property name to "shell_soundtrack"?
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: Some Shell Questions

Post by thelegend »

You mean changing this:
Hidden/Spoiler:
[code]
SoundStreamProperties()
{
Name("shell_soundtrack"); <---- I just changed it. Before there was this: Shell_Menu_Intro
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("Shell_music");
SegmentList()
{
Segment("Shell_Menu_Intro", 0.167);
}
}[/code]
If so then there is still no change.
By the way I just installed the latest patch and there was no difference. So I guess the script is not the problem (anymore).




EDIT: So after making a new sound.lvl (from shell folder) I have replaced the default Sound Shell.lvl (No panic; I made a backup) and now it works. But if I do the same then it will not work anymore. It seems the game doesn't care or read my user_script.lvl. If it did then it would have worked without any problems.

The Sound File (now fixed as you told me) seems to be correct.
The UserScript.lvl (just 1Kb in file size) must be correct. Or did I miss something. There are just three lines now:
Hidden/Spoiler:
[code]
ReadDataFile("sound\\shell.lvl")

gMusicStream = OpenAudioStream("sound\\shellmusic.lvl", "shell_music")

ScriptCB_PlayInGameMusic("Shell_Menu_Intro");
[/code]
My theory: The game skips reading my user_script.lvl. But why? Other mods that uses user_scripts work fine. I even just reinstalled the v1.3Patch.
My only solution was to replace the Sound Shell.lvl. But files could be missing like...I don't know which files it exactly contains. But I believe it would not be the best way at all.
Thank you very much for your help anyway :)
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Some Shell Questions

Post by AceMastermind »

thelegend wrote:I was working on a custom shell.lvl mod and was looking for some textures. But I cannot find them:

Code: Select all

1. The Loading Lights-You know when you start a map and at the bottom there are these red balls.
thelegend wrote:I extracted the common.lvl and found radiobutton_off and _on or something. These are the files I did mean.
C:\BF2_ModTools\data_ABC\Common\interface\PC
BF2_radiobutton_off.tga
BF2_radiobutton_on.tga
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: Some Shell Questions

Post by thelegend »

AceMastermind wrote: C:\BF2_ModTools\data_ABC\Common\interface\PC
BF2_radiobutton_off.tga
BF2_radiobutton_on.tga
Thank you for replying but I already found and edited these textures. I thought there might have been other textures, specially for the loading buttons, because I got one thing there changed.
I am going to describe it in a picture.

1) When I start the game, the buttons are unchanged.
2) But in options the buttons are changed. 3) And if I load a map, the buttons are unchanged again (Probably because they read these buttons from the original common.lvl I shouldn't replace with mine).
Hidden/Spoiler:
Image

If I got the first userscript working (for the background sound) then I would try to let the game read my common.lvl in my addon folder.

@Marth: By the way: Is it possible to write a path to my map's sound folder (in addon directory) to make the user_script read the addon file instead of my custom file in data/_lvl_pc/sound?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Some Shell Questions

Post by AQT »

The texture name for the loading dots is actually called loading.tga. I was having trouble myself finding which .lvl file this texture could possibly be located in a while back for a map, so I asked Marth about it since he had successfully replaced it in his Mass Effect mod. I don't think he remembers how he figured the name out. :P
Anakin wrote:#1 Do you want to change the loading points the way i did it for the RC-Mod?? If yes, take the lvlExtractor and open the stock loadscreen lvl. You'll find the name and texture in there.
I'm certain that I simply gave you permission to just use the LVL Extractor on the loading screen .lvl file that I had compiled when you asked me for the texture names for the loading dots and the Tips and Tricks box (I would have just given you the names since it's just a quick look-up had I had access to my map's source files at the time, but I didn't). Speaking of which, the latter texture is called loadtipsbox_pieces.tga. That was also a pain to find, if I can recall.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Some Shell Questions

Post by AceMastermind »

AQT wrote:The texture name for the loading dots is actually called loading.tga.
...the latter texture is called loadtipsbox_pieces.tga.
Okay, those textures are included with the Loadscreen Tool here:
viewtopic.php?p=427683#p427683
and are compiled into the game's LOAD.lvl here
Star Wars Battlefront II\GameData\DATA\_LVL_PC\LOAD\LOAD.lvl
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: Some Shell Questions

Post by thelegend »

Thank you AQT and Ace, I just replaced the load.lvl with my custom one and now the loading dots (I am going to keep this name) are changed.

The same with the Shell.lvl (For Sounds in data/sounds). I still don't get why my user_script is now working yet. But the replaced files are pretty small at all so I believe it won't take too much space to create backup folders.

There's still one more thing where I am in trouble. I just edited the fonts and replaced all I could have found in both 1playerhud.hud files. In-game it works but there are still the old fonts behind or in front of my newer fonts. How can I disable or remove the default fonts in-game? I followed the tutorial step for step here: viewtopic.php?p=470829#p470829
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: Some Shell Questions

Post by Anakin »

If you want to disable stock fonts you need to load unvisible fonts with the name of the stock once. You need to do that after the stock fonts are loaded.
Have a look at step 3: http://www.gametoast.com/viewtopic.php?f=27&t=29836
Post Reply