SOLVED: adding CIS and REP to hoth escape

Started by Led, December 30, 2011, 04:10:22 PM

Previous topic - Next topic
December 30, 2011, 04:10:22 PM Last Edit: December 31, 2011, 07:38:55 AM by Buckler
Hi,

I am working on the mission file for adding CIS and REP units to Hoth Escape.  I have the units showing up, but no x-wings show up.  (The map was only set to spawn GCW vehicles, so getting CW ships to spawn will not be easily possible.)

Any ideas?  Here is my current mission.lua called hoth6a.lua:

BTW, this file with GCW era units does spawn x-wings and ties, etc.



---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
--  Empire Attacking (attacker is always #1)
    local ALL = 1
    local IMP = 2
    local REP = 1
    local CIS = 2
--  These variables do not change
    local ATT = 1
    local DEF = 2


AddMissionObjective(IMP,"red", "level.hoth6.objectives.1");
AddMissionObjective(IMP,"orange", "level.hoth6.objectives.2");
--AddMissionObjective(IMP,"orange", "level.hoth6.objectives.3");
AddMissionObjective(ALL,"red", "level.hoth6.objectives.1");
AddMissionObjective(ALL,"orange", "level.hoth6.objectives.2");
--AddMissionObjective(ALL,"orange","level.hoth6.objectives.3");






    SetTeamAggressiveness(ALL, 1.0)
    SetTeamAggressiveness(IMP, 1.0)

      ReadDataFile("sound\\bes.lvl;bes1cw");

    ReadDataFile("SIDE\\all.lvl",
        "all_fly_xwing",
        "all_fly_ywing",
        "all_inf_basicurban",
        "all_inf_lukeskywalker",
        "all_inf_smuggler");
    ReadDataFile("SIDE\\imp.lvl",
        "imp_fly_tiebomber",
        "imp_fly_tiefighter",
        "imp_inf_basic_tie",
        "imp_inf_dark_trooper",
        "imp_inf_darthvader");


    ReadDataFile("SIDE\\cis.lvl",       
        "cis_inf_basic",
        "cis_inf_countdooku",
        "cis_inf_droideka");
    ReadDataFile("SIDE\\rep.lvl",
        "rep_inf_basic",
        "rep_inf_jet_trooper",
        "rep_inf_macewindu");





--    Republic Stats
      SetTeamName(REP, "Republic");
      SetTeamIcon(REP, "rep_icon");
      AddUnitClass(REP, "rep_inf_clone_trooper",11)
      AddUnitClass(REP, "rep_inf_arc_trooper",5)
      AddUnitClass(REP, "rep_inf_clone_pilot",5)
      AddUnitClass(REP, "rep_inf_clone_sharpshooter",4)
      AddUnitClass(REP, "rep_inf_jet_trooper",3)
      SetHeroClass(REP, "rep_inf_macewindu")



--  CIS Stats
      SetTeamName(CIS, "CIS");
      SetTeamIcon(CIS, "cis_icon");
     AddUnitClass(CIS, "cis_inf_battledroid",11)
      AddUnitClass(CIS, "cis_inf_assault",5)
      AddUnitClass(CIS, "cis_inf_pilotdroid",5)
      AddUnitClass(CIS, "cis_inf_assassindroid",4)
      AddUnitClass(CIS, "cis_inf_droideka",3)
      SetHeroClass(CIS, "cis_inf_countdooku")





--  Attacker Stats
    SetUnitCount(ATT, 28)
    SetReinforcementCount(ATT, 100)
    AddBleedThreshold(ATT, 31, 0.0)
    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 2.25)
    AddBleedThreshold(ATT, 1, 3.0)

--  Defender Stats
    SetUnitCount(DEF, 28)
    SetReinforcementCount(DEF, 100)
    AddBleedThreshold(DEF, 31, 0.0)
    AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 2.25)
    AddBleedThreshold(DEF, 1, 3.0)

