Initial commit.

This commit is contained in:
Ragora 2013-02-01 15:45:22 -05:00
commit f5a6cfce9b
262 changed files with 128936 additions and 0 deletions

View file

@ -0,0 +1,308 @@
//--------------------------------------------------------------------------
// Artillery Turret
//--------------------------------------------------------------------------
datablock ShockwaveData(artilleryShockwave)
{
width = 6.0;
numSegments = 32;
numVertSegments = 6;
velocity = 50;
acceleration = 20.0;
lifetimeMS = 500;
height = 3.0;
verticalCurve = 0.5;
is2D = false;
texture[0] = "special/shockwave4";
texture[1] = "special/gradient";
texWrap = 6.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "0.6 1.0 0.2 0.50";
colors[1] = "0.56 0.36 0.26 1.0";
colors[2] = "0.56 0.36 0.26 0.0";
mapToTerrain = true;
orientToNormal = false;
renderBottom = false;
};
datablock ParticleData(artilleryExplosionSmoke)
{
dragCoeffiecient = 6.0;
gravityCoefficient = 0.25; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 3000;
lifetimeVarianceMS = 200;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
textureName = "special/Smoke/bigSmoke";
colors[0] = "0.2 0.2 0.2 0.6";
colors[1] = "0.25 0.25 0.25 0.4";
colors[2] = "0.4 0.4 0.4 0.0";
sizes[0] = 5.0;
sizes[1] = 8.0;
sizes[2] = 15.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleData(artilleryFallerSmoke)
{
dragCoeffiecient = 0.7;
gravityCoefficient = 2.0; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 6000;
lifetimeVarianceMS = 750;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
textureName = "special/Smoke/bigSmoke";
colors[0] = "1.0 0.8 0.1 0.6";
colors[1] = "0.3 0.3 0.3 0.6";
colors[2] = "0.3 0.3 0.3 0.6";
colors[3] = "0.35 0.35 0.35 0.3";
colors[4] = "0.4 0.4 0.4 0.0";
sizes[0] = 3.0;
sizes[1] = 6.0;
sizes[2] = 7.0;
sizes[3] = 10.0;
sizes[4] = 15.0;
times[0] = 0.0;
times[1] = 0.1;
times[2] = 0.25;
times[3] = 0.5;
times[4] = 0.75;
};
datablock ParticleEmitterData(artilleryExplosionSmokeEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionOffset = 0.0;
ejectionVelocity = 15.0;
velocityVariance = 10.0;
thetaMin = 89.0;
thetaMax = 90.0;
lifetimeMS = 500;
particles = "artilleryExplosionSmoke";
};
datablock ParticleEmitterData(artilleryExplosionSmokeEmitter2)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionOffset = 0.0;
ejectionVelocity = 15.0;
velocityVariance = 15.0;
thetaMin = 0.0;
thetaMax = 10.0;
lifetimeMS = 350;
particles = "artilleryFallerSmoke";
};
datablock ParticleEmitterData(artilleryExplosionSmokeEmitter3)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionOffset = 12.0;
ejectionVelocity = 20.0;
velocityVariance = 5.0;
thetaMin = 0.0;
thetaMax = 25.0;
lifetimeMS = 350;
particles = "artilleryFallerSmoke";
};
datablock ExplosionData(artillerysubExplosion1)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
delayMS = 0;
offset = 0.0;
playSpeed = 0.6;
sizes[0] = "10.0 10.0 10.0";
sizes[1] = "15.0 15.0 15.0";
times[0] = 0.0;
times[1] = 1.0;
};
datablock ExplosionData(artillerybarrelExplosion)
{
soundProfile = MortarExplosionSound;
shockwave = artilleryShockwave;
shockwaveOnTerrain = true;
subExplosion[0] = artillerysubExplosion1;
emitter[0] = artilleryExplosionSmokeEmitter;
emitter[1] = artilleryExplosionSmokeEmitter2;
emitter[2] = artilleryExplosionSmokeEmitter3;
shakeCamera = true;
camShakeFreq = "8.0 9.0 7.0";
camShakeAmp = "100.0 100.0 100.0";
camShakeDuration = 1.3;
camShakeRadius = 40.0;
};
datablock GrenadeProjectileData(artillerybarrelshot)
{
projectileShapeName = "grenade_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 4.25;
damageRadius = 25.0;
radiusDamageType = $DamageType::Artillery;
kickBackStrength = 3000;
explosion = "artillerybarrelexplosion";
velInheritFactor = 0.0;
splash = GrenadeSplash;
baseEmitter = GrenadeSmokeEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
grenadeElasticity = 0.25;
grenadeFriction = 0.3;
armingDelayMS = 500;
gravityMod = 0.8;
muzzleVelocity = 65.0;
drag = 0.1;
sound = MortarTurretProjectileSound;
hasLight = true;
lightRadius = 3;
lightColor = "0.05 0.2 0.05";
};
//--------------------------------------------------------------------------
// artillery explosion
//--------------------------------------------------------------------------
datablock TurretImageData(ArtilleryBarrelLarge)
{
shapeFile = "turret_tank_barrelmortar.dts";
item = artilleryBarrelLargePack;
projectile = artillerybarrelshot;
projectileType = GrenadeProjectile;
usesEnergy = true;
fireEnergy = 1;
minEnergy = 1;
emap = true;
// Eolk - There should be no spread.
muzzleFlash = ChaingunTurretMuzzleFlash;
// Turret parameters
activationMS = 300;
deactivateDelayMS = 600;
thinkTimeMS = 200;
degPerSecTheta = 580;
degPerSecPhi = 960;
attackRadius = 370;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = PBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
// fire off about 2 quick shots
stateName[3] = "Fire";
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = AssaultMortarFireSound;
stateScript[3] = "onFire";
stateTimeoutValue[3] = 3.0; //0.3
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Ready";
// stateTransitionOnTriggerUp[3] = "Reload";
stateTransitionOnNoAmmo[3] = "NoAmmo";
stateName[8] = "Reload";
stateTimeoutValue[7] = 5.0;
stateAllowImageChange[8] = false;
stateSequence[8] = "Reload";
stateTransitionOnTimeout[8] = "Ready";
stateTransitionOnNotLoaded[8] = "Deactivate";
stateTransitionOnNoAmmo[8] = "NoAmmo";
stateName[9] = "Deactivate";
stateSequence[9] = "Activate";
stateDirection[9] = false;
stateTimeoutValue[9] = 1;
stateTransitionOnLoaded[9] = "ActivateReady";
stateTransitionOnTimeout[9] = "Dead";
stateName[10] = "Dead";
stateTransitionOnLoaded[10] = "ActivateReady";
stateName[11] = "NoAmmo";
stateTransitionOnAmmo[11] = "Reload";
stateSequence[11] = "NoAmmo";
};

