xboxscene.org forums

Author Topic: Battlefront Ii Weapon Editing And Side.lvl Tutorial  (Read 602 times)

cyguration

  • Archived User
  • Newbie
  • *
  • Posts: 9
Battlefront Ii Weapon Editing And Side.lvl Tutorial
« on: June 14, 2008, 07:14:00 AM »

Requirements:

1. Modded Xbox
2. Full copy of Battlefront II
3. Battlefront II Mod Tools for PC
3. Notepad
4. Hex Editor (Preferably Hex Workshop)

Difficulty: 6/10


If you haven’t figured out how to switch weapons (and I don’t mean changing a chaingun for a rocket launcher) then this tutorial can help you modify the weapon of your choice or alter weapon caches for some character classes. So let’s get to it.

First you’ll need to copy over the side you wish to edit. For this tutorial I’ll be using the all.lvl (the Rebel Alliance). Just so you’re not left with tons of questions on how to do this I’ll be using the Stormtrooper Luke Skywalker as an example. And yes, there is a Stormtrooper Luke already on the Xbox game disc, just in case you didn’t know.

Before editing the all.lvl you’ll first need to add Stormtrooper Luke to a level. If you’ve modified the mission.lvl before then you know the process. All you’re really doing is replacing one of the soldiers with the line: all_hero_luke_storm. If you don’t know how to edit the mission.lvl for the Xbox then refer to the following tutorial: http://forums.xbox-s...view=getnewpost   

For test purposes you might want to add Stormtrooper Luke to Mos Eisley. Munge the Mission.lvl and that will be last you’ll need of the Munging process in this tutorial.

Next you’ll need to access the all.lvl, so open it up with a hex editor. Now you’re going to need references for the stats and weapons, so goto the BF2_ModTools\Assets\Sides\All\Odf folder and open up the files all_hero_luke_ storm.odf and all_hero_hansolo_storm.odf. You’ll need these for referential purposes.

Head back to the hex editor and goto the toolbar and click on Find; type in luke_storm. It should bring you right to where you need to be. You’ll need to scroll up by approximately three clicks. The following line should be visible:
BASE....all_inf_default.TYPE....all_hero_luke_storm.

The line above indicates that Luke is a standard soldier. Now the problem with this is that the game locks up if you have award weapons on your profile for the Xbox...because Stormtrooper Luke wasn’t given the proper weapon placements. Click back over to the all_hero_luke_storm odf and you’ll notice that Luke only has three weapons. In order for the game to work with profiles with and without award weapons we’ll have to increase the amount of weapons in Luke’s profile. Despite popular theory it is, in fact, possible to increase the size of a Side.lvl in a hex editor without the game locking up. But it requires a good deal of precision of code placement and rearrangement. Don’t worry, though, the hard parts are almost over with.

Go back into the hex editor and click on the toolbar and highlight Find. You’ll need to search up Hansolo_Storm and copy over some attributes. First thing first, scroll up by approximately three clicks until you see the line:
BASE....com_hero_default....TYPE....all_hero_hansolo_storm..

As indicated, Han Solo as a Stormtrooper is labeled as a hero. Thus he has default hero stats. We’ll need this to indicate Luke as a hero as well.
*This is a very important step*
Drag the mouse from the beginning of the word BASE all the way to the last four periods after com_hero_default. Don’t select anything else but what was indicated. Now select copy from the toolbar menu and head back to the toolbar and click on Find. Do another search for luke_storm. If it says it can’t find it then repeat the search until it does find the line. Once you’re back at the section with Luke, you’ll need to scroll up to the line:
BASE....all_inf_default.TYPE....all_hero_luke_storm.

*Very important step*
You’ll notice that Luke’s line is shorter. Now if you manually edit this line it will screw up Luke’s data and he won’t even appear in the game. So carefully highlight from the word BASE all the way to the single period behind all_inf_default. Do not highlight the word TYPE or anything after it. It’s also important to note not to highlight anything before the word BASE. Again, you’ll screw things up and Luke won’t appear in the game. Now after you’ve highlighted the indicated text you’re going to paste over it with the contents you copied. So the new line for Stormtrooper Luke should look like this:
BASE....com_hero_default....TYPE....all_hero_luke_storm.