--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize ("EntityWalker",0)
    AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
    AddWalkerType(1, 0) --
    AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
    AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each

    SetMemoryPoolSize ("CommandWalker",0)
    SetMemoryPoolSize("EntityFlyer", 32)
    SetMemoryPoolSize("FlyGotoHelper", 64)
    SetMemoryPoolSize("EntityHover", 0)
    SetMemoryPoolSize("EntityCarrier", 0)
    SetMemoryPoolSize("MountedTurret", 36)
    SetMemoryPoolSize("EntityBuildingArmedDynamic", 0)
    SetMemoryPoolSize("PowerupItem", 40)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 250)
    SetMemoryPoolSize("Obstacle", 550)

    SetSpawnDelay(5.0, 0.25)
--    ReadDataFile("bes\\bes1.lvl")
    ReadDataFile("dc:hoth6\\hoth6.lvl")
    SetDenseEnvironment("false")

    SetMinFlyHeight(120)
    SetMaxFlyHeight(520)
    SetMinPlayerFlyHeight(0)
    SetMaxPlayerFlyHeight(520)

    SetAIVehicleNotifyRadius(64)
    SetStayInTurrets(1)

--  Birdies
    SetNumBirdTypes(1);
    SetBirdType(0,1.0,"bird");

--  Sound
    OpenAudioStream("sound\\bes.lvl",  "bes1cw_music");
    OpenAudioStream("sound\\cw.lvl",  "cw_tac_vo");
    OpenAudioStream("Sound\\cw.lvl", "cw_vo");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("sound\\bes.lvl",  "bes1");

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1);
    SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1);

    SetOutOfBoundsVoiceOver(1, "repleaving");
    SetOutOfBoundsVoiceOver(2, "cisleaving");

    SetAmbientMusic(REP, 1.0, "rep_bes_amb_start",  0,1);
    SetAmbientMusic(REP, 0.99, "rep_bes_amb_middle", 1,1);
    SetAmbientMusic(REP, 0.1,"rep_bes_amb_end",    2,1);
    SetAmbientMusic(CIS, 1.0, "cis_bes_amb_start",  0,1);
    SetAmbientMusic(CIS, 0.99, "cis_bes_amb_middle", 1,1);
    SetAmbientMusic(CIS, 0.1,"cis_bes_amb_end",    2,1);

    SetVictoryMusic(REP, "rep_bes_amb_victory");
    SetDefeatMusic (REP, "rep_bes_amb_defeat");
    SetVictoryMusic(CIS, "cis_bes_amb_victory");
    SetDefeatMusic (CIS, "cis_bes_amb_defeat");

    SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin");
    SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout");
    --SetSoundEffect("WeaponUnableSelect",  "com_weap_inf_weaponchange_null");
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null");
    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(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

    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





    SetAttackingTeam(ATT);

--  Camera Stats
--Bes1 Platforms
--Platform Sky
AddCameraShot(0.793105, -0.062986, -0.603918, -0.047962, -170.583618, 118.981544, -150.443253);
--Control Room
AddCameraShot(0.189716, 0.000944, -0.981826, 0.004887, -27.594292, 100.583740, -176.478012);
--Extractor
AddCameraShot(0.492401, 0.010387, -0.870113, 0.018354, 19.590666, 100.493599, -47.846901);

end



Can I read in multiple sides like this and mix them?  Or do I need to make all new side files?


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

Since its CW era first get rid of
Local ALL = 1
Local IMP = 2

and then for
Local REP = 1
Local CIS = 2

try reversing the numbers so its like
Local REP = 2
Local CIS = 1

See how that works.
Current Projects:
Battlefront One and a Half Era Mod, v2.0. Making great progress (SWBF)

Thanks j-dee, but it didn't work. :(

(The CPs of the teams were switched, but still no xwings.)

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

IF you followed what jdee said with doing this.

Local REP = 2
Local CIS = 1

Change it to this

Local ALL = 2
Local IMP = 1

So the numbers are the other way round that should get it working. The ODF commands used to add vehciles to maps kind of depend on those being the right way round. And are era specific so it must be ALL and IMP for them to show up, and they must be defining the right varible either 1 or 2.

December 30, 2011, 08:04:48 PM #4 Last Edit: December 30, 2011, 08:37:12 PM by Buckler
OK, I will try the combinations and edit this post until I get it right.

edit:  nothing worked.  My understanding of loading multiple stock sides is lacking.  Any other ideas?





this one did not work:

  local ALL = 2
   local IMP = 1
      local REP = 2
      local CIS = 1


this one did not work:

   local ALL = 1
   local IMP = 2
      local REP = 2
      local CIS = 1

this one did not work:

   local ALL = 1
   local IMP = 2
      local REP = 1
      local CIS = 2


and the last one did not work:


   local ALL = 2
   local IMP = 1
      local REP = 1
      local CIS = 2
---------------------------------
OK, so none of those things worked.

The interesting thing is that in the GCW era

   local ALL = 1
    local IMP = 2

works, but

   local ALL = 2
    local IMP = 1

doesn't, so I would have thought that either option 2 or 3 would have worked.  I will next try switching
  local ATT = 1
    local DEF = 2
for options 2 and 3

----------------------
this did not work:

   local ALL = 1
   local IMP = 2
      local REP = 1
      local CIS = 2

--  These variables do not change
    local ATT = 2
    local DEF = 1

and this did not work:
  local ALL = 1
   local IMP = 2
      local REP = 2
      local CIS = 1

--  These variables do not change
    local ATT = 2
    local DEF = 1






---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
--  Empire Attacking (attacker is always #1)
--  local ALL = 1
--   local IMP = 2


   local ALL = 2
   local IMP = 1



      local REP = 2
      local CIS = 1




--  These variables do not change
    local ATT = 1
    local DEF = 2


AddMissionObjective(IMP,"red", "level.hoth6.objectives.1");
AddMissionObjective(IMP,"orange", "level.hoth6.objectives.2");

AddMissionObjective(ALL,"red", "level.hoth6.objectives.1");
AddMissionObjective(ALL,"orange", "level.hoth6.objectives.2");


    SetTeamAggressiveness(ALL, 1.0)
    SetTeamAggressiveness(IMP, 1.0)

      ReadDataFile("sound\\bes.lvl;bes1cw");



    ReadDataFile("SIDE\\cis.lvl",       
        "cis_inf_basic",
        "cis_inf_countdooku",
        "cis_inf_droideka");
    ReadDataFile("SIDE\\rep.lvl",
        "rep_inf_basic",
        "rep_inf_jet_trooper",
        "rep_inf_macewindu");



    ReadDataFile("SIDE\\all.lvl",
        "all_fly_xwing",
        "all_fly_ywing");
    ReadDataFile("SIDE\\imp.lvl",
        "imp_fly_tiebomber",
        "imp_fly_tiefighter",
        "imp_inf_basic_tie");

 

--    Republic Stats
      SetTeamName(REP, "Republic");
      SetTeamIcon(REP, "rep_icon");
      AddUnitClass(REP, "rep_inf_clone_trooper",11)
      AddUnitClass(REP, "rep_inf_arc_trooper",5)
      AddUnitClass(REP, "rep_inf_clone_pilot",5)
      AddUnitClass(REP, "rep_inf_clone_sharpshooter",4)
      AddUnitClass(REP, "rep_inf_jet_trooper",3)
      SetHeroClass(REP, "rep_inf_macewindu")



--  CIS Stats
      SetTeamName(CIS, "CIS");
      SetTeamIcon(CIS, "cis_icon");
     AddUnitClass(CIS, "cis_inf_battledroid",11)
      AddUnitClass(CIS, "cis_inf_assault",5)
      AddUnitClass(CIS, "cis_inf_pilotdroid",5)
      AddUnitClass(CIS, "cis_inf_assassindroid",4)
      AddUnitClass(CIS, "cis_inf_droideka",3)
      SetHeroClass(CIS, "cis_inf_countdooku")





--  Attacker Stats
    SetUnitCount(ATT, 28)
    SetReinforcementCount(ATT, 100)
    AddBleedThreshold(ATT, 31, 0.0)
    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 2.25)
    AddBleedThreshold(ATT, 1, 3.0)

--  Defender Stats
    SetUnitCount(DEF, 28)
    SetReinforcementCount(DEF, 100)
    AddBleedThreshold(DEF, 31, 0.0)
    AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 2.25)
    AddBleedThreshold(DEF, 1, 3.0)

