Posted by angrycamel at September 21st, 2006

(Halo 1)Utility: HMPi (Halo Map Pack Installer)
Tue Oct 26, 2004 5:13 am

Reddog & AngryCamel’s Halo Map Pack Installer

Download:HMPi (Halo Map Pack Installer)
Overview:

HMPi is designed to allow the easy distribution and installation of HaloMod MapPacks. We can accomplish that by developing a standard in which to deploy MapPacks. This document will attempt to break down the build process of a HMPi compatible MapPack.

For those who have not seen it yet:




Here is a fun little peek at the dev process of the HMPi UI:

The How To Basics:

An HMPi MapPack is made up of:

    a folder with 14 properly named ppfs
    mapPackNameHere.xbe.ini
    default.xbe.ini

When HMPi installs the pack, it downloads the necessary original map files, patches them with the ppfs, fixes their build version numbers and internal names, and creates a properly edited xbe file for the MapPack. You do not need to worry about hex editing an xbe or the ppf to get the map directory and build versions correct. In fact, no ppfs of the xbes are needed. So your job, as a MapPack builder, is to create and arrange the ini and ppf files in the right format and make sure they have the right names.
Setting up the folder structure:

Start by creating a “~input” folder. Under that, create a folder to hold your map ppfs here. The folder name must be no more than 5 characters long. For example, Halo NMP 1.1 used “nmp” as its map folder name. When your MapPack is installed, this folder will be right alongside the “maps” folder on the users XBOX, and will hold all of your custom maps.
Setting up the ppf’s:

This section assumes that you already have all of the maps that you would like to pack up in ppf form. If not, see the “Making PPF’s” section below.

Disclaimer:
HMPi does not support ppf’s containing:

    Patch Validation
    Undo Data

Caution:
Make sure that you turn those features off in your PPF maker. Better yet, just use RPPE to make your patches — RPPE ppfs will be smaller, faster, and guaranteed NMPi compliant!
The goal of this section is to put 14 ppf files (13 MP maps and the UI) in the last folder you created in the previous section. For example, an NMP 1.1 installation would have 14 ppf files in a “~input\nmp” folder.
Each ppf must be named with the following conventions:
whateverName(mapToPatch)(mapToReplace).ppf
Example:

ACDIBG(BG)(PR).ppf

…will patch bloodgulch.map with this ppf and then name it prisoner.map to replace Prisoner in the map selection screen.
Halo currently only has space for thirteen maps. We need to label each one of our thirteen ppfs with a 2 letter code representing one of those slots. We can only use each slot once. For example if I wanted to place “A Cold Day In Bloodgulch” in the same slot as “Derelict” then I would use the code “DT” in my second set of “( )”, but if I wanted it to use the Sidewinder slot then I would use the “SW” code.
The following is a list of the compatible map codes:
BA - Boarding Action

BC - Battlecreek (filename is beavercreek.map)BG - Bloodgulch

CO - Chill Out

DN - Damnation

DT - Derelict (filename is carousel.map)

PR - Prisoner HH - Hang em’ High

LT - Longest

PP - Chiron TL34 (filename is putput.map)

RR - Rat Race SW - Sidewinder

WZ - Wizard

UI - User Interface (Menu) (filename is ui.map)
It is not important which map gets replaced (the second “( )”) but it is important that you have one of each map from the original Halo represented so that all thirteen slots are accounted for but none duplicated. To double check your list of ppf files, do the following:
1) Read through your list and make sure that the first “( )” in each name represents the map that the ppf should use as a source

2) Make a list of all 13 abbreviations on a piece of paper

