[SOLVED] Is This Possible

Started by Jango, March 06, 2010, 04:13:41 PM

Previous topic - Next topic
March 06, 2010, 04:13:41 PM Last Edit: April 01, 2010, 04:03:03 AM by Jango
Is it possible to have 2 local teams in a map? I'm working on enhancing hoth and i want to have probe droids as 1 local team and wampa as another local team. here's something interesting in geonosis's LUA file: --  Local Stats
    SetTeamName(3, "locals")
    AddUnitClass(3, "geo_inf_geonosian", 7)
    SetUnitCount(3, 7)
    SetTeamAsFriend(3, DEF)
    --SetTeamName(4, "locals")
    --AddUnitClass(4, "rep_inf_jedimale",1)
    --AddUnitClass(4, "rep_inf_jedimaleb",1)
    --AddUnitClass(4, "rep_inf_jedimaley",1)
    --SetUnitCount(4, 3)
    --SetTeamAsFriend(4, ATT)
There is no 'ctrl' button on Chuck Norris's computer. Chuck Norris is always in control.

I'm pretty sure it is. gogo12 did it, I believe. You may want to ask him for more details if it involves more than just adding a team 4.


(•̪●)=ε/̵͇̿̿/'̿'̿ ̿ ̿̿ ̿ ̿"" (-_-*)

It works! I was able to have 4 teams at once: rebels, imperials, wampa, and probe droids. YAY!
There is no 'ctrl' button on Chuck Norris's computer. Chuck Norris is always in control.

March 08, 2010, 01:56:40 AM #3 Last Edit: March 08, 2010, 01:58:47 AM by ggctuk
Can you post how you did it? And does Hoth have two sets of spawn points?
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

I took off deathregion in a mission file and saw probe droids, co cool. I can't wait to look at the mission tools closer.

March 08, 2010, 01:40:03 PM #5 Last Edit: March 08, 2010, 07:01:05 PM by Jango
its just like adding a third team but labelling them as team 4. the only problem ive had is that i cant localize their names seprate. ie= when a probe droid kills me it says wampa instead.
-- 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 = 2
    local IMP = 1
--  These variables do not change
    local ATT = 1
    local DEF = 2

    SetAttackingTeam(ATT);

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

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

    SetMaxFlyHeight(100)
    SetMaxPlayerFlyHeight(100)
   
    ReadDataFile("sound\\hot.lvl;hot1gcw");
    ReadDataFile("SIDE\\all.lvl",
        "all_fly_snowspeeder",
        "all_inf_basicsnow",
        "all_inf_lukeskywalkersnow",
        "all_inf_smugglersnow",
        "all_walk_tauntaun")
    ReadDataFile("SIDE\\imp.lvl",
        "imp_inf_basicsnow",
        "imp_inf_dark_troopersnow",
        "imp_inf_darthvader",
        "imp_walk_atat",
        "imp_walk_atst_snow",
        "imp_droid_probe")
    ReadDataFile("dc:SIDE\\snw.lvl",
        "snw_inf_wampa")
    ReadDataFile("dc:SIDE\\Probe.lvl",
        "imp_droid_probe")

--      Alliance Stats
    SetTeamName(ALL, "Alliance")
    SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "all_inf_soldiersnow",14)
    AddUnitClass(ALL, "all_inf_vanguardsnow",3)
    AddUnitClass(ALL, "all_inf_pilot",4)
    AddUnitClass(ALL, "all_inf_marksmansnow",4)
    AddUnitClass(ALL, "all_inf_smugglersnow",3)
    SetHeroClass(ALL, "all_inf_lukeskywalkersnow")

--      Imperial Stats
    SetTeamName(IMP, "Empire")
    SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_storm_troopersnow",14)
    AddUnitClass(IMP, "imp_inf_shock_troopersnow",3)
    AddUnitClass(IMP, "imp_inf_pilotatat",4)
    AddUnitClass(IMP, "imp_inf_scout_troopersnow",4)
    AddUnitClass(IMP, "imp_inf_dark_troopersnow",3)
    SetHeroClass(IMP, "imp_inf_darthvader")

