Munging a BF1 Side

NOTE: For BF1, but contains a strong base for BF2. YOU MUST have the 1.3 patch.

Vocab (FYI):

-Sides - includes units and weapons. REP=Republic etc.
-munge - to compile, like zipping
-assets - unmunged files that make the game work
-ODF - file that defines the properties of a unit or weapon
-REQ - file needed by the munger
-TGA - Type of bitmap used by the game
-MSH - Also called geometry, is a set of verticies that are connected by lines, without a bitmap, the units would be gray blobs, merely just shapes. Textures are "painted" onto the shape.
-BAT - a C program
-_BUILD - the unmunged files do not go here. This is where the munger is located
-LUA - A script that tells what units are in a level, and a bunch of other properties.
-ZE - Zero Editor that edits the terrain, object placement, etc. in a map.
-LVL - the product of the munger, like a .zip

Munging a side:
INFO: Everything pertaining to the Republic faction is stored in the sides folder REP. The REP folder should always be under the SIDES folder.

1. Open BFBuilder.hta
2. Create a new project, fill in the neccesary info. Let's just say you named your map test.
3. Copy the REP folder from assets/sides to Datatest/sides/
4. Edit the files in Datatest/sides/rep/, such as replacing a texture, or changing an ODF. Make sure the new files have the same name as the original.
5. Go to Datatest/_BUILD_PC/, and EDIT the munge.bat. You should get to a point where it says:

cd SidesREM STARTSIDES
REM cd GAM
REM @call munge.bat
REM cd ..
REM ENDSIDES
cd ..

REM means to comment out. Lines with REM on it won't be ran. cd means to change directory, so cd sides means to change the directory to the sides folder. cd .. means to go up a folder. Notice how the side "GAM" (for gammorean) is already there (It was created by BFBuilder). All these lines do is run the munge.bat in _BUILD_PC/Sides/GAM. But we wan't to munge the REP side, so change GAM to REP, and remove the REM's so the lines are ran:

cd Sides
REM STARTSIDES
cd REP
@call munge.bat
cd ..
REM ENDSIDES
cd ..

6. Go to _BUILD_PC/Sides/REP. Well there isn't one, that's a problem. So create it! Ok copy the munge.bat and clean.bat from _BUILD_PC/Sides/GAM to _BUILD_PC/Sides/REP. \
7. EDIT the munge.bat that you just pasted. It should look like this.

@call ..\munge_side.bat Gam
@call ..\munge_fpm.bat Gam

Well that's bad, it should be Rep not Gam, so change it.

@call ..\munge_side.bat Rep
@call ..\munge_fpm.bat Rep

Phew, that's all the codework. Notice how there are more than one munge.bat's. One calls another, that calls another, and it gets confusing.
8. Open up BFBuilder, if it's not already open, and load your level, test, if it's not already loaded.
9. Hit the munge button, AND WAIT! NEVER INTERUPT A MUNGE! WAIT UNTILL NOTEPAD POPS UP WITH THE LOG. It may take a long time.
10. Go to BFBuilder/AddOn/Test/Data/_lvl_pc/Side/ . There should be a rep.lvl. If not, one of the munge.bat's is incorrect.
11. If you do indeed have a rep.lvl, congratulations! You're smart! Cut it out of there, and paste it in:
C:\Program Files\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE. BUT WAIT! DO NOT OVERWRITE THE ORIGINAL REP.LVL! Back up the original before you paste in yours.
12. Run the game. You should see your changes.