Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

FAQ and Problem Solving - Vehicles

The 2016 reincarnation of Carmageddon! Thanks, SCi!
Post Reply
User avatar
AlexTSK
mindless
Posts: 2860
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa
Contact:

FAQ and Problem Solving - Vehicles

Post by AlexTSK »

This is going to be a little problem solving and FAQ section specifically pertaining custom vehicles. So if you have an issue you may find the solution here. I'll do my best to update this topic with new solutions as the problems arise. Please don't hesitate to post any issues/solutions you have come across and I will add them to the list if they aren't already in.

----------------------------------------------------------------------------------------------------------------------------------

To quickly go to the section/issue you want , use your browsers search function and search for the numbers in the table of contents below.

Table of Contents: (Under construction)

1.0 Enabling Error Logging

1.1 Critical Errors

-1.1.1 Wheels

-1.1.2 Materials

-1.1.3 Collision Errors

1.2 Non-Critical Errors

1.2.1 Tyre(s) Offset from Rim

1.2.2 Wheels facing the wrong way

1.2.3 Wheel(s) not spinning

1.2.4 Tyre(s) not spinning/scrolling

1.2.5 Car is facing the wrong way/upside down/ sideways.

1.2.6 No driver in the car

1.2.7 In-car camera not working

1.2.8 Car can't be wasted

1.2.9 Car sometimes falls through the floor upon getting wasted

1.2.10

1.2.11

----------------------------------------------------------------------------------------------------------------------------------
1.0 Enabling Error Logging

Start off with enabling logging. This will allow you to track and fix certain issues. Keep in mind that the logs will work only if your custom vehicle is actually loaded into a race, if the vehicle has critical issues that cause the game to crash nothing will be logged.

Follow these steps to enable error logs:

1: Create a folder named 'Diagnostics' in your CMD root directory

2: In Steam, right-click on CMD and select

3: Select Properties

4: Under the general tab select "Set Launch Options"

5: Add the following too the launch options box "-dumplogs" (minus the quotes)

6: You should now have the logs up and running.

After enabling logs inside the "Diagnostics" folder you will find folders with various date and time stamps which correspond to each launch of the game.

Inside these folders you will always find two files:

SESSION_LOG.TXT is created when launching the game (going as far as the menus will generate this file)

SCRIPT_LOG.txt is created only when loading into a level.

SCRIPT_LOG.txt is the one you want to check out for possible errors, I'll come back to this file and its contents later on.

----------------------------------------------------------------------------------------------------------------------------------
1.1 Critical Errors

Pretty self explanatory, these issues will cause your game to crash when using your custom vehicle and starting a race.

The game does not load Structure.XML for the garage, so you will most of the time be able to see the car in the garage just fine(the game is just loading the model and textures and nothing else) However if the car has an error you will (most of the time) only be able to tell when starting up a race.

1.1.1 Wheels

This section deals with the wheel setup in your Structure.XML

The absence of wheels is usually noticeable in the car select screen before loading into a level, if your car is missing wheels when it loads up in the garage(car selection screen), chances are good that attempting to load a level while using that car will crash the game. Reincarnation/Max Damage requires the wheel physics to be set up 100% correctly or else the game will crash when loading into a level.

Always make sure that you have following basics 100% correct:

-You have 4 wheels defined, Wheel_FL, Wheel_FR, Wheel_RL, Wheel_RR. Make sure the nodes on your model are named accordingly.

-Each wheel has the correct physics properties, a mismatch in which will case the game to crash

- If the Physics properties are mixed up between each wheel, hub, brake (Example: assigning FRONT_LEFT... when it should be FRONT_RIGHT..) then the game will crash without logging the error.

Check that your wheel nodes define the following properties (if using Flummery, these should be generated automatically provided you named your nodes correctly)

Front Left Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_LEFT_WHEEL" )

Front Right Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_RIGHT_WHEEL" )

