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.
Re: Some Shell Questions
Posted: Wed Aug 05, 2015 10:31 pm
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.
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 4:42 am
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
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 6:27 am
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?
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 7:01 am
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.
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 7:53 am
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?
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 8:09 am
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.
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 8:40 am
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)
-- 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_split_main")
ScriptCB_DoFile("ifs_split_map")
ScriptCB_DoFile("ifs_split_profile")
if(gPlatformStr == "XBox") then
ScriptCB_DoFile("ifs_split2_profile")
end
-- 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
(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.
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 1:27 pm
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:
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.
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.
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 2:06 pm
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
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:
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.
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.)
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..)?
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 2:54 pm
by Marth8880
Did you try changing the sound stream property name to "shell_soundtrack"?
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 3:21 pm
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:
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
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 4:19 pm
by AceMastermind
thelegend wrote:I was working on a custom shell.lvl mod and was looking for some textures. But I cannot find them:
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:
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?
Re: Some Shell Questions
Posted: Thu Aug 06, 2015 7:36 pm
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.
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.
Re: Some Shell Questions
Posted: Fri Aug 07, 2015 5:52 am
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
Re: Some Shell Questions
Posted: Fri Aug 07, 2015 6:44 am
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
Re: Some Shell Questions
Posted: Fri Aug 07, 2015 7:08 am
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