Vehicle ODF tutorial by psych0fred

Started by Phobos, February 06, 2017, 07:15:22 PM

Previous topic - Next topic
Commented AAT.odf vehicle tutorial by psych0fred

Quote[GameObjectClass]
ClassLabel          = "hover" // Defines the class label for the game engine to expose properties
GeometryName        = "cis_hover_aat.msh"   // Defines the mesh for Zeroeditor when placed as an object

[Properties]

GeometryName        = "cis_hover_aat"   // Sets name of mesh file to use for vehicle

Explosion           = "cis_hover_aat_exp"   // Sets name of odf file to call when vehicle dies

// Some vehicles have a slow death, the ATAT for example has a long death animation attached to it
// -- the ATAT reaches critical health, crumbles to it's knees, then finally explodes; flyers can die
// -- but go spinning off before exploding...
//--in which case the ExplosionCritical and ExplosionDestruct are used

ExplosionCritical   = "cis_hover_aat_exp"   // Sets name of odf file to call when vehicle reaches critical health
ExplosionDestruct   = "cis_hover_aat_exp"   // Sets name of odf file to call when vehicle finally explodes

VehicleType         = "light"   // Defines the vehicle type for ???????
AISizeType          = "MEDIUM"  // Defines the size of the AI for planning graphs

MapTexture          = "aat_icon"    // Defines the tga file used on map for vehicle
MapScale            = 1.5   // Defines the scale of the icon on the map
HealthTexture       = "HUD_cis_aat_icon"    // Defines the tga used for the vehicle health icon

WaterEffect         = "waterwake_lg"    // Defines the common particle effect for when vehicle goes through water

FLYERSECTION        = "BODY"    // Defines the primary section of the vehicle occupied by pilot
VehiclePosition     = "common.vehiclepositions.pilot"   // Defines the pilot position for localization
FirstPerson         = "cishq\cishq;cis_1st_cockpit_AAT" // Defines the path to the fpm folder/lvl/sub-lvl
FirstPersonFOV      = "52" // Sets the first person field of view
CockpitTension      = 22    // Sets the tension of the cocpit camera

CollisionScale      = 4 // Sets the damage resulting from collision
CollisionThreshold  = 5 // Sets the threshold of impact before damage occuers
MaxHealth           = 6600.0    // Sets teh vehicle's max health
HealthType          = "vehicle" // Sets the health type for a vehicle, used for ?????????
//HitLocation       = "p_crithit 0"

SetAltitude         = 0.5   // Sets the default hover altitude
GravityScale        = 4.0   // Sets the mass of the vehicle
LiftSpring          = 4.0   // Sets the spring in the hover
LiftDamp            = 3.0   // Sets the cushion of the spring on subsequent bounces

Acceleration        = 5.25  // Sets the rate of acceleration m/s
Deceleration        = 7.0   // Sets the rate of decelleration m/s
Traction            = 20.0 // Sets the percent to decrease acceleration rate when starting from zero
ForwardSpeed        = 12.0 // Sets the maxspeed m/s
ReverseSpeed        = 10.0  // Sets the max reverse speed m/s
StrafeSpeed         = 4.5   // Sets the max strafe speed m/s

// The following sections tweak the bounce
AddSpringBody       = "-1.6 1.9 1.95 2.5"
BodySpringLength    = 0.3
AddSpringBody       = "1.6 1.9 1.95 2.5"
BodySpringLength    = 0.3

AddSpringBody       = "0.0 2.15 -1.6 3.5"
BodySpringLength    = 0.8
BodyOmegaXSpringFactor = 2

VelocitySpring      = 5
VelocityDamp        = 2.5
OmegaXSpring        = 1.0
OmegaXDamp          = 3.0
OmegaZSpring        = 4.0
OmegaZDamp          = 1.5


SpinRate            = 1.7   // Sets the rate of turn for the vehicle is turning but not moving
TurnRate            = 1.7   // Sets the rate of turn for the vehicle when turning while moving
TurnFilter          = 5.0   // Sets a tension in the rate of turn to make it ramp up
PitchRate           = 0.5   // Sets the rate of pitching the vehicle
PitchFilter         = 1.0   // Sets the rate ramping up the pitch when starting a tilt
PitchDamp           = 1.0   // Sets the rate slowing down the vehicle when stopping a tilt

//SpinRate            = 2.7
//TurnRate            = 1.7
//TurnFilter          = 5.0
//PitchRate           = 2.5
//PitchFilter         = 1.0
//PitchDamp           = 1.0


