Introduction
This is a guide to making a building with boolean cuts.
A boolean cut is basicly cutting one shape with another.
Place box A into box B, and remove box B. when the box is removed, it takes away any overlapping area from box A.
This tut will take you all the way into the game. Will work with DFX and JO.
This tutorial will probably be the most comprehensive one found anywhere on the web for adding a model to DFX or JO.
If you use it somewhere else, that's cool, but don't forget to say where you got it, and give us a little credit.
I will use Max 8 for this tutorial, and the files I post at the end will contain the max files I used to create this tut.
You must use Max 8 or above to load the .max files.
About 3ds Max
Remember, max is NOT forward compatable.
Max 7 will NOT load a max file from Max 8 or 9.
Max 8 will NOT load a max file from Max 9.
Max IS backward compatable.
Required Tools
3ds Max
JO Mod Tools by Nova (JO DEV kit?)
Unofficial Jo/DFX Mod Tools
3D max setup
Standards
This is the list from the OED Manual, use it to scale your buildings..
The following list gives a guide to generic sizes for standard objects and orientation.
• Doors: 1.5 meters wide by 2.4 meters in high.
• Windows: 1.5 meters wide by 1.5 meters high. 1.0 meter from the floor to the sill.
• Ceilings: 3.75 meters in height.
• Actionable Items: 1.2 meters in height from floor (levers, doorknobs, switches, etc..)
I usually use .25 for the width/height of my walls and floors..
You must keep this in mind when creating your object.
The Maxsetup file is the most helpful file you have for creating models or BHD, JO & DFX.
This file will setup your scale, and is very precise.
1metre in max, will = 1 metre in the med/game.
If everyone used this file, then everyone's models would all be the exact same scale. Doors made by one modder would fit doorways from another
modder...etc..
USE IT..Always..
Setting Up
I usually create a folder before I start.
This is where I'm going to save my File, in that folder...also keeps all files for the one model together.
Later, we will put any textures we want into this folder as well.
Open Max 8, and load in the 3D max setup.
Before you go any further, do a "Save as", and choose a name for your model.
Save it in the folder you created above.
I name my model the same name I'm going to use for the 3di model in game.
This name must be unique to the items.def file, this means that no other 3di file uses that name.
I usually use my initials, and a brief model description.
The name needs to be under 11 characters (not including the file extension.3di) or the pack command will NOT
pack the item into your game.
(The pack.exe will trunicate at 15 digits, but it's safer to stick with the above)
An example name for this model might be ee8841d1w
This would translate as
Eagle Eye, 8 x 8 x 4 room with 1 door and 1 window.
Bonus Download
Here are all the files from my "eehouse03".
This building was cut from 1 block with boolean cuts.
Click Here
Questions
Questions about the Boolean Tutorial can be posted HERE, as I
have locked the tutorial off from comments.
WARNING
Save after each major action, just in case you have a crash.
OK, Let's do it..
Open your saved setup max file you created above.
OK, create a box, centre it on the grid. Say 8 x 8 x 4
4 will be the "Standard" height we will use for all future models, it enables us to Stack buildings in the med by raising them in 4 x 1 metre
increments...we won't need to use the other small increment to try and get them the right height..
Therefore, a 2 story building will be 8 high.
Now we need to centre this on the Grid.
Select the box, then the Move Tool
Type zero into all of the boxes, x, y, and z should be 0 already.
This will move the box to the centre of the work area.
Create a second box, the size of a door.. 1.5 x 1.5 x 2.4
Now, centre the box, then drag it down to a wall, because both boxes have been centred, it will be exactly in the middle..
Now, we need to raise the box up, so we have a floor height, so click on the door, then the select and move..
Type 0.25 into the z value, and this will raise the door by 0.25 metres..
This is the thickness of the floor we will use as a "standard"
Now, click on the arrow up on the tool bar, then select the main Box....the big one..
From the "create" pull down menu, select compound / boolean
Now, on the right, see the "Pick Boolean" , click the "Pick Operand B"
Now, select the door..and it should minus the door from the box.
IMPORTANT NOTE:
Return to the "Standard Primative" mode, use the pull down to return to the Standard Primatives.
Do this now!!
Change cursor
EE
Cutting a Window
It's the same as the door, so make a new box.
The box needs to be made to the standard posted above.
• Windows: 1.5 meters wide by 1.5 meters high. 1.0 meter from the floor to the sill.
The window can be longer if you want, just so long as it's 1.5 high. Ours will be a standard for this exercise.
So, create a box 1.5 x 1.5 x 1.5 near where you want to cut it out.
Centre the image on the Y axis and raise it to 1.25 metres.
Why 1.25? Sill to floor = 1 metre + thickness of floor.
Select the box, then the Move Tool
Now Using the x axis, drag the box over the wall where your going to cut the window, put it about half way in.
Change cursor
Time to cut out the window
Select the main box.
From the "create" pull down menu, select compound / boolean
Now, on the right, see the "Pick Boolean" , click the "Pick Operand B"
Select the window box, and it will cut your window.
IMPORTANT NOTE:
Return to the "Standard Primative" mode, use the pull down to return to the Standard Primatives.
Do this after every Boolean Cut..
Do this now!!
Change cursor
Next step is to cut out the inside
The box you create to cut out the inside needs to be calculated.
Room size is 8 x 8 x 4
Door is .25 from the base, making the floor .25 thick
I usually make the walls and the ceiling the same thickness.
Height = 4 - .25 (floor) - .25 (ceiling) = 3.5
Room = 8 - wall (north) - wall (south) - 7.5
Therefore
Room = 7.5 x 7.5 x 3.5
Make a box 7.5 x 7.5 x 3.5
Snap this box to the centre as above.
Raise it by .25 the same as the door.
You should have something like this.
Cutting out the inside
Select the cursor.
Select the main box.
From the "create" pull down menu, select compound / boolean
Now, on the right, see the "Pick Boolean" , click the "Pick Operand B"
Select the inside box, and it will cut your window.
You can select by using the "Select by name"
1. Click on the "Select by name"
2. Select the box number you want to remove
3. Click on the "Pick" button
The box will be removed.
IMPORTANT NOTE:
Return to the "Standard Primative" mode, use the pull down to return to the Standard Primatives.
Do this now!!
Change cursor
What's Next..
Now, we get to the bits where we need to learn the Novalogic naming conventions.
What are Naming Conventions?
Quick Explanation..
The game engine must have common names for parts of models, so it knows what to do with what parts of what models.
Please read the manual and get familiar with some of those names.
You should have a copy if you have downloaded the Super OED...if not, here's the link.
JO Mod Tools by Nova (JO DEV kit?)
Naming the parts
We have to rename our main box as a main object.
This name will always start with 01
We will need to add a collision box so the player can't walk through the object, this name start with CB01
We need to centre the object, usually a small box named _01
We need a ground point, this box can be a clone of the _01 object and must be named UPG01 ground
Collision boxes
A collision box can NOT have any concave surfaces.
Collision boxes can be a pain, you must remember that AI can NOT see through a collision box.
So, if you cover a window, AI will not see a human player on the other side.
Therefore, a wall with a window must have at least 4 CB's.
Our building has 1 door, and 1 window.
That means 1 walls with 3 CB's (Wall with door)
1 wall with 4 CB's (Wall with window)
The other 4 walls (floors) can have 1 each.
That's a total of 11 CB's we must create for our basic building.
Renaming box 1
Change cursor
Select Box1, type your name up in the box in the right hand corner, see below.
The name will be 01 plus a description, I use the name of the 3di I'm going to create
ie: 01_ee8841d1w
Adding the Centre Point
_01 defines the centre of the object.
This box is usually a "Token" box, it doesn't need to be big, as the game doesn't render it.
Create a box 0.125 x 0.125 x 0.125 with a height segment of 2
Now centre the box on the x & y axis.
Now, we need to set the height, this can be tricky.
Basicly, the horizontal centre line of the new box must sit on the base line of the floor.
This is why we have created this box with a height segment of 2.
Now we can see where the horizontal centre line is.
If your using the dimensions I have set, then lower the z value of the box to -0.062.
Zoom in on the left view, and you can see the result.
Arrow 1. is the base line of the 01_ object.
Now we can rename this box to _01
Change cursor
1. Click the Select by name.
2. Click box01
3. Click Select
Over type box01 with _01
Adding the Ground Point
With the _01 object still selected.
Right click anywhere to bring up the context menu.
Select "Clone"
Click the radio button "Copy"
Type UPG01 ground into the Name.
Click OK
You now have your UPG01 ground
It sits exactly over the _01 object.
You can download what's happened so far from Here
This zip contains..
The working max model so far.
A copy of the material I'm going to use.
The Max setup file for scaling.
Adding the Collision Boxes
The floors are easy, we know our box is 8 x 8 x .25 thick, so, create 2 boxes that size.
We know our box is 4 high, so, create 2 boxes, 1 is 8 x .25 x 4, the other is .25 x 8 x 8
Using the skills you learned above, centre the 2 floors, 1 will be in the right place, the other we will need to raise.
How high, well, we can use the drag bar from the left view, or, figure it out..
Box is 4 high, floor is .25, minus them, and we get 3.75. This should be the height we need to set one of the CB's.
Now the 2 walls, centre them both x=0 x=0
Using the move tool, move each of the walls out to the edges, use the left and right views to see that they line up with the walls, should be about
3.876.
Now, I usually make these see thru, so I get a better view.
Select all 4 of your CB's.
Change cursor
So, if you hide the 01 object you get this.
It's much easier to see if you have missed creating any CB's if you do this.
Select the 01 object using the method above.
Right click, and select "Hide Selection"
OK, on with it, unhide the 01 object, and hide the 4 CB's you have finished.
Create 4 boxes along the wall with the window.
2 low flat ones, and 2 skinny high ones.
The 2 low flat ones can be 8 x .25 we'll adjust the height manually in a minute.
The other 2 can be 4 high, and .25 deep, we'll adjust the width manually.
Using the adjustment arrows on the right, and the left view, adjust the width and heights you haven't set yet.
Then use the move tool to put them over the wall, you can use the opposite of the ones above which where 3.876, use -3.876.
It's OK to overlap them, this means players can't sqeeze between the CB's and get through the wall.
Once in place, make them see thru.
Then you can select all 4 and hide them.
Create another 3 boxes along the door side.
Adust the known heights and widths. ( 4 high / .25 length)
Using the move tools, the top view and the arrow Parameters on the right, adjust the widths of the 2 side pieces.
Using the Green Y Axis arrow on the Top view, raise the section above the door.
Then adjust the y axis of all the pieces so they cover the wall, you can manually enter -3.876 if you want.
You can also use the top view to adjust these.
Now select all 3 and make them see through.
OK, next..
Change cursor
Right click, and unhide all
Select the boxes that will be the CB's
From the tool Menu, select Rename Objects
Fill out the popup as below, use you 3di name as the suffix.
Then hit the rename button.
Now, if you go back to the Select Objects, you will see that we just renamed all our CB's correctly, and quickly.
Close off the Select Objects.
Your model should look like this now..
If you hide the 01_ object, you should see all our CB's, covering all the walls/floor/ceiling
Now it's time to add a texture
Right click and Unhide all.
Select the 01_ object.
Right Click, and "Hide Unselected"
You now have just the 01 object visable, since this is all that we need to texture.
Below is a link to the current saved version of my tutorial files.
In that zip is a texture.
Unzip the file, and copy the texture to the folder where your saving your model, the one you created right back at the beginning of this
exercise...
Click here to download the current tut files.
Shrink max to the task bar, open windows explorer, and browse to the folder where you just saved the texture, and your model.
Resize that window to a corner.
Restore Max, and resize it so you can see the Windows Explorer.
Make sure Max is the active window, and press the M key to bring up the Material Editor.
Drag the editor over to the right so you can see the name of the material in the Windows Explorer
From the Windows Explorer, left click on the wall765.tga
Hold down the left mouse button, and drag the wall765.tga onto the top left ball of the Material Editor
Now close off the Windows Explorer, and resize Max back to full screen, move the Material Editor over to the left.
Now, if it's not already selected, select your 01_ Object.
Click on 1. Show Map in Viewport, then 2. assign material to selection.
At the same time, you should have the texture appear on the 01 Object
Close of the Material Editor.
Now, where almost finished, we just need to scale the mapping, so future models using the same texture will look right together, plus, it will make it
so the texture doesn't look too stretched.
NOTE: The supplied texture looks pretty good without this next step, so make it optional if you want.
Over on the right, where it says Modifier List, use the Pull Down to locate the UVW Map. select it.
You will notice your model texture just went up $hIt creek.
Select the Radio Button for box, then change all the values to 3.5
This isn't the best texture to do this with, works well with brick textures, or the collection of egypt ones I have.
Your model is finished.
Right click and unhide all.
Then save to your folder.
Export to ASE
The SuperOED needs a file formatted as an ASE to import a model.
So, we need to export our model to that format.
From the pull down "File" menu, select Export.
From the Browser window, pull down the file types and select ASE.
Browse to your save folder where all your files are.
Type in a name, I use the name I've been using all along.
Make sure all the boxes are ticked.
Then click OK.
You have exported your model, save and leave Max.
The SuperOED
If you haven't already done so, download this file.
Extract it to a folder some where, and create a desktop shortcut to the SuperOed.exe
JO Mod Tools by Nova (JO DEV kit?)
Open the SuperOED.
First think we need to do is setup the paths to the textures of your model. Then the path to where you want to save the 3di.
I use the same folder for each, so we contain all our files in the same folder.
This will probably change with every model you do.
From the Edit menu, pull down the Preferences.
Now, click on the browse which I marked in red, locate your save folder, and click ok.
Same with the other path, the 2 should be the same when your finished.
From the File menu, pull down Import Single ASE file
Browse to your file.
Make sure it's set to LOD 0
LOD = Level Of Detail. We'll only worry about LOD 0, as you may know, in game, as you move closer/further away from a item, it gains/loses detail.
So, if we want, we can setup 4 different models with more/less detail for the game to render as we move closer/further away from that item.
OK, what you se now may not make much sense, your probably too close to itto see what you have loaded.
With your mouse on the blue area, hold down the right mouse button, and move your mouse left to bring the whole wire frame into view.
Hole down the left mouse button, and use the mouse to rotate your model.
Why is my background colour different? I changed my prefences.
Change the Edit View, and Render View colours
Click on the render button at the top/middle of the SuperOED.
You should get a rendered view of the model.
Now we setup the sound for the texture, ours is a stone material.
From the Edit Menu, (or press the M key) pull down the Material Editor.
Select the material on the left, then, on the right, pull ddown to see the Surface Type, use the pull down to select Stone. Then hit OK.
Ready to save the 3di?
From the file Menu, pull down Export 3di.
My name are already filled out because of the way I named my folder, fill out the name and save.
You should now have a 3di in your working folder.
Before we leave the SuperOED, save the project. It will hold info of any properties you setup, this is usefull if you have many textures, you can
refer back to your setting later.
Also keeps settings for any animations you have made. So, say you have a model of a truck, and you have already had it it the SuperOED, you setup the
drive wheels and the steering. Then you discover an error on your model. You fix the error in Max, export to ase using the same name. Then youcan
reload the project, and the model will take on all the settings you already setup, but, apply then to the new model.
You shouldn't need to type in a name, or browse to the folder, details should already be set, just click save.
Close off the SuperOED, time to get the model into the game.
Let's just check and see what files you have. Use Windows Explorer to browse to your save folder, I have these files.
You can get them by clicking HERE
Getting your model into the game
I'm going to use DFX as my game platform.
I'm sure your not a total noob, so, make a copy of your BASIC DFX game.
I put mine in the same directory as the original, and called it "Delta Force Xtreme b"
We are going to use this for our test mod.
You will need to create a Desktop shortcut to the dfx.exe file, then edit the shortcut, and add the (space)/d
If you don't do this, the game may not see all your new files.
"C:Program FilesNovaLogicDelta Force Xtreme bdfx.exe" /d
You don't need this for map files, just modded, or new game files.
You will need these tools.
FwO Raven's pff utility v0.7
You need the DeSCR.exe from the Unofficial Jo/DFX Mod
Tools
Install the FwO Raven pff Utility if you haven't already done so. If you have a pff utility already installed, and know what your doing, then use
that one.
Open the Pff Extractor.
From the File Menu, pull down Open File.
Browse to your new copy of DFX, hold down the shift key, and select all 4 pff files. This will save us having to search each pff file for the .def
files. This will load them all in.
Wait a little while for them to load in, files will be displayed when they are loaded.
Down on the bottom left is the filter, use the pulldown to set it on "def".
Select the items.def, right click, extract, then browse to the folder where you have been saving all your files.
This file is still encrypted by Novalogic, you need to convert it to a text file with the DeSCR tool.
Open the DeSCR tool.
Select the key for BHD/TS/JO, DFX uses the same key.
Hit the Decrypt key, and browse to the items.def file you just extracted.
Hit the open button, and the file will be saved as ITEMS.DEF.txt in your folder.
Open the items.def.txt file in a text editor.
Locate a suitable entry to use as a base for your own.
I'm going to use this one.
begin "Adobe hut 2"
id 101037
textid text_building
type building
graphic DHut02
attrib: Landable
end
Select the entry, right click and copy it.
Now, drag down to the bottom of the items.def, and paste a copy at the bottom.
Now, we need to adjust this entry and add our own details.
Edit the name, I'll call mine "Stone Building 1 door 1 window"
The ID must be a new number, one that is not already used. Please understand that the game only reads the last 4 digits, so, you can't use 102001 and
112001, as they will be read as the same.
Choose a number, then, use the search feature of your text editor to make sure it hasn't already been used. I'll use 101040.
Next, edit the name of the 3di file which is the graphic. Mines called ee8841d1w.3di, so I will use that name less the .3di. = ee8841d1w
so here is my entry.
begin "Stone Building 1 door 1 window"
id 101040
textid text_building
type building
graphic ee8841d1w
attrib: Landable
end
save the items.def.
Close off the text editor.
What Files do I need?
OK, now you can copy the files you need to your game folder.
Before you do this, go to your mod folder, delete the ITEMS.DEF, as it's stll encrypted, and has no further use.
Rename the ITEMS.DEF.TXT to ITEMS.DEF, as this is the file that is decrypted, and contains your modified entry.
There is no need to encrypt the def file, as the game will read it as a text file.
OK, select the files you need for the game, there's only 3 of them.
1. Your 3di
2. Your texture
3. Your Items.def
Later, you can convert yout tga into a dds, but that's another story.
Copy those 3 files to your Modded game folder.
If you want, you can create a med picture, follow the instructions in THIS post, you can use the SuperOED as your source picture.
That's it, now we can make a map with your new item.
Make a test map
If you haven't created a shortcut to the Med in your mod folder, you can do so now, or, just browse to your mod folder, and double click on the
dfxmed.exe
Make a test map, choose a terrain, place a start marker, and your building.
Your building will be under Buildings, the items are sorted by the 3di name, so just scroll down until you see you 3di name on the left. As you can
see, I haven't made a med pic for mine yet.
I set mine as a Single Player.
Save the map, and run your modded DFX, the one you created above.
You can get the final zip containing all my files HERE
Includes the items.def, the DFX Test map, as well as all the Max, and SuperOED Files.
Also contains a med pic that I didn't have above.
Cheers
EE
Questions
Questions about the Boolean Tutorial can be posted HERE, as I
have locked the tutorial off from comments.
Something I missed.
To get the game to use your new files, you must turn on the external resource.
This means putting a on the command line of your game icon.
Make sure you have an icon on your desktop that is related to the mod.
Right click on that icon, go to properties.
On the target line, right at the very end, type in {space}/d
Cheers
EE