--  Level Stats
    ClearWalkers()
    SetMemoryPoolSize("EntityWalker", -2)
    AddWalkerType(0, 0) -- 0 droidekas
    AddWalkerType(1, 10) -- 6 atsts with 1 leg pairs each
    AddWalkerType(2, 2) -- 2 atats with 2 leg pairs each
    SetMemoryPoolSize("CommandWalker", 2)
    SetMemoryPoolSize("EntityFlyer", 4)
    SetMemoryPoolSize("MountedTurret", 48)
    SetMemoryPoolSize("PowerupItem", 60)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("OrdnanceTowCable", 8) -- need extra for wrapped/fallen cables
    SetMemoryPoolSize("EntityLight", 120)

    ReadDataFile("dc:Hoth\\Hoth.lvl")
    SetSpawnDelay(10.0, 0.25)
    SetDenseEnvironment("false")
    SetDefenderSnipeRange(170)
    AddDeathRegion("Death");

--  Local Stats
    SetTeamName(3, "locals1")
    AddUnitClass(3, "snw_inf_wampa", 4);
    SetUnitCount(3, 4)
    SetTeamAsEnemy(3,DEF)
    SetTeamAsEnemy(3,ATT)

    SetTeamName(4, "locals2")
    AddUnitClass(4, "imp_droid_probe", 4);
    SetUnitCount(4, 4)
    SetTeamAsEnemy(4,DEF)
    SetTeamAsFriend(4,ATT)

--  Attacker Stats
    SetUnitCount(ATT, 28)
    SetReinforcementCount(ATT, 250)
    AddBleedThreshold(ATT, 31, 0.0)
    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 2.25)
    AddBleedThreshold(ATT, 1, 3.0)
    SetTeamAsEnemy(ATT, 3)
    SetTeamAsFriend(ATT, 4)

--  Defender Stats
    SetUnitCount(DEF, 24)
    SetReinforcementCount(DEF, 250)
    AddBleedThreshold(DEF, 31, 0.0)
    AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 2.25)
    AddBleedThreshold(DEF, 1, 3.0)
    SetTeamAsEnemy(DEF, 3)
    SetTeamAsEnemy(DEF, 4)

--  Sound Stats
    OpenAudioStream("sound\\hot.lvl", "hotgcw_music");
    OpenAudioStream("sound\\hot.lvl", "hot1gcw");
    OpenAudioStream("sound\\hot.lvl", "hot1gcw");
    OpenAudioStream("sound\\gcw.lvl", "gcw_vo");
    OpenAudioStream("sound\\gcw.lvl", "gcw_tac_vo");

    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, IMP, "all_hot_transport_away", .75, 1);
    --SetLowReinforcementsVoiceOver(ALL, IMP, "all_hot_transport_away", .5, 1);
    --SetLowReinforcementsVoiceOver(ALL, IMP, "all_hot_transport_away", .25, 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_hot_amb_start",  0,1);
    SetAmbientMusic(ALL, 0.99, "all_hot_amb_middle", 1,1);
    SetAmbientMusic(ALL, 0.1,"all_hot_amb_end",    2,1);
    SetAmbientMusic(IMP, 1.0, "imp_hot_amb_start",  0,1);
    SetAmbientMusic(IMP, 0.99, "imp_hot_amb_middle", 1,1);
    SetAmbientMusic(IMP, 0.1,"imp_hot_amb_end",    2,1);

    SetVictoryMusic(ALL, "all_hot_amb_victory");
    SetDefeatMusic (ALL, "all_hot_amb_defeat");
    SetVictoryMusic(IMP, "imp_hot_amb_victory");
    SetDefeatMusic (IMP, "imp_hot_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(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


--  Camera Stats
--Hoth
--Hangar
AddCameraShot(0.944210, 0.065541, 0.321983, -0.022350, -500.489838, 0.797472, -68.773849);
--Shield Generator
AddCameraShot(0.371197, 0.008190, -0.928292, 0.020482, -473.384155, -17.880533, 132.126801);
--Battlefield
AddCameraShot(0.927083, 0.020456, -0.374206, 0.008257, -333.221558, 0.676043, -14.027348);


end
There is no 'ctrl' button on Chuck Norris's computer. Chuck Norris is always in control.

March 25, 2010, 05:55:47 PM #6 Last Edit: March 27, 2010, 01:48:36 AM by gogo12
This is for the 2 local teams in map.EXAMPLE!This is my GCW era LUA file from my planet Thispis:
This part is under the ALL and IMP stats

--  Attacker Stats
    SetUnitCount(ATT, 32)
    SetReinforcementCount(ATT, 200)
--    AddBleedThreshold(ATT, 31, 0.0)
--    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 0.75)
    AddBleedThreshold(ATT, 10, 1.5)
    AddBleedThreshold(ATT, 1, 3.0)

[][][][] Ok under the last AddBleedThreshold add this: SetTeamAsFriend(ATT,3) This is for the attacking team.It will look like this:[][][][]

--  Attacker Stats
    SetUnitCount(ATT, 32)
    SetReinforcementCount(ATT, 200)
--    AddBleedThreshold(ATT, 31, 0.0)
--    AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 0.75)
    AddBleedThreshold(ATT, 10, 1.5)
    AddBleedThreshold(ATT, 1, 3.0)
    SetTeamAsFriend(ATT,3)

