PART 2 - THE CAR

2.1 GETTING STARTED

   When you begin plotting points for a new car, CarEd will prompt you for the name of
your car. Note: you can rename it later. CarEd will create a directory for your car
and textures.
  Example: If you name your car ClownCar, CarEd will create:
     cared\ClownCar\
        and
     cared\ClownCar\tiffrgb
  When you save your car, the .OBJ file should be placed in your cars directory.
You can name the .OBJ file to anything you want, but it will default to <carname>.OBJ
   Once you have modeled your car, you can choose the Compile car menu item from the
File menu, which will create all the needed files for the game and place them into
your cars directory.
   CarEd will generate the <carname>.TXT and <carname>.WAM files if they do not exist.
These are both text files that define the physics and special textures for your car.
   When you are ready to test out your new car, all you need to do is copy your cars
directory to the games carma2\data\cars\ path, set up the opponents
file (see section 2.6) and you should be ready to roll.
   All cars should have a few basic parts: 4 wheels and a car body. Smashable windows,
bumpers, wheel guards and opening doors are optional, but add to the realism.
   In this beta version of CarEd you are required to name all four wheel components
with these EXACT names:
  FRWHEEL     - front right wheel
  FLWHEEL     - front left wheel
  RRWHEEL     - rear right wheel
  RLWHEEL     - rear left wheel
You should NOT include any of the wheel components in a group, unless the wheel
itself has multiple components. If the wheel does have multiple parts, they should
all be placed in a group named as described above: FRWHEEL,FLWEEL,RRWHEEL,RLWHEEL.
 

2.2 THE SIMPLE MODEL

   This section is not a required step in car creation, but if you are running C2 with
less than maximum complexity settings, you may want to create the simple model. The
simple model is just what the name says, a simplified version of your model. Just
a basic outline of your car is needed with a few textures. There are no moving parts
such as wheels or doors, just one big blocky mass.
   You should first load up you cars model and add a new component. Now trace the
side view of your car by plotting points. Create as FEW points as possible, just a
rough sketch of the cars profile, including the wheels. Now select all the points
you just plotted (they should all have an X value of 0) and slide them off to the
right or left side of your car (try to line up the points with the outermost X point
in your model). Now click on the "Iterate" button located in the "Points" box, select
a single iteration with a -1 for the X scale and click Ok. This will duplicate
your profile to either side of the car. Now from the "Components" menu, select
Export component and save the profile points to an OBJ file. You are now ready
to start building your simple model.
   From the File menu, select New Model and enter in a name in this EXACT format:
simple_<carname> . Now go to the "Components" menu and click "Import Component" and
select the .OBJ file you just saved. From the profile points that should now be
displayed in the editor, you need to create at least three components, a Top cover
and two side covers (you may also wan to create a Front,Back and Bottom cover).
Save the model and re-load your full model (it should be textured before you
proceed with this step).  Line up your car in browser view so you can clearly see
the side view of your car and press Alt-Print-Screen. This will copy the windows
image to the clip board, so you can then paste it into an image editor. From the
image editor, cut out just the side view picture of the car (trimming off as many
pixels as possible). Now resize the image so that it's dimensions are multiples
of 2 (16,13,64 or 128). Save the cut out image as a .TIF file into your
simple_<carname>\tiffrgb directory. The TIF image you just created as you may have
guessed, will become the side view texture for your simple model. Repeat this
process for the rest of the sides as needed (Top,Bottom,Front,Back...).
   Now, texture you simple model with the images you created, open up the Group
dialog, create a dummy group (adding at least 1 component) and check the
Is Master group box (see figure 1.6). Save the model once again, and then Compile it.
From the files that are generated, you will need to move the simple_<carname>.DAT,
simple_<carname>.MAT, simple_<carname>.ACT and textures into your full models
directory, or directly to the directory you may have created under
carma2\data\cars\<carname>.
   When you run Carmageddon II, with less than maximum complexity setting, your
cars model should no longer disappear when viewed at a distance, but the simple
model you created should be in it's place.
 

2.3 THE <carname>.TXT FILE

   It is not a requirement to modify this file, but it will really help add character
