Page 1 of 1

Shell.lvl scripts

Posted: Wed Dec 22, 2010 3:20 pm
by giftheck
Does anybody have or know what's inside the BF1 Shell.lvl script files? I'd like a peek to see what's in there, mainly to see whether it's possible to add eras toEndor, Hoth, Geonosis and Kamino, but also because I'd love to see what else shell.lvl contains to see how exactly it impacts on SWBF, what it does for the game etc.

I hear psych0fred once had the scripts but I wouldn't know if he still had them.

Re: Shell.lvl scripts

Posted: Wed Dec 22, 2010 4:59 pm
by Teancum
Nope - looked into this awhile back, eras are hard coded.

Re: Shell.lvl scripts

Posted: Wed Dec 22, 2010 5:09 pm
by giftheck
Teancum wrote:Nope - looked into this awhile back, eras are hard coded.
What I meant was adding in Clone Wars to Hoth and Endor, and Galactic Civil War to Geonosis and Kamino. On his site, psych0fred said that would require a shell change.

Re: Shell.lvl scripts

Posted: Wed Dec 22, 2010 6:47 pm
by Teancum
Ah, gotcha. :thumbs:

Re: Shell.lvl scripts

Posted: Wed Dec 22, 2010 7:04 pm
by jdee/barc
I have a way of doing this without editing shell.lvl. It may not be exactly what you want though.
-create fixed versions of the hoth and endor worlds with certaing things like spawnpoints for CW units, objects, and vehicles (like changing the hoth shield generator to be a technounion ship or something and changing spawns for AT-ATs to AT-TEs)
-make CW era playable by making mission maps that use those fixed lvl files.
-release with your mod.

Just an easier way of doing it without editing shell.lvl

Re: Shell.lvl scripts

Posted: Thu Dec 23, 2010 5:39 am
by giftheck
jdee/barc wrote:I have a way of doing this without editing shell.lvl. It may not be exactly what you want though.
-create fixed versions of the hoth and endor worlds with certaing things like spawnpoints for CW units, objects, and vehicles (like changing the hoth shield generator to be a technounion ship or something and changing spawns for AT-ATs to AT-TEs)
-make CW era playable by making mission maps that use those fixed lvl files.
-release with your mod.

Just an easier way of doing it without editing shell.lvl
It means making the map list longer with BFE, and Battlefront has an addon map limit. Since Hoth and Endor would be non-canon anyways, I'd keep things the way they are and test the shipped map limit which nobody seems to have done. I'd love to edit the campaign also but I don't know if that is hardcoded or not. That's why I'd love to create a shell.lvl tool so that I can at least see what the scripts for shell.lvl contain myself.

