Map Making

Note: This is a salvaged tutorial from the now lost FR Wiki, so links and images may be broken, but the info is still a great help to modders.

Conduit’s MapMaking FAQ
For Freedom Force and Freedom Force vs. the Third Reich

1. What do I need to make a map?

Well, technically the only thing you need is FFEdit, (available here) but I highly recommend an image editing program that can edit tga files, (either paint shop pro, or photoshop, get photoshop if you can afford it, if you can’t get paint shop pro) and a hex editor (I use this) and/or NifSkope. If you want to make terrains and objects from scratch, you need 3ds Max and the character studio add on, which will add up to a total cost of 5,000$. You’ll also need to practice for a while to be able to make something good, and this isn’t required for map making.

2. How do you get started making a map?

Note: doing what’s explained here will not allow you to edit any objects the map already has

Well, first open up FFEdit and select the Mission tab. Click the new button. Use the new folder button to create a new folder for your map, and open the folder, then click open. Now click browse next to the Layout file box and select the layout file for the terrain that you want. If you selected the file for an ingame level, uncheck the Markers and Scenery checkboxes under the Mission Markers box, and check the Layout checkbox. Now select everything except _impobj_0 and delete them. This will remove all the objects the map already has. If you had left them, you wouldn’t be able to edit them in the in game editor, and they wouldn’t behave like regular objects. Now click in the name box and type in a name for your map. You’re now ready to begin actually making the map.

3. Is there anyway I can edit an ingame map and keep the objects with it?

Yes, but it’s a bit more complicated. There’s a file in the data folder called missions.ff. Make a copy of it and rename it so it’s missions.zip. This will change it into a zip file. Open the zip file and unzip it. You might have to use the winzip wizard to do this. Now go to the folder that you unzipped it to and find the folder for the map that you want to edit and copy the mission.dat and mission.mg files and paste them into the folder for your custom map. Now open up FFEdit and load the mission.dat file in your custom map folder. Change the name, and you’re ready to star making the map.

4. How do you use the level editor?

To start it, click the Edit In Game button at the bottom of the FFEditor. This will open Level Edit. It’s a modified version of the FF engine, and all graphics and sound settings you have for FF will be applicable here. The camera controls are the same as in FF, which if you don’t know, you really shouldn’t be reading this. Click on any object to select it, and you can move it by clicking and dragging. Hold down the Z key and move the mouse left and right to rotate it. Hold down the X key and move the mouse up and down to lean it forward or back, or in some cases left or right. Press H to turn \”Snap to Terrain\” on and off. What this basically means is whether the object changes it’s vertical level to put itself on top of other objects and terrain as you move it. If it’s on, it does that, if it’s off, it remains at it’s current elevation no matter what the terrain or object elevation. Hold down Shift and move the mouse up and down to change it’s elevation. What really happens, actually, is that it moves the object nearer or farther to the camera, but since the camera in FF is always overhead unless you use the Free Camera cheat (which works in the level editor, by the way) so it’s basically the same thing. Press Delete to delete the selected object. Now comes the fun part, adding objects. Press the C key, and the create menu opens. There are Seven tabs:

Add a Character
Add a Positional Marker
Add a Light
<DIR> Area_Specific
<DIR> Characters
<DIR> FX
<DIR> Vehicles

Add a character is used for adding characters and custom objects Positional Markers are used for mods and for danger room maps Lights, are, well, Lights Finally, we come to the directories. These are where all the objects are. Area Specific contains nearly all of the objects, Characters contains the Turrets, FX contains the Vine trap object from the Pan levels and the Light from the shadow’s lair level, and Vehicles contains the Cars, Trucks, Buses, and the rest of the Vehicles. When you open up Area Specific, you will see several subdirectories, these are organized from what kind of maps there were used for. Objects found in City maps will be in the City subdirectory, and objects found on the Robot Factory map will be in the Robot Factory subdirectory, etc. Look around a bit to see what’s where. To add an object, go through the subdirectories until you see something like object_name.nif. Double click on that and the object will be added where you are looking at (or, if you have Free Camera enabled, where you were looking at when you used the cheat). Press Spacebar to add another of the last object that you added. Use the object controlls refered to earlier to move and rotate it. Look in the FFEditor documentation for any controls that I might have forgot.