3) Read through your ppf file list looking at the second “( )” and mark off each abbreviation
You should have marked off all of the abbreviations and marked them only once.You will need a 14th ppf for the UI modifications named “ui(UI)(UI).ppf”. This should be something you created with the map names, descriptions and icons edited to match your new maps. If you have not done so already, please refer to the “Setting up the UI” portion of this tutorial for instructions on how to build your UI ppf.
Tip: RPP and RPPE can make ppfs for you. Highlight your modified cache file and the original compressed map at the same time. Now drag them onto RPP.exe or RPPE.exe. For example, let’s say I had been modifying a bloodgulch cache file named cache003.map. I would FTP the original bloodgulch.map file to my PC, and then drag it along with cache003.map onto RPP.exe.
Setting up the mapPackNameHere.xbe.ini:

Create a new text file and name it “mapPackNameHere.xbe.ini”. Of course you do not have to name it that verbatim, simply replace the “mapPackNameHere” string with the name of your MapPack’s xbe file. The name, including the “.xbe”, can be no longer than 20 characters and you will see why later on. Once you have done this open it in a text editor and enter the following text:

    DisplayedName=

    MapDir= BuildVersion=

    DemosPath=

DisplayedName: The string entered here will be the title of the xbe file. For example it is what will show up in the games list on an EvoX menu. For ini files other than default.xbe.ini, this field is not very important since the mapPackNameHere.xbe file will not show up in EvoX (only default.xbe files show up). Max length: 71 characters.
MapDir: This is the name of the folder that you put your MapPack’s ppf files in during the “Setting up the folder structure” and “Setting up the ppf’s” sections. Max length: 5 characters.
BuildVersion: Any string of up to 15 characters identifying your MapPack. For example, “AngryCamel-v1.5″ and “09/15/04-Reddog” are good map versions. Max length: 15 characters.
DemosPath: Enter the name of the xbe file you want to lauch when a user clicks on the “Game Demos” link at the bottom of the Halo main menu. For your MapPack’s ini, this would usually be “default.xbe”, unless you are installing more than one MapPack. Max length: 20 characters.
Once you have entered everything in, your file should look similar to the example below:
Contents of the camel.xbe.ini file:

    DisplayedName=AngryCamel v1.5

    MapDir=AC15

    BuildVersion= AngryCamel-v1.5

    DemosPath=default.xbe

Setting up the default.xbe.ini:

Create a new text file and name it “default.xbe.ini”. Open it in a text editor and enter the following text:

    DisplayedName=

    MapDir=maps

    BuildVersion=01.10.12.2276 DemosPath=

Once you have done this you can enter your MapPack specific information.
DisplayedName: The string entered here will be the title of the xbe file. For example it is what will show up in the games list on an EvoX menu. You can just set it to Halo like the original version, or name it something that describes Halo and your MapPack. Max length: 71 characters.
MapDir: For default.xbe.ini, you should just use the original “maps” folder.

BuildVersion: For default.xbe.ini, you should just use the original “01.10.12.2276″ version.
DemosPath: Enter the name of your MapPacks ini file from the last section, but remove the .ini. This will replace the game demos link on the Halo main menu (not graphically, just functionally). So if your ini file was named bobpack.xbe.ini, you would enter “bobpack.xbe”. Max length: 20 characters.
Continuing our previous example, a completed default.xbe.ini file should look similar to the example below:
Contents of the default.xbe.ini file:

    DisplayedName=Halo + AngryCamel v1.5

    MapDir=maps

    BuildVersion=01.10.12.2276

    DemosPath= camel.xbe

Making PPFs:

Things you will need:

    .NET Framework 1.1 Installed

    Red Pack Pro Editor (RPPE)

    Original map that yours is based off ofYour modified map

Make sure that your map and the original map that yours is based off of are in the same folder. Drag your map file onto PPFSmartMake.exe.
Setting up the UI:

Things you will need:

OR

