How to add other troopers in space?
Moderator: Moderators
- Grapple
- Private Recruit
- Posts: 21
- Joined: Sat Apr 16, 2011 3:52 pm
- Projects :: SWBF2 Skins
How to add other troopers in space?
hi all, i was wondering if someone could tell me how to make a mission.lvl file that makes it so that i can have a clone commander in space? thanks
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to add other troopers in space?
Are you a) trying to create your own space map with a Clone Commander as a unit, or b) wanting to add Clone Commanders to all of the stock space maps?Grapple wrote:hi all, i was wondering if someone could tell me how to make a mission.lvl file that makes it so that i can have a clone commander in space? thanks
If your answer is 'a)' then go into data_ABC\Common\Scripts\ABC\ (where ABC is your map's 3-letter name) and open up ABCc_cmn.lua using either Notepad or Notepad++. Scroll down and find where it says this:
Code: Select all
myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},
},
cis = {
team = CIS,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
}
}Code: Select all
officer = { "rep_inf_ep3_officer",4},Code: Select all
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},Code: Select all
myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},
officer = { "rep_inf_ep3_officer",4},
},
cis = {
team = CIS,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
}
}I am not quite sure myself how you would approach answer 'b)', so that would be great if somebody could shed some light on that.
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: How to add other troopers in space?
Good tut Marth88880.
If it were 'b)' and you're only adding it to assault this is how I would do it:
Go to assets/scripts/spa/*what ever space map you needed*
For the sake of this tutorial it will be spa6 (space mygeeto)
You will need to grab two files, ( or 3 if you want to add ctf but we won't do that ) "spa6c_Diet Dr. Pepper" and "spa6c_cmn"
Copy them both into your *yourmapname/common/scripts/*yourmapname*
Open spa6c_cmn and do what Marth88880's tutorial above says to add the clone commander.
Then save and close.
Now, go into your *yourmapname*/addme and open the file addme.lua
Okay next, what you need to do after that is go to your common folder and open the file mission.req,
The thing is it will break online compatibility with that level.
If it were 'b)' and you're only adding it to assault this is how I would do it:
Go to assets/scripts/spa/*what ever space map you needed*
For the sake of this tutorial it will be spa6 (space mygeeto)
You will need to grab two files, ( or 3 if you want to add ctf but we won't do that ) "spa6c_Diet Dr. Pepper" and "spa6c_cmn"
Copy them both into your *yourmapname/common/scripts/*yourmapname*
Open spa6c_cmn and do what Marth88880's tutorial above says to add the clone commander.
Then save and close.
Now, go into your *yourmapname*/addme and open the file addme.lua
Add the above lines in yellow to your file. Then save and close. Now run the mungeAddme.bat.addme.lua wrote:--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-------------------------------------
AddNewGameModes( sp_missionselect_listbox_contents, "spa6%s_%s", {era_c = 1, mode_Diet Dr. Pepper_c = 1,} )
-------------------------------------
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
--AddDownloadableContent("*yourmapname","*yourmapname",4)
--AddDownloadableContent("*yourmapname","*yourmapname",4)
AddDownloadableContent("spa6","spa6c_Diet Dr. Pepper",4)
-------------------------------------
-- all done
newEntry = nil
n = nil
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\GID\\data\\_LVL_PC\\core.lvl")
Okay next, what you need to do after that is go to your common folder and open the file mission.req,
and add that to the same place in your req file, then munge with common checked, play, and enjoy!addme.lua wrote:REQN
{
"lvl"
"*yourmapnameg_con"
"*yourmapnamec_con"
"spa6c_Diet Dr. Pepper"
The thing is it will break online compatibility with that level.