5. What are positional markers for?

Positional markers, well, mark positions. They are used for mods to define positions on the map that will be used during scripting. They are also used for Danger Room maps to define player and enemy spawn locations. You add a positional marker by pressing C and double clicking on Add a Positional Marker. It will look like a white transparent sphere with an arrow inside it. You can rotate and move it like any other object, and you can adjust the size of the sphere by holding down the right mouse button and moving the mouse up and down, but you won’t need to do that for danger room maps. Select it and press the N key to rename it (this also works with any other object). For a dangerroom map, for it to show up on the list of dangerroom maps, it needs to have the following markers on it:

squad_1
squad_2
squad_3
squad_4
skirmishspawn
group1marker1
group1marker2
group1marker3
group1marker4
group1marker5
group1marker6
group2marker1
group2marker2
group2marker3
group2marker4
group2marker5
group2marker6
group3marker1
group3marker2
group3marker3
group3marker4
group3marker5
group3marker6
group4marker1
group4marker2
group4marker3
group4marker4
group4marker5
group4marker6

The squad markers are actually for multiplayer, they determine where each of the player’s squads will spawn. Skirmishspawn determines where the player’s squad will spawn in a dangerroom game. The rest of the markers determine where the enemies in a dangerroom game will spawn. You could add all those positial markers and rename them manually, but this can be very time consuming. Instead, why I do is what I call the merge dats technique. What you do is you find another dangerroom map, preferably one that uses the same terrain as your map and you copy it’s mission.dat file. You put the copy in a different folder and open it in the editor. Now, select everything except the dangerroom markers and delete them. Set everything in the Layout File, Texture Dir., and Name boxes at the top to the same as your map. Go to the options tab and click the merge dats button. Select the mission.dat of the map that you’re creating to write to, and the copied mission.dat that you just made to read from. Open your map, and the dangerroom markers should be there. Open the Level Editor and move the markers to where you want them. You may need to use the Free Camera Cheat to do this.

6. How do you retexture the map?

There are two ways. The first way is you change the texture directory. Above the Name box in the upper left corner is the texture dir. box. It should have \”library\area_specific\_textures\” in it if you haven’t changed it already. Change _textures to something else. Now open the area_specific folder and create a new folder named what you changed _textures to. Now copy the textures for all the objects and the terrain that the map uses to here (you’re going to have to have unzipped art.ff earlier for this, do the same thing that I told you to do with missions.ff if you haven’t). Start Level Edit and look around to see if you got everything. If you missed a texture, the parts of the object or terrain that use that texture will appear white. If you did miss something, open up the nif that the object or terrain uses in a hex editor. Search for tga to find out what textures the object uses (remember to get the rubble textures if you have any buildings on the map). Now that you have all the textures in the folder, open the ones that you want to change up with an image editor and change them to what you want. It helps to have skinning talent for this. The downside to this technique is that you have to have the texture of every single object the map uses in the folder, even if you don’t want to change all of them. This takes up a lot of space. The other way requires a hex editor or NifSkope. You need to copy the object and terrain nifs that you want to use different textures, and put them somewhere in the Freedom Force folder, preferable in a subfolder of Area_Specific for the objects, and the art/library/terrain folder for terrains (be sure to include the other nifs used when you destroy the object in game). Now open the copies in a hex editor. Search for tga and change the name of the textures it looks for, note that the new texture that it looks for has to be the same length as the old one. Now copy the original texture of it, paste it into area_specific/_textures and rename to the texture that the nif now looks for. Open it up with an image editor and change it to what you want. Now you’re going to have to make a custom object using the nif, or make a level.txt using the terrain (IGTTL).

7. How do you use lights?

