It is currently Tue May 21, 2013 7:06 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: I discovered a lua trick that totally blew my mind
PostPosted: Wed Mar 16, 2011 8:05 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
I was modding my sides mod when I discovered this. I have the missionlist.lua from shell.lvl that teancum posted.
-I made an addon map with the intent of trying to make an test era mod to see if era mods were possible in BF1
-after failing three times I thought of, copying the part of missionlist.lua where maps/eras are added and overwriting the part of the addme.lua where maps/eras are added.

I got this result with new maps that were suddenly not addon maps but rather part of the game itself, like the stock maps. (the names are not localized, and I don't have the scripts fully compiled yet. (the green strip is because it was in sptest)

my reaction= :shock:

Image


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Wed Mar 16, 2011 8:07 pm 
Offline
Space Ranger
User avatar

Joined: Tue Aug 17, 2010 3:30 pm
Posts: 5251
Location: My lair, working on The Clone Wars, Battlefront 3, Shattered Mirror, and eating cake.
Projects :: Battlefront 3 + The Clone Wars + Evolved
Games I'm Playing :: SWBF2 World of Tanks
Xfire: thewulfman (Marth is cool)
Good work :thumbs:


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Thu Mar 17, 2011 12:25 am 
Offline
Second Lance Corporal
User avatar

Joined: Mon Feb 14, 2011 4:44 pm
Posts: 103
Projects :: BattleFront 1.5 tester
Games I'm Playing :: Battlefront
Wow!
Keep it up!
:thumbs:


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Thu Mar 17, 2011 2:43 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
This might be as close as one could get with making an era mod in BF1.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Thu Mar 17, 2011 3:30 pm 
Offline
Sergeant Major
User avatar

Joined: Fri Oct 15, 2010 7:15 pm
Posts: 243
Location: Ohio, USA
Projects :: Tython-Siege of Darkness Zombie Hotel
Games I'm Playing :: SWBF 1+2
Xfire: (guru is cool) bamdur123
I would of never thought about the addme.lua nice job (ill be trying to get some shell work if i can and will expierement with this)


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Thu Mar 17, 2011 4:09 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
you need the missionlist lua. teancum posted it. just go back through the bf1 threads and look for it.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Thu Mar 17, 2011 7:00 pm 
Offline
Sergeant Major
User avatar

Joined: Fri Oct 15, 2010 7:15 pm
Posts: 243
Location: Ohio, USA
Projects :: Tython-Siege of Darkness Zombie Hotel
Games I'm Playing :: SWBF 1+2
Xfire: (guru is cool) bamdur123
Yes i have it. i am trying to look for more scripts


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 1:36 pm 
Offline
Jedi
Jedi
User avatar

Joined: Mon Jan 19, 2009 5:58 pm
Posts: 1048
So in essence this works much like the BF2 addme.lua's function of adding new maps/eras to the main game via addon. Pretty cool discovery but have you tested it yet to see if it works 100% yet? Can this be used to, say, add Clone Wars to Hoth and Endor, and Galactic Civil War to Geonosis and Kamino? And does this bypass the 21 addon maps restriction?


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 3:09 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
no i haven't tested those yet and i hadn't thought about that yet.

- Editing the campaign might be possible through this. and each campaign can have up to 255 missions each but i doubt anyone would want to do that.

EDIT

So far I've tested with 15 maps and it works fine


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 5:34 pm 
Offline
Jedi
Jedi
User avatar

Joined: Mon Jan 19, 2009 5:58 pm
Posts: 1048
Cool!

Now I really do wonder what else can be done from addon. Maybe new Historical Campaigns (possibly overwriting the shipped campaigns?)

Have you tried overwriting a shipped Instant Action map using this to see if it works (since I assume this method loads the scripts from addon and not the shipped game), say, Kamino: Tipoca City with Rhen Var: Citadel?

Because if it loads from your addon mission.lvl, I think we've cracked it so we can get custom animations and sides ingame WITHOUT overwriting the old ones.

Just to let you know, for the main game, maps are named in the localization files (in core.lvl) and not the missionlist.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 5:51 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
no, actually, the mission scripts run from the regular mission.lvl itself, which I edited by creating new scripts for the eras, most of which are basically edited, renameed duplicates of the stock ones and which call for the use of the modded worlds and sides. the only thing i really did that made this possible was copy the first half of missionlist that that outlined all the non-addon worlds into the addme lua, editing it, and munging, and that became the new "missionlist" lua. addme and missionlist are very similar.


about custom animations, Bamdur is having a great sucess with doing that for my mod. He ported a two-hand gripped pistol anim by darthduck and an aayla lightsabre anim. search for some of his videos on xfire. all you really need to do is be good at animating and animationsets/banks and putting it in a common.lvl

about sides that don't overwrite the stock sides, i already did that with my mod by having my sides run from a folder separate from the sides folder (the stock sides remain in folder SIDE, mine run from new folder called MAIN). I thought you did that with Battlefront Expansion as well, or did i misunderstand?

and thanks for the info about localization.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 8:18 pm 
Offline
Jedi Admin
Jedi Admin
User avatar

Joined: Wed Sep 07, 2005 11:42 pm
Posts: 10192
Location: Indiana
I'm glad someone caught it - that's what I posted it for but didn't have any time then to explain how it worked. I'll follow this topic and try to answer anything I can.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 8:42 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
alright-y then, does this actually affect the addon map limit or how many add-on maps you have? I mean, i tested it with 15 maps, but I'm still not entirely sure.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 9:10 pm 
Offline
Jedi Admin
Jedi Admin
User avatar

Joined: Wed Sep 07, 2005 11:42 pm
Posts: 10192
Location: Indiana
There will still be a total number of missions that you have. A mission counts as one LUA setup for a map (so Bespin Platforms - Clone Wars is one mission). In SWBF2 the limit is 500. Dunno what that'll be in SWBF1.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Fri Mar 18, 2011 9:20 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
the addon limit is 21 in the 1.2 patch and possibly up to 512 in the 1.3 . Now I can't install the 1.3 patch because I have the best of pc edition, not the regular CD version so I'm limited.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Sat Mar 19, 2011 6:29 pm 
Offline
Jedi
Jedi
User avatar

Joined: Mon Jan 19, 2009 5:58 pm
Posts: 1048
With this trick are we able to override the Historical Campaign?


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Sat Mar 19, 2011 7:14 pm 
Offline
Jedi Admin
Jedi Admin
User avatar

Joined: Wed Sep 07, 2005 11:42 pm
Posts: 10192
Location: Indiana
Yes, I highlighted the historical campaign sections in yellow below. It's still just a CW/GCW campaign, but you can definitely extend it with new maps or replace them if you want.

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
}


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Sat Mar 19, 2011 7:51 pm 
Offline
Lance Corporal

