Using the Battlefront Main Play Mod to make a Hero Map

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Anniversary

Using the Battlefront Main Play Mod to make a Hero Map

Post by giftheck »

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:

Code: Select all

    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:

Code: Select all

--  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:

Code: Select all

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

Here are the GCW heroes:

Code: Select all

    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")
Post Reply