The four extra periods after the word “default” are a-okay and need to be there.  Save the all.lvl file. You’re not done yet but consider this to be a checkpoint.

Next up is adding new weapons and abilities for Luke. This works the exact same way as changing Luke into a hero. We’re going to have to copy and paste in new weapons. First we’ll exchange Luke’s standard Stormtrooper rifle for Han’s blaster pistol (viz., This is all for referential purposes, you can select whatever weapon you want). So search up hansolo_storm and look for the phrase:
PROP.......,all_weap_hero_hanpistol.

Again, you’re going to copy this whole phrase (including the period after the word “hanpistol”) You’re going to search up luke_storm and look for the phrase:
PROP.......,all_weap_inf_rifle..

So you’ll want to select all of the forementioned phrase (including the two periods after the word rifle) and paste in the line you copied. Luke will now have a DL-44 blaster pistol as his main weapon. You might want to take the game for a test spin to see how things work. Next, though, we’re going to need to add a second weapon for Luke’s secondary weapon slot. So go back to Stormtrooper Han...we’ll be using his fusion cutter for this example. Look for the following lines after searching up Hansolo_storm:
PROP.....C.,1...PROP......./all_weap_inf_fusioncutter...PROP....e...0...PROP.....E.-1...

You’ll need to copy that entire line, including the three periods after the E -1 statement. Pasting this will be slightly tricky, only because Luke’s data doesn’t extend past three weapons, yet we’re giving him his fourth weapon! So go back to the notepad you opened with all_hero_luke_storm.odf and look where it says:
FoleyFXClass        = "imp_inf_trooper"

You’re going to want to keep your eye out for this statement in the hex editor, only it won’t say FoleFXClass...so you’ll just need to look for imp_inf_trooper. That indicates where Luke’s weapon cache ends and where we’ll need to extend it. So you’ll need to go back to StormTrooper Luke’s section in the all.lvl and look for the phrase just before “imp_inf_trooper” (which should be at the end of Luke’s weapon listing). It should be the following:
PROP.....C.,1...

You’ll need to select this line (including the three periods) and paste over it with the one you copied from above, for Han’s fusion cutter. Save and test it to see if it works.

Now for the last part of the weapon switching (feel proud, you’re almost near the end). Even though we’ve added a new weapon to Luke’s stash, the game will still lock-up if someone with a profile that starts with award weapons is playing Stormtrooper Luke. So you’ll need to add one more weapon to Luke’s weapon cache. In this case we’ll be adding the original Rebel Alliance Award Rifle. So goto the toolbar and select find. Type in “default_rifleman”. It should bring you to the default Rebel soldier. You should also see all the available weapons for the soldier. If you notice, unlike the Mod Tools ODF listings for the soldiers/characters, the weapon listing is as follows for the rifle, pistol, thermal detonator, etc: 2.1, 2.2, 2.3, etc., etc., So for future reference just remember that when adding a new weapon to a character look for the weapon listing reference number. If the character has six weapons then the sixth weapon would be 2.6, etc. Or if you only want the character to have four weapons, the fourth weapon would be 2.4. Get it? As a side note, if the fusion cutters for Luke don’t work, simply go back to Han in the hex editor and find the line PROP.....C.,1...PROP......2.4...PROP......./all_weap_inf_fusioncutter...PROP....e...0...PROP.....E.-1...

Copy and paste it over the phrase in Luke’s section and test to see if it works.

Anyway, back to the Rebel rifleman...you should see the following line for the award rifle (which is the weapon we’re going to add to Stormtrooper Luke’s repetoire):
PROP......2.5...PROP.....}..all_weap_award_rifle....PROP........6...PROP....<I.a1...

Copy this line to the end of Luke’s weapon cache listing (preferably where there are just periods representing 0s), just as it was done in the previous steps and then save the file and copy it over to your Xbox. If it doesn’t work then go back and start from scratch by copying the all.lvl from your Battlefront II disc. Just make sure when you copy the code you copy the entire segments, as the segments contain formatting that keeps the code readable for the game. Primarily, that’s the one thing to remember when adding, changing weapons...you want to keep the formatting intact.

Now that you’re all done Luke should have fusion cutters and can earn a playable award rifle, without locking up the game!
Logged