Joined: Thu Mar 03, 2011 5:08 pm
Posts: 94
Location: New Zealand
Projects :: SWBF Renewed
Games I'm Playing :: SWBF SWBFII
Xfire: sleepkillerhasxfire
xbox live: N/A
Nice find :)


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Sat Mar 19, 2011 8:25 pm 
Offline
1st Lieutenant
User avatar

Joined: Wed Aug 25, 2010 2:47 pm
Posts: 450
Location: Cambridge, MA
Projects :: Battlefront One and a Half Mod
Games I'm Playing :: SWBF SWBF2 TF2
Xfire: i stopped using it,
xbox live: No gamertag set
Teancum wrote:
Yes, I highlighted the historical campaign sections in yellow below. It's still just a CW/GCW campaign, but you can definitely extend it with new maps or replace them if you want.

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
}



YES!!!! :runaway: I'm remaking the campaigns.


Top
 Profile  
 
 Post subject: Re: I discovered a lua trick that totally blew my mind
PostPosted: Sun Mar 20, 2011 5:08 pm 
Offline
Jedi
Jedi
User avatar

Joined: Mon Jan 19, 2009 5:58 pm
Posts: 1048
My mod will finally also be able to modify the campaigns, and the map list can at last look tidier.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


StarWars Gametoast Forum Style by Penguin, © 2011