Lights are used to apply specific lighting to a certain part of the map. You don’t actually need lights, as without them the level still looks ok, but lights can be used to add effects to a certain part of the level. To add a light, press C and double click Add a Light. You can move it like other objects and position the light where you want. You will be able to see a visible difference as you move the light around the level. You can also edit the colors of the light. First go into your image editor and play around with the color settings until you find the color that you want for your light. Now select the light and go to the marker details box in FFEdit. You’ll need to have the layout checkbox under the mission markers box checked for this to work. In the Marker Details box, there are 4 textboxes designated Rot. These control the colors of the light. The top one is red, the next one down is blue, and the third one down is green. Copy the color settings from your image editor to this and you now have a colored light. Also, if you add a negative to the front of the color settings numbers, you will get a \”light\” that creates darkness. Try it.

8. How do you use custom objects?

First, you need to create a template for the object. Start FFEdit and go to the Templates tab. You’ll see a list of existing templates on the left and a template info box on the right. I’ll explain the template info box first. At the top there are 3 boxes, Name, Class, and Material. The Name is exactly what it sounds like, the object’s name. Class dictates whether it’s an object, a vehicle, a building, a powerup, or a number of classes of characters. Use object for most custom objects, vehicle for when you want to use a character mesh as scenery, and be sure to not place any vehicle nodes near it unless you intend it to drive around. Use building if you’ve built an object that you planned to use as a building in 3ds Max (refer to the Art documentation that came with the Editor for how to make custom objects, buildings, etc. in 3ds Max). Material sets what the object is made of, you should be familiar with this if you’ve ever created a character in FF. Under those 3 boxes is the Example Nif box, which you use to set what nif the object uses. Click the ‘…’ button next to it to browse to the nif, or type in the location if you want it to use an ingame .nif (which you can’t browse to). The attribute overrides boxes determine the properties of the object. Click the drop down button on any of the boxes to select a property, then type in a number in the text bos to the right of it. The 2 properties that have to be set for any object are Mass and Health, which both do exactly what you’d expect. Note that the Mass number will be modified in game by the material that you set. I don’t know what the exact modifiers are, so if anybody does know, can you tell me? There are a whole lot more, see the editor documentation for a list of all of them. I’ll talk about 4 notable ones. The first is MinHealth, this makes the object stop taking any damage once it’s health reaches the set number. MinForce dictates how hard it is to move that object, the bigger the number, the more force is required to move it. Setting it as -1 makes the object immovable. Physical sets whether the object can be interacted with. Finally, Flyover sets whether the object’s name, health, etc. will show up when the mouse it put over it. Setting it as 0 makes it basically indistinguishable from the terrain in game. At the bottom, there are 5 boxes. The Arg ones are used for objects with special scripted commands, the Arg2 box dictates the name of the special command the object has, and the Arg3 box dictates what scripted function is called when the command is activated in game. The Skin box dictates what skin the object uses if it’s set as a character or a vehicle. The Explosion box dictates what, if any, area attack is used when the object is destroyed. To create a custom object, either find an existing template with properties similar to what you want, rename it and then Save, and modify to what you want, or create a new template from scratch with the New command at the bottom. Now, create a character with the same name as the template, and you can add it in the ingame level editor.

9. How do I use a custom terrain? This is less complicated then using a custom object. First, you need a terrain nif (refer to the Art documentation for how to make them). Place this nif in a subfolder in the art/library/terrain folder. Now, if you already have the level.txt, extents.txt, and lights.txt files, place them in a subfolder in the ar/level layout folder. If you have hex edited a terrain file to use new textures and thus don’t have those files for it, copy the files from the original terrain. Now open the level.txt file in Notepad and change the location of the terrain nif to the location of the new one. You can now set a map to use the layout files you just created using the Layout file box.

10. Is there anyway to create custom indoor levels without 3ds Max?

