Torque3D/Templates/Full PhysX/game/art/datablocks/player.cs
2012-12-12 13:53:32 -05:00

675 lines
17 KiB
C#

//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Player Audio Profiles
//----------------------------------------------------------------------------
datablock SFXProfile(DeathCrySound)
{
fileName = "art/sound/orc_death";
description = AudioClose3d;
preload = true;
};
datablock SFXProfile(PainCrySound)
{
fileName = "art/sound/orc_pain";
description = AudioClose3d;
preload = true;
};
//----------------------------------------------------------------------------
datablock SFXProfile(FootLightSoftSound)
{
filename = "art/sound/lgtStep_mono_01";
description = AudioClosest3d;
preload = true;
};
datablock SFXProfile(FootLightHardSound)
{
filename = "art/sound/hvystep_ mono_01";
description = AudioClose3d;
preload = true;
};
datablock SFXProfile(FootLightMetalSound)
{
filename = "art/sound/metalstep_mono_01";
description = AudioClose3d;
preload = true;
};
datablock SFXProfile(FootLightSnowSound)
{
filename = "art/sound/snowstep_mono_01";
description = AudioClosest3d;
preload = true;
};
datablock SFXProfile(FootLightShallowSplashSound)
{
filename = "art/sound/waterstep_mono_01";
description = AudioClose3d;
preload = true;
};
datablock SFXProfile(FootLightWadingSound)
{
filename = "art/sound/waterstep_mono_01";
description = AudioClose3d;
preload = true;
};
datablock SFXProfile(FootLightUnderwaterSound)
{
filename = "art/sound/waterstep_mono_01";
description = AudioClosest3d;
preload = true;
};
//----------------------------------------------------------------------------
// Splash
//----------------------------------------------------------------------------
datablock ParticleData(PlayerSplashMist)
{
dragCoefficient = 2.0;
gravityCoefficient = -0.05;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 400;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "art/shapes/actors/common/splash";
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 0.5";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.8;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(PlayerSplashMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
lifetimeMS = 250;
particles = "PlayerSplashMist";
};
datablock ParticleData(PlayerBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.50;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 400;
lifetimeVarianceMS = 100;
useInvAlpha = false;
textureName = "art/shapes/actors/common/splash";
colors[0] = "0.7 0.8 1.0 0.4";
colors[1] = "0.7 0.8 1.0 0.4";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.1;
sizes[1] = 0.3;
sizes[2] = 0.3;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(PlayerBubbleEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 2.0;
ejectionOffset = 0.5;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "PlayerBubbleParticle";
};
datablock ParticleData(PlayerFoamParticle)
{
dragCoefficient = 2.0;
gravityCoefficient = -0.05;
inheritedVelFactor = 0.1;
constantAcceleration = 0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "art/shapes/particles/millsplash01";
colors[0] = "0.7 0.8 1.0 0.20";
colors[1] = "0.7 0.8 1.0 0.20";
colors[2] = "0.7 0.8 1.0 0.00";
sizes[0] = 0.2;
sizes[1] = 0.4;
sizes[2] = 1.6;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(PlayerFoamEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "PlayerFoamParticle";
};
datablock ParticleData( PlayerFoamDropletsParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
textureName = "art/shapes/actors/common/splash";
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 0.5";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.8;
sizes[1] = 0.3;
sizes[2] = 0.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( PlayerFoamDropletsEmitter )
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 2;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 60;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
orientParticles = true;
particles = "PlayerFoamDropletsParticle";
};
datablock ParticleData( PlayerWakeParticle )
{
textureName = "art/shapes/particles/wake";
dragCoefficient = "0.0";
gravityCoefficient = "0.0";
inheritedVelFactor = "0.0";
lifetimeMS = "2500";
lifetimeVarianceMS = "200";
windCoefficient = "0.0";
useInvAlpha = "1";
spinRandomMin = "30.0";
spinRandomMax = "30.0";
animateTexture = true;
framesPerSec = 1;
animTexTiling = "2 1";
animTexFrames = "0 1";
colors[0] = "1 1 1 0.1";
colors[1] = "1 1 1 0.7";
colors[2] = "1 1 1 0.3";
colors[3] = "0.5 0.5 0.5 0";
sizes[0] = "1.0";
sizes[1] = "2.0";
sizes[2] = "3.0";
sizes[3] = "3.5";
times[0] = "0.0";
times[1] = "0.25";
times[2] = "0.5";
times[3] = "1.0";
};
datablock ParticleEmitterData( PlayerWakeEmitter )
{
ejectionPeriodMS = "200";
periodVarianceMS = "10";
ejectionVelocity = "0";
velocityVariance = "0";
ejectionOffset = "0";
thetaMin = "89";
thetaMax = "90";
phiReferenceVel = "0";
phiVariance = "1";
alignParticles = "1";
alignDirection = "0 0 1";
particles = "PlayerWakeParticle";
};
datablock ParticleData( PlayerSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 0.5";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( PlayerSplashEmitter )
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 3;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 60;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
orientParticles = true;
lifetimeMS = 100;
particles = "PlayerSplashParticle";
};
datablock SplashData(PlayerSplash)
{
numSegments = 15;
ejectionFreq = 15;
ejectionAngle = 40;
ringLifetime = 0.5;
lifetimeMS = 300;
velocity = 4.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "art/shapes/particles/millsplash01";
emitter[0] = PlayerSplashEmitter;
emitter[1] = PlayerSplashMistEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 0.3";
colors[2] = "0.7 0.8 1.0 0.7";
colors[3] = "0.7 0.8 1.0 0.0";
times[0] = 0.0;
times[1] = 0.4;
times[2] = 0.8;
times[3] = 1.0;
};
//----------------------------------------------------------------------------
// Foot puffs
//----------------------------------------------------------------------------
datablock ParticleData(LightPuff)
{
dragCoefficient = 2.0;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.6;
constantAcceleration = 0.0;
lifetimeMS = 800;
lifetimeVarianceMS = 100;
useInvAlpha = true;
spinRandomMin = -35.0;
spinRandomMax = 35.0;
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 0.0";
sizes[0] = 0.1;
sizes[1] = 0.8;
times[0] = 0.3;
times[1] = 1.0;
};
datablock ParticleEmitterData(LightPuffEmitter)
{
ejectionPeriodMS = 35;
periodVarianceMS = 10;
ejectionVelocity = 0.2;
velocityVariance = 0.1;
ejectionOffset = 0.0;
thetaMin = 20;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
useEmitterColors = true;
particles = "LightPuff";
};
//----------------------------------------------------------------------------
// Liftoff dust
//----------------------------------------------------------------------------
datablock ParticleData(LiftoffDust)
{
dragCoefficient = 1.0;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
useInvAlpha = true;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
colors[0] = "1.0 1.0 1.0 1.0";
sizes[0] = 1.0;
times[0] = 1.0;
textureName = "art/shapes/particles/dustParticle";
};
datablock ParticleEmitterData(LiftoffDustEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 2.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 90;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
useEmitterColors = true;
particles = "LiftoffDust";
};
//----------------------------------------------------------------------------
datablock DecalData(PlayerFootprint)
{
size = 0.4;
material = CommonPlayerFootprint;
};
datablock DebrisData( PlayerDebris )
{
explodeOnMaxBounce = false;
elasticity = 0.15;
friction = 0.5;
lifetime = 4.0;
lifetimeVariance = 0.0;
minSpinSpeed = 40;
maxSpinSpeed = 600;
numBounces = 5;
bounceVariance = 0;
staticOnMaxBounce = true;
gravModifier = 1.0;
useRadiusMass = true;
baseRadius = 1;
velocity = 20.0;
velocityVariance = 12.0;
};
// ----------------------------------------------------------------------------
// This is our default player datablock that all others will derive from.
// ----------------------------------------------------------------------------
datablock PlayerData(DefaultPlayerData)
{
renderFirstPerson = false;
computeCRC = false;
// Third person shape
shapeFile = "art/shapes/actors/Soldier/soldier_rigged.DAE";
cameraMaxDist = 3;
allowImageStateAnimation = true;
// First person arms
imageAnimPrefixFP = "soldier";
shapeNameFP[0] = "art/shapes/actors/Soldier/FP/FP_SoldierArms.DAE";
canObserve = 1;
cmdCategory = "Clients";
cameraDefaultFov = 55.0;
cameraMinFov = 5.0;
cameraMaxFov = 65.0;
debrisShapeName = "art/shapes/actors/common/debris_player.dts";
debris = playerDebris;
throwForce = 30;
minLookAngle = "-1.4";
maxLookAngle = "0.9";
maxFreelookAngle = 3.0;
mass = 120;
drag = 1.3;
maxdrag = 0.4;
density = 1.1;
maxDamage = 100;
maxEnergy = 60;
repairRate = 0.33;
energyPerDamagePoint = 75;
rechargeRate = 0.256;
runForce = 4320;
runEnergyDrain = 0;
minRunEnergy = 0;
maxForwardSpeed = 8;
maxBackwardSpeed = 6;
maxSideSpeed = 6;
sprintForce = 4320;
sprintEnergyDrain = 0;
minSprintEnergy = 0;
maxSprintForwardSpeed = 14;
maxSprintBackwardSpeed = 8;
maxSprintSideSpeed = 6;
sprintStrafeScale = 0.25;
sprintYawScale = 0.05;
sprintPitchScale = 0.05;
sprintCanJump = true;
crouchForce = 405;
maxCrouchForwardSpeed = 4.0;
maxCrouchBackwardSpeed = 2.0;
maxCrouchSideSpeed = 2.0;
maxUnderwaterForwardSpeed = 8.4;
maxUnderwaterBackwardSpeed = 7.8;
maxUnderwaterSideSpeed = 7.8;
jumpForce = "747";
jumpEnergyDrain = 0;
minJumpEnergy = 0;
jumpDelay = "15";
airControl = 0.3;
fallingSpeedThreshold = -6.0;
landSequenceTime = 0.33;
transitionToLand = false;
recoverDelay = 0;
recoverRunForceScale = 0;
minImpactSpeed = 10;
minLateralImpactSpeed = 20;
speedDamageScale = 0.4;
boundingBox = "0.65 0.75 1.85";
crouchBoundingBox = "0.65 0.75 1.3";
swimBoundingBox = "1 2 2";
pickupRadius = 1;
// Damage location details
boxHeadPercentage = 0.83;
boxTorsoPercentage = 0.49;
boxHeadLeftPercentage = 0.30;
boxHeadRightPercentage = 0.60;
boxHeadBackPercentage = 0.30;
boxHeadFrontPercentage = 0.60;
// Foot Prints
decalOffset = 0.25;
footPuffEmitter = "LightPuffEmitter";
footPuffNumParts = 10;
footPuffRadius = "0.25";
dustEmitter = "LightPuffEmitter";
splash = PlayerSplash;
splashVelocity = 4.0;
splashAngle = 67.0;
splashFreqMod = 300.0;
splashVelEpsilon = 0.60;
bubbleEmitTime = 0.4;
splashEmitter[0] = PlayerWakeEmitter;
splashEmitter[1] = PlayerFoamEmitter;
splashEmitter[2] = PlayerBubbleEmitter;
mediumSplashSoundVelocity = 10.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 5.0;
// Controls over slope of runnable/jumpable surfaces
runSurfaceAngle = 38;
jumpSurfaceAngle = 80;
maxStepHeight = 0.35; //two meters
minJumpSpeed = 20;
maxJumpSpeed = 30;
horizMaxSpeed = 68;
horizResistSpeed = 33;
horizResistFactor = 0.35;
upMaxSpeed = 80;
upResistSpeed = 25;
upResistFactor = 0.3;
footstepSplashHeight = 0.35;
//NOTE: some sounds commented out until wav's are available
// Footstep Sounds
FootSoftSound = FootLightSoftSound;
FootHardSound = FootLightHardSound;
FootMetalSound = FootLightMetalSound;
FootSnowSound = FootLightSnowSound;
FootShallowSound = FootLightShallowSplashSound;
FootWadingSound = FootLightWadingSound;
FootUnderwaterSound = FootLightUnderwaterSound;
//FootBubblesSound = FootLightBubblesSound;
//movingBubblesSound = ArmorMoveBubblesSound;
//waterBreathSound = WaterBreathMaleSound;
//impactSoftSound = ImpactLightSoftSound;
//impactHardSound = ImpactLightHardSound;
//impactMetalSound = ImpactLightMetalSound;
//impactSnowSound = ImpactLightSnowSound;
//impactWaterEasy = ImpactLightWaterEasySound;
//impactWaterMedium = ImpactLightWaterMediumSound;
//impactWaterHard = ImpactLightWaterHardSound;
groundImpactMinSpeed = "45";
groundImpactShakeFreq = "4.0 4.0 4.0";
groundImpactShakeAmp = "1.0 1.0 1.0";
groundImpactShakeDuration = 0.8;
groundImpactShakeFalloff = 10.0;
//exitingWater = ExitingWaterLightSound;
observeParameters = "0.5 4.5 4.5";
class = "armor";
cameraMinDist = "0";
DecalData = "PlayerFootprint";
// Allowable Inventory Items
mainWeapon = Lurker;
maxInv[Lurker] = 1;
maxInv[LurkerClip] = 20;
maxInv[LurkerGrenadeLauncher] = 1;
maxInv[LurkerGrenadeAmmo] = 20;
maxInv[Ryder] = 1;
maxInv[RyderClip] = 10;
maxInv[ProxMine] = 5;
maxInv[DeployableTurret] = 5;
// available skins (see materials.cs in model folder)
availableSkins = "base DarkBlue DarkGreen LightGreen Orange Red Teal Violet Yellow";
};