Final steps when making a C2 car
User avatar
Toshiba-3 created Final steps when making a C2 car on Tue Mar 29, 2011 8:03 pm
Post
With this article I'm going to hint you at what you shouldn't forget at the time of your C2 release. Ofcourse this isn't the type of behaviour you might want to adopt for your very first addons as it might not be worth the time you put in. But polishing your cars can make them popular and make people look forward for your next item.

So that's it! You just put your 3D model in Carmageddon 2 and everything seems ok for a first ingame test. You probably already had a go at physics or even based your car physics on an existing one etc. What are the steps you shouldn't forget now?

1. The bounding boxes! Before spending too much time tweaking the physics, be sure that your BBox is good and done. To work out a correct BBox, have a look at C2S' "guide at perfecting your car physics". My personal note on this is that even though it's one of C2 major features, too many or too complex bounding boxes will generate crash-to-desktop events! So try to be as simple as possible with your BBoxes. Try to have as few boxes as possible, then make them as simple as possible.
You can easily make the BBoxes (as defined in C2S' guide ; no concave curves and flat bottom for the first bbox) in your modeling program, be it 3dsMax, Zmodeler, CarEd, etc. then export it to PT2 as you did with the actual addon car and obviously, make sure it is well oriented and sized. Then you can use PT2's nifty "Save non-car .txt file as..." tool. Simply select the first bbox, click on this tool in the drop down top menu, enter a two digit number directly followed by whatever name you want (example: 01bbox1.txt), and hit OK. This will generate a non-car text file that includes a properly generated bounding box chunk. You copy paste it into your car's text file and do the same with other bounding boxes part (if any). Really easy.

2. Still before doing the actual physics, make sure your wheels are well defined. This means adding the proper wheel diameter for both front and rear wheels in the car text file, but also the wheel coordinates for each. You can mesure all this in PlayThing2 as well.

3. The physics. Once again, check C2S' guide. Don't forget the angular momentum proportions. Else your car might shake or be stuck into the ground.

4. Now go back to the top of your text file. Ask yourself: is the driver of my car a girl? If so don't forget to add GIRL right under the version line. If he's a male don't write anything.

5. Verify the softness of your car. As most car text file say already: "0.7 is soft(sportscar), 0.2 is tough(truck), 0.0 is a rock(solig granite car)". Please, don't make your addon unrealisticly/uselessly strong. Don't be afraid to let your car bend. Else there's no point in putting it into C2 :)

6. Choose the correct/most fitting engine sound too! You'll have to take the reference from either other cars or directly from the SOUND.TXT file. It is alse possible to add a new engine noise, then make sure it isn't annoying ingame, and don't forget to include it in the release archive (zip/rar file).

7. Ok, now something that a lot of people don't care about or simply don't know: the damage systems. To make things simple: if the engine of your car is in the rear, it makes no sense that front impacts would damage the engine in the game. It isn't very complicated to modify the damage systems, just change the number of clauses from a text chunk to another and move the actual condition. Most likely to vary from a car to another are obviously the engine, but also the driver (a bus driver will suffer more from a front impact than the default top impact).

8. The simple_model! This is a very important point. Addons lacking a simple_model will appear all of sudden out of nowhere. They might also be ressource hog if the simple_model feature is disabled for said addons. So the simple_model is a very basic model/box that kinda fits the shape of your car. Apply side/front/rear/top texture on it to make it look like your car when it's very small on the screen. Have a look at other addons to get a clear idea of what it's all about. The game will need the ACT DAT and MAT files for this simple_model and the files must always be named like this: simple_nameofthecar. The model itself however (in PT2) should be named NAMEOFTHECAR.1. If it isn't the case (you might have named simplemodel for example) then in PT2, select it and hit SHIFT+G and do the modification. You can test it ingame easily by entering the Action Replay mode (numpad ENTER key) and moving the camera away from your car until the simple_model appears. If your car is very detailed, don't hesitate to decrease the distance at which the simple_model appears (default is 8, might use 6 or even 5) but then be sure to have a good simple_model.

9. Shrapnel colors. Near the end of the text file. These define the colors of the shrapnels coming out of your car when you hit another car or walls, etc. You can define several colors. They are in the RGB format like so: 210,56,45 (this would be a reddish color) and you can get these coords from your favorite photo editing program. It is also possible to use simple mats but they don't all work and there's no advantage to proceed so. Finally you can enter several times the same color, it can help you have smaller ratio for a color than another. Example: 3 x purple and 1 x black will generate ingame 75% purple shrapnels and 25% black.

10. Fire points. Another important point. Not setting them up will result in absurd situation like this one: you hit a wall and your engine is very damaged, but for some reason it's your rear bumper that's on fire! Ok so these firepoints are actually vertice IDs you can get in PT2. The only valid vertices are the ones from the master object! Open your car in PT2 and either delete everything but the master object or size up the master object so that one way or another you can actually easily select verts on it. Go into the Selection tab and choose the select vertice tool. Now simply select a vertice where you want fire to appear for each firepoint entry in the car text file. The numbers listed in the Selection tab are the ones to write in the text file.

11. Camera positions. Seriously don't forget these. We often use them in Action Replay mode, for videos and the likes. You can be creative there too you know.

12. Another great C2 feature are the FUNKS. If your car has rearlights, try to setup FUNKS it's always a good plus. FUNKS are another great way to be creative with your car. You can generate interesting effects with it. Either linked to your car movement or not. If your vehicle has tank tracks, FUNKS are needed as well.

13. Much like FUNKS, GROOVES are a vast C2 feature. Where FUNKS animate textures, GROOVES animate 3D components. Default GROOVES are the four wheels and the front pivots. But you can also add the driver's head as a groove or the steering wheel. The engine vibrating. A moving killing machine in front of your car etc. Once again be creative. If you use GROOVES that rely on the steering or the suspension system you'll have to add and use GroovyFunkRefs (part above the wheels diameter).
NB: Idealy components set as GROOVES shouldn't appear in the WAM file. So if you want them to detach anyway, you'll have to put the groovy object into a dummy and set the dummy as a detachable instead. This is getting advanced modding.

14. We were talking about the WAM file: don't forget the setup the smashable materials. Most of these are indeed windows and lights. They are a really good effect and make it fun to smash your car!

15. Still in the WAM file, try to have as many detachables as possible! That's the other great thing we like to see in C2: cars breaking in bits. Detachables can have smashable materials by the way! Doors can be set as flappables which are a sort of detachable that can open and close. Have a look at other addons to get the hang of this.
NB: If you have components in the WAM that are set like this: normal, boring, 0 ... well you can remove them as it is the default.

Optional: 16. The SHELL model is another C2 feature that enhances the look of your undamaged addon, improves performences a little bit, allows the Gonad mode to work, might help you be creative in some manners. However a good SHELL model can be quite difficult to achieve, so I'll talk about it in another article.


This should kinda do it for a complete addon :)
What about the actual release package now?