Yes, there is. I call this the Walls and Fog technique. Be warned that this is extremely tedious, though. To begin, you need to create 2 objects. The first is a wall object. Set the example nif to library\area_specific\underground\shadows_door\shadows_door.nif if the map is going to use a different texture folder, or a copy of that nif hexed to use a different texture if you’re going to use ingame textures for the rest of the objects. Now, for the attribute overrides, set minhealth to whatever health is, minforce to -1, and flyover to 0. The second is a fog object that you’ll use when the existing ones are too big to be used. Create a copy of the nif of the robot parts box used in the Mr. Mechanical base level (the really big crate). Hex the copy to use a different texture, and make the new texture all black. Now rename the fog_of_war template, save, and then set Example nif to the nif that you just created. Now create a map using a copy of the small_blank terrain hexed to use 2 textures (like the terrain used with the Sky map by Gengoro). Place the walls to layout the rooms, and then put in the fog to get rid of everywhere else. Use the Room_1 object under the area_specific/robot_factory directory to get rid of any large areas (make sure you change it’s elevation so it’s level with the top of the walls first), and then use the custom fog object you made to get rid of the rest (again, remember to change the elevation so the top of the crate is level with the top of the walls). You now have an indoor map, you can now place the rest of the objects and other things in the map.

10. How do I create ground fog?

Note: place other objects before this, as you will end up selecting the ground fog whenever you try to select an object below it. First, you need to add the clouds either from Pan’s Island or from the Empire State Building levels. They will appear very far below the terrain. Now turn off Snap to Terrain, click and hold on one of the clouds, hold shift, and raise it up so it’s about level with the terrain. Next move it over so it passes through the terrain, from there you can adjust the altitude further if need be.

Terra forming with Nifskope
For Freedom Force vs the 3d Reich

Got an idea for a great map but think it’s too complicated to pull off? Maybe you’re getting sick of fighting in the city and would like a more exotic locale? Mapmaking is not as hard as it appears and nifskope makes it much easier.

This tutorial will show you how to use nifskope to modify an existing terrain of create a new one altogether. The instructions are long because I’m assuming you’ve never gotten into modding, but it’s actually very simple. After 2 or 3 tries, the whole process will take you about 20 minutes.

