Hex Editing Tutorial

Started by Phobos, April 19, 2011, 03:25:14 PM

Previous topic - Next topic
April 19, 2011, 03:25:14 PM Last Edit: April 15, 2014, 05:34:49 AM by Phobos
Hex Editing Tutorial     
Written By: Phobos Developer

Hex Editing
Here will be tutorials and guides on how to hex edit LVL files. There are different things you can change by hex editing. MISSION.lvl isn't usually hex edited much because of the builder for it. CORE.lvl can be hex edited to change the F5 commands. Boundaries, capture regions, and vehicles can be removed. The common, shell, and side files aren't usually edited often.


Basics - Removing Boundaries
To start hex editing, you need a hex editor. I use this one.
Download that and load any LVL file to get a basic understanding. There are several LVL files you can modify, but for the basic tutorial I will be showing you how to remove boundaries from any map, in this example we will use cloud city.

Open bes2.lvl from the bes folder in your hex editor. It should look like this:


Now click Find and type "boundary" without quotes and hit ok. You should see this:


The last step is simple. Just click on the "62" on the left column, where the number hex values correspond with boundary, and replace them all with "00". In the end it should look like this:


Congratulations you have just removed boundaries. No more deaths out of bounds. Now before you save, make sure your original bes2.lvl is backed up or copied somewhere else, because you always want to have the original files without any mods.


Removing CPs (Command Posts) and Vehicles
Removing CP - Tutorial
Load the hex editor and in find type "capture" until you see this:


Removing Vehicles
Certain maps have ships or tanks, and often times we find this inhibits the fun of the map. All vehicles are referenced in LVL files as "com_item_vehicle_spawn". Only by testing one at a time is it possible to determine which vehicles are which since they all have the same name, but by individually removing one at a time you can determine how to remove, for example, only cloud cars and not regular planes on platforms. Here is an example:

Replace the 63 to 6e for this one, and then go through the rest of the vehicle_spawns to remove all tanks.


Custom Team Commands
This guide teaches you how to mod the CORE.lvl so that you can use custom commands instead of the default "Enemy Sighted!" commands. Modding the CORE.lvl is very delicate and you must not make any mistakes or it could ruin your file. It is very important to make a backup copy of this file just in case you do mess up.

The first step is finding the commands you wish to edit. This is a tricky process but it is easy once you know how. We will start with "PICK ME UP!" and change that to something else. First step is load core.lvl in hexeditor. Then type PICK make sure it is in caps. It should look like this:


Don't click ok because it won't find it. You have to first click the HEX option, next to octal and ascii. It will convert PICK into numbers "50 49 43 4b". Now in between each number put 00 so that it looks like "50 00 49 00 43 00 4b":


Now hit ok. You will see PICK ME UP with a period in between each letter. It can be changed but in between each letter must remain a "00" value. The space value "20" must also be in between two "00" values. You must also stay in the limits of however many characters are allowed per command. Here is an example of a working altered command that says "Enemy Flanker":


I recommend changing only two or three at a time then testing in game, because it doesn't always work correctly. You should back up your CORE every time you go to edit just in case it does mess up.


Advanced Info
under construction

Important Commands:
00   Acts as either a barrier and can replace certain codes in LVL files to null things.
20   Regular Space
0A   Line break in Cheat Engine

I couldn't find any thig with the "Find" tool..Have any idea why?

try capitalizing the first letter, that worked for me with boundary and Boundary (Boundary works)
=AaTc= Forever

SALLY....

-Retired Modder

I have a feeling that will help, thanks.