--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize ("EntityWalker",0)
    AddWalkerType(0, 8) -- 8 droidekas (special case: 0 leg pairs)
    AddWalkerType(1, 0) --
    AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
    AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each

    SetMemoryPoolSize ("CommandWalker",0)
    SetMemoryPoolSize("EntityFlyer", 64)
    SetMemoryPoolSize("FlyGotoHelper", 64)
    SetMemoryPoolSize("EntityHover", 0)
    SetMemoryPoolSize("EntityCarrier", 0)
    SetMemoryPoolSize("MountedTurret", 36)
    SetMemoryPoolSize("EntityBuildingArmedDynamic", 0)
    SetMemoryPoolSize("PowerupItem", 40)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 250)
    SetMemoryPoolSize("Obstacle", 550)

    SetSpawnDelay(5.0, 0.25)
--    ReadDataFile("bes\\bes1.lvl")
    ReadDataFile("dc:hoth6\\hoth6.lvl")
    SetDenseEnvironment("false")

    SetMinFlyHeight(120)
    SetMaxFlyHeight(520)
    SetMinPlayerFlyHeight(0)
    SetMaxPlayerFlyHeight(520)

    SetAIVehicleNotifyRadius(64)
    SetStayInTurrets(1)

--  Birdies
    SetNumBirdTypes(1);
    SetBirdType(0,1.0,"bird");

