xboxscene.org forums

Author Topic: Battlefront Ii Mission.lvl Modding Tutorial  (Read 675 times)

cyguration

  • Archived User
  • Newbie
  • *
  • Posts: 9
Battlefront Ii Mission.lvl Modding Tutorial
« on: May 30, 2008, 11:29:00 PM »

First off, huge thanks to Teancum from Gametoast.com for helping me get the basics down. Anyway, here's a quick tutorial for using the SWBFII Mod Tools in order to alter things like the amount of bots on a battlefield or the kind of units that are available in a map.

Requirements:
1. Modded Xbox (Most important)
2. Star Wars Battlefront II (Full game with specific files copied to the Xbox hard drive)
3. Star Wars Battlefront II Mod Tools for PC
4. Notepad (For editing scripts)

Now if you don’t have a modded Xbox you minus well go and Google up soft-modding. Otherwise this tutorial will be useless to you. Also, if you’re an advanced modder you won’t have any use for this tutorial either. This is mainly for n00bs.

First and foremost you’re going to need to copy Battlefront II to your Xbox’s hard-drive. Create a directory for Battlefront II in your Games folder. If you don’t have a games folder you might want to create one. It would probably be best to use the EvoX bios filemanager or the Xbox Media Center (best). The files you’re going to need to copy will include all the root directory (or Xbox executables) from the BF2 disc (i.e., default.xbe, downloader.xbe, update.xbe). You’ll also need to copy the Media directory and certain files from the Data directory.

Just so you know, you don’t need all the files in the Data directory, just the necessary files to make the game run and the maps you want to play. You’ll need to copy the *.bin files first and then go into the _LVL_XBOX directory for the core gameplay files. All the *.lvl files in the root directory of the _LVL_XBOX need to be copied to the hard disk, as well as the entire SIDE folder (this folder contains all the different factions or sides in Battlefront, such as the Republic or the CIS). If you don’t plan to play with certain sides in the future you can just go back and delete the respective *.lvl files. Also copy over the FPM directory for the first-person models.
Now you’re going to want to copy the map folders over – but only copy over the maps you want to play – they’re abbreviated with the first three letters of the world’s name (i.e., HOT = Hoth, GEO = Geonosis).  

The last couple of things you’re going to need to copy over is the Load directory and specific files from the Sound folder. Be sure to copy over the shell.lvl and put it in the Sound folder on your hard disk. You’ll also need the maps you plan to play on sound lvl files, otherwise the levels won’t work. That’s it for copying stuff.

If you don’t have the Mod Tools you’ll have to get them in order to proceed any further. Once you’re done with the copying (and installing the Mod Tools) you’ll need to open up your Battlefront Mod Tools Visual Munge (e.g., You can find it in its’ start menu program folder). As shown in the Visual Munge, simply follow the instructions for creating a new world (i.e., For an example map you might want to name it HGT, as that is what I’ll be using for demonstration purposes)...it doesn’t really matter what you name it or what description you put in it, though. Once it’s done munging the real fun begins.

You’re going to need to go into the  \BF2_Tools\data\Common\ folder and copy the Mission.req file to the Common folder of your created world (e.g., \BF2_Tools\data_HGT\Common\ ). Also, copy over all the scripts from the \BF2_Tools\data\Common\Scripts, and place them in the respective folder of your created world (e.g., \BF2_Tools\Data_HGT\Common\Scripts\ ). Now remember the worlds you copied onto your Xbox hard drive? Well you’re going to need the scripts to edit those worlds for the munging process. So goto the \BF2_Tools\Assets\ folder and
open up the Scripts folder. You should see a very similar list of abbreviated worlds when you were copying them from the BF2 disc. For whatever maps you copied to the hard drive you might want to select and copy the map folders from the \BF2_Tools\Assets\Scripts folder. You’re going to paste the copied folders in the \BF2_Tools\Data_HGT\Common\Scripts\ folder. Great, now all the files are in place and you won’t have to mess with any of the folders unless you plan to add new maps or take them away. But for now, you’re done copying and pasting folders.