The script segment of shell.req, from psych0fred's site:
Hidden/Spoiler:
ucft
{

REQN
{
"script"
"shell_interface"
"ifs_vkeyboard"

"ifelem_mappreview"
"ifelem_titlebar_large"

"ifs_boot"
"ifs_legal"
"ifs_start"
"ifs_login"
"ifs_main"

"ifs_missionselect"
"ifs_missionselect_pcMulti"
"missionlist"

"ifs_sp"
"ifs_difficulty"
"ifs_sp_era"
"ifs_sp_briefing"
"ifs_sp_yoda"

"ifs_instant_top"
"ifs_instant_side"

"metagame_state"
"metagame_util"
"ifs_meta_top"
"ifs_meta_main"
"ifs_meta_main_logic"
"ifs_meta_main_input"
"ifs_meta_main_display"
"ifs_meta_battle"
"ifs_meta_deathstar"
"popups_meta_main"
"metagame_ai"
"ifs_meta_new_load"
"ifs_meta_load"
"ifs_meta_opts"
"ifs_meta_configs"

"ifs_unlockables"
"ifs_tutorials"
"ifs_credits"

"ifs_mp"
"ifs_mpgs_login"
"ifs_mp_main"
"ifs_mp_gameopts"
"ifs_mp_joinds"
"ifs_mp_lobbyds"
"ifs_mp_maptype"
"ifs_mp_sessionlist"
"ifs_mp_autonet"

"ifs_split_map"
"ifs_split_profile"

"popup_ok_large"

"ifs_mp_leaderboard"
"ifs_mp_leaderboarddetails"
"ifs_pckeyboard"
"ifs_movietrans"
"ifs_meta_movie"
"ifs_attract"
"ifs_mp_lobby_quick"
"ifs_meta_tutorial"
}
While it's possible to just take the BF2 scripts and edit them I have a feeling that would not work at all, or with minimal results as things would be different. This is why I would like somebody who actually has these scripts to upload them.

Re: Shell.lvl scripts

Posted: Thu Dec 23, 2010 10:32 am
by Teancum
This is the only script I have, but theoretically you can edit it then inject it back into shell.lvl if you know what you're doing. I asked for this a loooong time ago.

missionlist lua:
Hidden/Spoiler:
-- List of missions presented to the user for IA/MP/splitscreen/etc.
-- This list is kept in alphabetical order (in English, anyhow).
--
-- Each entry should be in the following form:
-- { -- starts a table entry
-- mapluafile = "END1", -- base name of map, w/o attacking side, no ".lua" either
-- showstr = "planets.endor.name1", -- localization key in DB of item to show
-- side_a = 1, -- [OPTIONAL] Put this in the table if there is a "a" version of the map
-- side_c = 1, -- [OPTIONAL] Put this in the table if there is a "c" version of the map
-- side_i = 1, -- [OPTIONAL] Put this in the table if there is a "i" version of the map
-- side_r = 1, -- [OPTIONAL] Put this in the table if there is a "r" version of the map
-- side_a_team1 = "common.sides.all.name" -- [OPTIONAL] -- localized name of team1 in an 'a' version of this map
-- side_a_team2 = "common.sides.imp.name" -- [OPTIONAL] -- localized name of team2 in an 'a' version of this map
-- -- Note, there's also OPTIONAL side_c_team1, side_i_team1, side_r_team1,
-- -- side_c_team2, side_i_team2, side_r_team2 fields.
--
-- }, -- ends a table entry
--
-- Below, things are in one-entry-per-line format to make it easier to
-- comment in/out maps by commenting in/out a single line

sp_missionselect_listbox_contents = {
{ mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1},
{ mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1},

{ mapluafile = "END1", showstr = "planets.endor.mapname1", side_a = 1},

{ mapluafile = "GEO1", showstr = "planets.geonosis.mapname1", side_r = 1},

{ mapluafile = "HOT1", showstr = "planets.hoth.mapname1", side_i = 1},

{ mapluafile = "KAM1", showstr = "planets.kamino.mapname1", side_c = 1},

{ mapluafile = "KAS1", showstr = "planets.kashyyyk.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "KAS2", showstr = "planets.kashyyyk.mapname2", side_c = 1, side_i = 1},

{ mapluafile = "NAB1", showstr = "planets.naboo.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "NAB2", showstr = "planets.naboo.mapname2", side_c = 1, side_a = 1},

{ mapluafile = "RHN1", showstr = "planets.rhenvar.mapname1", side_r = 1, side_i = 1},
{ mapluafile = "RHN2", showstr = "planets.rhenvar.mapname2", side_c = 1, side_a = 1},

{ mapluafile = "TAT1", showstr = "planets.tatooine.mapname1", side_r = 1, side_i = 1},
{ mapluafile = "TAT2", showstr = "planets.tatooine.mapname2", side_r = 1, side_i = 1},

{ mapluafile = "YAV1", showstr = "planets.yavin.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "YAV2", showstr = "planets.yavin.mapname2", side_r = 1, side_i = 1},

}

mp_missionselect_listbox_contents = {
{ mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1},
{ mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1},

{ mapluafile = "END1", showstr = "planets.endor.mapname1", side_a = 1},

{ mapluafile = "GEO1", showstr = "planets.geonosis.mapname1", side_r = 1},

{ mapluafile = "HOT1", showstr = "planets.hoth.mapname1", side_i = 1},

{ mapluafile = "KAM1", showstr = "planets.kamino.mapname1", side_c = 1},

{ mapluafile = "KAS1", showstr = "planets.kashyyyk.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "KAS2", showstr = "planets.kashyyyk.mapname2", side_c = 1, side_i = 1},

{ mapluafile = "NAB1", showstr = "planets.naboo.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "NAB2", showstr = "planets.naboo.mapname2", side_c = 1, side_a = 1},

{ mapluafile = "RHN1", showstr = "planets.rhenvar.mapname1", side_r = 1, side_i = 1},
{ mapluafile = "RHN2", showstr = "planets.rhenvar.mapname2", side_c = 1, side_a = 1},

{ mapluafile = "TAT1", showstr = "planets.tatooine.mapname1", side_r = 1, side_i = 1},
{ mapluafile = "TAT2", showstr = "planets.tatooine.mapname2", side_r = 1, side_i = 1},

{ mapluafile = "YAV1", showstr = "planets.yavin.mapname1", side_c = 1, side_i = 1},
{ mapluafile = "YAV2", showstr = "planets.yavin.mapname2", side_r = 1, side_i = 1},
}

-- List of maps usable in attract mode. These should be the raw lua
-- filenames (without ".lua"), and one per line, so we can turn them
-- on/off easily. Historical missions could go in here if desired.
attract_mode_maps = {
"bes1a",
"bes1r",
"bes2a",
"bes2r",
"end1a",
"geo1r",
"hot1i",
"kam1c",
"kas1c",
"kas1i",
"kas2c",
"kas2i",
"nab1c",
"nab1i",
"nab2a",
"nab2c",
"rhn1i",
"rhn1r",
"tat1i",
"tat1r",
"tat2i",
"tat2r",
"yav1c",
"yav1i",
"yav2i",
"yav2r",

-- Historical maps, off by default
"nab1c_h",
"nab2c_h",
"kas1c_h",
"geo1r_h",
"kam1c_h",
"rhn1r_h",
"kas2c_h",
"tat1i_h",
"tat2i_h",
"rhn2a_h",
"yav2i_h",
"yav1i_h",
"hot1i_h",
"bes2a_h",
"bes1a_h",
"end1a_h",
}


-- Singleplayer campaigns. Each of these tables has a set of
-- sub-tables, one sub-table per mission. These are run through in
-- order. Note: there is a max of 255 missions in a campaign. Todo:
-- add in listings for VOs, backgrounds, etc.
--
-- Optional params per line:
-- side = 2, -- forces the user to team 2 (defender). If omitted, team 1 (attacker) is forced
-- intromovie = "", --movie played before yoda
-- outtromovie = "", --movie played after yoda, before mission
-- exitmovie = "", --movie played after mission is done (and you win)
-- [More will be coming, which refer to text to print, voiceover, etc.]

SPCampaign_CW = {
--Player is CIS
{
mapluafile = "nab1c_h",
side = 1,
showstr = "ifs.sp.cw.map1name",
description = "ifs.sp.cw.map1descr",
movie = "nab1fly",
voiceover = "cis_missionbriefing_nab1",
intromovie = "nab1h01",
outtromovie = "tutorial01cw",
outtromovie_left = 90,
outtromovie_top = 60,
outtromovie_width = 460,
outtromovie_height = 350,
outtromovielocalized = 1,
briefingmusic = "shell_droidinvasion",
iconmodel = "com_icon_CIS"
}, --Player is CIS
{
mapluafile = "nab2c_h",
side = 1,
showstr = "ifs.sp.cw.map2name",
description = "ifs.sp.cw.map2descr",
movie = "nab2fly",
voiceover = "cis_missionbriefing_nab2",
outtromovie = "nab2h01",
briefingmusic = "shell_droidinvasion",
unlockable = 1,
iconmodel = "com_icon_CIS"
}, --Player is CIS
{
mapluafile = "kas1c_h",
side = 1,
showstr = "ifs.sp.cw.map3name",
description = "ifs.sp.cw.map3descr",
movie = "kas1fly",
voiceover = "cis_missionbriefing_kas1",
briefingmusic = "shell_droidinvasion",
unlockable = 2,
iconmodel = "com_icon_CIS"
},

--Player is Republic
{
mapluafile = "geo1r_h",
side = 1,
showstr = "ifs.sp.cw.map4name",
description = "ifs.sp.cw.map4descr",
movie = "geo1fly",
outtromovie = "geo1h01",
voiceover = "rep_missionbriefing_geo1",
briefingmusic = "shell_clonewars",
unlockable = 3,
iconmodel = "com_icon_republic"
},

--Player is Republic
{
mapluafile = "kam1c_h",
side = 2,
showstr = "ifs.sp.cw.map5name",
description = "ifs.sp.cw.map5descr",
movie = "kam1fly",
intromovie = "kam1h01",
outtromovie = "kam1h02",
voiceover = "rep_missionbriefing_kam1",
briefingmusic = "shell_clonewars",
unlockable = 4,
iconmodel = "com_icon_republic"
},--Player is Republic
{
mapluafile = "rhn1r_h",
side = 1,
showstr = "ifs.sp.cw.map6name",
description = "ifs.sp.cw.map6descr",
movie = "rhn1fly",
voiceover = "rep_missionbriefing_rhn1",
briefingmusic = "shell_clonewars",
unlockable = 5,
iconmodel = "com_icon_republic"
},--Player is Republic
{
mapluafile = "kas2c_h",
side = 2,
showstr = "ifs.sp.cw.map7name",
description = "ifs.sp.cw.map7descr", side = 2,
movie = "kas2fly",
voiceover = "rep_missionbriefing_kas1",
briefingmusic = "shell_clonewars",
exitmovie = "kas2h01",
iconmodel = "com_icon_republic"
},--Player is Republic
}

SPCampaign_GCW = {
--Player is the Empire
{
mapluafile = "tat1i_h",
side = 1,
showstr = "ifs.sp.gcw.map1name",
description = "ifs.sp.gcw.map1descr",
movie = "tat1fly",
intromovie = "tat1h01",
outtromovie = "tutorial01gcw",
outtromovie_left = 90,
outtromovie_top = 60,
outtromovie_width = 460,
outtromovie_height = 350,
outtromovielocalized = 1,
voiceover = "imp_missionbriefing_tat1",
briefingmusic = "shell_imperialmarch",
iconmodel = "com_icon_imperial"
},--Player is the Empire
{
mapluafile = "tat2i_h",
side = 1,
showstr = "ifs.sp.gcw.map2name",
description = "ifs.sp.gcw.map2descr",
movie = "tat2fly",
intromovie = "tat2h01",
voiceover = "imp_missionbriefing_tat2",
briefingmusic = "shell_imperialmarch",
unlockable = 6,
iconmodel = "com_icon_imperial"
},--Player is the Empire
{
mapluafile = "rhn2a_h",
side = 2,
showstr = "ifs.sp.gcw.map3name",
description = "ifs.sp.gcw.map3descr",
movie = "rhn2fly",
voiceover = "imp_missionbriefing_rhn1",
briefingmusic = "shell_imperialmarch",
iconmodel = "com_icon_imperial"
},--Player is the Empire
{
mapluafile = "yav2i_h",
side = 1,
showstr = "ifs.sp.gcw.map4name",
description = "ifs.sp.gcw.map4descr",
movie = "yav2fly",
intromovie = "yav2h01",
voiceover = "imp_missionbriefing_yav1",
briefingmusic = "shell_imperialmarch",
iconmodel = "com_icon_imperial"
},--Player is the Alliance
{
mapluafile = "yav1i_h",
side = 2,
showstr = "ifs.sp.gcw.map5name",
description = "ifs.sp.gcw.map5descr",
movie = "yav1fly",
intromovie = "yav1h01",
voiceover = "all_missionbriefing_yav1",
briefingmusic = "shell_clash",
unlockable = 7,
iconmodel = "com_icon_alliance"
},--Player is the Alliance

--Player is the Alliance
{
mapluafile = "hot1i_h",
side = 2,
showstr = "ifs.sp.gcw.map6name",
description = "ifs.sp.gcw.map6descr", side = 2,
movie = "hot1fly",
outtromovie = "hot1h02",
voiceover = "all_missionbriefing_hot1",
briefingmusic = "shell_clash",
unlockable = 8,
iconmodel = "com_icon_alliance"
},--Player is the Alliance
{
mapluafile = "bes2a_h",
side = 1,
showstr = "ifs.sp.gcw.map7name",
description = "ifs.sp.gcw.map7descr",
movie = "bes2fly",
intromovie = "bes2h01",
voiceover = "all_missionbriefing_bes1",
briefingmusic = "shell_clash",
unlockable = 9,
iconmodel = "com_icon_alliance"
},--Player is the Alliance
{
mapluafile = "bes1a_h",
side = 1,
showstr = "ifs.sp.gcw.map8name",
description = "ifs.sp.gcw.map8descr",
movie = "bes1fly",
outtromovie = "bes1h01",
voiceover = "all_missionbriefing_bes2",
briefingmusic = "shell_clash",
unlockable = 10,
iconmodel = "com_icon_alliance"
},--Player is the Alliance
{
mapluafile = "end1a_h",
side = 1,
showstr = "ifs.sp.gcw.map9name",
description = "ifs.sp.gcw.map9descr",
movie = "end1fly",
outtromovie = "end1h02",
exitmovie = "end1h03",
voiceover = "all_missionbriefing_end1",
briefingmusic = "shell_clash",
iconmodel = "com_icon_alliance"
},--Player is the Alliance
}
Also, here's a proper loadscreen tool. I never had time to finish it, but there's a SWBF1 and SWBF2 version in there. You'll have to extract compiled MSH files from a loadscreen level from SWBF1 and do some hex editing and renaming, but you can build custom SWBF1-esque loadscreens. I've never actually gotten around to it, but I know it's possible. SWBF2 can't run the SWBF1 load screens, but there's a tool in there for SWBF2 that allows you to roll through multiple load screens while loading like in the default game.

I'm not officially supporting these. I just don't have time to do so anymore. If anyone who has the time to look into them and write a tutorial I'd appreciate it. I've got basic file structures set up. If anyone who knows what they're doing gets stuck, just let me know and I'll try to help. Newbies need not apply until this is all documented properly.

Loadscreen Tool.rar

Re: Shell.lvl scripts

Posted: Thu Dec 23, 2010 11:10 am
by giftheck
Cool! I'd assume psych0fred sent you that script, but I'd doubt he'd have any other scripts left. Thanks for the help :)

EDIT: BattleBelk said six units was possible by hacking shell.lvl (http://www.gametoast.com/forums/viewtop ... 75#p346975), and psych0fred implied as much. While psych0fred's screens of sixth and seventh units may be from an earlier version I am sure that what I have been told by DarkAngelTBP on DeviantArt and from what psych0fred himself said, that there were six units working, fully functioning, only shortly before the game's release. Of course, it's entirely possible the mod tools patches have removed any code pertaining to sixth units. If it's not possible, I don't really care, I've worked my mod into the five class system anyways. But I'd like to push the utter boundaries of the engine. BattleBelk hasn't been on since September so chances are he's not doing modding anymore. It was a nice thought while it was there though :roll:

Re: Shell.lvl scripts

Posted: Thu Dec 23, 2010 8:54 pm
by jdee/barc
@Teancum
Do you know any possible ways of injecting this back into shell.lvl? THis is very interesting.

Re: Shell.lvl scripts

Posted: Thu Dec 23, 2010 10:40 pm
by Teancum
Sure - it's not hard per se. Just compile the single script and do a hex-edit copy/paste, replacing the original file, then update the first 8 bytes of the lvl file to reflect the new file size. I have to do this a LOT with the Xbox mod. I don't have SWBF1 anymore, but if someone wants to update the lua I can compile and inject it into shell.lvl (I'd need the original shell.lvl since I don't have SWBF1). I don't want to do this a ton of times, though -- so if maps and eras are going to be added finish all that up first, then I'll update the shell once all those maps are working as addon maps.

Re: Shell.lvl scripts

Posted: Fri Dec 24, 2010 4:28 am
by giftheck
Teancum wrote:Sure - it's not hard per se. Just compile the single script and do a hex-edit copy/paste, replacing the original file, then update the first 8 bytes of the lvl file to reflect the new file size. I have to do this a LOT with the Xbox mod. I don't have SWBF1 anymore, but if someone wants to update the lua I can compile and inject it into shell.lvl (I'd need the original shell.lvl since I don't have SWBF1). I don't want to do this a ton of times, though -- so if maps and eras are going to be added finish all that up first, then I'll update the shell once all those maps are working as addon maps.
Exactly. It's not that different from adding/removing meshes from a msh file, especially since the lvl format is just a container format for the munged files to be compiled into. If you wanted to go one step further and if you really know what you're doing (like BattleBelk did) you could either create a shell remunger by extracting all the munged files, or you could go one further if you really understood the format and create a program that can read, decompile and recompile LVL into its individual munged formats (which I am surprised nobody has done yet)