[TUTORIAL]How to mod mission LUA for SWBF2

Started by Anyder, November 15, 2014, 09:34:13 AM

Previous topic - Next topic
November 15, 2014, 09:34:13 AM Last Edit: April 14, 2015, 08:28:13 AM by Anyder
First of all u need to have the SWBF2 modding toolbox installed in ur PC (or if u wanna hexedit the swbf2.exe file, it's also possible to make the server spawn delay be changed). If you don't have the modding tools, here i leave u a link: http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=436

Then you'll have to go to C:\BF2_ModTools\data\_BUILD and run Modtools VisualMunge.exe

Create a map with the name u want, I usually write LEL but u can write whatever u want xD

After the data_*the name u've given to ur map* (eg. data_LEL) you'll have to head to C:\BF2_ModTools\assets
and copy all the folders in there (BES, COR, .. ), and paste them into the (C:\BF2_ModTools\data_LEL\) Common folder
Now go ahead and mod whatever u want in the lua, but make sure u do it correctly
Here I leave the tutorial about how to mod mission.lvl lua: https://sites.google.com/site/swbf2modtoolsdocumentation/battlefront-ii-mission-lua-guide

After getting everything modded, go to the previous folder where u should find mission.req

Just copy this and paste it there (replacing all previous text):
[spoiler]
ucft
{
    REQN
    {
        "config"
        "ingame_movies"
    }

    REQN
    {
        "script"
        "setup_teams"
        "gametype_conquest"
        "gametype_capture"
        "Objective"
        "MultiObjectiveContainer"
        "ObjectiveCTF"
        "ObjectiveAssault"
        "ObjectiveSpaceAssault"
        "ObjectiveConquest"
        "ObjectiveTDM"
        "ObjectiveOneFlagCTF"
"SoundEvent_ctf"
        "ObjectiveGoto"       
        "LinkedShields"
        "LinkedDestroyables"
        "LinkedTurrets"
        "Ambush"
        "PlayMovieWithTransition"
    }

    REQN
    {
        "lvl"
"bes2c_con"
"bes2c_ctf"
"bes2g_con"
"bes2g_ctf"
"bes2g_eli"
        "cor1c_con"
        "cor1g_con"
        "cor1g_ctf"
        "cor1c_ctf"
        "cor1g_eli"
        "dag1c_1flag"
        "dag1c_con"
        "dag1c_ctf"
        "dag1c_smuggler"
        "dag1g_con"
"dag1g_ctf"
        "dea1g_con"
        "dea1c_con"
        "dea1g_1flag"
        "dea1c_1flag"
        "dea1g_c"
"end1g_1flag"
"end1g_con"
"end1g_eli"
"end1g_hunt"
"fel1c_1flag"
"fel1c_c"
"fel1c_con"
"fel1g_1flag"
"fel1g_con"
"geo1c_c"
"geo1c_con"
"geo1c_conxl"
"geo1c_ctf"
"geo1c_hunt"
"geo1c_xl"
"hot1g_1flag"
"hot1g_c"
"hot1g_con"
"hot1g_conxl"
"hot1g_hunt"
"hot1g_uber"
"hot1g_xl"
"kam1c_1flag"
"kam1c_c"
"kam1c_con"
"kam1g_1flag"
"kam1g_con"
"kas2c_c"
"kas2c_con"
"kas2c_conxl"
"kas2c_ctf"
"kas2c_hunt"
"kas2c_uber"
"kas2c_xl"
"kas2g_con"
"kas2g_ctf"
"kas2g_xl"
"mus1c_c"
"mus1c_con"
"mus1c_ctf"
"mus1g_con"
"mus1g_ctf"
"myg1c_c"
"myg1c_con"
"myg1c_ctf"
"myg1g_con"
"myg1g_ctf"
"myg1g_eli"
"nab2c_con"
"nab2c_ctf"
"nab2c_hunt"
"nab2g_c"
"nab2g_con"
"nab2g_ctf"
"nab2g_eli"
"ifs_awardstats"
"ifs_careerstats"
"ifs_opt_controller_common"
"ifs_opt_general"
"ifs_opt_mp"
"ifs_opt_mp_listtags"
"ifs_personalstats"
"ifs_teamstats"
"pctabs_options"
"pol1c_con"
"pol1c_ctf"
"pol1g_c"
"pol1g_con"
"pol1g_ctf"
"tan1c_1flag"
"tan1c_con"
"tan1g_1flag"
"tan1g_c"
"tan1g_con"
"tat2c_con"
"tat2c_ctf"
"tat2g_con"
"tat2g_ctf"
"tat2g_eli"
"tat2g_hunt"
"tat3c_1flag"
"tat3c_con"
"tat3g_1flag"
"tat3g_con"
"tat3g_hunt"
"test1a"
"test1c"
"test1g"
"test1r"
"uta1c_1flag"
"uta1c_c"
"uta1c_con"
"uta1g_1flag"
"uta1g_con"
"yav1c_1flag"
"yav1c_con"
"yav1g_1flag"
"yav1g_c"
"yav1g_con"
"yav2c_1flag"
"yav2c_con"
"yav2c_ctf"
"yav2g_1flag"
"yav2g_con"
"yav2g_ctf"
"yav2g_eli"
    }
}
[/spoiler]

*I hope I didnt forget any map, except of the space ones and rhen var, if u wanna have added these maps, do it on ur own by adding them after the last one:

   "rhn2g_1flag"

Finally go to C:\BF2_ModTools\data_LEL\_BUILD and run Modtools VisualMunge.exe

Right as it is, just click on munge and u'll have ur mission.lvl munged in the _LVL_PC folder.

If I forgot something, please, just post it  :cheers:
Anyder | Talent, Ops & Culture | SWBF & Player Engagement
Email: communityambassador@swbfgamers.com
SWBFSpy Discord: http://discord.swbfspy.com
SWBFSpy Info: http://info.swbfspy.com

April 03, 2020, 01:06:10 PM #1 Last Edit: April 03, 2020, 01:46:02 PM by dsaf
I'm having a little trouble

On Coruscant Conquest i'm trying to this

soldier  = { "rep_inf_ep3_rifleman",7, 25},
            assault  = { "rep_inf_ep3_rocketeer",1, 4},
            engineer = { "rep_inf_ep3_engineer",1, 4},
            sniper   = { "rep_inf_ep3_sniper",1, 4},
            officer = {"rep_inf_ep3_officer",1, 4},
            special = { "rep_inf_ep3_jettrooper",1, 4},
           
        },
        cis = {
            team = CIS,
            units = 32,
            reinforcements = 150,
            soldier  = { "cis_hero_darthmaul",7, 25},
            assault  = { "cis_inf_rocketeer",1, 4},
            engineer = { "cis_inf_engineer",1, 4},
            sniper   = { "cis_inf_sniper",1, 4},
            officer = {"cis_inf_officer",1, 4},
            special = { "cis_inf_droideka",1, 4},

And this is my mission.req

ucft
{
    REQN
    {
        "config"
        "ingame_movies"   
    }

    REQN
    {
        "script"
        "setup_teams"
        "gametype_conquest"
        "gametype_capture"
        "Objective"
        "MultiObjectiveContainer"
        "ObjectiveCTF"
        "ObjectiveAssault"
        "ObjectiveSpaceAssault"
        "ObjectiveConquest"
        "ObjectiveTDM"
        "ObjectiveOneFlagCTF"
   "SoundEvent_ctf"
        "ObjectiveGoto"       
        "LinkedShields"
        "LinkedDestroyables"
        "LinkedTurrets"
        "Ambush"
        "PlayMovieWithTransition"
    }

    REQN
    {
        "lvl"
   "bes2c_con"
   "bes2c_ctf"
   "bes2g_con"
   "bes2g_ctf"
   "bes2g_eli"
        "cor1c_con"
        "cor1g_con"
        "cor1g_ctf"
        "cor1c_ctf"
        "cor1g_eli"
        "dag1c_1flag"
        "dag1c_con"
        "dag1c_ctf"
        "dag1c_smuggler"
        "dag1g_con"
   "dag1g_ctf"
        "dea1g_con"
        "dea1c_con"
        "dea1g_1flag"
        "dea1c_1flag"
        "dea1g_c"
   "end1g_1flag"
   "end1g_con"
   "end1g_eli"
   "end1g_hunt"
   "fel1c_1flag"
   "fel1c_c"
   "fel1c_con"
   "fel1g_1flag"
   "fel1g_con"
   "geo1c_c"
   "geo1c_con"
   "geo1c_conxl"
   "geo1c_ctf"
   "geo1c_hunt"
   "geo1c_xl"
   "hot1g_1flag"
   "hot1g_c"
   "hot1g_con"
   "hot1g_conxl"
   "hot1g_hunt"
   "hot1g_uber"
   "hot1g_xl"
   "kam1c_1flag"
   "kam1c_c"
   "kam1c_con"
   "kam1g_1flag"
   "kam1g_con"
   "kas2c_c"
   "kas2c_con"
   "kas2c_conxl"
   "kas2c_ctf"
   "kas2c_hunt"
   "kas2c_uber"
   "kas2c_xl"
   "kas2g_con"
   "kas2g_ctf"
   "kas2g_xl"
   "mus1c_c"
   "mus1c_con"
   "mus1c_ctf"
   "mus1g_con"
   "mus1g_ctf"
   "myg1c_c"
   "myg1c_con"
   "myg1c_ctf"
   "myg1g_con"
   "myg1g_ctf"
   "myg1g_eli"
   "nab2c_con"
   "nab2c_ctf"
   "nab2c_hunt"
   "nab2g_c"
   "nab2g_con"
   "nab2g_ctf"
   "nab2g_eli"
   "ifs_awardstats"
   "ifs_careerstats"
   "ifs_opt_controller_common"
   "ifs_opt_general"
   "ifs_opt_mp"
   "ifs_opt_mp_listtags"
   "ifs_personalstats"
   "ifs_teamstats"
   "pctabs_options"
   "pol1c_con"
   "pol1c_ctf"
   "pol1g_c"
   "pol1g_con"
   "pol1g_ctf"
   "tan1c_1flag"
   "tan1c_con"
   "tan1g_1flag"
   "tan1g_c"
   "tan1g_con"
   "tat2c_con"
   "tat2c_ctf"
   "tat2g_con"
   "tat2g_ctf"
   "tat2g_eli"
   "tat2g_hunt"
   "tat3c_1flag"
   "tat3c_con"
   "tat3g_1flag"
   "tat3g_con"
   "tat3g_hunt"
   "test1a"
   "test1c"
   "test1g"
   "test1r"
   "uta1c_1flag"
   "uta1c_c"
   "uta1c_con"
   "uta1g_1flag"
   "uta1g_con"
   "yav1c_1flag"
   "yav1c_con"
   "yav1g_1flag"
   "yav1g_c"
   "yav1g_con"
   "yav2c_1flag"
   "yav2c_con"
   "yav2c_ctf"
   "yav2g_1flag"
   "yav2g_con"
   "yav2g_ctf"
   "yav2g_eli"
    }
}

I saved it and I munged it, with the visual munge, it says it is in the lvl_pc foler, of star wars battlefront 2. Found that. But when i opened it. Nothing was in the lvl_pc folder, not even the mission.lvl. What do i do?
Works In Progress
Yellow Command Mod (TBA)
Native Dune Sea Mod (TBA)
Backwards Battlefront Mod (TBA)