Now the simplest thing to edit first is probably lifting the 16 limit Bot-ban for the Xbox version of Battlefront II. For anyone who wanted 32, 64 or possibly 100+ bots on the battlefield all you have to do is goto the \BF2_Tools\Data_HGT\Common\Scripts\ folder and look for a series of files that start with Objective. In this case, we’re going to change the standard 16 bot limit for ALL the Conquest modes. So find the script called ObjectiveConquest.lua and open it up with Windows Notepad or any text editor. Next you’re going to open up the find menu in your text editor (or press CTRL-F) and type in BOTS. A line starting with: ScriptCB_SetNumBots() should appear. It may have some text inside the brackets, simply delete it and replace it with 100. Basically we’re overriding the Xbox Game Option settings (or limitations) for bots and whatever number you type in (i.e., 100, in this case) is the amount of total bots that can appear on a map while playing Conquest. So the line should look like this: ScriptCB_SetNumBots(100)

Save the ObjectiveConquest.lua and you’ve just increased the total number of bots for conquest! You can use the exact same method for modifying the amount of bots available in other modes as well. Simply find and edit the appropriate Objective script (i.e., ObjectiveAssault, ObjectiveOneFlagCTF, etc.) and search for Bots. It’s just that simple.

The only thing is that we’ve increased the amount of available bots, but we need to tell the maps that we have more maps at our disposal. So we’re going to use Hoth as an example (if you didn’t copy the Hoth script folder from the Assets folder, then go back and look for the folder called hot and copy it to the Data_HGT\Common\Scripts folder). Next you’re going to goto the \BF2_Tools\Data_HGT\Common\Scripts\hot\ folder and you should see all of Hoth’s script files. Look for hot1g_con.lua. Open it with a text editor. Press CTRL-F and type in: all_inf_wookie. While we’re in here changing the bots we’re going to quickly replace the wookie with Han Solo.
So where it reads: all_inf_wookiee_snow, replace it with: all_hero_hansolo_tat. Press CTRL-F and search for: wookie. If you see anymore references with all_inf_wookie_snow, replace it with all_hero_hansolo_tat.

Now scroll through the hot1g_con.lua and look for a line that reads: SetupTeams. This is where the level defines how many bots will be in the level. Where it says Team = ALL, just below that is a line that simply reads: Units. This determines how many bots will be on-screen for that side. For the rebels we’ll make this 30...so 30 bots will be on the Hoth play area. For Imperials (e.g., Where it says Team = IMP) you’re going to change the unit number where it says Units, to 70. Now to prevent the Xbox from locking up, we’re going to make sure that too many Heroes or Hero classes aren’t flooding the map. So scroll back up to the rebels unit description which might look like this (since you added in Han Solo):

team = ALL,
            units = 30,
            reinforcements = 150,
            soldier = {"all_inf_rifleman_snow",9, 25},
            assault = {"all_inf_rocketeer_snow",1, 4},
            engineer   = {"all_inf_engineer_snow",1, 4},
            sniper  = {"all_inf_sniper_snow",1, 4},
            officer = {"all_inf_officer_snow",1, 4},
            special = {"all_hero_hansolo_tat",1, 4},

Change the 4 to a 1 where it says all_hero_hansolo_tat. This means that only one person can play Han Solo and only one of his units will be available to play at a time. The first number represents the amount of units the bots will play while the second number represents the amount of units both the computer and the human players can play. But considering that soldiers take up less memory you might want to increase the 9 next to the all_inf_rifleman_snow to 20. So it should look like this: {"all_inf_rifleman_snow",20, 25}. This means that there can be up to 20 rifleman bots at a time on the battlefield.

If you want more from the default reinforcements then add more than just the 150...if you want the game to be unbalanced against a particular side, then decrease it more than the opposing side.
This can be fun if you play the rebels and have less reinforcements than the Empire, because it makes it more difficult to win...something Battlefront games sorely lack in.

