Hey guys, since AG made that topic on ODF editing, I figured I might as well go through an LUA file with you.
In case you don't know, whenever a map is loaded, its LUA script is run. The job of the LUA is to load the map data and make sure there is enough memory available for the map. For most maps, there are 2 or 3 LUA files. 1 to load the game in each era, and 1 to add the map to the list of maps.
FYI this is a WIP so not every part of the LUA will be explained
Note: any time you see ***, replace it with your map id
First of all, you will find the LUA scripts in BFBuilder\Data***\Common\Scripts\***
***a.lua or ***i.lua are the GCW scripts. ***c.lua or ***r.lua are the CW scripts. There is also an addme.lua which eventually becomes addme.script, but I'm not going to go through that right now.
Now, I will explain a normal mod map LUA file line by line.
NOTE: This is the CW file. The GCW one is the same in terms of concept.
--start header -- This is a comment. Does not have any impact on the final script
function ScriptInit() -- tells the game that this is where the map loader begins
local CIS = 1 -- Script constants. Best not to touch these
local REP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(REP,"red", "level.rya1.objectives.1"); -- The map objectives shown on the select unit screen. REP means it is shown to the Clones, red doesn't really mean anything, and "level.rya1..." is the language key displayed. (Don't ask about language keys in this topic)
AddMissionObjective(REP,"orange", "level.rya1.objectives.2");
AddMissionObjective(REP,"orange", "level.rya1.objectives.3");
AddMissionObjective(CIS,"red", "level.rya1.objectives.1");
AddMissionObjective(CIS,"orange", "level.rya1.objectives.2");
AddMissionObjective(CIS,"orange","level.rya1.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1cw"); -- loads the map-specific sound files. Unless you plan on recording a whole new sound set, this should work just fine for you
--end soundlvl
-- Start sidelvls
ReadDataFile("SIDE\\cis.lvl", -- load the data file for the droids
"cis_inf_basic", -- the main 4 troopers
"cis_inf_countdooku", -- plus the jedi
"cis_inf_droideka"); -- plus the 5th trooper
ReadDataFile("SIDE\\rep.lvl", -- same as above but for clones
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS") -- Sets the name of the team
SetTeamIcon(CIS, "cis_icon") -- Sets the icon used for the team
AddUnitClass(CIS, "cis_inf_battledroid",10) -- Adds the unit to the troop options. CIS means it's a droid, "cis_inf..." is which unit it is, and the number is how many of them are on the field as AI
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") -- Adds the jedi unit. Basically same as above
SetTeamName(REP, "Republic") -- See above but for clones
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) -- Number of AI on the field at once in SP. Ignored in MP
SetReinforcementCount(ATT, 200) -- Number of reinforcements
SetUnitCount(DEF, 16) -- See above
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1) -- AI stuff. No need to change unless adding natives
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
--start memorypools
ClearWalkers() -- Reset defaults on memory
AddWalkerType(0, 4)-- special -> droidekas -- Allocates the memory for a walker (AT-TE etc). First number is pairs of legs. 0 means droideka. Second number MUST be equal to number on the field at any one time. Not sure if it is adjusted when humans use dekas
AddWalkerType(1, 4)-- 1x2 (1 pair of legs) -- see above
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60) -- Allocates the memory for other items. Not making a full list of options. First is entity type, second is max on the field at once
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:rya1\\rya1.lvl") -- Read in the actual map.
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25) -- Max and Min spawn delay, respectively
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false") -- Changes some rendering options. Set to true on maps like endor
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
AddDeathRegion("deathregion") -- added this to the file because of importance. Any region you add in Zeroeditor that you want people to die in upon entry must have a copy of this
--end deathregions
--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatcw_music"); -- Load the audio from an LVL file. first argument is the path to the file, second is the audio stream in the file
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); -- Sound to play when a team has 2 CPs or less. First argument is the team to play it for, second is what team must have the low CP count, 3rd is the name of the audio entry in one of the streams listed above, and I need help with the 4th
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);-- Same format as above, plays when there are less than 20 reinforcements left for a team
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"); -- Sound to play when a player goes out of bounds. First is the team ID, second is the audio name
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(CIS,1.0,"cis_tat_amb_start",0,1);-- Backround music to be played throughout the game. First is the team to play it for, second is the percentage of reinforcements remaining to start the music, 3rd is the audio name, and 4th and 5th I don't know
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");-- Music to play on Victory/Defeat. You should know the format by now
SetDefeatMusic (CIS,"cis_tat_amb_defeat");
SetVictoryMusic(REP,"rep_tat_amb_victory");
SetDefeatMusic (REP,"rep_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");-- Sets up a sound effect. First is the event for the effect, second is the audio name
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");-- Sound to play when a planetary bonus is activated in Galactic Conquest. First is the team to play it for, second is the team who got the bonus, 3rd is the bonus id, and 4th is the audio name
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);-- Adds a camera location to see during the spawn timer. freecam in SPTest can tell you the values for this (use fake console to get camera coordinates)
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 -- Pass control back to the main game
--end footer
A few important notes:
ALL paths to files MUST use double slashes!!!! The game will go wacky if you don't use them
To access files specific to your mod, prefix the path to an lvl with "dc:". Without that, it will go to the main _lvl_pc folder under GameData
Advanced LUA coming soon!
In case you don't know, whenever a map is loaded, its LUA script is run. The job of the LUA is to load the map data and make sure there is enough memory available for the map. For most maps, there are 2 or 3 LUA files. 1 to load the game in each era, and 1 to add the map to the list of maps.
FYI this is a WIP so not every part of the LUA will be explained
Note: any time you see ***, replace it with your map id
First of all, you will find the LUA scripts in BFBuilder\Data***\Common\Scripts\***
***a.lua or ***i.lua are the GCW scripts. ***c.lua or ***r.lua are the CW scripts. There is also an addme.lua which eventually becomes addme.script, but I'm not going to go through that right now.
Now, I will explain a normal mod map LUA file line by line.
NOTE: This is the CW file. The GCW one is the same in terms of concept.
--start header -- This is a comment. Does not have any impact on the final script
function ScriptInit() -- tells the game that this is where the map loader begins
local CIS = 1 -- Script constants. Best not to touch these
local REP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(REP,"red", "level.rya1.objectives.1"); -- The map objectives shown on the select unit screen. REP means it is shown to the Clones, red doesn't really mean anything, and "level.rya1..." is the language key displayed. (Don't ask about language keys in this topic)
AddMissionObjective(REP,"orange", "level.rya1.objectives.2");
AddMissionObjective(REP,"orange", "level.rya1.objectives.3");
AddMissionObjective(CIS,"red", "level.rya1.objectives.1");
AddMissionObjective(CIS,"orange", "level.rya1.objectives.2");
AddMissionObjective(CIS,"orange","level.rya1.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1cw"); -- loads the map-specific sound files. Unless you plan on recording a whole new sound set, this should work just fine for you
--end soundlvl
-- Start sidelvls
ReadDataFile("SIDE\\cis.lvl", -- load the data file for the droids
"cis_inf_basic", -- the main 4 troopers
"cis_inf_countdooku", -- plus the jedi
"cis_inf_droideka"); -- plus the 5th trooper
ReadDataFile("SIDE\\rep.lvl", -- same as above but for clones
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
--end sidelvls
--start loadouts
SetTeamName(CIS, "CIS") -- Sets the name of the team
SetTeamIcon(CIS, "cis_icon") -- Sets the icon used for the team
AddUnitClass(CIS, "cis_inf_battledroid",10) -- Adds the unit to the troop options. CIS means it's a droid, "cis_inf..." is which unit it is, and the number is how many of them are on the field as AI
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") -- Adds the jedi unit. Basically same as above
SetTeamName(REP, "Republic") -- See above but for clones
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) -- Number of AI on the field at once in SP. Ignored in MP
SetReinforcementCount(ATT, 200) -- Number of reinforcements
SetUnitCount(DEF, 16) -- See above
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1) -- AI stuff. No need to change unless adding natives
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances
--start memorypools
ClearWalkers() -- Reset defaults on memory
AddWalkerType(0, 4)-- special -> droidekas -- Allocates the memory for a walker (AT-TE etc). First number is pairs of legs. 0 means droideka. Second number MUST be equal to number on the field at any one time. Not sure if it is adjusted when humans use dekas
AddWalkerType(1, 4)-- 1x2 (1 pair of legs) -- see above
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60) -- Allocates the memory for other items. Not making a full list of options. First is entity type, second is max on the field at once
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:rya1\\rya1.lvl") -- Read in the actual map.
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25) -- Max and Min spawn delay, respectively
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false") -- Changes some rendering options. Set to true on maps like endor
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
AddDeathRegion("deathregion") -- added this to the file because of importance. Any region you add in Zeroeditor that you want people to die in upon entry must have a copy of this
--end deathregions
--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatcw_music"); -- Load the audio from an LVL file. first argument is the path to the file, second is the audio stream in the file
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); -- Sound to play when a team has 2 CPs or less. First argument is the team to play it for, second is what team must have the low CP count, 3rd is the name of the audio entry in one of the streams listed above, and I need help with the 4th
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);-- Same format as above, plays when there are less than 20 reinforcements left for a team
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"); -- Sound to play when a player goes out of bounds. First is the team ID, second is the audio name
SetOutOfBoundsVoiceOver(1,"Impleaving");
SetAmbientMusic(CIS,1.0,"cis_tat_amb_start",0,1);-- Backround music to be played throughout the game. First is the team to play it for, second is the percentage of reinforcements remaining to start the music, 3rd is the audio name, and 4th and 5th I don't know
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");-- Music to play on Victory/Defeat. You should know the format by now
SetDefeatMusic (CIS,"cis_tat_amb_defeat");
SetVictoryMusic(REP,"rep_tat_amb_victory");
SetDefeatMusic (REP,"rep_tat_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");-- Sets up a sound effect. First is the event for the effect, second is the audio name
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");-- Sound to play when a planetary bonus is activated in Galactic Conquest. First is the team to play it for, second is the team who got the bonus, 3rd is the bonus id, and 4th is the audio name
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);-- Adds a camera location to see during the spawn timer. freecam in SPTest can tell you the values for this (use fake console to get camera coordinates)
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 -- Pass control back to the main game
--end footer
A few important notes:
ALL paths to files MUST use double slashes!!!! The game will go wacky if you don't use them
To access files specific to your mod, prefix the path to an lvl with "dc:". Without that, it will go to the main _lvl_pc folder under GameData
Advanced LUA coming soon!