From memory.
You export the tractor as a classic truck (PKG as standard vehicle) with common objects and paint names but don't forget the trailer hitch (a surface of two polys, doesn't matter his position) called TRAILER_HITCH_H
You export the trailer as it is (PKG as trailer) with new named objects. BODY_H becomes TRAILER_H:m, wheels are named TWHL0_H:m to TWHL3_H:m plus another TRAILER_HITCH_H (again, doesn't matter his position).
However the TRAILER_HITCH_H of the tractor must be correctly oriented, you must consider the fact that it will be linked to the other trailer hitch. Ditto for the second TRAILER_HITCH_H (the trailer one). So the first one looks like an HEALIGHT object while the second one looks like a BLIGHT object (I mean, their direction).
Here's the content of these two files :
*.dgTrailerJoint
Code: Select all
type: a
dgTrailerJoint {
ForceLimit 999.000000
JointStatus 2
RestoreForceLean 2.000000
DampConstLean 2.000000
DampLinearLean 0.900000
RestoreForceRoll 2.000000
DampConstRoll 0.100000
DampLinearRoll 2.000000
LeanLimit 3.000000
LimitElasticityLean 0.000000
LimitElasticityRoll 0.000000
FreeRange 0.140000
FreeLean 0.100000
FreeRoll 0.100000
}
*.VehTrailer
Code: Select all
type: a
vehTrailer {
Mass 10000.000000
InertiaBox 2.500000 3.600000 10.500000
CarHitchOffset -0.074035 0.506000 2.69712
TrailerHitchOffset -0.066000 0.300000 -11.50716
WheelFront {
SuspensionExtent 0.100000
SuspensionLimit 0.100000
SuspensionFactor 1.000000
SuspensionDampCoef 0.200000
SteeringLimit 0.390000
SteeringOffset 0.000000
BrakeCoef 1.000000
HandbrakeCoef 1.000000
CamberLimit -1.000000
WobbleLimit 0.000000
TireDispLimitLong 0.125000
TireDampCoefLong 0.250000
TireDragCoefLong 0.020000
TireDispLimitLat 0.125000
TireDampCoefLat 0.250000
TireDragCoefLat 0.050000
OptimumSlipPercent 0.140000
StaticFric 2.000000
SlidingFric 1.900000
}
WheelBack {
SuspensionExtent 0.330000
SuspensionLimit 0.100000
SuspensionFactor 1.000000
SuspensionDampCoef 0.200000
SteeringLimit 0.180000
SteeringOffset 0.000000
BrakeCoef 1.000000
HandbrakeCoef 1.000000
CamberLimit -1.000000
WobbleLimit 0.000000
TireDispLimitLong 0.125000
TireDampCoefLong 0.250000
TireDragCoefLong 0.020000
TireDispLimitLat 0.125000
TireDampCoefLat 0.250000
TireDragCoefLat 0.050000
OptimumSlipPercent 0.140000
StaticFric 2.000000
SlidingFric 1.900000
}
Drivetrain {
AngInertia 5000.000000
BrakeDynamicCoef 1.000000
BrakeStaticCoef 1.200000
}
}
(taken from another truck)
These files are the only way to find the correct position (and the height too) of a trailer, behind the truck.
Anway, making a trailer for MM2 isn't coherent. Long time ago, I imported a lot of them and, for each, the BOUND object don't surrounds the trailer whereas this one is below the horizontal axle (X from ZM) :/ Dunno if it's an error of ZM 1.05 but if you take the time to put the trailer objects positionned like a classic truck, in-game, either the trailer doesn't work or the look will be strange (too high, invisible or too far).
*It makes me want to retry*
___
Tips (make sure that you've the GEOMETRY, BOUND and TUNE folders before starting).
1a) If you don't want to waste your time, start ZM1, make a cylinder (16 horiz. steps, 0 vertic.), scale it a bit and rename it as a WHL object.
b) Copy and make the other wheels. Now make a cube, rename it as BODY_H, copy and rename it as BOUND. Finally make a surface of two polys (create > surfaces > flat), from the Top view, 0 horiz./vertic. steps), rename it as SHADOW_H.
c) From the back view, make another flat surface (0, 0) named TRAILER_HITCH_H ~ You can move this object to the back of the truck but doesn't matter in-game.
d) Adjust each object and recenter the axis, show all + select all, click on SEL, display > local axis > reset, click on objects from any view (except the 3D one), now click on "center axis").
e) Save and copy the Z3D.
2a) Open it and save as trailer.z3d. Rename BODY_H as TRAILER_H:m, rename each wheel by respecting the correct name (WHL0_H:m becomes TWHL3_H:m etc).
b) Select the TRAILER_HITCH_H object and click on Modify > reorient. Now you've the tractor.z3d and the trailer.z3d properly set before export.
c) Export the tractor as a standard vehicle (w/o any paint), then the trailer as a trailer.
3) It's time to edit the TUNE files now.
Here's the required files and folders to get a truck with his trailer, in-game.
banger (10)
test_TRAILER_HITCH.dgBangerData
test_trailer_TRAILER_HITCH.dgBangerData
test_trailer_TWHL0.dgBangerData
test_trailer_TWHL1.dgBangerData
test_trailer_TWHL2.dgBangerData
test_trailer_TWHL3.dgBangerData
test_WHL0.dgBangerData
test_WHL1.dgBangerData
test_WHL2.dgBangerData
test_WHL3.dgBangerData
These files have the same content, doesn't matter. Just have it with the correct suffix.
camera (3)
cam, far, near (nothing changes for a trailer) ;
vehicle (7)
test.dgtrailerjoint
test.vehtrailer
test.vehCarDamage
test.vehGyro
test.vehStuck
test.vehcarsim
test_opp.vehcarsim
vehGyro and vehStuck have detailed options handling ;
vehCarsim and opp.vehCarsim are identical (such as the opponent/player CSV audio files) ;
vehCarDamage handles the detachable parts, strength and smoking features (position, colour) ;
Finally, two new files are added. the dgtrailerjoint allow you to edit the capacity of the trailer in-game (elasticity, force feedback) while vehtrailer is the most important with these lines : CarHitchOffset and TrailerHitchOffset.