Rear Left Wheel - DamageParameters:Add_PhysicsProperty( "REAR_LEFT_WHEEL" )

Rear Right Wheel - DamageParameters:Add_PhysicsProperty( "REAR_RIGHT_WHEEL" )

- You also want a parent for the wheel node, (typically this will be an axle shaft, or a brake disc/drum mesh), this will hold the point of rotation

- The point of rotation will make the object spin with the wheels, so it makes sense to have this set on a brake disc(which you don't want to stay stationary)

NB: This property defines the rotation point Avoid putting this property on the wheel node itself and rather put it on the parent of the wheel node (a brake disc that you want to spin with the wheel for example

Front Left Brake Drum/Disc/Axle: CDamageParameters:Add_PhysicsProperty( "FRONT_LEFT_POINT_OF_ROTATION" )

Front Right Brake Drum/Disc/Axle: CDamageParameters:Add_PhysicsProperty( "FRONT_LEFT_POINT_OF_ROTATION" )

Rear Left Brake Drum/Disc/Axle: CDamageParameters:Add_PhysicsProperty( "REAR_LEFT_POINT_OF_ROTATION" )

Rear Right Brake Drum/Disc/Axle: CDamageParameters:Add_PhysicsProperty( "REAR_RIGHT_POINT_OF_ROTATION" )

You may also have a hub mesh or node, this is the part of wheel that will not spin but rather act as a mounting point for your brake disc/drum and brake caliper(if you have one) as well as be the point of suspension and the point of steering for the front wheels. Alternatively, if you don't have a hub you can add these properties to your Brake Drum/Disc/Axle combo, which will then become your hub

I have not looked into 4 wheel steering just yet so I will update this section when I've tested it out, I know fatcats monster bug has it so it does function. The standard setup is the front wheels have steering.

Front Left Hub :
CDamageParameters:Add_PhysicsProperty( "FRONT_LEFT_POINT_OF_SUSPENSION" )
CDamageParameters:Add_PhysicsProperty( "FRONT_LEFT_POINT_OF_STEERING" )

Front Right Hub :
CDamageParameters:Add_PhysicsProperty( "FRONT_RIGHT_POINT_OF_SUSPENSION" )
CDamageParameters:Add_PhysicsProperty( "FRONT_RIGHT_POINT_OF_STEERING" )

Rear Left Hub :
CDamageParameters:Add_PhysicsProperty( "REAR_LEFT_POINT_OF_SUSPENSION" )

Rear Right Hub :
CDamageParameters:Add_PhysicsProperty( "REAR_RIGHT_POINT_OF_SUSPENSION" )

- Wheels need to have collision and physics properties set, once again flummery will output these correctly if your nodes are named, you'll just have to move the point of rotation/suspension properties to their respective parts.

1.1.2 Material Issues

Paint Material

Its now required that your vehicle have a material named "Paint", a strange requirement that was added after the shader overhaul. Nonetheless, you need this at least one material on your vehicle(not the wheels) to be named "Paint" or else the game will crash.

Missing Materials

If the game cannot find one/multiple materials that are defined on your vehicle you will also get a crash. This is easily spotted in car select, the missing materials will pulsate a rainbow of colors. Make sure your material names correspond to those .MTL files in your car's folder.

----------------------------------------------------------------------------------------------------------------------------------
1.1.3 Collision/Convex Hull Error

This one is rather sneaky and I would imagine most people won't run into it. The basic principle of this is, the game draws a collision shape for each detachable part, an sometimes the detachable parts may be very complex (in my case it was the engine mesh). This collision mesh may intersect other detachables and cause the game to go into nuclear meltdown attempting to compute the collisions, which results in a game crash before you've loaded into a race.

If you are encountering game crashes and it's not the wheels or hierarchy, you may be running into this error, it is however a pretty simple fix. All you need to do is define a shape for the possible problem part in Structure.xml.

Add one of these this to the Part you think may be causing the collision issue :

CDamageParameters:Set_ShapeType( "TIC_TAC_X" )
CDamageParameters:Set_ShapeType( "TIC_TAC_Y" )
CDamageParameters:Set_ShapeType( "TIC_TAC_Z" )

----------------------------------------------------------------------------------------------------------------------------------
Non-Critical Errors

1.2.1 Tyres are Offset from the rims

- I suggest your wheels share the same pivot point as the hub, and anything else that is in the heirarchy leading up to the hub.
Example Hierarchy: Hub_FL ---> BrakeDisc_FL ---> Wheel_FL, have all of these share the same pivot. In order to ofset your wheel to not clip through the hub, add an offset to the wheel node before exporting.

- The welds on the wheels nodes MUST have Add_PartSpaceVertex(0,0,0) otherwise tires will be offset in-game

1.2.2Wheels on the left or right are facing the wrong way

1.2.3Wheel(s) aren't spinning

1.2.4Tyre(s) aren't spinning/scrolling

1.2.4

----------------------------------------------------------------------------------------------------------------------------------
User avatar
starbuck
kill boss
Posts: 1604
Joined: Wed Jan 21, 2004 12:26 pm

FAQ and Problem Solving - Vehicles

Post by starbuck »

While this is a perfect idea for cars cause they look complicated we should have one for maps too.
User avatar
AlexTSK
mindless
Posts: 2860
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa
Contact:

FAQ and Problem Solving - Vehicles

Post by AlexTSK »

starbuck wrote:While this is a perfect idea for cars cause they look complicated we should have one for maps too.
No experience in that I'm afraid, If get into map making I'll make one for maps as well.
User avatar
AlexTSK
mindless
Posts: 2860
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa
Contact:

FAQ and Problem Solving - Vehicles

Post by AlexTSK »

Thanks, will add a couple of these.
User avatar
AlexTSK
mindless
Posts: 2860
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa
Contact:

FAQ and Problem Solving - Vehicles

Post by AlexTSK »

Going to do a bit of a clean up and minor update to this troubleshooting thread, stay tuned
User avatar
Sleep Dirt
hit n run
Posts: 153
Joined: Sun Nov 27, 2011 7:36 pm
Location: England, Isle of Wight

FAQ and Problem Solving - Vehicles

Post by Sleep Dirt »

AlexTSK wrote:Going to do a bit of a clean up and minor update to this troubleshooting thread, stay tuned
Sweet timing for that update Alex, I'm just about to jump into making a beast, so sure I'll be running into every error going sooner or later :p
The Ocean Is the Ultimate Solution.
User avatar
Doctor Fraggington
turbo bastard
Posts: 307
Joined: Wed Jan 15, 2014 1:47 am

FAQ and Problem Solving - Vehicles

Post by Doctor Fraggington »

'80s Time Warp wrote:
[*]- If the Physics properties are mixed up between each wheel, hub, brake (Example: assigning FRONT_LEFT... when it should be FRONT_RIGHT..) then the game will crash without giving an error in the Script_Log, unless that has changed since Gold Release.
If I understand correctly you mean attaching, say, a FRONT_LEFT_WHEEL to a FRONT_RIGHT_DISC. I think you should specify that, otherwise it sounds like you're saying that the LEFT-assigned objects are visually RIGHT - although that's problematic too I bet.

Relatedly:

AlexTSK wrote:
Front Left Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_LEFT_WHEEL" )

Front Right Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_RIGHT_WHEEL" )

Rear Left Wheel - DamageParameters:Add_PhysicsProperty( "REAR_LEFT_WHEEL" )
Rear Left Wheel - DamageParameters:Add_PhysicsProperty( "REAR_RIGHT_WHEEL" )
User avatar
AlexTSK
mindless
Posts: 2860
Joined: Sun Dec 18, 2011 1:12 pm
Location: South Africa
Contact:

FAQ and Problem Solving - Vehicles

Post by AlexTSK »

Doctor Fraggington wrote:

Relatedly:



AlexTSK wrote:
Front Left Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_LEFT_WHEEL" )

Front Right Wheel - DamageParameters:Add_PhysicsProperty( "FRONT_RIGHT_WHEEL" )

Rear Left Wheel - DamageParameters:Add_PhysicsProperty( "REAR_LEFT_WHEEL" )
Rear Left Wheel - DamageParameters:Add_PhysicsProperty( "REAR_RIGHT_WHEEL" )

Fixed, thanks
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

FAQ and Problem Solving - Vehicles

Post by '80s Time Warp »

Doctor Fraggington wrote:
'80s Time Warp wrote:
[*]- If the Physics properties are mixed up between each wheel, hub, brake (Example: assigning FRONT_LEFT... when it should be FRONT_RIGHT..) then the game will crash without giving an error in the Script_Log, unless that has changed since Gold Release.


If I understand correctly you mean attaching, say, a FRONT_LEFT_WHEEL to a FRONT_RIGHT_DISC. I think you should specify that, otherwise it sounds like you're saying that the LEFT-assigned objects are visually RIGHT - although that's problematic too I bet.

No, I meant that if you assign the physics property for the wrong wheel index. More specifically mixing up "Front_Left_", "Front_Right_", "Rear_Left_", "Rear_Right_". As opposed to mixing up "_Point_Of_Suspension", "_Point_Of_Rotation", "_Point_Of_Steering", "_Wheel", which is equally problematic.

Whilst it does seem that assigning physics properties from the wrong wheel index will no longer crash the game, it will cause other issues instead, such as wheels not rotating & tires getting offset. I can't confirm what happens if the wrong type of physics property is assigned, as the last time I made that mistake was over two dozen vehicles ago.

Regardless, most, if not all of the above situations will result in the game not printing any errors/warnings to the Script_Log.

Anyway, I'll edit the earlier post so it's a little clearer. ;)
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
User avatar
'80s Time Warp
Road Warrior
Posts: 1257
Joined: Wed Aug 03, 2011 8:30 pm

FAQ and Problem Solving - Vehicles

Post by '80s Time Warp »

Beating me to it on tutorial setup hehe.

I would add:

  • - If the game crashes when loading an event, then the problem is usually in the structure.xml (if all parts are present in hierarchy)

  • - If the Physics properties are incorrectly assigned, then the game is likely to crash without giving an error in the Script_Log, unless that has changed since Gold Release

    Examples:
    1. Assigning FRONT_LEFT_POINT_OF_ROTATION to the Front_Right Brake Disc/Drum, when FRONT_RIGHT_POINT_OF_ROTATION should be assigned. This might result in the game crashing upon event load.

    2. Assigning FRONT_RIGHT_POINT_OF_SUSPENSION to the Front_Right Brake Disc/Drum, when FRONT_RIGHT_POINT_OF_ROTATION should be assigned. This might result in the game crashing upon event load

      If the game doesn't crash, you might find wheels/tires getting offset and not wheels rotating correctly.


  • - Driveshafts are usually animated manually in their local axis (see animation controllers below)
    1. Use GEARBOX_OUTPUT_ANGLE for transmission to live axle or transfer box

    2. Use WHEEL_ROTATION_XX, where XX is FL, FR, RL, RR


  • - Wheels need to have collision properties set (Use TIC_TAC_X)

  • - The welds on the wheels nodes MUST have Add_PartSpaceVertex(0,0,0), otherwise tires will be offset in-game

I'm hoping to get some basic tutorials setup soon too, so I might be back with some other useful info for car setup.

EDIT: clarified mixing up of physics properties
Just another '80s Dreamer....
Twitter Manifestation. - Mods for Max Damage.
Please do not use my old/deadname.
Post Reply

Check who’s online

Users browsing this forum: No registered users and 99 guests