What you’ll need:
Nifskope Available at sourceforge.net (direct link: http://sourceforge.net/project/showfiles.php?group_id=149157&package_id=170735)
FFedit
At least 200MB to burn. 300MB if you want to go big.
It helps to have a decent video card and at least 512MB of RAM.

I – Extract your source files and set up a working folder

Before getting started, we need to set up our working folder and unzip some files that came with the game. I always use a working folder when making maps, to keep my regular .dats and files safe (in case I screw something up!). You do not have to. To set up a working folder, just create a folder named “mapmaker” (or similar) in your main Freedom Force Directory (C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\). Basically, you’re creating a mapmaking “mod” folder.

Copy the art.ff, missions.ff, and layout.ff files from your Data directory and paste them into your working folder. These are large files, but we’ll be downsizing shortly. You’ll also need to copy all your .dat files (attributes, campdef, characters, objects, etc.). You won’t be adjusting all of them, but it helps to have everything you’d normally have in the real game.

To unzip, right click art.ff and rename it to art.zip. Repeat for the other two files and then unzip them into your working folder. Be sure to keep existing file structure intact and, if prompted, click “OK” to replace any existing files. When finished you should have two folders: “art” and “missions”(the “layout” files have been extracted into the “art” folder). Open “art”, and then “library”. The only folders you really need are “area_specific” and “terrain”. You can delete the rest. You can also open up “area_specific” and delete everything but “_textures” if you like. The other folders are the objects and characters used in the game. I keep them in case I need to create a new object using one of the standard objects. The difference is about 80MB memory, if that means anything. You can also delete the art.zip, missions.zip, and layout.zip if you haven’t already.

When finished, your working folder should be located at: C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\workingfolder.

II – Create a base terrain
The easiest way to create a new terrain is to modify an existing terrain, so the first thing to do is decide which map you want to modify. Try to pick something with the general contours and landmarks you need. For this example, we’re going to create a grassy plain that can be used as a base for creating other maps. I chose this example for brevity. You can use the same process for any map.

Open FFedit and select the “options” tab. Point your “Primary Data Path” to your working folder. Next, click on the “missions” tab and then press the “Load” button towards the bottom of the page. The window that opens should contain all the campaign and multiplayer missions. Load a mission and the click the “Edit In-game” button to see how it looks. Repeat through the various levels until you find one that suits your needs. I’ve chosen level “3A_Red”. Once you’ve found your level, use the “Save as” button on FFEdit. When the box opens, find your working folder and expand it. Next, scroll down to the “Missions” folder and highlight it. Click the “make new folder” button and name it whatever you want to name your map. For this example, I’m using “jm_grassy_knoll_base”.

Now you’re ready to create your base terrain!

In FFedit, just below the “Mission Objects” window, are two boxes: one says “Layout” and the other says “Objects”. Deselect the “Objects” box and select instead the “Layout” box. The “Mission Objects” window should fill with the various items as defined in the level layout file. Find the object named “_impobj_0” and note the location of its .NIF file in the “Object Details” section to the right of “Mission Objects”. In this case, the .NIF location is: library\area_specific\Cuba\terrain\3a_terrain.nif

Remember, you’re in your working folder, so the .NIF’s actual location would be workingfolder\data\art\library\area_specific\Cuba\terrain\3a_terrain.nif. This is your new terrain base. You’ll need to copy (always good to keep a backup) and rename it. I put all my custom objects into a custom directory (to make them easier to find), but you can put it wherever you like. Just make note of the location for later. As for the name, I’m using jm2_terrain.nif . My new base is therefore located at: C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\workingfolder\art\library\area_specific\jm_objects\terrain\jm2_terrain.nif.

Now comes the fun part…

Navigate to your new NIF file. Right click and select “Properties”. Deselect “Read Only” and click “OK”. Now open it in nifskope. If you really want to go big, you can change every texture file to whatever you like. I’m kinda lazy, so I’m only going to change the ones I really need to. Since I’m creating a grassy knoll, I’m going to replace all the “non grassy” textures with “grassy” ones.

The same process applies for any type of terrain you want to create. I prefer using the in-game textures whenever possible to conserve memory and save time, but you can use pretty much any texture you like, just make sure it’s in standard dimensions (i.e. 256×256 or 512×512). Any custom textures that you want to use should go into the default directory (i.e. art\library\area_specific\_textures). You can create a separate texture folder for your map, but then you have to copy every texture your map uses, including lightmaps and debris. It’s much faster to add your own textures to the default directory. Just be sure to name your textures something unique, like “jm_texture1” (using your initials) so they do not conflict with anything else. If I’m bringing in textures and/or objects fro m FF1, I usually keep the same file names, as they could affect many different objects/characters.

The “Block List” window of nifskope lists every textured item within the NIF file. Yes, there are quite a few. Fortunately, nifskope changes multiple textures at once, making our job MUCH easier.

First, I want to select my basic “grass” texture. I’m going to use one of the map’s existing textures for simplicity. (If you want to use a different texture from the game, you can find them at: “workingfolder\data\art\library\area_specific\_textures”.) Scrolling down through the block list I find several nodes listed as “grass”. Expand a “grass” node until you find an entry called “NiSourceTexture”; the specific file is in the “value” box. In this case: “cub_terrain_grass2.tga”. Click the flower icon next to the texture name and you will open a window asking you to select a texture file. Highlight the name of texture (again, “cub_terrain_grass2.tga” in our example) then right-click…”Copy” it. Hit cancel to close the window. Now scroll back up to the top of the “Block List” window. Every node that doesn’t say “grass” somewhere in the title must be changed (cliffs, and other rock-based features excepted). I’m also changing the footpaths, but you may wish to keep them in your own map. To change the textures, just double click just to the right of the texture name (within the same line) and you will open up a manual entry box (like my technical jargon?). Highlight the existing texture (using click and drag), and then type “CRTL +‘V’” (control button and letter “v” simultaneously) to paste the new texture name into place. You can also click the “flower” icon and navigate to the texture you want, but this places a direct link onto the .NIF file. If you distribute it and somebody does not have the texture in that exact location it will not show up. By placing only the name of the file, the program will look in whatever “texture” directory you define later in FFedit. Don’t worry about the .tga extensions, FFVTTR will run a .dds file if no .tga file is present.

Repeat. Many times.

If you are doing this example, you will notice that, by node 60 (“60 NiNode”), the new texture is already in place. You’ll find the same with other nodes as well. Thank you nifskope! I usually expand every couple of nodes to double check, but this little feature still saves you quite a bit of time. Once you’re finished, just save and that’s it! You have a new terrain.

NOTE: Want roads without the markings (crosswalks, arrows, etc.)? You can replace the existing texture with the same texture as the road (as long as it is seamless) or you can “hide” the markings themselves. Expand the NiNode in question and click on NiTriShape. You’ll see the object highlight in the rendered view to your right. Right click the node and select “flags”. Check the “hidden” box and click “accept”. Unfortunately, you can’t do multiple nodes at once, but there usually are more than a few lines to modify. Double check the rendered view to ensure you didn’t hide an integral part of the terrain. You’ll know by the hole in the map!

You might be thinking: “Why don’t I just change the actual textures themselves? Wouldn’t it be easier?” The answer is “yes”….and “no”. Changing the textures themselves requires a separate texture directory (otherwise you’ll change the texture for the entire game). Which means, in addition to the textures you want to change, you also have to copy every texture you’re going to use – including debris and shadowboxes. This takes up time and memory and makes for a lengthy download.. Changing the .NIF file directly allows you to use the default texture directory and saves you time (and memory) in the long run.

III. Testing and using your new terrain
So you have a terrain, now how do you use it in FFedit? There are two ways to do this: 1) create a new level layout file or 2) hex edit your mission.dat file to point to your new terrain. I prefer to create a blank level layout file. That way, if you ever use the same terrain again, you can just import the layout and place everything else as objects. By all means, hex edit if you prefer, but this section will cover the layout file.

