I was wondering how tp add a pre-existing map to the BF1 addme.lua. I know how to setup a BF2 addme file and noticed slight differences between the BF1 and BF2 versions. I've already setup what I think will work (blue) What I've highlighted in red is what I'm questioning.
This is to allow custom units and localization to appear on stock maps. Mission.lua's have already been edited correctly.
For example yav1c.lua BF1
SWBFI addme.lua
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "GSM", showstr = "GSM", side_c = 1, side_a = 1, dnldable = 1, }
local newEntry = { mapluafile = "yav1", showstr = "yav1", side_c = 1, side_a = 1, dnldable = 1, }
-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[n+1] = newEntry
-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry
-- associate this mission name with the current downloadable content directory
-- you should list all missions in mission.lvl 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("GSM","GSMc",4)
AddDownloadableContent("GSM","GSMa",4)
AddDownloadableContent("yav1","yav1c",4)
AddDownloadableContent("yav1","yav1a",4)
-- all done
newEntry = nil
n = nil
Edit: I know I setup the addme.lua script incorrectly because of these errors.
[spoiler]Opened logfile BFront.log 2013-01-24 1703
Message Severity: 3
.\source\LuaScript.cpp(523)
OpenScript(YAV1c): script (39d01927) not found
Message Severity: 3
.\source\GameState.cpp(804)
Could not open MISSION\YAV1c.lvl
Message Severity: 3
.\source\GameState.cpp(823)
Could not open mission YAV1c
[/spoiler]
Quote from: Glitch on January 24, 2013, 11:01:25 AM
I noticed that there are slight differences between the mission name setup in BF1 and BF2. I know how to setup a BF2 addme.lua but not a BF1 addme.lua. I was wondering how would I add a pre-existing map to the BF1 addme.lua I've already setup what I think will work (blue) What I've highlighted in red is what I'm questioning.
If you are doing what I think you're trying to, this should work.
When you create a map, and edit the mission Luas for it, you'll notice the
ReadDataFile("dc:bes2\\bes2.lvl")
ReadDataFile
: self explanitory
("
: encloses the file
DC:
: means to read the file out of the directory that the map comes with. /Addon/Bes2/
if you were to take away the
DC:
from the equation, it will read
the LVL file from /GameData/Data/_LVL_PC/BES/ folder
hence using the map that the game already uses.
(You can do that to all the ReadDataFile lines in the lua as well)
I hope this helps.
Whoops, guess you didn't catch my edit. (My internet was slow, sorry about that. :()
Quote from: GlitchI was wondering how to add a pre-existing map to the BF1 addme.lua. I know how to setup a BF2 addme file and noticed slight differences between the BF1 and BF2 versions. I've already setup what I think will work (blue) What I've highlighted in red is what I'm questioning.
I've already setup the mission files correctly.
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_fedlander_dome",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
Quote from: -RepublicCommando- on January 24, 2013, 11:13:48 AM
If you are doing what I think you're trying to, this should work.
When you create a map, and edit the mission Luas for it, you'll notice the
ReadDataFile("dc:bes2\\bes2.lvl")
ReadDataFile
: self explanitory
("
: encloses the file
DC:
: means to read the file out of the directory that the map comes with. /Addon/Bes2/
if you were to take away the DC:
from the equation, it will read
the LVL file from /GameData/Data/_LVL_PC/BES/ folder
hence using the map that the game already uses.
(You can do that to all the ReadDataFile lines in the lua as well)
I hope this helps.
He is not talking about the map lua, but rather the addme lua...
That misunderstanding was my fault. I need to correct this setup.
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "GSM", showstr = "GSM", side_c = 1, side_a = 1, dnldable = 1, }
local newEntry = { mapluafile = "GEO1", showstr = "GEO1", side_c = 1, side_a = 1, dnldable = 1, }
local newEntry = { mapluafile = "yav1", showstr = "yav1", side_c = 1, side_a = 1, dnldable = 1, }
local newEntry = { mapluafile = "yav2", showstr = "yav2", side_c = 1, side_a = 1, dnldable = 1, }
-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[n+1] = newEntry
-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry
-- associate this mission name with the current downloadable content directory
-- you should list all missions in mission.lvl 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("GSM","GSMc",4)
AddDownloadableContent("GSM","GSMa",4)
AddDownloadableContent("yav1","yav1c",4)
AddDownloadableContent("yav2","yav2r",4)
AddDownloadableContent("GEO1","GEO1r",4)
AddDownloadableContent("GEO1","GEO1r_h",4)
-- all done
newEntry = nil
n = nil
The BFbuilder pro application automatically makes your addme.lua file when you start a new map project. I am not sure SWBF can support 4 maps in the addme.
I would suggest you just use the addme created by BFbuilder, since we can not (as yet) make custom campaigns.
Each Addon level has a separate addme.script file associated with it. There is no universal one (as you seem to be trying to create).
Ah, so in order to add custom units/skins to specific stock maps I need to add the stock map's addme.lua to the mod?
Quote from: Glitch on January 24, 2013, 04:57:23 PM
Ah, so in order to add custom units to specific stock maps I need to use the stock map's addme.lua?
When I want to do this, I make an addon level folder through BFbuilder. Then I just edit the map readdatafile line to read the stock map instead of one in the downloadable content folder. Easy as can be!
Here is a portion of a map lua that calls the stock cloud city map but calls on side lvl files in a special location:
ReadDataFile("SWBFgamersUpdate1.0\\sides\\01-Led\\pistolsonly\\SIDE\\all.lvl",
"all_inf_basicurban",
"all_inf_lukeskywalker",
"all_inf_smuggler");
ReadDataFile("SWBFgamersUpdate1.0\\sides\\01-Led\\pistolsonly\\SIDE\\imp.lvl",
"imp_inf_basic_tie",
"imp_inf_dark_trooper",
"imp_inf_darthvader");
-- Alliance Stats
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "all_inf_soldierurban",11)
SetHeroClass(ALL, "all_inf_lukeskywalker")
SetAttackingTeam(ATT);
-- Imperial Stats
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_storm_trooper",11)
SetHeroClass(IMP, "imp_inf_darthvader")
-- Attacker Stats
SetUnitCount(ATT, 25)
SetReinforcementCount(ATT, 50)
AddBleedThreshold(ATT, 31, 0.0)
AddBleedThreshold(ATT, 21, 0.0)
AddBleedThreshold(ATT, 11, 0.0)
AddBleedThreshold(ATT, 1, 0.0)
-- Defender Stats
SetUnitCount(DEF, 25)
SetReinforcementCount(DEF, 50)
AddBleedThreshold(DEF, 31, 0.0)
AddBleedThreshold(DEF, 21, 0.0)
AddBleedThreshold(DEF, 11, 0.0)
AddBleedThreshold(DEF, 1, 0.0)
-- Level Stats
ClearWalkers()
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Obstacle", 514)
SetSpawnDelay(2.0, 0.25)
ReadDataFile("BES\\bes2.lvl")
SetDenseEnvironment("true")
I'd like to use all the stock maps. Give them custom units/skins and allow localization changes.
I've already edited the mission.lua's accordingly. Now I just need to add the maps to the readdatafile line in the custom map mission.lua? Or did I interpret that incorrectly?
Edit 1: Ah, saw the edit, reading
Edit 2: So this is the edited stock mission.lua or the custom one? I'm using an edited stock side.
Would this kind of layout within the lua work?
-- Level Stats
ClearWalkers()
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Obstacle", 514)
SetSpawnDelay(2.0, 0.25)
ReadDataFile("BES\\bes1.lvl")
ReadDataFile("BES\\bes2.lvl")
ReadDataFile("GEO\\geo1.lvl")
ReadDataFile("KAM\\kam1.lvl")
ReadDataFile("KAS\\kas1.lvl")
ReadDataFile("KAS\\kas2.lvl")
ReadDataFile("KAS\\kas2_h.lvl")
ReadDataFile("NAB\\nab1.lvl")
ReadDataFile("NAB\\nab1_h.lvl")
ReadDataFile("NAB\\nab2.lvl")
ReadDataFile("NAB\\nab2_h.lvl")
ReadDataFile("RHN\\rhn1.lvl")
ReadDataFile("RHN\\rhn2.lvl")
ReadDataFile("TAT\\tat1.lvl")
ReadDataFile("TAT\\tat1h.lvl")
ReadDataFile("TAT\\tat2.lvl")
ReadDataFile("YAV\\yav1.lvl")
ReadDataFile("YAV\\yav2.lvl")
ReadDataFile("YAV\\yav2_h.lvl")
SetDenseEnvironment("true")
ReadDataFile("BES\\bes2.lvl")
That is the line you need. For other maps, use the appropriate folder and map lvl name :cheers:
Quote from: Dark_Phantom on January 24, 2013, 04:52:58 PM
Each Addon level has a separate addme.script file associated with it. There is no universal one (as you seem to be trying to create).
Well there is for stockmap in the shell, but I think he is just trying to mod the mission.lvl to call on custom sides. For stock maps I suggest putting your custom sides in the side folder that way you won't have to have DC:\\ references in the edited mission.
Quote from: Buckler on January 24, 2013, 05:11:56 PM
ReadDataFile("BES\\bes2.lvl")
That is the line you need. For other maps, use the appropriate folder and map lvl name :cheers:
I've inserted that line into GSMc.lua along with the other stock maps. Munging now. :D Thanks Buckler! I'll let you know how it goes. (I'm assuming I need to keep the other mission.lua's for varied side changes, skins, units etc.)
Quote from: Phobos on January 24, 2013, 05:13:53 PMI think he is just trying to mod the mission.lvl to call on custom sides.
Yep, that just about sums it up. I've backed up the stock cis.lvl and replaced it with my own.
Edit: Hmm, the additional skins and localization did not appear in game.
Quote from: Glitch on January 24, 2013, 05:30:40 PM
I've inserted that line into GSMc.lua along with the other stock maps. Munging now. :D Thanks Buckler! I'll let you know how it goes. (I'm assuming I need to keep the other mission.lua's for varied side changes, skins, units etc.)
Yep, that just about sums it up. I've backed up the stock cis.lvl and replaced it with my own.
Edit: Hmm, the additional skins and localization did not appear in game.
post your map lua and let's have a look
Quote from: GlitchEdit: Hmm, the additional skins and localization did not appear in game.
By that, I meant that the stock maps did not use the localization and skin changes. I may have messed something up prior to the munge. I'll take a closer look tomorrow. Gonna get some sleep.
GSMc.lua
--start header
function ScriptInit()
local CIS = 1
local REP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(REP,"red", "level.GSM.objectives.1");
AddMissionObjective(REP,"orange", "level.GSM.objectives.2");
AddMissionObjective(REP,"orange", "level.GSM.objectives.3");
AddMissionObjective(CIS,"red", "level.GSM.objectives.1");
AddMissionObjective(CIS,"orange", "level.GSM.objectives.2");
AddMissionObjective(CIS,"orange","level.GSM.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1cw");
--end soundlvl
-- Start sidelvls
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_basic_battledroids",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",10)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")
--end loadouts
--start teamstats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
-- Level Stats
ClearWalkers()
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Obstacle", 514)
SetSpawnDelay(2.0, 0.25)
ReadDataFile("BES\\bes1.lvl")
ReadDataFile("BES\\bes2.lvl")
ReadDataFile("GEO\\geo1.lvl")
ReadDataFile("KAM\\kam1.lvl")
ReadDataFile("KAS\\kas1.lvl")
ReadDataFile("KAS\\kas2.lvl")
ReadDataFile("KAS\\kas2_h.lvl")
ReadDataFile("NAB\\nab1.lvl")
ReadDataFile("NAB\\nab1_h.lvl")
ReadDataFile("NAB\\nab2.lvl")
ReadDataFile("NAB\\nab2_h.lvl")
ReadDataFile("RHN\\rhn1.lvl")
ReadDataFile("RHN\\rhn2.lvl")
ReadDataFile("TAT\\tat1.lvl")
ReadDataFile("TAT\\tat1h.lvl")
ReadDataFile("TAT\\tat2.lvl")
ReadDataFile("YAV\\yav1.lvl")
ReadDataFile("YAV\\yav2.lvl")
ReadDataFile("YAV\\yav2_h.lvl")
SetDenseEnvironment("true")
--start memorypools
ClearWalkers()
AddWalkerType(0, 4)-- special -> droidekas
AddWalkerType(1, 4)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:GSM\\GSM.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false")
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
--end deathregions
--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatcw_music");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\cw.lvl","cw_vo");
OpenAudioStream("sound\\cw.lvl","cw_tac_vo");
OpenAudioStream("sound\\tat.lvl","tat1_emt");
SetBleedingVoiceOver(CIS,CIS,"cis_off_com_report_us_overwhelmed",1);
SetBleedingVoiceOver(CIS,REP,"cis_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,CIS,"rep_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,REP,"rep_off_com_report_us_overwhelmed",1);
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1,1);
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1,1);
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(CIS,1.0,"cis_tat_amb_start",0,1);
SetAmbientMusic(CIS,0.99,"cis_tat_amb_middle",1,1);
SetAmbientMusic(CIS,0.1,"cis_tat_amb_end",2,1);
SetAmbientMusic(REP,1.0,"rep_tat_amb_start",0,1);
SetAmbientMusic(REP,0.99,"rep_tat_amb_middle",1,1);
SetAmbientMusic(REP,0.1,"rep_tat_amb_end",2,1);
SetVictoryMusic(CIS,"cis_tat_amb_victory");
SetDefeatMusic (CIS,"cis_tat_amb_defeat");
SetVictoryMusic(REP,"rep_tat_amb_victory");
SetDefeatMusic (REP,"rep_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut","binocularzoomout");
SetSoundEffect("SpawnDisplayUnitChange","shell_select_unit");
SetSoundEffect("SpawnDisplayUnitAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplaySpawnPointChange","shell_select_change");
SetSoundEffect("SpawnDisplaySpawnPointAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplayBack","shell_menu_exit");
SetPlanetaryBonusVoiceOver(REP,REP,0,"rep_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(REP,CIS,0,"rep_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(REP,REP,1,"");
SetPlanetaryBonusVoiceOver(REP,CIS,1,"");
SetPlanetaryBonusVoiceOver(REP,REP,2,"rep_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(REP,CIS,2,"rep_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(REP,REP,3,"rep_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(REP,CIS,3,"rep_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(REP,REP,4,"rep_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(REP,CIS,4,"rep_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(REP,REP,5,"rep_bonus_rep_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP,CIS,5,"rep_bonus_cis_sabotage");
SetPlanetaryBonusVoiceOver(REP,REP,6,"");
SetPlanetaryBonusVoiceOver(REP,CIS,6,"");
SetPlanetaryBonusVoiceOver(REP,REP,7,"rep_bonus_rep_training");--advanced training
SetPlanetaryBonusVoiceOver(REP,CIS,7,"rep_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,CIS,0,"cis_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(CIS,REP,0,"cis_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(CIS,CIS,1,"");
SetPlanetaryBonusVoiceOver(CIS,REP,1,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,2,"cis_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(CIS,REP,2,"cis_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(CIS,CIS,3,"cis_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(CIS,REP,3,"cis_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(CIS,CIS,4,"cis_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(CIS,REP,4,"cis_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(CIS,CIS,5,"cis_bonus_cis_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS,REP,5,"cis_bonus_rep_sabotage");
SetPlanetaryBonusVoiceOver(CIS,CIS,6,"");
SetPlanetaryBonusVoiceOver(CIS,REP,6,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,7,"cis_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,REP,7,"cis_bonus_rep_training");--advanced training
--end soundconfig
--start activebonus
--end activebonus
--start camerashots
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
--end camerashots
--start footer
end
--end footer
ReadDataFile("dc:SIDE\\cis.lvl",
this file is in the "downloadable content folder" this means it is looking in ModID/SIDE for the cis.lvl file. Is it really there?
ReadDataFile("BES\\bes1.lvl")
ReadDataFile("BES\\bes2.lvl")
ReadDataFile("GEO\\geo1.lvl")
ReadDataFile("KAM\\kam1.lvl")
ReadDataFile("KAS\\kas1.lvl")
ReadDataFile("KAS\\kas2.lvl")
ReadDataFile("KAS\\kas2_h.lvl")
ReadDataFile("NAB\\nab1.lvl")
ReadDataFile("NAB\\nab1_h.lvl")
ReadDataFile("NAB\\nab2.lvl")
ReadDataFile("NAB\\nab2_h.lvl")
ReadDataFile("RHN\\rhn1.lvl")
ReadDataFile("RHN\\rhn2.lvl")
ReadDataFile("TAT\\tat1.lvl")
ReadDataFile("TAT\\tat1h.lvl")
ReadDataFile("TAT\\tat2.lvl")
ReadDataFile("YAV\\yav1.lvl")
ReadDataFile("YAV\\yav2.lvl")
ReadDataFile("YAV\\yav2_h.lvl")
you cant read in this many maps. at most you can read in two, but they must be compatible.
ReadDataFile("dc:GSM\\GSM.lvl")
this looks like another map. do you have a folder in addon called GSM ?
In my opinion, you need to start with this tutorial:
http://www.swbfgamers.com/index.php?topic=8.0
The other thing you should do is look at the map lua for Jabba's Palace.
edit: tell me the name of your modID and what stock map you want to use your sides on, and tomorrow i will make a map lua and send you the modID folder to use for your sides.
cis.lvl is already in C:\Program Files (x86)\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE
GSM is placed in C:\Program Files (x86)\LucasArts\Star Wars Battlefront\GameData\AddOn
I already understand how to create a side mod, modify odf's, how to munge, etc. Like I stated before. I'm coming from BFII mod tools. http://starwarsbattlefront.filefront.com/developer/Glitch25;36079
http://swbf-custom.forumactif.com/t277-glitch-s-mods
I just need to figure out how allow different maps use a different set of classes by editing the .lua files with the Star Wars Battlefront I mod tools. Judging by what I've seen so far, these tools seem to be a bit more limited.
C:\BFBuilder\DataGSM is where I'm munging my custom side along with the .lua changes.
You obviously know how to mod, but there are particulars about SWBF that you still need to work out. SWBF in general is much more limited than SWBF2 in all aspects. The people that are here still like it though, because the game play is "better" to us, and we like a challenge :)
The reason why I directed you to the tutorial, is that everything is made for you automatically for the mod tools. It seems that you are piecing things together--which will work--but only if you completely understand the process.
Some important stuff and links are down at the bottom of this post. These luas shown here are included in download links at the bottom.
For map GSM here is a two era addme.lua that you need
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "GSM", showstr = "GSM", side_c = 1, side_a = 1, dnldable = 1, }
-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[n+1] = newEntry
-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry
-- associate this mission name with the current downloadable content directory
-- you should list all missions in mission.lvl 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("GSM","GSMc",4)
AddDownloadableContent("GSM","GSMa",4)
-- all done
newEntry = nil
n = nil
here is GSMa.lua
you will need to adjust your unit names as appropriate.
--start header
function ScriptInit()
local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(IMP,"red", "level.GSM.objectives.1");
AddMissionObjective(IMP,"orange", "level.GSM.objectives.2");
AddMissionObjective(IMP,"orange", "level.GSM.objectives.3");
AddMissionObjective(ALL,"red", "level.GSM.objectives.1");
AddMissionObjective(ALL,"orange", "level.GSM.objectives.2");
AddMissionObjective(ALL,"orange","level.GSM.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1gcw");
--end soundlvl
-- Start sidelvls
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_basicdesert",
"all_inf_lukeskywalker",
"all_inf_smuggler");
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_basic_tie",
"imp_inf_darthvader",
"imp_inf_dark_trooper");
--end sidelvls
--start loadouts
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "all_inf_soldierdesert",10)
AddUnitClass(ALL, "all_inf_vanguard",1)
AddUnitClass(ALL, "all_inf_pilot",2)
AddUnitClass(ALL, "all_inf_marksman",2)
AddUnitClass(ALL, "all_inf_smuggler",1)
SetHeroClass(ALL, "all_inf_lukeskywalker")
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_storm_trooper",10)
AddUnitClass(IMP, "imp_inf_shock_trooper",1)
AddUnitClass(IMP, "imp_inf_pilottie",2)
AddUnitClass(IMP, "imp_inf_scout_trooper",2)
AddUnitClass(IMP, "imp_inf_dark_trooper",1)
SetHeroClass(IMP, "imp_inf_darthvader")
--end loadouts
--start teamstats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
--start memorypools
ClearWalkers()
AddWalkerType(0, 0)-- special -> droidekas
AddWalkerType(1, 0)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:GSM\\GSM.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false")
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
--end deathregions
--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatgcw_music");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\gcw.lvl","gcw_vo");
OpenAudioStream("sound\\gcw.lvl","gcw_tac_vo");
OpenAudioStream("sound\\tat.lvl","tat1_emt");
SetBleedingVoiceOver(ALL,ALL,"all_off_com_report_us_overwhelmed",1);
SetBleedingVoiceOver(ALL,IMP,"all_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(IMP,ALL,"imp_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(IMP,IMP,"imp_off_com_report_us_overwhelmed",1);
SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1,1);
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1,1);
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(ALL,1.0,"all_tat_amb_start",0,1);
SetAmbientMusic(ALL,0.99,"all_tat_amb_middle",1,1);
SetAmbientMusic(ALL,0.1,"all_tat_amb_end",2,1);
SetAmbientMusic(IMP,1.0,"imp_tat_amb_start",0,1);
SetAmbientMusic(IMP,0.99,"imp_tat_amb_middle",1,1);
SetAmbientMusic(IMP,0.1,"imp_tat_amb_end",2,1);
SetVictoryMusic(ALL,"all_tat_amb_victory");
SetDefeatMusic (ALL,"all_tat_amb_defeat");
SetVictoryMusic(IMP,"imp_tat_amb_victory");
SetDefeatMusic (IMP,"imp_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut","binocularzoomout");
SetSoundEffect("SpawnDisplayUnitChange","shell_select_unit");
SetSoundEffect("SpawnDisplayUnitAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplaySpawnPointChange","shell_select_change");
SetSoundEffect("SpawnDisplaySpawnPointAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplayBack","shell_menu_exit");
SetPlanetaryBonusVoiceOver(IMP,IMP,0,"imp_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(IMP,ALL,0,"imp_bonus_all_medical");
SetPlanetaryBonusVoiceOver(IMP,IMP,1,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,1,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,2,"imp_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(IMP,ALL,2,"imp_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(IMP,IMP,3,"imp_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(IMP,ALL,3,"imp_bonus_all_hero");
SetPlanetaryBonusVoiceOver(IMP,IMP,4,"imp_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(IMP,ALL,4,"imp_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(IMP,IMP,5,"imp_bonus_imp_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(IMP,ALL,5,"imp_bonus_all_sabotage");
SetPlanetaryBonusVoiceOver(IMP,IMP,6,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,6,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,7,"imp_bonus_imp_training");--advanced training
SetPlanetaryBonusVoiceOver(IMP,ALL,7,"imp_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,ALL,0,"all_bonus_all_medical");
SetPlanetaryBonusVoiceOver(ALL,IMP,0,"all_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(ALL,ALL,1,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,1,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,2,"all_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(ALL,IMP,2,"all_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(ALL,ALL,3,"all_bonus_all_hero");
SetPlanetaryBonusVoiceOver(ALL,IMP,3,"all_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(ALL,ALL,4,"all_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(ALL,IMP,4,"all_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(ALL,ALL,5,"all_bonus_all_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(ALL,IMP,5,"all_bonus_imp_sabotage");
SetPlanetaryBonusVoiceOver(ALL,ALL,6,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,6,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,7,"all_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,IMP,7,"all_bonus_imp_training");--advanced training
--end soundconfig
--start activebonus
--end activebonus
--start camerashots
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
--end camerashots
--start footer
end
--end footer
here is GSMc.lua
--start header
function ScriptInit()
local CIS = 1
local REP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(REP,"red", "level.GSM.objectives.1");
AddMissionObjective(REP,"orange", "level.GSM.objectives.2");
AddMissionObjective(REP,"orange", "level.GSM.objectives.3");
AddMissionObjective(CIS,"red", "level.GSM.objectives.1");
AddMissionObjective(CIS,"orange", "level.GSM.objectives.2");
AddMissionObjective(CIS,"orange","level.GSM.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1cw");
--end soundlvl
-- Start sidelvls
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",10)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")
--end loadouts
--start teamstats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
--start memorypools
ClearWalkers()
AddWalkerType(0, 4)-- special -> droidekas
AddWalkerType(1, 4)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:GSM\\GSM.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false")
--end denseenvironment
--start birdsandfish
--end birdsandfish
Now here is the important part:
in the Addon folder:
C:\Program Files\LucasArts\Star Wars Battlefront\GameData\AddOn
there needs to be a folder called GSM
inside GSM are these folders:
Data
and a munged addme.script file
inside Data are these folders:
_lvl_PC
SIDE
GSM
Shell
and the files core.lvl and mission.lvl
your new side files go into SIDE
your GSM.lvl map goes in GSM
your new core file for localization is the core.lvl here
your new mission.lvl file goes here as mission.lvl
Here is a link to what needs to go in Addon:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=901
Here is a link to the BfBuilder dataGSM folder:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=902
this assumes that your sides are named cis.lvl, etc
and that your map is named GSM.lvl with two eras specified as GSMa and GSMc
get this to work first please and then we can go over how to change GSM.lvl to a stock map.
edit: the lua above are correct, but in the download I forgot to put dc:SIDE//cis.lvl etc
Wow, thanks for that man. Really helpful. :D
-Extracted and placed the assets you provided
-Modified the GSMc.lua file (Added dc:)
-Made a few changes to the localization
-Imported retail side and replaced it with my modified one. (CIS)
-Munged, placed GSM in my addon folder
-Played the preset map GSM and this was the result.
[spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fimg585.imageshack.us%2Fimg585%2F5050%2Fbattlefront201301251520.png&hash=dfa189d728b5cb8abc9b07422943925394bcc6c0)
Edit: Added second screenshot with more localization
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fimg9.imageshack.us%2Fimg9%2F1830%2Fbattlefront201301251802.png&hash=dc2b85c72fe6b15a0558c84523a2a5844c384942)[/spoiler]
The skin change worked (Standard to Geonosis)
The localization change worked.
Sweet, can't wait to see you finish this, be nice to have another mapper on the site :D
I wish I could get that far, but BFbuilder and BFbuilder Pro always make my work crash...
Good Luck to you though(https://www.swbfgamers.com/Smileys/macx/cheers.gif)
Thanks -RepublicCommando-! :D I just need to enable the custom units on stock maps and it's pretty much complete.
Cool, looks like you are in business!
Well...sort of. (Sorry :()
Quote from: Bucklerget this to work first please and then we can go over how to change GSM.lvl to a stock map.
The original question still stands, how do I tell the game to enable my custom side on stock maps? (Without replacing the cis.lvl in C:\Program Files (x86)\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE)
I recall you saying that the addme can only support up to two. Is this sort of thing even possible in BF1?
There is more than one way to do this. But this is what I suggest:
in your GSM map lua above, call this
ReadDataFile("BES\\bes1.lvl")
instead of
ReadDataFile("dc:GSM\\GSM.lvl")
and rebuild your mission.lvl file for the addon GSM map.
When you select your map, select the GSM map (you can always rename it) and it will load cloud city from the stock map levels, and load your sides from the Addon GSM folder.
If you do it this way, you can distribute your addon level so that people don't have to mess around with side file changes in the stock folders.
Make sense?
Yep, thanks for the quick explanation. But doesn't that mean that only one map can be loaded like that? "Click GSM (Or renamed map) and it loads Bespin with custom side" What about the other stock maps?
In SWBFII, I was able to create a side mod, edit the addme.lua and mission.lua files to enable every stock map to load different classes and skins. Is that sort of thing not possible for SWBFI?
If you tell it to read TAT3.lvl (or any other map lvl), it'll do that too, BUT, make sure your core and mission are edited to fit it as well (rather simple though, shouldn't be too much trouble, but T'is vital!)
I think I did something wrong, the GSM map crashed and none of the stock maps loaded the custom sides. :(
I think Buckler mentioned before, it can't support more than one or two maps?
GSMc.lua
[spoiler]--start header
function ScriptInit()
local CIS = 1
local REP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(REP,"red", "level.GSM.objectives.1");
AddMissionObjective(REP,"orange", "level.GSM.objectives.2");
AddMissionObjective(REP,"orange", "level.GSM.objectives.3");
AddMissionObjective(CIS,"red", "level.GSM.objectives.1");
AddMissionObjective(CIS,"orange", "level.GSM.objectives.2");
AddMissionObjective(CIS,"orange","level.GSM.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1cw");
--end soundlvl
-- Start sidelvls
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_geo",10)
AddUnitClass(CIS, "cis_inf_assault_geo",1)
AddUnitClass(CIS, "cis_inf_pilotdroid_geo",2)
AddUnitClass(CIS, "cis_inf_assassindroid_geo",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")
--end loadouts
--start teamstats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
--start memorypools
ClearWalkers()
AddWalkerType(0, 4)-- special -> droidekas
AddWalkerType(1, 4)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("BES\\bes1.lvl")
ReadDataFile("BES\\bes2.lvl")
ReadDataFile("GEO\\geo1.lvl")
ReadDataFile("KAM\\kam1.lvl")
ReadDataFile("KAS\\kas1.lvl")
ReadDataFile("KAS\\kas2.lvl")
ReadDataFile("KAS\\kas2_h.lvl")
ReadDataFile("NAB\\nab1.lvl")
ReadDataFile("NAB\\nab1_h.lvl")
ReadDataFile("NAB\\nab2.lvl")
ReadDataFile("NAB\\nab2_h.lvl")
ReadDataFile("RHN\\rhn1.lvl")
ReadDataFile("RHN\\rhn2.lvl")
ReadDataFile("TAT\\tat1.lvl")
ReadDataFile("TAT\\tat1h.lvl")
ReadDataFile("TAT\\tat2.lvl")
ReadDataFile("YAV\\yav1.lvl")
ReadDataFile("YAV\\yav2.lvl")
ReadDataFile("YAV\\yav2_h.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false")
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
--end deathregions
--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatcw_music");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\cw.lvl","cw_vo");
OpenAudioStream("sound\\cw.lvl","cw_tac_vo");
OpenAudioStream("sound\\tat.lvl","tat1_emt");
SetBleedingVoiceOver(CIS,CIS,"cis_off_com_report_us_overwhelmed",1);
SetBleedingVoiceOver(CIS,REP,"cis_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,CIS,"rep_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,REP,"rep_off_com_report_us_overwhelmed",1);
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1,1);
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1,1);
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(CIS,1.0,"cis_tat_amb_start",0,1);
SetAmbientMusic(CIS,0.99,"cis_tat_amb_middle",1,1);
SetAmbientMusic(CIS,0.1,"cis_tat_amb_end",2,1);
SetAmbientMusic(REP,1.0,"rep_tat_amb_start",0,1);
SetAmbientMusic(REP,0.99,"rep_tat_amb_middle",1,1);
SetAmbientMusic(REP,0.1,"rep_tat_amb_end",2,1);
SetVictoryMusic(CIS,"cis_tat_amb_victory");
SetDefeatMusic (CIS,"cis_tat_amb_defeat");
SetVictoryMusic(REP,"rep_tat_amb_victory");
SetDefeatMusic (REP,"rep_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut","binocularzoomout");
SetSoundEffect("SpawnDisplayUnitChange","shell_select_unit");
SetSoundEffect("SpawnDisplayUnitAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplaySpawnPointChange","shell_select_change");
SetSoundEffect("SpawnDisplaySpawnPointAccept","shell_menu_enter");
SetSoundEffect("SpawnDisplayBack","shell_menu_exit");
SetPlanetaryBonusVoiceOver(REP,REP,0,"rep_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(REP,CIS,0,"rep_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(REP,REP,1,"");
SetPlanetaryBonusVoiceOver(REP,CIS,1,"");
SetPlanetaryBonusVoiceOver(REP,REP,2,"rep_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(REP,CIS,2,"rep_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(REP,REP,3,"rep_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(REP,CIS,3,"rep_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(REP,REP,4,"rep_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(REP,CIS,4,"rep_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(REP,REP,5,"rep_bonus_rep_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP,CIS,5,"rep_bonus_cis_sabotage");
SetPlanetaryBonusVoiceOver(REP,REP,6,"");
SetPlanetaryBonusVoiceOver(REP,CIS,6,"");
SetPlanetaryBonusVoiceOver(REP,REP,7,"rep_bonus_rep_training");--advanced training
SetPlanetaryBonusVoiceOver(REP,CIS,7,"rep_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,CIS,0,"cis_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(CIS,REP,0,"cis_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(CIS,CIS,1,"");
SetPlanetaryBonusVoiceOver(CIS,REP,1,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,2,"cis_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(CIS,REP,2,"cis_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(CIS,CIS,3,"cis_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(CIS,REP,3,"cis_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(CIS,CIS,4,"cis_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(CIS,REP,4,"cis_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(CIS,CIS,5,"cis_bonus_cis_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS,REP,5,"cis_bonus_rep_sabotage");
SetPlanetaryBonusVoiceOver(CIS,CIS,6,"");
SetPlanetaryBonusVoiceOver(CIS,REP,6,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,7,"cis_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,REP,7,"cis_bonus_rep_training");--advanced training
--end soundconfig
--start activebonus
--end activebonus
--start camerashots
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
--end camerashots
--start footer
end
--end footer
[/spoiler]
mission.req
[spoiler]ucft
{
REQN
{
"lvl"
"GSMa"
"GSMc"
"bes1r"
"bes2r"
"GEO1r"
"GEO1r_h"
"kam1c"
"kam1c_h"
"kas1c"
"kas1c_h"
"kas2c"
"kas2c_h"
"NAB1c"
"NAB1c_h"
"nab2c"
"nab2c_h"
"rhn1r"
"rhn1r_h"
"rhn2c"
"tat1r"
"tat2r"
"yav1c"
"yav2r"
"tat3c"
}
}[/spoiler]
C:\BFBuilder\DataGSM\Common\Scripts\GSM
[spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fimg849.imageshack.us%2Fimg849%2F6826%2Fcaptureuzd.png&hash=23af4688e7080b0b009f8bb7debe9d978196d953)[/spoiler]
Edit: I looked at the error log, the GSM map crash was due to missing odf error.
[spoiler]Message Severity: 3
.\source\LoadUtil.cpp(831)
Could not find odf "rep_bldg_forwardcenter"!
Message Severity: 3
.\source\LoadUtil.cpp(879)
Attempting to build an object, cp2, that does not have an .odf file associated with it[/spoiler]
If replacing the ODF doesn't work, I'd say it's because the system is overloaded with all of those planets!
Do not load every level at once. Load the ONE level that you want. With mission and addme in BF1, only one planet should be loaded.
This is what your lua says:
[spoiler]ScriptInit (the mission.lua loader)
Sides are read. May have a problem with "dc:SIDE\\cis.lvl" if loading a stock lua, just stick your new side file in the game's side folder. Then just call "ReadDataFile(SIDE\\yoursidehere)"
Unit setup looks good.
SetTeamAsEnemy and Friend are unnecessary as there are no locals and you aren't doing anything with deathmatch. The teams ATT and DEF are auto set to beat each other up.
Load only one world now. This lua is for one planet, so "ReadDataFile(BES/bes2.lvl)" if calling Cloud City
Then all the lovely sound stuff that makes the world go around.[/spoiler]
I know this was blunt, but that is the easiest way to explain it in my eyes. Hope I helped a little 8)
Here is one of my past addme scripts. It adds two entires to the map list.
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "skgs1", showstr = "BESPIN: ZOMBIECITY", side_a = 1, side_r = 1, dnldable = 1, }
-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[n+1] = newEntry
-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry
-- all done
newEntry = nil
n = nil
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "skgh1", showstr = "BESPIN: ZOMBIECITY SURVIVAL", side_i = 1, dnldable = 1, }
-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[n+1] = newEntry
-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry
-- all done
newEntry = nil
n = nil
-- associate this mission name with the current downloadable content directory
-- you should list all missions in mission.lvl 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("skgs1","skgs1a",4)
AddDownloadableContent("skgs1","skgh1i",4)
AddDownloadableContent("skgs1","skgs1r",4)
I think this is what you are trying to do well part of it. You'll obviously need to add the additional scripts to your mission.lvl as well.
Quote from: -RepublicCommando- on January 25, 2013, 09:36:15 PM
If replacing the ODF doesn't work, I'd say it's because the system is overloaded with all of those planets!
Stop posting in this thread RC. The things you are posting are incorrect and are confusing the issue.
-------------------------------
As we have mentioned SWBF is more difficult to mod that SWBF2 due to its inherent limitations. You will be limited as to the number of maps you can put in the addme script--total for all addon levels is something like 50 which include each era.
If you want all of the stock maps to have custom sides, you can do a stock mission.lvl replacement. But then you might as well just replace the stock side lvl files and be done with it. Such are our limitations.
I have noticed that you are posting on Gametoast. As you have found, there are people that mod SWBF2 there that have a certain attitude about modding SWBF. I try to stay away from them. It is impossible to convince them that some people still prefer SWBF and they will make negative comments regarding the game we like to play and mod here.
Quote from: BucklerIf you want all of the stock maps to have custom sides, you can do a stock mission.lvl replacement. But then you might as well just replace the stock side lvl files and be done with it. Such are our limitations.
I have noticed that you are posting on Gametoast. As you have found, there are people that mod SWBF2 there that have a certain attitude about modding SWBF. I try to stay away from them. It is impossible to convince them that some people still prefer SWBF and they will make negative comments regarding the game we like to play and mod here.
Even if I were to replace the sides, they would only use the original units that I edited. Not the ones I added to the side. How would I tell the game that i'd like to use a specific unit on a certain map?
For Example: I added Geonosis Droids (Exact duplicates of the original units, just different skins) I'd like to use these units on Geonosis: Spire and Kamino: Topica City, what would I need to do in order for that to work?
They can be a bit thick skulled when it comes to Battlefront I. But they do their best to help.
Quote from: Glitch on January 26, 2013, 07:06:33 AM
Even if I were to replace the sides, they would only use the original units that I edited. Not the ones I added to the side. How would I tell the game that i'd like to use a specific unit on a certain map?
For Example: I added Geonosis Droids (Exact duplicates of the original units, just different skins) I'd like to use these units on Geonosis: Spire and Kamino: Topica City, what would I need to do in order for that to work?
OK, then what I suggest is that you do a mission.lvl replacement.
The stock mission.lvl file resides in this folder:
C:\Program Files\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC
We have a very nice tool called a Mission Builder by BattleBelk:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=319
It contains all the stock map luas and a munger. Just edit each map lua to call on your new sides,
where ever they may be located. Munge. Replace the stock mission.lvl file.
Quote from: Glitch on January 26, 2013, 07:06:33 AM
They can be a bit thick skulled when it comes to Battlefront I. But they do their best to help.
Some of them do their best to help, but some go out of their way to not help. Anyway, enough said on that ;)
-Munged the script. (Added dc: to the correct locations within all the CW .lua files)
-Munged the side. (No recent changes, worked in game when cis.lvl was replaced without the new mission.lvl)
-Backed up the original cis.lvl and mission.lvl
-Replaced both, tested in game with SPTest.exe
-Crashes on all CW missions, runs on GCW missions.
-SPTest.exe did not generate any error log, just this "Opened logfile BFront.log 2013-01-29 1505"
:confused:
Did you specify your new CIS units in each LUA ?
-- Start sidelvls
--no dc:SIDE if using stock file replacement
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",10)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
Geonosis Droid Skin Setup
[spoiler]
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
"cis_fly_fedcoreship_dome",
"cis_fly_geofighter",
"cis_fly_techounion_dome",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
"cis_walk_spider")
-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_geo",11)
AddUnitClass(CIS, "cis_inf_assault_geo",3)
AddUnitClass(CIS, "cis_inf_pilotdroid_geo",4)
AddUnitClass(CIS, "cis_inf_assassindroid_geo",4)
AddUnitClass(CIS, "cis_inf_droideka",3)
SetHeroClass(CIS, "cis_inf_countdooku")[/spoiler]
Standard Droid Skin Setup
[spoiler]
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
-- CIS Stats
SetTeamName(CIS, "CIS");
SetTeamIcon(CIS, "cis_icon");
AddUnitClass(CIS, "cis_inf_battledroid",11)
AddUnitClass(CIS, "cis_inf_assault",3)
AddUnitClass(CIS, "cis_inf_pilotdroid",4)
AddUnitClass(CIS, "cis_inf_assassindroid",4)
AddUnitClass(CIS, "cis_inf_droideka",3)
SetHeroClass(CIS, "cis_inf_countdooku")[/spoiler]
cis_inf_basic.req setup
[spoiler]ucft
{
REQN
{
"class"
"cis_inf_battledroid"
"cis_inf_assault"
"cis_inf_assassindroid"
"cis_inf_pilotdroid"
"cis_inf_battledroid_geo"
"cis_inf_assault_geo"
"cis_inf_assassindroid_geo"
"cis_inf_pilotdroid_geo"
}
}[/spoiler]
it is looking for a side file here:
ReadDataFile("dc:SIDE\\cis.lvl",
which will depend on what the name of the map lua is (and it expects it to reside in Addon, inside of that map lua name folder)
I suggest you rename the side file, for example: Glitch-cis.lvl
then put it in here:
C:\Program Files\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE
and then use this:
ReadDataFile("SIDE\\Glitch-cis.lvl",
then it knows where to find the file, no matter what the map lua name is.
Makes sense, I'll give it a try. Thanks. :happy:
Edit: It worked!! :D
[spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi1049.photobucket.com%2Falbums%2Fs385%2FGlitch025%2F2013-02-01_00025.jpg&hash=e452ceef6df04c8a2627ef5610e4d1ce58d4e6fe)
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi1049.photobucket.com%2Falbums%2Fs385%2FGlitch025%2F2013-02-01_00022.jpg&hash=9abce6cffd1cbe6a0f1b851cc50f83373e5c03fd)
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi1049.photobucket.com%2Falbums%2Fs385%2FGlitch025%2F2013-02-01_00006.jpg&hash=7bba74ff663311067ce6ee422c9d812a5b27f4ff)
(https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi1049.photobucket.com%2Falbums%2Fs385%2FGlitch025%2F2013-02-01_00002.jpg&hash=3c06fc6a89d1e6ade9aa5cd73864c8b7c86d57ab)[/spoiler]
The very last thing I need assistance with is the removal of the GSM map in instant action. (Every time I attempt this it crashes, I'm not sure if i'm missing something or its a bit different for BF1)
Quote from: Glitch on January 31, 2013, 06:41:18 PM
The very last thing I need assistance with is the removal of the GSM map in instant action. (Every time I attempt this it crashes, I'm not sure if i'm missing something or its a bit different for BF1)
make sure none of you map LUA use anything that resides in the GSM folder. Look for any GSM.lua or anything in any other LUA that uses dc:GSM\\something.
Yep, that fixed it, GSM was removed from the playlist. Thanks! :D Do you think the localization will still work without the addon being present in the instant action menu? Hmmm, I'll experiment with that tomorrow.