to your new car. Here is a short description of changes you may want to make:

   softness_factor - This value determines how tough your car is overall. A value of
      0.5 is relatively soft, and a value of 0 is a solid granite car. Trucks have
      a value of about 0.2.

   Minimum turning circle - (In the mechanics section) This determines how sharp of a
      turn you can make at low speed. 0.5 is average and 0.3 is super tight.

   Acceleration - (In the mechanics section)
      This value determines how fast your car will be. The average is about 5.0,
      setting it up to 7.0 or 8.0 is about the limit of being able to handle it.
      I actually set it up to around 200 once to see if I could break the sound
      barrier on the runway but a 747 landed on me and that was that.

   Center of mass - (In the mechanics section)
      The closer this value is to the center of your 4 wheels the better.
      If it is too high you will flip over in a turn and if it is to far back
      or forward, you will easily lose control in a turn.

   Mass - (In the mechanics section)
      The more mass you have the more damage you can inflict.
      1.5 - 2 is average, but 60-80 tons will let you smash through just
      about anything.

   Suspension give - (In the mechanics section)
      Each of your wheels has this attribute. The average is about 0.01.
      Stepping it up to 0.015 will give you a super plush ride, just make sure
      you car is far enough off the ground to allow it.

   Friction angles - (In the mechanics section)
      Each of your wheels has this attribute. This value determines how much
      traction your wheels have. The closer the number
      is to 90 the more traction you will get. 83 is average, but 89 is about as much
      as you can handle before you get a headache.

   Bounding shapes - (In the mechanics section)
      This shape definition is used for all collisions in the game.
      It is important to get this shape to fit your car as
      close as possible. It will add a lot of realism to your car. If you are adding a lot
      of suspension, remember to raise this shape as needed.
 

2.4 THE <carname>.WAM FILE

   I have only begun to tinker with this file, so I don't have a lot to say. Basically
it defines how each part of your car reflects damage. Take a look at a few different
.WAM files to get an idea of how to make changes. It is a text file so you can modify it
easily.
   The .WAM file also describes how your doors will open. Notice the crush type of the
door. it should be called flap and have a list of 3 vertices defining the pivot.
The first two points are the actual pivot points. they are the indices of the vertexes to be
used, found on your doors model in the <carname>.dat file. The third point has something
to do with the direction of rotation, but I am not sure.  You can find out which vertices
to use here by opening your <carname>.dat file, selecting a door component and then using
the 1 and q keys to cycle through each vertex to find the ones you want. If you look
at the status bar in the main window, it should tell you the index of the point you have
selected. The "kevoflap" attribute for a flap type component determines if the component
is a door(1) or something like a hood(0). Doors will open when the Enter key is pressed
in the game.
 

2.5 SUMMARY OF CAR DATA FILES

   When the car is complete you should only need these files in the <carname> directory:

<carname>.txt           - text file containing all car attributes
<carname>.wam           - text file containing damage information.
<carname>.dat           - The full componentized car model
<carname>.act           - The actor file generated when you save the <carname>.dat
<carname>.mat           - The material file, listing any images used.
<carname>SHELL.dat      - The full car model, minus the wheels, saved as a single component (SHELL)
simple_<carname>.dat    - The simple car model
simple_<carneme>.act    - The simple car Actor file
simple_<carneme>.mat    - The material list used for the simple model.
SCRN4.MAT               - An Optional material definition needed if you want window shrapnel.
                          (You can just copy it from the Eagle3.TWT)
tiffrgb\                - The directory containing all .TIF texture images for your car.
 
 

2.6 PLACING YOUR CAR INTO THE GAME

   This step has become much simpler due to the release of Pimp and Carstockalypse. First you will
need to place all of the cars data files described above into the carma2\data\cars\<carname> directory,
and then create a .C2C file in the carma2\ directory that Pimp or Carstockalypse will use to import
your car into the game.
  The .C2C file is a simple text file that describes your car, here is what it should look like:

// Opponent
<drivers name>
<driver image name>
<cars name>
4                       // Strength rating (1-5)
500000              // Cost to buy it
all                     // Network availability ('eagle', or 'all')
<carname>.TXT      // vehicle filename
//vehicle description
TOP SPEED: 150MPH
WEIGHT: 2 TONS
0-60MPH: 6.4 SECONDS
<a simple description of your car (about 10-20 words)>
//TAG <extra information you wish to supply>

   Note: any text appearing after a // is assumed to be a comment and may remain in the C2C file.
Once you have created the .C2C file, run Pimp or Carstockalypse to install your car.
 

2.7 THE FINAL TOUCH

   You will now want to add your car and drivers picture to the car selection menu of the game.
