To restrict the ships to water, I created a new locomotor for each ship in locomotor.ini. This is the locomotor for the Iraqi Patrol Boat:
Code:
Locomotor PatrolBoatShipLocomotor
Surfaces = WATER ;this allows the ship to travel only on water
Speed = 25 ; in dist/sec
SpeedDamaged = 20 ; in dist/sec
TurnRate = 20 ; in degrees/sec
TurnRateDamaged = 20 ; in degrees/sec
Acceleration = 23 ; in dist/(sec^2)
AccelerationDamaged = 20 ; in dist/(sec^2)
Lift = 120 ; in dist/(sec^2)
LiftDamaged = 80 ; in dist/(sec^2)
Braking = 50 ; in dist/(sec^2)
MinTurnSpeed = 0 ; in dist/sec
PreferredHeight = 4 ; at 1, 2, 3, the unit shakes from rounding. at 0 the SurfaceRelativeHeight flag is ignored.
AllowAirborneMotiveForce = Yes
ZAxisBehavior = SURFACE_RELATIVE_HEIGHT ;ensures the ship sits on the water
Appearance = HOVER ;gives the effect of the ship bobbing on the water
PitchStiffness = 0.9 ; stiffness of the "springs" in the suspension forward & back.
RollStiffness = 0.95 ; stiffness of the "springs" in the suspension side to side.
PitchDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
RollDamping = 0.9 ; How fast it damps. 0=perfect spring, bounces forever. 1=glued to terrain.
ForwardVelocityPitchFactor = -0.1 ; How much velocity will cause the front to lift/dip
LateralVelocityRollFactor = 0.1 ; How much cornering will cause the chassis to roll.
Apply2DFrictionWhenAirborne = Yes
AirborneTargetingHeight = 30
LocomotorWorksWhenDead = No
End
I added the following locomotors to locomotor.ini:
PatrolBoatShipLocomotor
DemoBoatShipLocomotor
MediumShipLocomotor
CruiserShipLocomotor
CarrierShipLocomotor
ConstructionShipLocomotor