addme.lua Setup

Started by Glitch, January 24, 2013, 11:01:25 AM

Previous topic - Next topic
January 24, 2013, 07:29:18 PM #15 Last Edit: January 24, 2013, 07:36:37 PM by Buckler
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.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 25, 2013, 03:01:21 AM #16 Last Edit: January 25, 2013, 03:21:32 AM by Glitch
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.
Quote: At times of chaos, humans are subjected to emotion rather than logic.

January 25, 2013, 04:25:58 AM #17 Last Edit: January 25, 2013, 07:07:33 AM by Buckler
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







Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 25, 2013, 12:22:43 PM #18 Last Edit: January 25, 2013, 03:06:58 PM by Glitch
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]
Edit: Added second screenshot with more localization
[/spoiler]

The skin change worked (Standard to Geonosis)
The localization change worked.

Quote: At times of chaos, humans are subjected to emotion rather than logic.

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

January 25, 2013, 06:21:14 PM #20 Last Edit: January 25, 2013, 06:25:38 PM by Glitch
Thanks -RepublicCommando-! :D I just need to enable the custom units on stock maps and it's pretty much complete.
Quote: At times of chaos, humans are subjected to emotion rather than logic.

Cool, looks like you are in business!
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 25, 2013, 07:54:04 PM #22 Last Edit: January 25, 2013, 07:56:04 PM by Glitch
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?
Quote: At times of chaos, humans are subjected to emotion rather than logic.

January 25, 2013, 08:08:31 PM #23 Last Edit: January 25, 2013, 08:11:20 PM by Buckler
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?
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

January 25, 2013, 08:22:00 PM #24 Last Edit: January 25, 2013, 08:24:36 PM by Glitch
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?
Quote: At times of chaos, humans are subjected to emotion rather than logic.

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!)

January 25, 2013, 09:29:25 PM #26 Last Edit: January 25, 2013, 09:35:44 PM by Glitch
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][/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]
Quote: At times of chaos, humans are subjected to emotion rather than logic.

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)
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

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.