--  Sound
    OpenAudioStream("sound\\bes.lvl",  "bes1cw_music");
    OpenAudioStream("sound\\cw.lvl",  "cw_tac_vo");
    OpenAudioStream("Sound\\cw.lvl", "cw_vo");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("sound\\bes.lvl",  "bes1");

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1);
    SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1);

    SetOutOfBoundsVoiceOver(1, "repleaving");
    SetOutOfBoundsVoiceOver(2, "cisleaving");

    SetAmbientMusic(REP, 1.0, "rep_bes_amb_start",  0,1);
    SetAmbientMusic(REP, 0.99, "rep_bes_amb_middle", 1,1);
    SetAmbientMusic(REP, 0.1,"rep_bes_amb_end",    2,1);
    SetAmbientMusic(CIS, 1.0, "cis_bes_amb_start",  0,1);
    SetAmbientMusic(CIS, 0.99, "cis_bes_amb_middle", 1,1);
    SetAmbientMusic(CIS, 0.1,"cis_bes_amb_end",    2,1);

    SetVictoryMusic(REP, "rep_bes_amb_victory");
    SetDefeatMusic (REP, "rep_bes_amb_defeat");
    SetVictoryMusic(CIS, "cis_bes_amb_victory");
    SetDefeatMusic (CIS, "cis_bes_amb_defeat");

    SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin");
    SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout");
    --SetSoundEffect("WeaponUnableSelect",  "com_weap_inf_weaponchange_null");
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null");
    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(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

    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





    SetAttackingTeam(ATT);

--  Camera Stats
--Bes1 Platforms
--Platform Sky
AddCameraShot(0.793105, -0.062986, -0.603918, -0.047962, -170.583618, 118.981544, -150.443253);
--Control Room
AddCameraShot(0.189716, 0.000944, -0.981826, 0.004887, -27.594292, 100.583740, -176.478012);
--Extractor
AddCameraShot(0.492401, 0.010387, -0.870113, 0.018354, 19.590666, 100.493599, -47.846901);

end


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

December 31, 2011, 07:42:01 AM #5 Last Edit: December 31, 2011, 08:57:03 AM by Buckler
OK, I got it.

It turns out that the vehicle spawns actually look at the NAME of the faction "Alliance" or "Empire" to spawn vehicles.


like this:

--    Republic Stats
      SetTeamName(REP, "Empire");
      SetTeamIcon(REP, "rep_icon");
      AddUnitClass(REP, "rep_inf_clone_trooper",11)
      AddUnitClass(REP, "rep_inf_arc_trooper",5)
      AddUnitClass(REP, "rep_inf_clone_pilot",5)
      AddUnitClass(REP, "rep_inf_clone_sharpshooter",4)
      AddUnitClass(REP, "rep_inf_jet_trooper",3)
      SetHeroClass(REP, "rep_inf_macewindu")







Below is the working mission file.




---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
--  Empire Attacking (attacker is always #1)
--  local ALL = 1
--   local IMP = 2


   local ALL = 1
   local IMP = 2



      local REP = 2
      local CIS = 1




--  These variables do not change
    local ATT = 1
    local DEF = 2


AddMissionObjective(IMP,"red", "level.hoth6.objectives.1");
AddMissionObjective(IMP,"orange", "level.hoth6.objectives.2");

AddMissionObjective(ALL,"red", "level.hoth6.objectives.1");
AddMissionObjective(ALL,"orange", "level.hoth6.objectives.2");


    SetTeamAggressiveness(ALL, 1.0)
    SetTeamAggressiveness(IMP, 1.0)

      ReadDataFile("sound\\bes.lvl;bes1cw");



    ReadDataFile("SIDE\\cis.lvl",       
        "cis_inf_basic",
        "cis_inf_countdooku",
        "cis_inf_droideka");
    ReadDataFile("SIDE\\rep.lvl",
        "rep_inf_basic",
        "rep_inf_jet_trooper",
        "rep_inf_macewindu");



    ReadDataFile("SIDE\\all.lvl",
        "all_fly_xwing",
        "all_fly_ywing");
    ReadDataFile("SIDE\\imp.lvl",
        "imp_fly_tiebomber",
        "imp_fly_tiefighter",
        "imp_inf_basic_tie");

 

--    Republic Stats
      SetTeamName(REP, "Empire");
      SetTeamIcon(REP, "rep_icon");
      AddUnitClass(REP, "rep_inf_clone_trooper",11)
      AddUnitClass(REP, "rep_inf_arc_trooper",5)
      AddUnitClass(REP, "rep_inf_clone_pilot",5)
      AddUnitClass(REP, "rep_inf_clone_sharpshooter",4)
      AddUnitClass(REP, "rep_inf_jet_trooper",3)
      SetHeroClass(REP, "rep_inf_macewindu")



--  CIS Stats
      SetTeamName(CIS, "Alliance");
      SetTeamIcon(CIS, "cis_icon");
     AddUnitClass(CIS, "cis_inf_battledroid",11)
      AddUnitClass(CIS, "cis_inf_assault",5)
      AddUnitClass(CIS, "cis_inf_pilotdroid",5)
      AddUnitClass(CIS, "cis_inf_assassindroid",4)
      AddUnitClass(CIS, "cis_inf_droideka",3)
      SetHeroClass(CIS, "cis_inf_countdooku")





--  Attacker Stats
    SetUnitCount(ATT, 28)
    SetReinforcementCount(ATT, 100)
    AddBleedThreshold(ATT, 31, 0.0)
    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 2.25)
    AddBleedThreshold(ATT, 1, 3.0)

--  Defender Stats
    SetUnitCount(DEF, 28)
    SetReinforcementCount(DEF, 100)
    AddBleedThreshold(DEF, 31, 0.0)
    AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 2.25)
    AddBleedThreshold(DEF, 1, 3.0)

