TUT - Using BF1 Main Play Mod 3.1 to make a hero assault map

Started by ggctuk, March 01, 2009, 12:23:37 PM

Previous topic - Next topic
This will run through the steps of using the Main Play Mod to create a new Hero Map. There were three hero maps included in the download (found here). It requires the Main Play Mod to work. It uses basic LUA editing functions.

First, create a new map in BFBuilder Pro. In this example, we will make a Naboo Theed Assault in the Clone Wars. So we shall call the map "Theed - Hero Assault CW", set it to play as a Clone Wars era map and label it "naba".

Open up the new "Datanaba" folder. Go into the "Commom/Scripts/naba" folder, delete "nabaa.lua", and open "nabac.lua". Now copy the contents of the shipped Naboo Theed lua - found in "BFBuilder/Assets/Naboo/nab2_c.lua" - into "Nabac.lua".

Delete all references to the vehicles and normal units under "ReadDataFile" and paste this in:

   ReadDataFile("SIDE\\rep.lvl",
        "rep_inf_ep3anakin",
        "rep_inf_ep3obiwan",
        "rep_inf_basic_arc",
        "rep_inf_kiadimundi",
        "rep_inf_macewindu",
        "rep_inf_yoda");
    ReadDataFile("SIDE\\cis.lvl",
        "cis_inf_basic",
        "cis_inf_countdooku",
        "cis_inf_darthmaul",
        "cis_inf_darthsidious",
        "cis_inf_grievous",
        "cis_inf_jangofett");
Replace the "Republic Stats" and "CIS Stats" sections with this:

--  Republic Stats
    SetTeamName(REP, "Republic");
    SetTeamIcon(REP, "rep_icon");
      AddUnitClass(REP, "rep_inf_macewindu",5)
      AddUnitClass(REP, "rep_inf_ep3obiwan",5)
      AddUnitClass(REP, "rep_inf_ep3anakin",5)
      AddUnitClass(REP, "rep_inf_kiadimundi",5)
      AddUnitClass(REP, "rep_inf_yoda",5)
      SetHeroClass(REP, "rep_inf_arc_trooperkamino")

--  CIS Stats
    SetTeamName(CIS, "CIS");
    SetTeamIcon(CIS, "cis_icon");
      AddUnitClass(CIS, "cis_inf_countdooku",5)
      AddUnitClass(CIS, "cis_inf_darthmaul",5)
      AddUnitClass(CIS, "cis_inf_darthsidious",5)
      AddUnitClass(CIS, "cis_inf_jangofett",5)
      AddUnitClass(CIS, "cis_inf_grievous",5)
      SetHeroClass(CIS, "cis_inf_assault")
Now you will need to localize the level. You can download the localizations for the units Here. Copy these files into your SOURCE_PC/Common/Localize folder.

Under "level", add a scope for your levelID (in this instance, "naba"). Then add the CPs (CP1, CP2 etc, for Theed there are 6 CPs). Add an "objectives" scope, and add "1" to it, label that as something like "Defeat the enemy heroes". Delete all objectives from your LUA and add this in their places:

   AddMissionObjective(REP, "red", "level.naba.objectives.1");
    AddMissionObjective(CIS, "red", "level.naba.objectives.1");
Now, munge and test.

Here are the GCW heroes:

   ReadDataFile("SIDE\\all.lvl",
        "all_inf_spy",
"all_inf_chewbacca",
"all_inf_hansolo",
        "all_inf_lukeskywalker",
        "all_inf_marek");
    ReadDataFile("SIDE\\imp.lvl",
        "imp_inf_bobafett",
"imp_inf_darthsidious",
"imp_inf_darthvader",
        "imp_inf_officersnow",
        "imp_inf_shadowguard");


--              Alliance Stats
        SetTeamName(ALL, "Alliance")
        SetTeamIcon(ALL, "all_icon")
    AddUnitClass(ALL, "all_inf_lukeskywalker",5)
    AddUnitClass(ALL, "all_inf_hansolo",5)
    AddUnitClass(ALL, "all_inf_chewbacca",5)
    AddUnitClass(ALL, "all_inf_marek",5)
    SetHeroClass(ALL, "all_inf_spy")


--              Imperial Stats
        SetTeamName(IMP, "Empire")
        SetTeamIcon(IMP, "imp_icon")
    AddUnitClass(IMP, "imp_inf_bobafett",5)
    AddUnitClass(IMP, "imp_inf_darthvader",5)
    AddUnitClass(IMP, "imp_inf_darthsidious",5)
    AddUnitClass(IMP, "imp_inf_shadowguard",5)
    SetHeroClass(IMP, "imp_inf_officersnow")
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1
--Endor: Imperial Base

A more expedient way to do this is to release a file, maybe called heroes.lvl. Just put only the files you need into that and then munge it. This allows you to have much smaller map sizes, and therefore, much smaller downloads. Might be useful, considering how much space this thing already takes up. Just include that in the mod.

While it does sort of make sense to make it all in one, it's also useful for those who DON'T want to download this huge, >100mb mod and just want your tiny <10mb map.

Something to consider, but nice tut all the same.


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

The mod itself was already quite large, sides would have increased the size of the downloads.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1
--Endor: Imperial Base