Setting up MaxED

MaxED is part of the Max-FX toolset. First you need to have the game installed as MaxED needs the game to access it's database.

To get the Max-FX tools in, insert the game CD and select Install Max-FX tools. After the installation you will have a new item in the Start/Programs menu called Max-FX tools under which you can launch MaxED. If you like, you can already open MaxED and start testing, but you will not be able to take your level into the game unless you do as described in the Preparing the game for custom levels section below.

Once you start to work  with MaxED, we recommend you to print yourself a copy of MaxED Quick Reference document. Users with plenty of previous 3D game editor experience can probably get already very much out of this document and start working almost immediately. And whatever your skill level is, it might be very good to briefly go through all the items and descriptions to get some kind of overview of all the features that MaxED has.

Preparing the game for custom levels

Remedy has already provided you a very basic custom level, that you can use as a base of your own work. 

Look the contents of your Max-FX tools folder. There you will find (among others) two folders: Rasmaker and ExampleMod. To get the basic level into game, you need to use the RASMaker program from Rasmaker folder to extract the MPM file from the ExampleMod folder.

RasMaker does not have graphic UI and you need to use the DOS prompt or Run command from the Start menu. The actual command is: 

Rasmaker.exe -X "basic room example mod.mpm"

Assuming that you know how to use command line system, you know that this does not work. Naturally you need to define the paths, for example like this: 

"D:\MAX-FX Tools\RasMaker\RASMaker.exe" -X "D:\MAX-FX
Tools\ExampleMod\Basic Room Example Mod.mpm"

Change the paths as necessary to match your system.

When the command is successful, a folder "data" appears inside the folder where the Rasmaker.exe is. Copy that-directory into your Max Payne directory. This will give us the modified levels.txt that will add a new item to the game's main menu.

Modify your shortcut to Max Payne the game by adding at least these two switches after the name. This gives you access to developer options and some additional keys inside the game.

MaxPayne.exe -developer -developerkeys

You might also consider adding -skipstartup and -window switches, which will make the game skip the opening animation and open the game in a window.

When you launch the game, you will have a new menu item presented which is the basic room example you just copied under the Max Payne folder.

When you have made some new content with MaxED, export your level on top of the example level (.ldb) inside the data folder and you can quickly access it from the game.

Possible problems:

MaxED doesn't start at all
Launch MaxED without command line switches and try out different rendering options. Also try out different drives for your video card.

I decided to extract the whole database from the .RAS files, but now MaxED can't find the database anymore
You have to define the database path as "...\Max Payne\data\database\" if you have it fully extracted from the .RAS files.

Abnormal program termination at startup
Make sure you don't have the database extracted from the .RAS files AND still have the original .RAS files in Max Payne -directory. MaxED doesn't work if it finds the database twice. Neither does the game. 

Tips:

If you want to, you can at this point define some useful settings for MaxED from Options/Local Settings. Double click on the value to change it.

AlphaTestReference
Changes the threshold value which the editor uses as an alpha test "cropping" value. 254 means that only pure white in alpha map is opaque and 1 means that only full black is completely transparent. 128 might be a good basic value

Autosave interval
Autosaves into the system %temp% directory as often as you want it to. Specified in minutes.

SharedDBPath
Max Payne database path. Points to the directory of .RAS files or to the extracted ...\data\database\

These will only appear when MaxED tries to read their values for the first time. They don't dramatically affect the way MaxED works, they are just in for the convenience of the user.

Texture directory
Directory where you keep your textures.

LevelDirectory
Directory where to save your .lvl files (unexported source files)

ExportDirectory
Directory where to export your level files.

All local settings are stored in the windows registry in:

"HKEY_CURRENT_USER\Software\Remedy Entertainment Tools\Max Payne Level Editor\Local preferences"