Just use HUC
The UI has 13 MP maps with images, titles, and descriptions that need to be modified for your map pack. This used to be a long, limited and tedious process, but not anymore thanks to Reddog’s RPPE app. If you follow the instructions below correctly, starting from a ui.map (compressed or cached), you should end with a ui(UI)(UI).ppf, finished and ready to be used in the install of your MapPack.
Create a working folder (e.g. “CustomUI\”) to do all of this in, just to keep things neat and in order. Now put a copy of the original ui.map file (e.g. off of the DVD). Just remember not to use the maps\ui.map that was already modded; ex: Halo NMP 1.1 install. Unpack the RPPE.rar file into your CustomUI directory too.
You should now have a folder with the following in it:

    RPPE.exe

    HmtFullLib.dll

    zlib1.dll

    UIUnpack.exe

    UIPack.exe

    ui.map

Drag ui.map onto RPPE.exe to make “ui-d.map”, the decompressed ui. Now drag ui-d.map onto UIUnpack.exe. This should create a new folder (”ui”) with all of the dds, title, and descriptions for the ui.map in it. Simply replace the dds files with the map screen shots you want to use. Refer to the “Creating map preview images” section for instructions on how to create the dds files to replace these. Everything else is included in text files for easy editing. Simply open one of the text files, make your adjustments, then save.
Once you have completed all of the editing needed for your MapPack, go back to the “CustomUI” folder. Drag ui-d.map onto UIPack.exe
Now test your work. Make a copy of ui-d.map called cache002.map and copy it to the halo cache directory on your xbox (x, y, or z drive with other cache files in it). Start up Halo and scroll through your new map images, titles, and descriptions.
If you would like to make any other changes to the UI such as injecting new sound for the menu or a new image for the “Game Demos” link do it now, because in the next step we will be creating the PPF.

Once you are satisfied with your changes to the ui it is time to make a ppf of it to be used in the installation. To do this highlight ui.map and ui-d.map (or cache002.map if you renamed it) and drag them both onto RPPE.exe. You should see a new file created called ui-to-ui-d.map or ui-to-cache002.ppf. Rename this file to ui(UI)(UI).ppf and it is ready to go into your MapPack’s map directory in ~input. You can throw away the rest of the files once you have the ppf. Creating map preview images:

Things you will need:

Once you have all of the required programs and files we can start editing the MP Map images. Open one of the original mp map image dds files in Photoshop. Now open the image that you wish to replace it with. With the new map image replacement as the front most window in Photoshop, select “Image>Image Size…” from the menu. Make sure that Resample Image and Constrain Proportions is checked. In the Pixel Dimensions area, set width and height to view as pixels using the drop down menus to the right of each field. Once this is done, compare the values in each field to determine which on is the largest. If the height is larger then replace it with 114. If the width is the larger of the two numbers then replace it with 140. Hit the ok button. Your image should now be resized to fit inside the dds file.
Hit control A or choose “Select>All” from the menu then hit control C or “Edit>Copy” from the menu. Select the window for the dds file to bring it to the front of Photoshop. Hit control V or choose “Edit>Paste” from the menu, this will create a new layer with your image pasted into it. Hit the letter V then move the layer into position over the original map image. Do not let any of your new image hang over the edges of the original or it will be clipped off. If you can see any of the original map image then select the background layer in the layers palette and using the paint tool with a solid black ink, paint over the part that you can see.

From the layer menu choose flatten image. Now choose “File>SaveAs” and select fileType of DDS. If you installed the dds plugin correctly you should see this in the list of available filetypes to save as. Hit save. A new window with options for the dds file will appear. Choose the following settings:
DTX1 (1 bit alpha)

no mip maps
Then hit save. Your final file should not be any larger than 16,384 bytes. Either replace the old dds in the ui-d directory if you are following the directions in the “Setting up the UI” section, or inject your new image using HUC (Halo UI Creator). Finishing up:

At this point you should have a “~input” folder two ini files in it an two folders (mathing the MapDir field within the ini files). The “maps” folder should contain a modified ui(UI)(UI).ppf (if you are modifying the retail ui at all), and your MapPacks map directory should contain 14 ppf files. If you have this and feel confident that it is correct then drop “~input” into your HMPi directory and run setup.exe. It should install without any problems. If it does, then congrats! You just successfully made a HMPi compatible haloMods MapPack!