StrafeRollAngle     = 0.01  // Angle the vehicle rolls when strafing
ThrustPitchAngle    = 0.0   // Picth of the vehicle caused by thrusting forward
BankAngle           = -0.01 // Angle of the vehicle when banking
BankFilter          = 3     //low is slow - How quickly the bank returns to level
LevelSpring         = 2.0   //low is slow - the force the restores level
LevelDamp           = 1.0   //low is slow - the force that reduces the momentum of the rotation

PCPitchRate         = "15.0" // may be obsolete, otherwise these settings are used on PC
PCSpinRate          = "15.0"// may be obsolete, otherwise these settings are used on PC   
PCTurnRate          = "20.0"// may be obsolete, otherwise these settings are used on PC

//Camera settings for vehicle position
// Think of camera as fixed on one end of long stick balanced on a cone
//-- on one end is camera, other end is focal point, cone at center can be shifted
//-- camera is eyepoint; TrackOffset is focal point; Trackcenter is cone position; tilt value is tilt on pole
EyePointOffset      = "0.0 2.5 -2.0"  // Camera position from vehicle origin x,y,z
TrackCenter         = "0.0 5.0 0.0"   // Camera tilt axis from vehicle origin x,y,z
TrackOffset         = "0.0 0.0 10.0"  // Camera Focal Point from vehicle origin x,y,z   
TiltValue           = "5.0"           // How much camera can tilt
PitchLimits         = "-30 20" // How far camera swings when pitching in degrees
YawLimits           = "-90 90"  // How far camera swings when tilting in degrees

// Each body section or turret section can be occupied by a unit
// -- if a body or turret section has more than one weapon, they are defined by WEAPONSECTION headers
// -- when a section has more than one weapon, section 1 is the primary fire and section 2 the secondary fire

WEAPONSECTION       = 1
WeaponName          = "cis_weap_hover_aat_cannon" // Odf name of weapon
WeaponAmmo          = 0 // Amount of ammo or clips in weapon 0 is infinite

AimerNodeName       = "side_gun_1"  // Hardpoint name in mesh that acts as camera point for aimer
AimerPitchLimits    = "-30.0 90.0"  // Sets pitch movement limits on aimer in degrees
AimerYawLimits      = "-30.0 10.0"  // Sets yaw movement limits on aimer in degrees
BarrelNodeName      = "recoil_1"    // Sets name of object in mesh to use as gun barrel to animate recoil
BarrelRecoil        = 0.25          // Sets amount of recoil to apply to object defined as barrel
FirePointName       = "hp_gun_2"    // Sets the name of the hardpoint in the mesh where the shot comes from

NextAimer           = "-"  // Header for other barrels weapons with multiple barrels, causing alternating shots

AimerNodeName       = "side_gun_2"
AimerPitchLimits    = "-30.0 90.0"
AimerYawLimits      = "-10.0 30.0"
BarrelNodeName      = "recoil_2"
BarrelRecoil        = 0.25
FirePointName       = "hp_gun_1"

WEAPONSECTION       = 2     // Weaponsection 2 defines weapons fired using the secondary fire button
WeaponName          = "cis_weap_hover_aat_missile"
WeaponAmmo          = "9"

// The AAT has six missile tubes, three on each side. Each is separated with a nextaimer line
//--causing the shots to fire from teh barrels one by one rather than from all six at once
AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleR_1"

NextAimer           = "-"

AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleL_2"

NextAimer           = "-"

AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleR_2"

NextAimer           = "-"

AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleL_3"

NextAimer           = "-"

AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleR_3"

NextAimer           = "-"

AimerPitchLimits    = "-5 90"
AimerYawLimits      = "-20.0 20.0"
AimerNodeName       = "hp_missleL_1"

// Turret1 is the turret on the top of the AAT
FLYERSECTION        = "TURRET1" // Turret1 is the secondary positon a unit can man

FirstPerson         = "cis\cissccam;cis_1st_cockpit_securitycam"
VehiclePosition     = "common.vehiclepositions.gunner"
TurretNodeName      = "Gun_Body"
PitchLimits         = "-40.0 20.0"
YawLimits           = "-180.0 180.0"
PitchTurnFactor     = 0.0

PCPitchRate         = "15.0"
PCTurnRate          = "20.0"

