SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding Tutorials => Topic started by: Led on June 08, 2012, 01:38:06 PM

Title: LUA lines for locals (again) :)
Post by: Led on June 08, 2012, 01:38:06 PM
Here is what you need to do to get locals on your map:

1) load in the sides you want to use--in this example, I am using geo.lvl, des.lvl (tuskens), gar.lvl, and des.lvl (jawa)

2) name the local teams 3, 4, 5, 6 etc and make sure they own a CP to spawn at

3) assign the units, team names, and unit counts


4) to get the new teams to fight each other use these lines

SetTeamAsEnemy(3,4)
SetTeamAsEnemy(4,3)

and to make them allies:
SetTeamAsFriend(3,4)
SetTeamAsFriend(4,3)

5) if you have a lot of AI running around, be sure to set this:
SetMemoryPoolSize("Aimer", 200)
to a big enough value

------------------------------------------------


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

-- +++++++++++++++++++++++++++++++++++++++++

   ReadDataFile("SIDE\\geo.lvl",
        "gen_inf_geonosian")

   ReadDataFile("SIDE\\des.lvl",
        "tat_inf_tuskenhunter",
        "tat_inf_tuskenraider")


  ReadDataFile("SIDE\\gar.lvl",
        "gar_inf_basic");

ReadDataFile("SIDE\\des.lvl",
        "tat_inf_jawa");


-- ++++++++++++++++++++++++++++++++++++++++++







--              Alliance Stats
        SetTeamName(ALL, "Alliance")
        SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "all_inf_soldierurban",11)
    AddUnitClass(ALL, "all_inf_vanguard",3)
    AddUnitClass(ALL, "all_inf_pilot",4)
    AddUnitClass(ALL, "all_inf_marksman",4)
    AddUnitClass(ALL, "all_inf_smuggler",3)
    SetHeroClass(ALL, "all_inf_lukeskywalker")
    SetAttackingTeam(ATT);



--              Imperial Stats
        SetTeamName(IMP, "Empire")
        SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_storm_trooper",11)
    AddUnitClass(IMP, "imp_inf_shock_trooper",3)
    AddUnitClass(IMP, "imp_inf_pilottie",4)
    AddUnitClass(IMP, "imp_inf_scout_trooper",4)
    AddUnitClass(IMP, "imp_inf_dark_trooper",3)
    SetHeroClass(IMP, "imp_inf_darthvader")


-- ++++++++++++++++++++++++++++++++++++++++++

--  Local Stats
    SetTeamName(3, "locals1")
    AddUnitClass(3, "tat_inf_tuskenraider", 5);
    AddUnitClass(3, "tat_inf_tuskenhunter", 2);
    SetUnitCount(3, 14)



--  Local Stats
    SetTeamName(4, "locals2")
    AddUnitClass(4, "geo_inf_geonosian", 7)
    SetUnitCount(4, 7)
   

--  Local Stats
    SetTeamName(5, "locals3")
    AddUnitClass(5, "gar_inf_vanguard",5)
    SetUnitCount(5, 7)
   

--  Local Stats
    SetTeamName(6, "locals4")
    AddUnitClass(6, "tat_inf_jawa", 14)
    SetUnitCount(6, 7)
   







-- ++++++++++++++++++++++++++++++++++++++++++
Title: Re: LUA lines for locals (again) :)
Post by: Led on October 28, 2012, 07:33:49 AM
Update:  SleepKiller and I have discovered that local team numbers must be sequential, i.e.

1, 2, 3, 4, 5

and not

1, 2, 5
EhPortal 1.34 © 2024, WebDev