Game Development Community

Getting the Tribes 2 Shrike working.

by Ian Roach · in Torque Game Engine · 06/11/2002 (6:53 pm) · 5 replies

Hey guys im just curious about getting the tribes 2 shrike workign in torque.

Ive done searches of forums and what not and have even found the new datablocks required for flying vehicles but im a bit lost in regards to how everything fits in.

For example i have the tribes 2 vehicle scripts and whatnot and ive edited the vehicle_shrike script with the new datablocks.

But i still get alot of errors.

Mostly related to the vehicle.cs script

Can anyone give me a step by step of getting a defualt tribes 2 shrike into torque ?

Regards

Ian Roach

PS: I believe the one thing missing in the documentation is getting vehicles into torque (even from a using t2 point of view)

#2
06/12/2002 (2:57 am)
Badguy i tried ure tutorial and got the following error

www.users.bigpond.net.au/Roachie/error.jpg

What i did was use ure drone scripts and then replaced the relavant areas with the new Head Flyer scripts that someone posted awhile back.

from here

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2490

a copy of the drone.cs file is located here

www.users.bigpond.net.au/Roachie/drone.cs

any chance u could take a gander ?

Regards

Ian Roach
#3
06/12/2002 (5:56 am)
None of those errors will prevent you from using badguy's drone. Your emitter definitions just don't match up, that's all.
#4
06/12/2002 (6:21 am)
use something like this
//--------------------------------------------------------------
// FLIER CONTRAILS
//--------------------------------------------------------------

datablock ParticleData(ContrailParticle)
{
   dragCoefficient      = 1.5;
   gravityCoefficient   = 0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 3000;
   lifetimeVarianceMS   = 0;
   textureName          = "~/data/shapes/specialfx/smokeParticle";
   colors[0]     = "0.6 0.6 0.6 0.5";
   colors[1]     = "0.2 0.2 0.2 0";
   sizes[0]      = 0.6;
   sizes[1]      = 5;
};

datablock ParticleEmitterData(ContrailEmitter)
{
   ejectionPeriodMS = 5;
   periodVarianceMS = 0;
   ejectionVelocity = 1;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 10;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   particles = "ContrailParticle";
};


datablock ParticleData(FlyerJetParticle)
{
   dragCoefficient      = 1.5;
   gravityCoefficient   = 0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS           = 200;
   lifetimeVarianceMS   = 0;
   textureName          = "~/data/shapes/specialfx/smokeParticle";
   colors[0]     = "0.9 0.7 0.3 0.6";
   colors[1]     = "0.3 0.3 0.5 0";
   sizes[0]      = 2;
   sizes[1]      = 6;
};

datablock ParticleEmitterData(FlyerJetEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;
   ejectionVelocity = 20;
   velocityVariance = 1.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 10;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvances = false;
   particles = "FlyerJetParticle";
};

//**************************************************************
// LIGHTS
//**************************************************************
//datablock RunningLightData(SkyHawkLight1)
//{
//   type        = 1;
//   radius      = 2.0;
//   length      = 3.0;
//   color       = "1.0  1.0  1.0  1.0";
//   direction   = "0.0  1.0 -1.0 ";
//   offset      = "0.0  0.0 -0.5";
//   texture     = "special/lightcone04";
//};

//datablock RunningLightData(SkyHawkLight2)
//{
//   radius = 1.5;
//   color = "1.0 1.0 1.0 0.3";
//   direction = "0.0 0.0 -1.0";
//   offset      = "0.0  0.8 -1.2";
//   texture = "special/headlight4";
//};

//**************************************************************
// VEHICLE CHARACTERISTICS
//**************************************************************