[][][] Now add unit in the locals team stats.EXAMPLE:

--  Local Stats
      SetTeamName(3, "locals")
      AddUnitClass(3, "imp_inf_501storm_trooper",5)
      SetUnitCount(3, 5)

[][][] Now go in the zero editor open your map and place new PATH and name it (example"if this is CP2) name it ImpSpawn2.I call it IMP because we want to spawn empire unit in game.If we place in the local stats geo_inf_geonosian in zeroeditor the PATH name will be Geospawn2.Now select (in this example CP2) and find ALLYPATH section and there add the name of the PATH for the locals.In this case ImpSpawn2.   [][][]

Now return to the LUA.Make the same thing again and for the Defender stats.Add there SetTeamAsFriend(DEF,4) Go again to the local stats and under SetTeamAsFriend(ATT,3) add this"

SetTeamName(4, "locals")
      AddUnitClass(4, "geo_inf_geonosian",5)
      SetUnitCount(4, 5)
      SetTeamAsFriend(4, DEF)

[][][]This is local team 4.He is for the defenders.Here i give you example whit geonosians.Now go again in zero editor and lets say you want the geonosians to spawn from CP1.In the ALLYPATH section add GeoSpawn1.Thats all.Now your part from the LUA file have to look like this:(FINAL LOOK)


--  Attacker Stats
    SetUnitCount(ATT, 32)
    SetReinforcementCount(ATT, 200)
--  AddBleedThreshold(ATT, 31, 0.0)
--  AddBleedThreshold(ATT, 21, 0.75)
    AddBleedThreshold(ATT, 11, 0.75)
    AddBleedThreshold(ATT, 10, 1.5)
    AddBleedThreshold(ATT, 1, 3.0)
    SetTeamAsEnemy(ATT,3)


--  Defender Stats
    SetUnitCount(DEF, 32)
    SetReinforcementCount(DEF, 200)
--  AddBleedThreshold(DEF, 31, 0.0)
--  AddBleedThreshold(DEF, 21, 0.75)
    AddBleedThreshold(DEF, 11, 0.75)
    AddBleedThreshold(DEF, 10, 1.5)
    AddBleedThreshold(DEF, 1, 3.0)
    SetTeamAsFriend(DEF,4)

--  Local Stats
    SetTeamName(3, "locals")
    AddUnitClass(3, "imp_inf_501storm_trooper",5)
    SetUnitCount(3, 5)
    SetTeamAsFriend(3, ATT)
    SetTeamName(4, "locals")
    AddUnitClass(4, "geo_inf_geonosian",5)
    SetUnitCount(4, 5)
    SetTeamAsFriend(4, DEF)

I hope you guys understand me. :slap: :rofl:
Remember.Every letter big or small have to be exactly like i show here.
none