1. Well first don't forget to make a nice menu image with the driver and all. Writing informations about your car so that it doesn't seem like a dull addon.

2. Remove all unused textures from your car's tiffrgb folder, and maybe size down some that might be uselessly too big. It quickly saves a lot of space.

3. Remove all useless files in your car folder. These include the SDF files from PT2, the BMX,ASE,ASC files, CarEd OBJ files. You get the idea.

4. Prepare a good Readme text file. Explaining who you are and what is the vehicle included. Add links to your site(s) maybe, the date, and infos about the model itself.

5. When preparing the ZIP/RAR archive that will contain your C2 addon, remember to remove the PIX16 folder of your car and the tiffrgb one of the menu images. Remember also that the archive should be foolproof: users should just have to extract the content of the zip into C2 main directory and every file would go in the right place directly. This means that you pay attention to the folder hierarchy.
When opening the zip, what we should see is this: DATA folder, C2C file, Readme file, maybe additional promo files.
Also don't get mixed up with the folders and their name:
Code:
DATA
 ` INTRFACE
     ` CarImage
         ` yourcarCI
 ` CARS
     ` yourcar


6. If you have the time: test your archive.


That's pretty much all. Remember that this article is just here to remind you of the basics. What you have to do in reality might differ depending on the addon you're working on :)
Feel free to remind me points I might have forgotten!
User avatar
Halogaland on Wed Mar 30, 2011 2:22 pm
Post
Quote:
4. Now go back to the top of your text file. Ask yourself: is the driver of my car a girl? If so don't forget to add GIRL right under the version line. If he's a male don't write anything.


What the hell does that? (you know that I'm interested XD)
TTR on Wed Mar 30, 2011 3:10 pm
Post
I was thinking the same thing lol.
Citywalker on Thu Mar 31, 2011 8:07 am
Post
Halo, it affects the in-game texts, for example: "Opponent status: pissing her pants" (not *his* pants).
(or whatever texts there really are, I don't remember precisely)
AdR on Sat Jan 17, 2015 7:54 pm
Post
I'm going to bump this thread as my question might come in handy for future reference.

What's the right way to identify vertex numbers in a model, to make a door hinge, for example?
(Keep in mind I'm only using 3dsmax + Harmalarm's exporter script, no PT2 at all)

The vertex #'s in 3dsmax obviously don't match whatever the hell the C2 engine uses as reference.
I think Plaything2 might be the solution, but after poking around a while, I have no idea how to actually select a vertex and see it's number or ID.
User avatar
Harmalarm on Sat Jan 17, 2015 8:31 pm
Post
Yes this is known ADR. C2 has a different vertex and texture vertex order. Luckilly I have a little script for this that will help you do this in 3ds max:

What you need to do is:
1. select you car part, probably the main car as this holds all the rotation vertices for the WAM file.
2. Select the vertex you need.
3. Run this little script
4. Copy the vertex number that you will see in the popup window to your WAM file.

The script is here below, you can save it in your maxscript editor, or dowload the script from Here and run it.

Code:
fn vert_to_tvert a f =
(
   a = snapshotasmesh a
   nbfaces = getNumFaces a
   tvert = 1
   for i=1 to nbfaces do
   (
      face = getface a i
      if (face.x as integer) == f do
      (
         tvert = (gettvface a i).x
      )
      if (face.y as integer) == f do
      (
         tvert = (gettvface a i).y
      )
      if (face.z as integer) == f do
      (
         tvert = (gettvface a i).z
      )      
   )
   tvert = (tvert as integer)-1
)

obj = $
if obj != undefined do (
   vertices = polyop.getVertSelection obj
   file = newscript()
   for v in vertices do (
      format "%\n" (vert_to_tvert obj v) to:file
   )
)


What the script will do is convert your vertex selection into carmageddons's own vertex indices. Let me know if it works please. (but it should as it did with me back a while) It is a little rudimentary, I should make it more user friendly but for now it will hopefully do the trick for you.

In PT2 this would be done by using the explode tool to seperate the car parts in view. Then you would need to go in vertices mode and select the proper ones. It is tricky and you will need to use the deselect all tool a lot. Selected vertex number should popup in the display. But as you might guess I'm not a big fan or PT2. The sole reason for the scriptpack was because PT2 just didn't do it for me with all it's crashes and shitty navigation. Perhaps someone else could elaborate on the PT2 part.
AdR on Sat Jan 17, 2015 9:08 pm
Post
THANKS!! Works like a charm! only that I've had to select the vertices from the part (door) not the main actor.

PT2 I DON'T NEED YOU! hehe :tongue:
User avatar
Toshiba-3 on Sat Jan 17, 2015 10:15 pm
Post
Quote:
PT2 I DON'T NEED YOU!

Well I'm afraid using PT2 for its optimise function can still be critical in some cases. And applying this function can also change the vertice IDs...

Also Harm, I noticed I also use PT2 to rename model identifiers (to make them unique for C1) and not having to do it via hexediting. Is there a way to do this with your script? I know how to do instances etc. but this is different.
Image / carmageddon add-ons at road reaction
User avatar
Harmalarm on Sun Jan 18, 2015 9:40 am
Post
Quote:
Well I'm afraid using PT2 for its optimise function can still be critical in some cases. And applying this function can also change the vertice IDs...

Maybe we should start a new THREAD about this.
Pages: 1



Extra information
It is currently Sun Nov 19, 2017 1:23 am,

Please Register a username.
In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
Users browsing this forum: No registered users and 1 guest
Moderators: coffeycup, Toshiba-3

Powered by phpBB :: Hosted by n3wton :: Molested by goats
CWA Links
Facebook