datablock FlyingVehicleData(SkyHawkFlyer)// : SkyHawkDamageProfile
{
   spawnOffset = "0 0 2";

   catagory = "Vehicles";
   //shapeFile = "~/data/shapes/max/joe/vehicles/sky_hawk/vehicle_sky_hawk.dts";
   shapeFile = "~/data/shapes/max/joe/vehicles/sky_hawk/vehicle_air_scout.dts";
   multipassenger = false;
   computeCRC = true;

   debrisShapeName = "~/data/shapes/max/joe/vehicles/sky_hawk/vehicle_air_scout_debris.dts";
   //debrisShapeName = "~/data/shapes/max/joe/vehicles/sky_hawk/vehicle_sky_hawk_debris.dts";
   debris = ShapeDebris;
   renderWhenDestroyed = false;

   drag    = 0.2;
   density = 1.0;

   mountPose[0] = sitting;
   numMountPoints = 1;  
   isProtectedMountPoint[0] = true;
   cameraMaxDist = 15;
   cameraOffset = 2.5;
   cameraLag = 0.9;
   //explosion = VehicleExplosion;
	explosionDamage = 0.5;
	explosionRadius = 5.0;

   maxDamage = 150;
   destroyedLevel = 1.40;

   isShielded = true;
   energyPerDamagePoint = 160;
   maxEnergy = 280;      // Afterburner and any energy weapon pool
   rechargeRate = 0.8;

   minDrag = 100;           // Linear Drag (eventually slows you down when not thrusting...constant drag)
   rotationalDrag = 10;        // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)

   maxAutoSpeed = 15;       // Autostabilizer kicks in when less than this speed. (meters/second)
   autoAngularForce = 15;       // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
   autoLinearForce = 15;        // Linear stabilzer force (this slows you down when autostabilizer kicks in)
   autoInputDamping = 0.95;      // Dampen control input so you don't' whack out at very slow speeds
   
   // Maneuvering
   maxSteeringAngle = 5;    // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
   horizontalSurfaceForce = 10;   // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
   verticalSurfaceForce = 100;     // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
   maneuveringForce = 3000;      // Horizontal jets (W,S,D,A key thrust)
   steeringForce = 700;         // Steering jets (force applied when you move the mouse)
   steeringRollForce = 8;      // Steering jets (how much you heel over when you turn)
   rollForce = 5;                // Auto-roll (self-correction to right you after you roll/invert)
   hoverHeight = 5;        // Height off the ground at rest
   createHoverHeight = 3;  // Height off the ground when created
   //maxForwardSpeed = 100;  // speed in which forward thrust force is no longer applied (meters/second)

   // Turbo Jet
   jetForce = 4000;      // Afterburner thrust (this is in addition to normal thrust)
   minJetEnergy = 55;     // Afterburner can't be used if below this threshhold.
   jetEnergyDrain = 3.6;       // 2.9 min  works Energy use of the afterburners (low number is less drain...can be fractional)                                                                                                                                                                                                                                                                                          // Auto stabilize speed
   vertThrustMultiple = 3.0;

   // Rigid body
   mass = 100;        // Mass of the vehicle
   bodyFriction = 0;     // Don't mess with this.
   bodyRestitution = 0.5;   // When you hit the ground, how much you rebound. (between 0 and 1)
   minRollSpeed = 0;     // Don't mess with this.
   softImpactSpeed = 14;       // Sound hooks. This is the soft hit.
   hardImpactSpeed = 25;    // Sound hooks. This is the hard hit.

   // Ground Impact Damage (uses DamageType::Ground)
   minImpactSpeed = 10;      // If hit ground at speed above this then it's an impact. Meters/second
   speedDamageScale = 0.06;

   // Object Impact Damage (uses DamageType::Impact)
   collDamageThresholdVel = 20.0;
   collDamageMultiplier   = 0.02;

   //
   minTrailSpeed = 15;      // The speed your contrail shows up at.
   trailEmitter = ContrailEmitter;
   forwardJetEmitter = FlyerJetEmitter;
   downJetEmitter = FlyerJetEmitter;

   //
   //jetSound = ScoutFlyerThrustSound;
   //engineSound = ScoutFlyerEngineSound;
   //softImpactSound = SoftImpactSound;
   //hardImpactSound = HardImpactSound;
   //wheelImpactSound = WheelImpactSound;
   
   //
   softSplashSoundVelocity = 10.0; 
   mediumSplashSoundVelocity = 15.0;   
   hardSplashSoundVelocity = 20.0;   
   exitSplashSoundVelocity = 10.0;

   //exitingWater      = VehicleExitWaterMediumSound;
   //impactWaterEasy   = VehicleImpactWaterSoftSound;
   //impactWaterMedium = VehicleImpactWaterMediumSound;
   //impactWaterHard   = VehicleImpactWaterMediumSound;
   //waterWakeSound    = VehicleWakeMediumSplashSound;
    
   dustEmitter = VehicleLiftoffDustEmitter;
   triggerDustHeight = 4.0;
   dustHeight = 1.0;

   damageEmitter[0] = LightDamageSmoke;
   damageEmitter[1] = HeavyDamageSmoke;
   //damageEmitter[2] = DamageBubbles;
   damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
   damageLevelTolerance[0] = 0.3;
   damageLevelTolerance[1] = 0.7;
   numDmgEmitterAreas = 1;

   //
   //max[chaingunAmmo] = 1000;

   minMountDist = 5;

   //splashEmitter[0] = VehicleFoamDropletsEmitter;
   splashEmitter[1] = VehicleFoamEmitter;

   shieldImpact = VehicleShieldImpact;

   //cmdCategory = "Tactical";
   //cmdIcon = CMDFlyingScoutIcon;
   //cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
   //targetNameTag = 'Shrike';
   //targetTypeTag = 'Turbograv';
   //sensorData = AWACPulseSensor;
   //sensorRadius = AWACPulseSensor.detectRadius;
   //sensorColor = "255 194 9";
   
   checkRadius = 5.5;
   observeParameters = "1 10 10";

   //runningLight[0] = ShrikeLight1;
   //runningLight[1] = ShrikeLight2;

   //shieldEffectScale = "0.937 1.125 0.60";

};
it is what I am using untill my mesh is done but be warned I got mine using the 2nd mouse button for thrust. And with these settings you can take the shrike too fast and crash the game
#5
06/12/2002 (7:01 am)
Thanks anthony

Ill try later tonight.

I have my own model which i want to use.

when i put the vehicle in the map it hovers to the ground slowly

then as soon as the collision box hits the terrain it goes flying up into the air and then will slowly begin to float to the ground again.

Thats when i get this error

www.users.bigpond.net.au/Roachie/error2.jpg

and that crashes the whole thing :/