Start off by creating a 64x64 pixel TIF image of your driver and a 192x128 pixel TIF image of your
car. Again, these TIF images should be uncompressed 24 bit color images. It is important to name
the 192x128 pixel car image <carname>.TIF and the 64x64 pixel driver image <drivername>.TIF.
Run CarEd and select the Tools - Create Menu Images from the main menu. A dialog will pop up
allowing you to select a TIF file. Choose one of the images you just created and CarEd will spit out
a .PIX file for your image. If you choose the 192x128 pixel car image, CarEd will produce 6 .PIX
files. Repeat this process for the other image, then copy all of the .PIX files CarEd generated into
a directory under the base Carmageddon II directory that should look something like this:
carma2\data\intrface\carimage\<carname>CI\PIX16  If all goes well, the next time you run
Carmageddon II, you should see your car and drivers menu images appear in the car selection
menu.
 

2.8 TROUBLESHOOTING

   Here are some common errors you may encounter, what they might mean and how to fix them:

"BRRender error"
   When you start up a game, or sometimes even while playing the game itself, you may receive
this error, crashing the game. It is usually due to a car design, that tries to map a single
texture across polygons that do not join properly. It can usually be fixed by mapping a single
texture to a single component. You may need to break up components into sub components to do
this. CarEd 1.0 had this problem, but it should not occur with a car generated by CarEd 1.1

"Can't find smash material '<materialname>'"
        or
"Can't find main material '<materialname>' referenced in funkotronic file"
        or
"Can't find animation frame pixelmap referenced in funkotronic file"
   This error occurs when the <carname>.WAM file defines a smash material that is not found
in the <carname>.MAT file. Generally the <materialname> is an alias material that maps to
a window, head\tail lights or other damageable part. Simply defining the <materialname> in
your textures list should fix this.
Note: at least one component in your car MUST use this texture.

"Can't find main car model"
   This means that the name of the car body component in the <carname>.DAT file does not match
the name in the <carname>.WAM file. The name of the main body component should look something
like <carname>.dat and the name in the .WAM file should be <carname>.ACT.

"<carname>.txt is corrupt"
   This is usually an easy one to fix. It can mean that the name of the <carname>.TXT file does
not match the name defined inside the <carname>.TXT file near the top. Don't ask me why they
had the name in the file itself but they did.

"wheels outside all shapes"
   If you are moving wheels around in the <carname>.txt file you may hit this one, it means
that the wheel locations you defined are outside of the bounding shapes also defined in the
<carname>.txt file. Moving the wheels back in, or making the bounding shape larger should
fix this.

"Less than 4 chars in car actor identifier"
   If you have named any one of your car parts with less than 4 characters, you will
see this error. CarEd should fix this for you automatically by padding '_' characters,
but other programs may not.

"Holy polygons Batman! There's a lot of vertices in that model"
   You have too many points and triangles defined. Try to find parts of your model that can
be simplified without losing too much shape. Remember, many complex ridges and curves can
be simulated with textures.

"The program has performed an illegal operation"
   This is the standard Windows application crashing message. It can be caused by quite
a few different problems. The most common places I have seen this occur is when I am
altering funk and groove settings in the .TXT file or messing with the shrapnel in the
.WAM file. Any changes to these types of settings MUST BE EXACT, or you will suffer
endless crashes like this that will truly test your patience.
   You may also encounter this error if you have textures defined in your .TXT files
camera turn off or START OF FUNK descriptors that are not used by your car.

   I have included a few errors that should not show up if you use CarEd to generate your
models, but you may encounter them if you use other programs like PlayThing2. Keep in
mind that the vast majority of errors are caused by problems in the .TXT and .WAM
files. If your car keeps crashing the game, try deleting the <carname>.WAM file which
may fix the problem. This is a temporary solution, but it will help you narrow down
the cause of the problem by letting you know something in the .WAM file is wrong.
 

2.9 DEPLOYMENT

  Create a new directory (it doesn't matter where), then create these directories inside of it:

data\
data\cars\
data\cars\<carname>\
data\cars\<carname>\tiffrgb\
data\intrface\
data\intrface\carimage\
data\intrface\carimage\<carname>CI\
data\intrface\carimage\<carname>CI\PIX16\

Place the .C2C file in the base directory and all image and data files in their respective
locations. Zip up the entire directory structure including the .C2C file. This .ZIP file
will be unzipped into the carma2\ directory so it is important to get all directory names
correct. I usually create another .ZIP file containing the car .ZIP you just created and
a README.TXT that describes how the user should unzip the file and where to find
Pimp or Carstockalypse to install the car.
   IMPORTANT! make sure to test the installation of your car by deleting all of it's
data files from the carma2\ directory and re-install it from the .ZIP file you just created.