TurnRate            = 1.5
TurnFilter          = 5.0
PitchRate           = 0.5
PitchFilter         = 1.0
PitchDamp           = 1.0

//PitchRate         = 0.8
//PitchFilter       = 2.75
//TurnRate          = 1.3
//TurnFilter        = 2.75

AimerNodeName       = "Main_Gun"
AimerPitchLimits    = "-30.0 90.0"
AimerYawLimits      = "0.0 0.0"

BarrelNodeName      = "recoil_3"
BarrelRecoil        = 0.75
FirePointName       = "hp_cannon_1"

EyePointOffset      = "0.0 2.0 -1.75"
TrackCenter         = "0.0 1.0 -2.0"
TrackOffset         = "0.0 0.0 3.0"
TiltValue           = "10.0"

// This section sets up the sounds triggered when manning the turret as well as when it moves
TurretYawSound         = "turret_whir_yaw_lp"
TurretYawSoundPitch    = "0.7"
TurretPitchSound       = "turret_whir_pitch_lp"
TurretPitchSoundPitch  = "0.7"
TurretAmbientSound     = ""
TurretActivateSound    = "vehicle_equip"
TurretDeactivateSound  = "vehicle_equip"
TurretStartSound       = ""
TurretStopSound        = ""

WeaponName              = "cis_weap_hover_aat_launcher"
WeaponAmmo              = 0

// This section define the collision geometry within the mesh to use when colliding with what kind of object
VehicleCollision        = "p_vehiclesphere"
SoldierCollision        = "CollisionMesh"
//SoldierCollision      = "p_sidegun1"
//SoldierCollision      = "p_sidegun2"
SoldierCollision        = "p_barrel"
SoldierCollision        = "p_turret"

OrdnanceCollision       = "CollisionMesh"
OrdnanceCollision       = "p_sidegun1"
OrdnanceCollision       = "p_sidegun2"
OrdnanceCollision       = "p_barrel"
OrdnanceCollision       = "p_turret"



// Chunks are the peices resulting from the vehicle's explosion
CHUNKSECTION            = "CHUNK1" // Defines the chunk
ChunkGeometryName       = "cis_hover_att_Chunk1"    // Defines the mesh file to use for the chunk
ChunkNodeName           = ""    // Defines the hardpoint in the mesh from which the chunk originates
ChunkTerrainCollisions  = "2"   // Defines the number of time the chunk bounces
ChunkTerrainEffect      = "dirtspray"   // Defines the particle effect attached to each bounce
ChunkPhysics            = "FULL"        // Defines the chunk behavior/mass
ChunkOmega              = "1.0 2.0 1.0" // ?? Defines chunk spin???
ChunkBounciness         = 0.35  // Defines rate of upward bounce
ChunkStickiness         = 0.45  // Defines how fast chunk accelerate in bounce
ChunkSpeed              = "15.0"  // Defines speed of moving chunk
ChunkUpFactor           = "25.00"   // Defines the upward speed of spawned chunk
ChunkTrailEffect        = "mediumsmoketrail"    // Defines the particle effect attached to chunk

// The next two lines define sounds to be triggered by chunks
ChunkInitialCollisionSound = "com_veh_collision_lg" //Played each time the chunk collides with something.
ChunkScrapeCollisionSound  = "" // Played as the chunk slides along another object.

CHUNKSECTION            = "CHUNK2"
ChunkGeometryName       = "cis_hover_att_Chunk2"
ChunkNodeName           = ""
ChunkTerrainCollisions  = "4"
ChunkTerrainEffect      = "dirtspray"
ChunkPhysics            = "FULL"
ChunkOmega              = "2.0 2.5 2.0"
ChunkBounciness         = 0.45
ChunkStickiness         = 0.25
ChunkSpeed              = "10.0"
ChunkUpFactor           = "0.00"
ChunkTrailEffect        = "mediumsmoketrail"

ChunkInitialCollisionSound = "com_veh_collision_lg" //Played each time the chunk collides with something.
ChunkScrapeCollisionSound  = "" // Played as the chunk slides along another object.

CHUNKSECTION            = "CHUNK3"
ChunkGeometryName       = "cis_hover_att_Chunk3"
ChunkNodeName           = ""
ChunkTerrainCollisions  = "3"
ChunkTerrainEffect      = "dirtspray"
ChunkTrailEffect        = "mediumsmoketrail"
ChunkPhysics            = "FULL"
ChunkOmega              = "2.0 1.0 2.0"
ChunkSpeed              = "12.0"