View file

@ -0,0 +1,163 @@
//--------------------------------------------------------------------------
// Gauss Cannon Turret
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------------------------------------------
datablock EffectProfile(EBLSwitchEffect)
{
effectname = "powered/turret_light_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(EBLSwitchSound)
{
filename = "fx/powered/turret_heavy_activate.wav";
description = AudioClose3d;
preload = true;
effect = EBLSwitchEffect;
};
datablock EffectProfile(FlameTurretFireEffect)
{
effectname = "Bonuses/Nouns/snake";
minDistance = 2.5;
maxDistance = 8.0;
};
datablock AudioProfile(FlameTurretFireSound)
{
filename = "fx/Bonuses/Nouns/snake.wav";
description = AudioClose3d;
preload = true;
effect = FlameTurretFireEffect;
};
datablock LinearFlareProjectileData(FlameTurretBolt)
{
projectileShapeName = "turret_muzzlepoint.dts";
scale = "1.0 1.0 1.0";
faceViewer = true;
directDamage = 0.08;
hasDamageRadius = true;
indirectDamage = 0.1;
damageRadius = 4.0;
kickBackStrength = 0.0;
radiusDamageType = $DamageType::Plasma;
explosion = "flameBoltExplosion";
splash = PlasmaSplash;
baseEmitter = FlameEmitter;
dryVelocity = 80.0; // z0dd - ZOD, 7/20/02. Faster plasma projectile. was 55
wetVelocity = -1;
velInheritFactor = 2.0;
fizzleTimeMS = 250;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = -1;
//activateDelayMS = 100;
activateDelayMS = -1;
size[0] = 0.2;
size[1] = 0.5;
size[2] = 0.1;
numFlares = 35;
flareColor = "1 0.18 0.03";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
sound = PlasmaProjectileSound;
fireSound = PlasmaFireSound;
wetFireSound = PlasmaFireWetSound;
hasLight = true;
lightRadius = 10.0;
lightColor = "0.94 0.03 0.12";
};
datablock TurretImageData(ELFBarrelLarge)
{
shapeFile = "turret_elf_large.dts";
item = ELFBarrelPack;
projectile = FlameTurretBolt;
projectileType = LinearFlareProjectile;
usesEnergy = true;
fireEnergy = 0.01;
minEnergy = 0.01;
emap = true;
minRankPoints = 1800;
projectileSpread = 0.5 / 1000.0;
// Turret parameters
activationMS = 700;
deactivateDelayMS = 1500;
thinkTimeMS = 120;
degPerSecTheta = 300;
degPerSecPhi = 500;
attackRadius = 80;
// State transiltions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = EBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.05;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = FlameTurretFireSound;
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.05;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateSound[4] = PlasmaReloadSound;
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
};

View file

@ -0,0 +1,457 @@
//--------------------------------------
// Flak Turret - Created by Dondelium_X, Greatly Modified by Blnukem
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds and feedback effects
//--------------------------------------
datablock EffectProfile(AASwitchEffect)
{
effectname = "powered/turret_light_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(AAFireEffect)
{
effectname = "weapons/chaingun_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(AASwitchSound)
{
filename = "fx/powered/turret_aa_activate.wav";
description = AudioClose3d;
preload = true;
effect = AASwitchEffect;
};
datablock AudioProfile(AAFireSound)
{
filename = "fx/weapons/plasma_rifle_fire.wav";
description = AudioDefault3d;
preload = true;
effect = AAFireEffect;
};
//--------------------------------------------------------------------------
// Particle effects
//--------------------------------------
datablock ParticleData(FlakDust)
{
dragCoefficient = 1.0;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
useInvAlpha = true;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "particleTest";
colors[0] = "0.3 0.3 0.3 0.5";
colors[1] = "0.3 0.3 0.3 0.5";
colors[2] = "0.3 0.3 0.3 0.0";
sizes[0] = 6.6;
sizes[1] = 10.8;
sizes[2] = 12.0;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData(FlakDustEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 20.0;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 88;
thetaMax = 92;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "FlakDust";
};
datablock ParticleData(FlakExplosionSmoke)
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.5; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "0.7 0.7 0.7 1.0";
colors[1] = "0.2 0.2 0.2 1.0";
colors[2] = "0.1 0.1 0.1 0.0";
sizes[0] = 4.0;
sizes[1] = 13.0;
sizes[2] = 4.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(FExplosionSmokeEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 6.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 200;
particles = "FlakExplosionSmoke";
};
datablock ParticleData(FlakSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 650;
textureName = "special/bigspark";
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.56 0.36 0.26 1.0";
colors[2] = "1.0 0.36 0.26 0.0";
sizes[0] = 3.0;
sizes[1] = 3.0;
sizes[2] = 4.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(FlakSparksEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 15;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "FlakSparks";
};
datablock ParticleData(FlakFlashSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 250;
lifetimeVarianceMS = 650;
textureName = "special/bigspark";
colors[0] = "1.0 0.2 0.2 1.0";
colors[1] = "0.7 0.7 0.2 1.0";
colors[2] = "0.5 0.5 0.1 0.0";
sizes[0] = 4.0;
sizes[1] = 5.0;
sizes[2] = 6.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(FlakFlashSparksEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 25;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "FlakFlashSparks";
};
//----------------------------------------------------
// Explosion
//----------------------------------------------------
datablock ExplosionData(FlakExplosion)
{
soundProfile = GrenadeExplosionSound;
faceViewer = true;
explosionScale = "1.0 1.0 1.0";
emitter[0] = FlakDustEmitter;
emitter[1] = FExplosionSmokeEmitter;
emitter[2] = FlakSparksEmitter;
emitter[3] = FlakFlashSparksEmitter;
shakeCamera = true;
camShakeFreq = "10.0 6.0 9.0";
camShakeAmp = "20.0 20.0 20.0";
camShakeDuration = 0.5;
camShakeRadius = 20.0;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock TracerProjectileData(Flak_Bullet)
{
doDynamicClientHits = true;
directDamage = 0.3;
directDamageType = $DamageType::AATurret;
explosion = FlakExplosion;
splash = ChaingunSplash;
hasDamageRadius = true;
indirectDamage = 0.15;
damageRadius = 25.0;
radiusDamageType = $DamageType::Flak;
kickBackStrength = 15;
sound = ChaingunProjectile;
dryVelocity = 600.0;
wetVelocity = 200.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 2000;
explodeOnDeath = true;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 15.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.35;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.5 0.5 0.175";
};
datablock TracerProjectileData(Flak_Bullet_exp)
{
doDynamicClientHits = true;
directDamage = 0.3;
directDamageType = $DamageType::AATurret;
explosion = FlakExplosion;
splash = ChaingunSplash;
hasDamageRadius = true;
indirectDamage = 0.15;
damageRadius = 25.0;
radiusDamageType = $DamageType::Flak;
kickBackStrength = 150;
sound = ChaingunProjectile;
dryVelocity = 0.0;
wetVelocity = 0.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 10;
explodeOnDeath = true;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 1;
tracerLength = 0.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.35;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.5 0.5 0.175";
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock TurretImageData(AABarrelLarge)
{
shapeFile = "turret_aa_large.dts";
item = AABarrelPack; // z0dd - ZOD, 4/25/02. Was wrong: AABarrelLargePack
projectileType = TracerProjectile;
projectile = Flak_Bullet;
projectileSpread = 25.0 / 1000.0;
usesEnergy = true;
fireEnergy = 1.0;
minEnergy = 1.0;
emap = true;
isSeeker = true;
seekRadius = 300;
maxSeekAngle = 6;
seekTime = 1.0;
minSeekHeat = 0.6;
useTargetAudio = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 1000;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = AASwitchSound;
stateTimeoutValue[1] = 1.0;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateScript[1] = "AAActivateReady";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire1";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateScript[2] = "AAReady";
stateName[3] = "Fire1";
stateTransitionOnTimeout[3] = "Reload1";
stateTimeoutValue[3] = 1.00;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire1";
stateSound[3] = AAFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload1";
stateTimeoutValue[4] = 0.08;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Fire2";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateName[5] = "Fire2";
stateTransitionOnTimeout[5] = "Reload2";
stateTimeoutValue[5] = 1.00;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateSequence[5] = "Fire2";
stateSound[5] = AAFireSound;
stateScript[5] = "onFire";
stateName[6] = "Reload2";
stateTimeoutValue[6] = 0.08;
stateAllowImageChange[6] = false;
stateSequence[6] = "Reload";
stateTransitionOnTimeout[6] = "Ready";
stateTransitionOnNotLoaded[6] = "Deactivate";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateName[7] = "Deactivate";
stateSequence[7] = "Activate";
stateDirection[7] = false;
stateTimeoutValue[7] = 1.0;
stateTransitionOnLoaded[7] = "ActivateReady";
stateTransitionOnTimeout[7] = "Dead";
stateName[8] = "Dead";
stateTransitionOnLoaded[8] = "ActivateReady";
stateName[9] = "NoAmmo";
stateTransitionOnAmmo[9] = "Reload2";
stateSequence[9] = "NoAmmo";
};
function AABarrelLarge::onFire(%data,%obj,%slot)
{
%p = Parent::onFire(%data, %obj, %slot);
%p.doexplodecheck = schedule(250, 0, "TurretFlakExplode", %p);
}
function TurretFlakExplode(%p){
if(!isObject(%p))
return;
InitContainerRadiusSearch(%p.getPosition(), 25, $TypeMasks::VehicleObjectType);
while ((%SearchResult = containerSearchNext()) != 0)
{
%pn = new (TracerProjectile)() {
dataBlock = Flak_Bullet_exp;
initialPosition = %p.getPosition();
sourceObject = %p.sourceObject;
sourceSlot = %p.sourceSlot;
vehicleObject = %p.vehicleObject;
};
MissionCleanup.add(%pn);
%p.delete();
return;
}
%p.doexplodecheck = schedule(30, 0, "TurretFlakExplode", %p);
}

View file

@ -0,0 +1,531 @@
datablock EffectProfile(IBLSwitchEffect)
{
effectname = "powered/turret_light_activate";
minDistance = 5.0;
maxDistance = 5.0;
};
datablock EffectProfile(IBLFireEffect)
{
effectname = "powered/turret_indoor_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(IBLSwitchSound)
{
filename = "fx/powered/turret_light_activate.wav";
description = AudioClose3d;
preload = true;
effect = IBLSwitchEffect;
};
datablock AudioProfile(IBLFireSound)
{
filename = "fx/weapons/chaingun_fire.wav";
description = AudioDefault3d;
preload = true;
effect = IBLFireEffect;
};
datablock SensorData(DeployedIndoorTurretSensor)
{
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = false;
detectionPings = true;
detectRadius = 130;
};
datablock ShockwaveData(IndoorTurretMuzzleFlash)
{
width = 0.5;
numSegments = 13;
numVertSegments = 1;
velocity = 2.0;
acceleration = -1.0;
lifetimeMS = 300;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
renderSquare = true;
texture[0] = "special/blasterHit";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "1.0 0.3 0.3 1.0";
colors[1] = "1.0 0.3 0.3 1.0";
colors[2] = "1.0 0.3 0.3 0.0";
};
datablock TurretData(TurretDeployedFloorIndoor) : TurretDamageProfile
{
className = DeployedTurret;
shapeFile = "turret_indoor_deployf.dts";
mass = 5.0;
maxDamage = 2.0;
destroyedLevel = 2.0;
disabledLevel = 1.8;
explosion = SmallTurretExplosion;
expDmgRadius = 5.0;
expDamage = 0.25;
expImpulse = 500.0;
repairRate = 0;
heatSignature = 0.0;
deployedObject = true;
thetaMin = 5;
thetaMax = 145;
thetaNull = 90;
primaryAxis = zaxis;
isShielded = true;
energyPerDamagePoint = 110;
maxEnergy = 30;
rechargeRate = 0.10;
barrel = DeployableIndoorBarrel;
canControl = false;
cmdCategory = "DTactical";
cmdIcon = CMDTurretIcon;
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
targetNameTag = 'Emplacment';
targetTypeTag = 'Turret';
sensorData = DeployedIndoorTurretSensor;
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
sensorColor = "191 0 226";
firstPersonOnly = true;
renderWhenDestroyed = false;
debrisShapeName = "debris_generic_small.dts";
debris = TurretDebrisSmall;
noFire = 1;
};
datablock TurretData(TurretDeployedWallIndoor) : TurretDamageProfile
{
className = DeployedTurret;
shapeFile = "turret_indoor_deployw.dts";
mass = 5.0;
maxDamage = 2.0;
destroyedLevel = 2.0;
disabledLevel = 1.8;
explosion = SmallTurretExplosion;
expDmgRadius = 5.0;
expDamage = 0.25;
expImpulse = 500.0;
repairRate = 0;
heatSignature = 0.0;
thetaMin = 5;
thetaMax = 145;
thetaNull = 90;
deployedObject = true;
primaryAxis = yaxis;
isShielded = true;
energyPerDamagePoint = 110;
maxEnergy = 30;
rechargeRate = 0.10;
barrel = DeployableIndoorBarrel;
canControl = false;
cmdCategory = "DTactical";
cmdIcon = CMDTurretIcon;
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
targetNameTag = 'Emplacment';
targetTypeTag = 'Turret';
sensorData = DeployedIndoorTurretSensor;
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
sensorColor = "191 0 226";
firstPersonOnly = true;
renderWhenDestroyed = false;
debrisShapeName = "debris_generic_small.dts";
debris = TurretDebrisSmall;
noFire = 1;
};
datablock TurretData(TurretDeployedCeilingIndoor) : TurretDamageProfile
{
className = DeployedTurret;
shapeFile = "turret_indoor_deployc.dts";
mass = 5.0;
maxDamage = 2.0;
destroyedLevel = 2.0;
disabledLevel = 1.8;
explosion = SmallTurretExplosion;
expDmgRadius = 5.0;
expDamage = 0.5;
expImpulse = 500.0;
repairRate = 0;
explosion = SmallTurretExplosion;
//thetaMin = 5;
//thetaMax = 145;
thetaMin = 35;
thetaMax = 175;
thetaNull = 90;
heatSignature = 0.0;
deployedObject = true;
primaryAxis = revzaxis;
isShielded = true;
energyPerDamagePoint = 110;
maxEnergy = 75;
rechargeRate = 0.5;
barrel = DeployableIndoorBarrel;
canControl = false;
cmdCategory = "DTactical";
cmdIcon = CMDTurretIcon;
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
targetNameTag = 'Implacment';
targetTypeTag = 'Turret';
sensorData = DeployedIndoorTurretSensor;
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
sensorColor = "191 0 226";
firstPersonOnly = true;
renderWhenDestroyed = false;
debrisShapeName = "debris_generic_small.dts";
debris = TurretDebrisSmall;
noFire = 1;
};
datablock StaticShapeData(ControlStation) : StaticShapeDamageProfile
{
className = Station;
shapeFile = "station_teleport.dts";
maxDamage = 2.0;
destroyedLevel = 2.0;
disabledLevel = 1.5;
explosion = DeployablesExplosion;
expDmgRadius = 8.0;
expDamage = 0.35;
expImpulse = 500.0;
dynamicType = $TypeMasks::StationObjectType;
isShielded = false;
energyPerDamagePoint = 110;
maxEnergy = 50;
rechargeRate = 0.20;
renderWhenDestroyed = false;
deployedObject = true;
cantAbandon = 1;
cmdCategory = "DSupport";
cmdIcon = CMDStationIcon;
cmdMiniIconName = "commander/MiniIcons/com_inventory_grey";
targetNameTag = 'Control';
targetTypeTag = 'Station';
debrisShapeName = "debris_generic_small.dts";
debris = DeployableDebris;
heatSignature = 0;
};
datablock TracerProjectileData(ImplacmentBullet)
{
doDynamicClientHits = true;
directDamage = 0.12; // z0dd - ZOD, 9-27-02. Was 0.0825
directDamageType = $DamageType::IndoorDepTurret;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
kickBackStrength = 1000.0;
sound = ChaingunProjectile;
//dryVelocity = 425.0;
dryVelocity = 1500.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1000.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 15.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.12;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock TurretImageData(DeployableIndoorBarrel)
{
shapeFile = "turret_tank_barrelchain.dts";
item = TurretIndoorDeployable; // z0dd - ZOD, 4/25/02. Was wrong: IndoorTurretBarrel
offset = "0 -1 0"; // L/R - F/B - T/B
rotation = "0 1 0 90";
projectile = ImplacmentBullet;
projectileType = TracerProjectile;
usesEnergy = true;
fireEnergy = 0.0;
minEnergy = 0.5;
projectileSpread = 0.5 / 1000.0;
maxSpread = 8 / 1000.0;
lightType = "WeaponFireLight";
lightColor = "0.25 0.15 0.15 1.0";
lightTime = "1000";
lightRadius = "2";
muzzleFlash = IndoorTurretMuzzleFlash;
// Turret parameters
activationMS = 1000;
deactivateDelayMS = 1000;
thinkTimeMS = 100000;
degPerSecTheta = 580;
degPerSecPhi = 960;
attackRadius = 240;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = IBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateShockwave[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = IBLFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.03;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
};
function DeployableIndoorBarrel::onFire(%data, %obj, %slot){
%data.lightStart = getSimTime();
if(%obj.spread $= "")
%obj.spread = %data.projectileSpread;
else
%obj.spread = %obj.spread + (4 / 10000);
if(%obj.lowSpreadLoop $= "")
%obj.lowSpreadLoop = schedule(250, 0, "lowerSpread", %data, %obj);
if(%obj.spread > %data.maxspread)
%obj.spread = %data.maxspread;
%vec = %obj.getMuzzleVector(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %obj.spread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %obj.spread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %obj.spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector = MatrixMulVector(%mat, %vec);
%initialPos = %obj.getMuzzlePoint(%slot);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %vector;
initialPosition = %initialPos;
sourceObject = %obj;
sourceSlot = %slot;
};
%obj.lastProjectile = %p;
MissionCleanup.add(%p);
if(%obj.client)
%obj.client.projectile = %p;
}
function lowerSpread(%data, %obj){
%obj.spread = %obj.spread - (4 / 10000);
if(%obj.spread < %data.projectileSpread){
%obj.spread = %data.projectileSpread;
%obj.lowSpreadLoop = "";
return;
}
%obj.lowSpreadLoop = schedule(120, 0, "lowerSpread", %data, %obj);
}
function TurretIndoorDeployableImage::onDeploy(%item, %plyr, %slot)
{
if(!isObject(%plyr.depTurret)){
%plyr.deplStation = "";
%plyr.depTurret = "";
}
if(%plyr.deplStation != 1){
%rot = %item.getInitialRotation(%plyr);
%className = "Turret";
%deplObj = new (%className)() {
dataBlock = %item.deployed;
};
%deplObj.setDeployRotation(%item.surfacePt, %item.surfaceNrm);
if (%deplObj.getDatablock().rechargeRate)
%deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate);
%deplObj.team = %plyr.client.Team;
%deplObj.setOwner(%plyr);
if (%deplObj.getTarget() != -1)
setTargetSensorGroup(%deplObj.getTarget(), %plyr.client.team);
addToDeployGroup(%deplObj);
AIDeployObject(%plyr.client, %deplObj);
serverPlay3D(%item.deploySound, %deplObj.getTransform());
$TeamDeployedCount[%plyr.team, %item.item]++;
if (%classname !$= "Item")
%deplObj.deploy();
addDSurface(%item.surface,%deplObj);
%plyr.deplStation = 1;
%plyr.depTurret = %deplObj;
return %deplObj;
}
else {
%rot = %item.getInitialRotation(%plyr);
%className = "StaticShape";
%deplObj = new (%className)() {
dataBlock = "ControlStation";
scale = "0.3 0.3 1";
};
%rot = %plyr.getRotation();
%deplObj.setTransform(VectorAdd(%item.surfacePt, %plac) SPC %rot);
if (%deplObj.getDatablock().rechargeRate)
%deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate);
%deplObj.team = %plyr.client.Team;
%deplObj.setOwner(%plyr);
if (%deplObj.getTarget() != -1)
setTargetSensorGroup(%deplObj.getTarget(), %plyr.client.team);
addToDeployGroup(%deplObj);
AIDeployObject(%plyr.client, %deplObj);
serverPlay3D(%item.deploySound, %deplObj.getTransform());
%deplObj.deploy();
%deplObj.Turret = %plyr.depTurret;
%deplObj.Turret.Base = %deplObj;
%startvec = vectorAdd(%deplObj.getPosition(), "0 0 2.5");
%endvec = %deplObj.Turret.getWorldBoxCenter();
if(vectorLen(vectorSub(%plyr.depTurret.getPosition(), %startvec)) >= 4){
%deplObj.schedule(10, "delete");
messageclient(%plyr.client, 'MsgClient', "Control position must be close to turret.");
return;
}
%search = containerRayCast(%startvec, %endvec, $TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::TurretObjectType);
if(%search){
if(getWord(%search,0) $= %deplObj){
echo(%deplObj.Turret@" "@getWord(%search,0));
%deplObj.schedule(10, "delete");
messageclient(%plyr.client, 'MsgClient', "Must be able to grasp turret from control position.");
return;
}
}
%plyr.unmountImage(%slot);
%plyr.decInventory(%item.item, 1);
%plyr.deplStation = "";
%plyr.depTurret = "";
addDSurface(%item.surface,%deplObj);
return %deplObj;
}
}
function ControlStation::onCollision(%data,%obj,%col) {
if(%col.getDatablock().className !$= "Armor")
return;
if(%obj.getMountNodeObject(0) == 0 && %col.mountVehicle){
%obj.mountObject(%col,0);
%col.setControlObject(%obj.Turret);
%col.client.setObjectActiveImage(%obj.Turret, 0);
}
}

View file

@ -0,0 +1,236 @@
//--------------------------------------------------------------------------
// Large Missile Turret
//
// z0dd - ZOD, 4/25/02. Labels for sound datablocks were wrong.
//-------------------------------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock EffectProfile(MILSwitchEffect)
{
effectname = "powered/turret_heavy_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(MILFireEffect)
{
effectname = "powered/turret_missile_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(MILSwitchSound)
{
filename = "fx/powered/turret_missile_activate.wav";
description = AudioClose3d;
preload = true;
effect = MILSwitchEffect;
};
datablock AudioProfile(MILFireSound)
{
filename = "fx/powered/turret_missile_fire.wav";
description = AudioDefault3d;
preload = true;
effect = MILFireEffect;
};
//--------------------------------------------------------------------------
// Particle effects: Note that we pull the below datablocks from
// scripts/weapons/missileLauncher.cs
//--------------------------------------
//datablock ParticleData(MissileSmokeParticle)
//datablock ParticleEmitterData(MissileSmokeEmitter)
//--------------------------------------------------------------------------
// Explosion: from scripts/weapons/disc.cs
//--------------------------------------
//dataBlock ExplosionData(DiscExplosion)
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock SeekerProjectileData(TurretMissile)
{
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.0;
damageRadius = 4.0;
radiusDamageType = $DamageType::MissileTurret;
kickBackStrength = 2500;
flareDistance = 200;
flareAngle = 30;
minSeekHeat = 0.6;
explosion = "MissileExplosion";
velInheritFactor = 0.2;
splash = MissileSplash;
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
lifetimeMS = 20000;
muzzleVelocity = 90.0; // z0dd - ZOD, 3/27/02. Was 80. Velocity of projectile
turningSpeed = 90.0;
proximityRadius = 4;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock SeekerProjectileData(sidewinder_Turret)
{
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.0;
damageRadius = 3.0;
radiusDamageType = $DamageType::Missile;
kickBackStrength = 650;
explosion = "MissileExplosion";
splash = MissileSplash;
velInheritFactor = 1.0; // to compensate for slow starting velocity, this value
// is cranked up to full so the missile doesn't start
// out behind the player when the player is moving
// very quickly - bramage
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
lifetimeMS = 15000; // z0dd - ZOD, 4/14/02. Was 6000
muzzleVelocity = 80.0;
maxVelocity = 350.0; // z0dd - ZOD, 4/14/02. Was 80.0
turningSpeed = 58.0;
acceleration = 75.0;
proximityRadius = 3;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
flareDistance = 200;
flareAngle = 30;
minSeekHeat = 0.0;
sound = MissileProjectileSound;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
useFlechette = true;
flechetteDelayMs = 1000;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = false;
};
//--------------------------------------------------------------------------
//-------------------------------------- Fusion Turret Image
//
datablock TurretImageData(MissileBarrelLarge)
{
shapeFile = "turret_missile_large.dts";
item = MissileBarrelPack; // z0dd - ZOD, 4/25/02. Was wrong: MissileBarrelLargePack
projectile = SideWinder_Turret;
projectileType = SeekerProjectile;
usesEnergy = true;
fireEnergy = 60.0;
minEnergy = 60.0;
isSeeker = true;
seekRadius = 400;
maxSeekAngle = 30;
seekTime = 0.35;
minSeekHeat = 0.6;
emap = true;
minTargetingDistance = 40;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 580;
degPerSecPhi = 1080;
attackRadius = 400;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = MILSwitchSound; // z0dd - ZOD, 3/27/02. Was MBLSwitchSound, changed for sound fix.
stateTimeoutValue[1] = 2;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = MILFireSound; // z0dd - ZOD, 3/27/02. Was MBLFireSound, changed for sound fix.
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 3.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 2;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
};

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,242 @@
// --------------------------------------------------------------
// Outdoor Deployable Turret barrel
// --------------------------------------------------------------
// --------------------------------------------------------------
// Sound datablocks
// --------------------------------------------------------------
datablock EffectProfile(OBLSwitchEffect)
{
effectname = "powered/turret_light_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(OBLFireEffect)
{
effectname = "powered/turret_outdoor_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(OBLSwitchSound)
{
filename = "fx/powered/turret_light_activate.wav";
description = AudioClose3d;
preload = true;
effect = OBLSwitchEffect;
};
datablock AudioProfile(OBLFireSound)
{
filename = "fx/powered/turret_outdoor_fire.wav";
description = AudioDefault3d;
preload = true;
effect = OBLFireEffect;
};
// --------------------------------------------------------------
// Projectile data
// --------------------------------------------------------------
datablock GrenadeProjectileData(AntiPersonnelMortar)
{
projectileShapeName = "grenade_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.15;
damageRadius = 20.0;
radiusDamageType = $DamageType::OutdoorDepTurret;
kickBackStrength = 0;
bubbleEmitTime = 1.0;
sound = GrenadeProjectileSound;
explosion = "GrenadeExplosion";
underwaterExplosion = "UnderwaterGrenadeExplosion";
velInheritFactor = 0.85; // z0dd - ZOD, 3/30/02. Was 0.5
splash = GrenadeSplash;
baseEmitter = GrenadeSmokeEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
grenadeElasticity = 0.30;
grenadeFriction = 0.2;
armingDelayMS = 100;
muzzleVelocity = 50.0;
gravityMod = 1.0;
};
// --------------------------------------------------------------
datablock SensorData(DeployedOutdoorTurretSensor)
{
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = false;
detectionPings = true;
detectRadius = 60;
};
datablock ShockwaveData(OutdoorTurretMuzzleFlash)
{
width = 0.5;
numSegments = 13;
numVertSegments = 1;
velocity = 2.0;
acceleration = -1.0;
lifetimeMS = 300;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
renderSquare = true;
texture[0] = "special/blasterHit";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "1.0 0.8 0.5 1.0";
colors[1] = "1.0 0.8 0.5 1.0";
colors[2] = "1.0 0.8 0.5 0.0";
};
datablock TurretData(TurretDeployedOutdoor) : TurretDamageProfile
{
className = DeployedTurret;
shapeFile = "turret_outdoor_deploy.dts";
rechargeRate = 0.15;
mass = 5.0;
maxDamage = 1.2;
destroyedLevel = 1.2;
disabledLevel = 0.9;
explosion = HandGrenadeExplosion;
expDmgRadius = 5.0;
expDamage = 0.3;
expImpulse = 500.0;
repairRate = 0;
deployedObject = true;
thetaMin = 0;
thetaMax = 145;
thetaNull = 90;
yawVariance = 30.0; // these will smooth out the elf tracking code.
pitchVariance = 30.0; // more or less just tolerances
isShielded = false;
energyPerDamagePoint = 110;
maxEnergy = 60;
renderWhenDestroyed = true;
barrel = DeployableOutdoorBarrel;
heatSignature = 0;
canControl = true;
cmdCategory = "DTactical";
cmdIcon = CMDTurretIcon;
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
targetNameTag = 'Anti-Infantry Mortar';
targetTypeTag = 'Turret';
sensorData = DeployedOutdoorTurretSensor;
sensorRadius = DeployedOutdoorTurretSensor.detectRadius;
sensorColor = "191 0 226";
firstPersonOnly = true;
debrisShapeName = "debris_generic_small.dts";
debris = TurretDebrisSmall;
};
datablock TurretImageData(DeployableOutdoorBarrel)
{
shapeFile = "turret_muzzlepoint.dts";
item = TurretOutdoorDeployable;
projectileType = GrenadeProjectile;
projectile = AntiPersonnelMortar;
usesEnergy = true;
fireEnergy = 0.0;
minEnergy = 30.0;
lightType = "WeaponFireLight";
lightColor = "0.25 0.25 0.15 0.2";
lightTime = "1000";
lightRadius = "2";
muzzleFlash = OutdoorTurretMuzzleFlash;
projectileSpread = 3.0 / 1000.0;
DontFireInsideDamageRadius = true;
DamageRadius = 30;
// Turret parameters
activationMS = 300;
deactivateDelayMS = 600;
thinkTimeMS = 200;
degPerSecTheta = 580;
degPerSecPhi = 960;
attackRadius = 240;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = OBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 1.5;
stateFire[3] = true;
stateShockwave[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = OBLFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.8;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
};

View file

@ -0,0 +1,178 @@
//--------------------------------------------------------------------------
// Chaingun Turret - Created by Dondelium_X, Greatly Modified by Blnukem
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------------------------------------------
datablock EffectProfile(HeavyCGTurretSwitchEffect)
{
effectname = "powered/turret_light_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock AudioProfile(HeavyCGTurretSwitchSound)
{
filename = "fx/powered/turret_light_activate.wav";
description = AudioClose3d;
preload = true;
effect = HeavyCGTurretSwitchEffect;
};
datablock EffectProfile(HeavyCGTurretFireEffect)
{
filename = "fx/vehicles/tank_chaingun.wav";
minDistance = 2.5;
maxDistance = 8.0;
};
datablock AudioProfile(HeavyCGTurretFireSound)
{
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefaultLooping3d;
preload = true;
effect = HeavyCGTurretFireEffect;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------------------------------------------
datablock TracerProjectileData(HVCGTurretBullet)
{
doDynamicClientHits = true;
directDamage = 0.13;
directDamageType = $DamageType::PlasmaTurret;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
kickBackStrength = 50.0;
sound = ChaingunProjectile;
dryVelocity = 3000.0;
wetVelocity = 1000.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 15.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 10.0/255.0 @ " " @ 30.0/255.0 @ " " @ 240.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.2;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = MG42Decal1;
decalData[1] = MG42Decal2;
decalData[2] = MG42Decal3;
decalData[3] = MG42Decal4;
decalData[4] = MG42Decal5;
decalData[5] = MG42Decal6;
hasLight = true;
lightRadius = 4.0;
lightColor = "0.5 0.5 0.175";
};
//--------------------------------------------------------------------------
// Chaingun Turret Image
//--------------------------------------------------------------------------
datablock TurretImageData(PlasmaBarrelLarge)
{
shapeFile = "turret_tank_barrelchain.dts";
item = ChaingunBarrelPack; // z0dd - ZOD, 4/25/02. Was wrong: ChaingunBarrelLargePack
mountPoint = 0;
projectile = HVCGTurretBullet;
projectileType = TracerProjectile;
casing = ShellDebris;
shellExitDir = "0.0 -10.0 10.0";
shellExitOffset = "0.0 0.0 1.0";
shellExitVariance = 10.0;
shellVelocity = 3.5;
usesEnergy = true;
fireEnergy = 0;
minEnergy = 1;
emap = true;
projectileSpread = 6.0 / 1000.0;
// Turret parameters
activationMS = 700; // z0dd - ZOD, 3/27/02. Was 1000. Amount of time it takes turret to unfold
deactivateDelayMS = 1500;
thinkTimeMS = 120; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 300;
degPerSecPhi = 500;
attackRadius = 200; // z0dd - ZOD, 3/27/02. Was 120
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = HeavyCGTurretSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateSequence[3] = "Fire";
stateSequenceRandomFlash[3] = true;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateSound[3] = HeavyCGTurretFireSound;
stateScript[3] = "onFire";
stateFire[3] = true;
stateEjectShell[3] = true;
stateTimeoutValue[3] = 0.1;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Reload";
stateTransitionOnNoAmmo[3] = "noAmmo";
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.01;
stateAllowImageChange[4] = false;
stateWaitForTimeout[4] = true;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
};