Who the heck is Perforce and where the heck is that folder??? That has always annoyed me, even more now that I’m making maps. Now I just create my own layout files, as it’s very simple. Go to “workingfolder\art\level layout\”, copy the folder for the mission you modified (in this case, “3a_red”) and rename it to the name of your mission. For this example: “jm_grassy_knoll_base”. Open up the folder and right click the layout file. Select “Properties” and then de-select “Read Only”. Save and close.

To edit your new layout file, just open it in notepad. The first line should be the terrain’s location followed by its coordinates: (0,0,0). Edit the line to point to your new terrain. There’s nothing else on this terrain that I really need, so I just delete everything else on the file. That’s right. Just highlight and delete. If you want to keep certain items but not others, you can delete them individually in FFedit. Save and close.

Now go back into FFedit. Select the “options” tab and make sure your “Primary Data Path” points to your working folder. Go to the “missions” tab and “Load” your mission. Now select “Import” and navigate to “workingfolder\art\level layout\yourlevellayout\” and click “OK”. This will import your new layout file. You should see “_impobj_0” in your “Mission Objects” window and it should point to your new terrain. Use “Edit In-game” to check your work. The most common mistakes are forgetting to change a certain texture or typing in the wrong file name You’ll know pretty quickly if something’s amiss. You can make changes in nifskope and then click save. When you click “Edit In-game” again the new version will come up.

Now you’re all set to add whatever objects, characters and markers you like. When you’re done, just copy your mission & layout folders, and any custom textures/objects you created into their respective places in your default “Data” directory (or elsewhere). Be sure to give custom objects and textures unique names or directories before you move them into your “Data” folder. (Use file menu “View>Arrange Icons By>Modified” to quickly locate new textures.) Finally, merge your objects.dat and characters.dat files to incorporate custom objects and characters into your game. I always follow Renegade’s suggestion that you merge from your “Data” characters and objects into your working folder BEFORE merging from your working folder into your “Data” folder. That way, your objects and characters stay current and the new ones are added.

You’re all done. Once you get the hang of it, this will take about 20 minutes or so. Have fun!