--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize ("EntityWalker",0)
    AddWalkerType(0, 8) -- 8 droidekas (special case: 0 leg pairs)
    AddWalkerType(1, 0) --
    AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
    AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each

    SetMemoryPoolSize ("CommandWalker",0)
    SetMemoryPoolSize("EntityFlyer", 64)
    SetMemoryPoolSize("FlyGotoHelper", 64)
    SetMemoryPoolSize("EntityHover", 0)
    SetMemoryPoolSize("EntityCarrier", 0)
    SetMemoryPoolSize("MountedTurret", 36)
    SetMemoryPoolSize("EntityBuildingArmedDynamic", 0)
    SetMemoryPoolSize("PowerupItem", 40)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 250)
    SetMemoryPoolSize("Obstacle", 550)

    SetSpawnDelay(5.0, 0.25)
--    ReadDataFile("bes\\bes1.lvl")
    ReadDataFile("dc:hoth6\\hoth6.lvl")
    SetDenseEnvironment("false")

    SetMinFlyHeight(120)
    SetMaxFlyHeight(520)
    SetMinPlayerFlyHeight(0)
    SetMaxPlayerFlyHeight(520)

    SetAIVehicleNotifyRadius(64)
    SetStayInTurrets(1)

--  Birdies
    SetNumBirdTypes(1);
    SetBirdType(0,1.0,"bird");