ChunkInitialCollisionSound = "com_veh_collision_lg" //Played each time the chunk collides with something.
ChunkScrapeCollisionSound  = "" // Played as the chunk slides along another object.

CHUNKSECTION            = "CHUNK4"
ChunkGeometryName       = "cis_hover_att_Chunk4"
ChunkNodeName           = ""
ChunkTerrainCollisions  = "0"
ChunkTerrainEffect      = "dirtspray"
ChunkTrailEffect        = "mediumsmoketrail"
ChunkPhysics            = "LEAF"
ChunkOmega              = "0.2 0.0 0.2"
ChunkSpeed              = "2.0"
ChunkSmokeEffect        = "smokeplume"
ChunkSmokeNodeName      = "hp_smoke"

ChunkInitialCollisionSound = "com_veh_collision_lg" //Played each time the chunk collides with something.
ChunkScrapeCollisionSound  = "" // Played as the chunk slides along another object.


// The next section defines damage particle effects

DamageStartPercent  = 70.0              // Health percentage where damage effect is turned on
DamageStopPercent   = 20.0              // Health percentage where damage effect is turned off
DamageEffect        = "vehiclespark"    // Particle effect to be spawned/turned on
DamageAttachPoint   = "hp_damage_2"     // Hardpoint in mesh where effect is attached
DamageEffectSound   = ""                // Sound that can be trigged at start of damage state
                                        // --looping sounds will stop when damage state changes
                                        // --sounds can also be attached to spawned particle effect

DamageStartPercent  = 70.0
DamageStopPercent   = 20.0
DamageEffect        = "vehiclespark"
DamageAttachPoint   = "hp_damage_4"

DamageStartPercent  = 60.0
DamageStopPercent   = 20.0
DamageEffect        = "vehiclespark"
DamageAttachPoint   = "hp_damage_3"

DamageStartPercent  = 50.0
DamageStopPercent   = 0.0
DamageEffect        = "vehiclesmoke"
DamageAttachPoint   = "hp_damage_2"

DamageStartPercent  = 19.0
DamageStopPercent   = 0.0
DamageEffect        = "vehicleflame"
DamageAttachPoint   = "hp_damage_2"

DamageStartPercent  = 30.0
DamageStopPercent   = 0.0
DamageEffect        = "vehiclesmoke"
DamageAttachPoint   = "hp_damage_1"

DamageStartPercent  = 10.0
DamageStopPercent   = 0.0
DamageEffect        = "vehicleflame"
DamageAttachPoint   = "hp_damage_3"
DamageEffectSound   = "cis_alert_loop"



EngineSound             = "cis_hover_aat_engine_parameterized" // Name of soundproperty to be used as looping engine
HurtSound               = "cis_hover_aat_hurt"    // Name of soundproperty to be triggered when vehicle takes damage
DeathSound              = "imp_weap_ord_exp_lg" // Name of soundproperty to be triggered when vehicle dies
TurnOnSound             = "cis_hover_aat_turn_on" // Name of soundproperty triggered when unit enters vehicle
TurningOffSound         = ""        // Name of soundproperty triggered when unit leaves vehicle
TurnOffSound            = "cis_hover_aat_turn_off" // Name of soundproperty triggered when vehile turns off
TurnOffTime             = "1.0" // Time after unit leaves vehicle before vehicle turns off
Music                   = ""    // Default music played when unit enters vehicle
RepMusic                = ""    // Music played when rep unit enters vehicle
CISMusic                = ""    // Music played when cis unit enters vehicle
ALLMusic                = ""    // Music played when all unit enters vehicle
IMPMusic                = ""    // Music played when imp unit enters vehicle
MusicSpeed              = ".25" // Speed vehicle must reach before music is triggered
MusicDelay              = "3.0" // Delay when speed reached before music is played
GroundedSound           = ""    // May be obsolete -- soundtriggered by hover bouncing against terrain
GroundedHeight          = ""    // May be obsolete -- height of vehicle that triggers groundedsound
BoostSound              = ""    // Soundproperty, speed threshold (%), going over or under (1 or 0)
FoleyFXGroup            = "metal_foley" // Defines the sound foley class to play for footsteps on object
VehicleCollisionSound   ="com_veh_collision_lg" // Name of soundproperty to trigger when vehicle collides with objects


Is this new? Is this the second coming of psych0fred?

No, it's been on his site for ages.
All mods on indefinite hold