Now that you’re done editing the bots you can save the file and close it out. It’s time to build the map. Simple so far. Goto the \BF2_ModTools\Data_HGT\_BUILD\ and double click on the ModTools Visual Munge. Leave the settings the same and click on Munge. Once it’s done munging now it’s time to copy over the Mission.lvl. You’ll find it in the _LVL_PC folder in the Data_HGT folder. Either FTP the Mission.lvl over to your Xbox hard drive, or load it to a memory device or burn it to a CD-R/CD-RW. Anyway, you need to copy the Mission.lvl into the _LVL_XBOX folder in your Battlefront II directory. Done and Done!
Logged

yoba

  • Archived User
  • Newbie
  • *
  • Posts: 5
Battlefront Ii Mission.lvl Modding Tutorial
« Reply #1 on: January 07, 2009, 11:43:00 AM »

Many thanks for this Cyguration.  I saw your post back in the summer, but didn't have a chance to check it out until the recent holidays.  I'm very glad that I did.

I used the hex editing approach back when it first hit the board, but couldn't do all the mods I wanted to (Boba or Jango playable on all levels) because of the limitations on over-writing character names using the hex edit.  i.e. You could only replace a playable character with another if the replacement characters 'name' was shorter than the original.

The method Cyguration supplied by-passes these limitations.  I now have Boba or Jango playable in every level (including space levels), in story mode and galactic conquest mode.

Who knows when we'll see SW BFIII with the recent demise of Free Radical and development getting turned over to Rebellion.

Anyone who was limited the hex editing approach that's looking to get an improved BF fix might want to give this a try.
Logged

yoba

  • Archived User
  • Newbie
  • *
  • Posts: 5
Battlefront Ii Mission.lvl Modding Tutorial
« Reply #2 on: January 13, 2009, 11:22:00 AM »

QUOTE(yoba @ Jan 7 2009, 02:19 PM) View Post

Many thanks for this Cyguration.  I saw your post back in the summer, but didn't have a chance to check it out until the recent holidays.  I'm very glad that I did.

I used the hex editing approach back when it first hit the board, but couldn't do all the mods I wanted to (Boba or Jango playable on all levels) because of the limitations on over-writing character names using the hex edit.  i.e. You could only replace a playable character with another if the replacement characters 'name' was shorter than the original.

The method Cyguration supplied by-passes these limitations.  I now have Boba or Jango playable in every level (including space levels), in story mode and galactic conquest mode.

Who knows when we'll see SW BFIII with the recent demise of Free Radical and development getting turned over to Rebellion.

Anyone who was limited the hex editing approach that's looking to get an improved BF fix might want to give this a try.


Update - I should test everything before shooting my mouth off.  The changes caused story mode to crash.
Logged

GTTeancum

  • Archived User
  • Jr. Member
  • *
  • Posts: 58
Battlefront Ii Mission.lvl Modding Tutorial
« Reply #3 on: January 22, 2009, 01:42:00 PM »

As someone who avidly edits SWBF2 PC I can tell you that campaign often references a character more than once for objectives and things, so if you're replacing a name you're gonna get a crash without updating all other references.
Logged

yoba

  • Archived User
  • Newbie
  • *
  • Posts: 5
Battlefront Ii Mission.lvl Modding Tutorial
« Reply #4 on: January 25, 2009, 11:14:00 AM »

QUOTE(GTTeancum @ Jan 22 2009, 04:18 PM) View Post

As someone who avidly edits SWBF2 PC I can tell you that campaign often references a character more than once for objectives and things, so if you're replacing a name you're gonna get a crash without updating all other references.



Hey Teancum.  I've seen your posts around on BF2 mods and found them really helpful.

I fixed my story mode crash after I clued in that Jango wasn't in the Rep side.  Duh.
Boba works in the balance of story mode when the later levels flip over from the Rep side to the Imp side.

I think I updated everything else ok.  The game hasn't crashed anywhere else...yet.
Logged