--  Sound
    OpenAudioStream("sound\\bes.lvl",  "bes1cw_music");
    OpenAudioStream("sound\\cw.lvl",  "cw_tac_vo");
    OpenAudioStream("Sound\\cw.lvl", "cw_vo");
    OpenAudioStream("sound\\bes.lvl",  "bes1");
    OpenAudioStream("sound\\bes.lvl",  "bes1");

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1);
    SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1);
    SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1);

    SetOutOfBoundsVoiceOver(1, "repleaving");
    SetOutOfBoundsVoiceOver(2, "cisleaving");

    SetAmbientMusic(REP, 1.0, "rep_bes_amb_start",  0,1);
    SetAmbientMusic(REP, 0.99, "rep_bes_amb_middle", 1,1);
    SetAmbientMusic(REP, 0.1,"rep_bes_amb_end",    2,1);
    SetAmbientMusic(CIS, 1.0, "cis_bes_amb_start",  0,1);
    SetAmbientMusic(CIS, 0.99, "cis_bes_amb_middle", 1,1);
    SetAmbientMusic(CIS, 0.1,"cis_bes_amb_end",    2,1);

    SetVictoryMusic(REP, "rep_bes_amb_victory");
    SetDefeatMusic (REP, "rep_bes_amb_defeat");
    SetVictoryMusic(CIS, "cis_bes_amb_victory");
    SetDefeatMusic (CIS, "cis_bes_amb_defeat");

    SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin");
    SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout");
    --SetSoundEffect("WeaponUnableSelect",  "com_weap_inf_weaponchange_null");
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null");
    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(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

    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





    SetAttackingTeam(ATT);

--  Camera Stats
--Bes1 Platforms
--Platform Sky
AddCameraShot(0.793105, -0.062986, -0.603918, -0.047962, -170.583618, 118.981544, -150.443253);
--Control Room
AddCameraShot(0.189716, 0.000944, -0.981826, 0.004887, -27.594292, 100.583740, -176.478012);
--Extractor
AddCameraShot(0.492401, 0.010387, -0.870113, 0.018354, 19.590666, 100.493599, -47.846901);

end





note:  the released mission changed a few options from above

here is a video


http://www.xfire.com/video/524d61/

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