Initial Commit

This commit is contained in:
Robert Fritzen 2014-02-26 13:54:04 -06:00
commit bd51490b14
316 changed files with 150033 additions and 0 deletions

View file

@ -0,0 +1,180 @@
//--------------------------------------------------------------------------
// ELF Gun
//--------------------------------------------------------------------------
datablock AudioProfile(ELFGunSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(ELFGunFireSound)
{
filename = "fx/weapons/ELF_fire.wav";
description = CloseLooping3d;
preload = true;
};
datablock AudioProfile(ElfFireWetSound)
{
filename = "fx/weapons/ELF_underwater.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(ELFHitTargetSound)
{
filename = "fx/weapons/ELF_hit.wav";
description = CloseLooping3d;
preload = true;
};
//--------------------------------------
// Sparks
//--------------------------------------
datablock ParticleData(ELFSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 200;
lifetimeVarianceMS = 0;
textureName = "special/blueSpark";
colors[0] = "0.8 0.8 1.0 1.0";
colors[1] = "0.8 0.8 1.0 1.0";
colors[2] = "0.8 0.8 1.0 0.0";
sizes[0] = 0.35;
sizes[1] = 0.15;
sizes[2] = 0.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(ELFSparksEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 4;
velocityVariance = 2;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
// lifetimeMS = 100;
particles = "ELFSparks";
};
//--------------------------------------
// Projectile
//--------------------------------------
datablock ELFProjectileData(BasicELF)
{
beamRange = 30;
numControlPoints = 8;
restorativeFactor = 3.75;
dragFactor = 4.5;
endFactor = 2.25;
randForceFactor = 2;
randForceTime = 0.125;
drainEnergy = 1.0;
drainHealth = 0.0;
directDamageType = $DamageType::ELF;
mainBeamWidth = 0.1; // width of blue wave beam
mainBeamSpeed = 9.0; // speed that the beam travels forward
mainBeamRepeat = 0.25; // number of times the texture repeats
lightningWidth = 0.1;
lightningDist = 0.15; // distance of lightning from main beam
fireSound = ElfGunFireSound;
wetFireSound = ElfFireWetSound;
textures[0] = "special/ELFBeam";
textures[1] = "special/ELFLightning";
textures[2] = "special/BlueImpact";
emitter = ELFSparksEmitter;
};
//--------------------------------------
// Rifle and item...
//--------------------------------------
datablock ItemData(ELFGun)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_elf.dts";
image = ELFGunImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an ELF gun";
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(ELFGunImage)
{
className = WeaponImage;
shapeFile = "weapon_elf.dts";
item = ELFGun;
offset = "0 0 0";
projectile = BasicELF;
projectileType = ELFProjectile;
deleteLastProjectile = true;
emap = true;
usesEnergy = true;
minEnergy = 3;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ELFGunSwitchSound;
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateTransitionOnAmmo[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateEnergyDrain[3] = 5;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateTransitionOnTriggerUp[3] = "Deconstruction";
stateTransitionOnNoAmmo[3] = "Deconstruction";
//stateSound[3] = ElfFireWetSound;
stateName[4] = "NoAmmo";
stateTransitionOnAmmo[4] = "Ready";
stateName[5] = "Deconstruction";
stateScript[5] = "deconstruct";
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateName[6] = "DryFire";
stateSound[6] = ElfFireWetSound;
stateTimeoutValue[6] = 0.5;
stateTransitionOnTimeout[6] = "Ready";
stateName[7] = "CheckWet";
stateTransitionOnWet[7] = "DryFire";
stateTransitionOnNotWet[7] = "Fire";
};

View file

@ -0,0 +1,318 @@
//--------------------------------------
// Default blaster
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(BlasterSwitchSound)
{
filename = "fx/weapons/blaster_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(BlasterFireSound)
{
filename = "fx/weapons/blaster_fire.WAV";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(BlasterProjectileSound)
{
filename = "fx/weapons/blaster_projectile.WAV";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(blasterExpSound)
{
filename = "fx/weapons/blaster_impact.WAV";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(BlasterDryFireSound)
{
filename = "fx/weapons/chaingun_dryfire.wav";
description = AudioClose3d;
preload = true;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( BlasterSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -1.4;
lifetimeMS = 300;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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.05;
sizes[1] = 0.2;
sizes[2] = 0.2;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( BlasterSplashEmitter )
{
ejectionPeriodMS = 4;
periodVarianceMS = 0;
ejectionVelocity = 4;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 50;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "BlasterSplashParticle";
};
datablock SplashData(BlasterSplash)
{
numSegments = 15;
ejectionFreq = 15;
ejectionAngle = 40;
ringLifetime = 0.35;
lifetimeMS = 300;
velocity = 3.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = BlasterSplashEmitter;
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock ParticleData(BlasterExplosionParticle1)
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent4";
colors[0] = "1.0 0.8 0.2 1.0";
colors[1] = "1.0 0.4 0.2 1.0";
colors[2] = "1.0 0.0 0.0 0.0";
sizes[0] = 0.25;
sizes[1] = 0.5;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(BlasterExplosionEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 2;
velocityVariance = 1.5;
ejectionOffset = 0.0;
thetaMin = 70;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "BlasterExplosionParticle1";
};
datablock ParticleData(BlasterExplosionParticle2)
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/blasterHit";
colors[0] = "1.0 0.2 0.2 1.0";
colors[1] = "1.0 0.2 0.2 0.5";
colors[2] = "1.0 0.0 0.0 0.0";
sizes[0] = 0.3;
sizes[1] = 0.90;
sizes[2] = 1.50;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(BlasterExplosionEmitter2)
{
ejectionPeriodMS = 30;
periodVarianceMS = 0;
ejectionVelocity = 1;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = false;
lifetimeMS = 200;
particles = "BlasterExplosionParticle2";
};
datablock ExplosionData(BlasterExplosion)
{
soundProfile = blasterExpSound;
emitter[0] = BlasterExplosionEmitter;
emitter[1] = BlasterExplosionEmitter2;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock EnergyProjectileData(EnergyBolt)
{
emitterDelay = -1;
directDamage = 0.3;
directDamageType = $DamageType::Blaster;
kickBackStrength = 0.0;
bubbleEmitTime = 1.0;
sound = BlasterProjectileSound;
velInheritFactor = 0.5;
explosion = "BlasterExplosion";
splash = BlasterSplash;
grenadeElasticity = 0.998;
grenadeFriction = 0.0;
armingDelayMS = 500;
muzzleVelocity = 90.0;
drag = 0.05;
gravityMod = 0.0;
dryVelocity = 200.0;
wetVelocity = 150.0;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
hasLight = true;
lightRadius = 3.0;
lightColor = "0.5 0.175 0.175";
scale = "0.25 20.0 1.0";
crossViewAng = 0.99;
crossSize = 0.55;
lifetimeMS = 3000;
blurLifetime = 0.2;
blurWidth = 0.25;
blurColor = "0.4 0.0 0.0 1.0";
texture[0] = "special/blasterBolt";
texture[1] = "special/blasterBoltCross";
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(BlasterImage)
{
className = WeaponImage;
shapeFile = "weapon_energy.dts";
item = Blaster;
projectile = EnergyBolt;
projectileType = EnergyProjectile;
usesEnergy = true;
fireEnergy = 4;
minEnergy = 4;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = BlasterSwitchSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = NoRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = BlasterFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateTimeoutValue[6] = 0.3;
stateSound[6] = BlasterDryFireSound;
stateTransitionOnTimeout[6] = "Ready";
};
datablock ItemData(Blaster)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy.dts";
image = BlasterImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a blaster";
};

View file

@ -0,0 +1,431 @@
//--------------------------------------
// Disc launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(DiscSwitchSound)
{
filename = "fx/weapons/blaster_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(DiscLoopSound)
{
filename = "fx/weapons/spinfusor_idle.wav";
description = ClosestLooping3d;
};
datablock AudioProfile(DiscFireSound)
{
filename = "fx/weapons/spinfusor_fire.wav";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(DiscReloadSound)
{
filename = "fx/weapons/spinfusor_reload.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(discExpSound)
{
filename = "fx/weapons/spinfusor_impact.wav";
description = AudioExplosion3d;
preload = true;
};
datablock AudioProfile(underwaterDiscExpSound)
{
filename = "fx/weapons/spinfusor_impact_UW.wav";
description = AudioExplosion3d;
preload = true;
};
datablock AudioProfile(discProjectileSound)
{
filename = "fx/weapons/spinfusor_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(DiscDryFireSound)
{
filename = "fx/weapons/spinfusor_dryfire.wav";
description = AudioClose3d;
preload = true;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock ParticleData(DiscExplosionBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 2000;
lifetimeVarianceMS = 750;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 0.4";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 1.0;
sizes[1] = 1.0;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.3;
times[2] = 1.0;
};
datablock ParticleEmitterData(DiscExplosionBubbleEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 3.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "DiscExplosionBubbleParticle";
};
datablock ExplosionData(UnderwaterDiscExplosion)
{
explosionShape = "disc_explosion.dts";
soundProfile = underwaterDiscExpSound;
faceViewer = true;
sizes[0] = "1.3 1.3 1.3";
sizes[1] = "0.75 0.75 0.75";
sizes[2] = "0.4 0.4 0.4";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
emitter[0] = "DiscExplosionBubbleEmitter";
shakeCamera = true;
camShakeFreq = "10.0 11.0 10.0";
camShakeAmp = "20.0 20.0 20.0";
camShakeDuration = 0.5;
camShakeRadius = 10.0;
};
datablock ExplosionData(DiscExplosion)
{
explosionShape = "disc_explosion.dts";
soundProfile = discExpSound;
faceViewer = true;
explosionScale = "1 1 1";
shakeCamera = true;
camShakeFreq = "10.0 11.0 10.0";
camShakeAmp = "20.0 20.0 20.0";
camShakeDuration = 0.5;
camShakeRadius = 10.0;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "1.0 1.0 1.0";
times[0] = 0.0;
times[1] = 1.0;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData(DiscMist)
{
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 = "particleTest";
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(DiscMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "DiscMist";
};
datablock ParticleData( DiscSplashParticle2 )
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.03; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 600;
lifetimeVarianceMS = 300;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.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] = 1.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( DiscSplashEmitter2 )
{
ejectionPeriodMS = 25;
ejectionOffset = 0.2;
periodVarianceMS = 0;
ejectionVelocity = 2.25;
velocityVariance = 0.50;
thetaMin = 0.0;
thetaMax = 30.0;
lifetimeMS = 250;
particles = "DiscSplashParticle2";
};
datablock ParticleData( DiscSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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( DiscSplashEmitter )
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 3;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 60;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "DiscSplashParticle";
};
datablock SplashData(DiscSplash)
{
numSegments = 15;
ejectionFreq = 0.0001;
ejectionAngle = 45;
ringLifetime = 0.5;
lifetimeMS = 400;
velocity = 5.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = DiscSplashEmitter;
emitter[1] = DiscMistEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock LinearProjectileData(DiscProjectile)
{
projectileShapeName = "disc.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.50;
damageRadius = 7.5;
radiusDamageType = $DamageType::Disc;
kickBackStrength = 1750;
sound = discProjectileSound;
explosion = "DiscExplosion";
underwaterExplosion = "UnderwaterDiscExplosion";
splash = DiscSplash;
dryVelocity = 90;
wetVelocity = 50;
velInheritFactor = 0.5;
fizzleTimeMS = 5000;
lifetimeMS = 5000;
explodeOnDeath = true;
reflectOnWaterImpactAngle = 15.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 5000;
activateDelayMS = 200;
hasLight = true;
lightRadius = 6.0;
lightColor = "0.175 0.175 0.5";
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(DiscAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_disc.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some spinfusor discs";
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(DiscImage)
{
className = WeaponImage;
shapeFile = "weapon_disc.dts";
item = Disc;
ammo = DiscAmmo;
offset = "0 0 0";
emap = true;
projectileSpread = 0;
projectile = DiscProjectile;
projectileType = LinearProjectile;
// State Data
stateName[0] = "Preactivate";
stateTransitionOnLoaded[0] = "Activate";
stateTransitionOnNoAmmo[0] = "NoAmmo";
stateName[1] = "Activate";
stateTransitionOnTimeout[1] = "Ready";
stateTimeoutValue[1] = 0.5;
stateSequence[1] = "Activated";
stateSound[1] = DiscSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateSequence[2] = "DiscSpin";
stateSound[2] = DiscLoopSound;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 1.25;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = DiscFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5; // 0.25 load, 0.25 spinup
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = DiscReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = DiscDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock ItemData(Disc)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_disc.dts";
image = DiscImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a spinfusor";
emap = true;
};

View file

@ -0,0 +1,742 @@
//--------------------------------------
// Grenade launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(GrenadeSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(GrenadeFireSound)
{
filename = "fx/weapons/grenadelauncher_fire.wav";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(GrenadeProjectileSound)
{
filename = "fx/weapons/grenadelauncher_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(GrenadeReloadSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(GrenadeExplosionSound)
{
filename = "fx/weapons/grenade_explode.wav";
description = AudioExplosion3d;
preload = true;
};
datablock AudioProfile(UnderwaterGrenadeExplosionSound)
{
filename = "fx/weapons/grenade_explode_UW.wav";
description = AudioExplosion3d;
preload = true;
};
datablock AudioProfile(GrenadeDryFireSound)
{
filename = "fx/weapons/grenadelauncher_dryfire.wav";
description = AudioClose3d;
preload = true;
};
//----------------------------------------------------------------------------
// Underwater fx
//----------------------------------------------------------------------------
datablock ParticleData(GrenadeExplosionBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 600;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 0.4";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 1.0;
sizes[1] = 1.0;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(GrenadeExplosionBubbleEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 3.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "GrenadeExplosionBubbleParticle";
};
datablock ParticleData(UnderwaterGrenadeDust)
{
dragCoefficient = 1.0;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.0;
constantAcceleration = -1.1;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 500.0;
textureName = "particleTest";
colors[0] = "0.6 0.6 1.0 0.5";
colors[1] = "0.6 0.6 1.0 0.5";
colors[2] = "0.6 0.6 1.0 0.0";
sizes[0] = 3.0;
sizes[1] = 3.0;
sizes[2] = 3.0;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterGrenadeDustEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 15.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 70;
thetaMax = 70;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "UnderwaterGrenadeDust";
};
datablock ParticleData(UnderwaterGrenadeExplosionSmoke)
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.25; // rises slowly
inheritedVelFactor = 0.025;
constantAcceleration = -1.1;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "0.1 0.1 1.0 1.0";
colors[1] = "0.4 0.4 1.0 1.0";
colors[2] = "0.4 0.4 1.0 0.0";
sizes[0] = 2.0;
sizes[1] = 6.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterGExplosionSmokeEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 6.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 90.0;
lifetimeMS = 250;
particles = "UnderwaterGrenadeExplosionSmoke";
};
datablock ParticleData(UnderwaterGrenadeSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
textureName = "special/underwaterSpark";
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.6 1.0 1.0";
colors[2] = "0.6 0.6 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.75;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterGrenadeSparksEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 12;
velocityVariance = 6.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "UnderwaterGrenadeSparks";
};
datablock ExplosionData(UnderwaterGrenadeExplosion)
{
soundProfile = UnderwaterGrenadeExplosionSound;
faceViewer = true;
explosionScale = "0.8 0.8 0.8";
emitter[0] = UnderwaterGrenadeDustEmitter;
emitter[1] = UnderwaterGExplosionSmokeEmitter;
emitter[2] = UnderwaterGrenadeSparksEmitter;
emitter[3] = GrenadeExplosionBubbleEmitter;
shakeCamera = true;
camShakeFreq = "10.0 6.0 9.0";
camShakeAmp = "20.0 20.0 20.0";
camShakeDuration = 0.5;
camShakeRadius = 20.0;
};
//----------------------------------------------------------------------------
// Bubbles
//----------------------------------------------------------------------------
datablock ParticleData(GrenadeBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 600;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
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.5;
sizes[1] = 0.5;
sizes[2] = 0.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(GrenadeBubbleEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 0.1;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "GrenadeBubbleParticle";
};
//----------------------------------------------------------------------------
// Debris
//----------------------------------------------------------------------------
datablock ParticleData( GDebrisSmokeParticle )
{
dragCoeffiecient = 1.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -60.0;
spinRandomMax = 60.0;
colors[0] = "0.4 0.4 0.4 1.0";
colors[1] = "0.3 0.3 0.3 0.5";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 0.0;
sizes[1] = 1.0;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( GDebrisSmokeEmitter )
{
ejectionPeriodMS = 7;
periodVarianceMS = 1;
ejectionVelocity = 1.0; // A little oomph at the back end
velocityVariance = 0.2;
thetaMin = 0.0;
thetaMax = 40.0;
particles = "GDebrisSmokeParticle";
};
datablock DebrisData( GrenadeDebris )
{
emitters[0] = GDebrisSmokeEmitter;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 0.3;
lifetimeVariance = 0.02;
numBounces = 1;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( GrenadeSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -1.4;
lifetimeMS = 300;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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.05;
sizes[1] = 0.2;
sizes[2] = 0.2;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( GrenadeSplashEmitter )
{
ejectionPeriodMS = 4;
periodVarianceMS = 0;
ejectionVelocity = 4;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 50;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "BlasterSplashParticle";
};
datablock SplashData(GrenadeSplash)
{
numSegments = 15;
ejectionFreq = 15;
ejectionAngle = 40;
ringLifetime = 0.35;
lifetimeMS = 300;
velocity = 3.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = BlasterSplashEmitter;
colors[0] = "0.7 0.8 1.0 1.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 1.0";
colors[3] = "0.7 0.8 1.0 1.0";
times[0] = 0.0;
times[1] = 0.4;
times[2] = 0.8;
times[3] = 1.0;
};
//--------------------------------------------------------------------------
// Particle effects
//--------------------------------------
datablock ParticleData(GrenadeSmokeParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.2; // rises slowly
inheritedVelFactor = 0.00;
lifetimeMS = 700; // lasts 2 second
lifetimeVarianceMS = 150; // ...more or less
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.9 0.9 0.9 1.0";
colors[1] = "0.6 0.6 0.6 1.0";
colors[2] = "0.4 0.4 0.4 0.0";
sizes[0] = 0.25;
sizes[1] = 1.0;
sizes[2] = 3.0;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(GrenadeSmokeEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 5;
ejectionVelocity = 1.25;
velocityVariance = 0.50;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "GrenadeSmokeParticle";
};
datablock ParticleData(GrenadeDust)
{
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] = 3.2;
sizes[1] = 4.6;
sizes[2] = 5.0;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData(GrenadeDustEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 15.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "GrenadeDust";
};
datablock ParticleData(GrenadeExplosionSmoke)
{
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] = 2.0;
sizes[1] = 6.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(GExplosionSmokeEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 6.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 90.0;
lifetimeMS = 250;
particles = "GrenadeExplosionSmoke";
};
datablock ParticleData(GrenadeSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
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] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.75;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(GrenadeSparksEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 12;
velocityVariance = 6.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "GrenadeSparks";
};
//----------------------------------------------------
// Explosion
//----------------------------------------------------
datablock ExplosionData(GrenadeExplosion)
{
soundProfile = GrenadeExplosionSound;
faceViewer = true;
explosionScale = "0.8 0.8 0.8";
debris = GrenadeDebris;
debrisThetaMin = 10;
debrisThetaMax = 50;
debrisNum = 8;
debrisVelocity = 26.0;
debrisVelocityVariance = 7.0;
emitter[0] = GrenadeDustEmitter;
emitter[1] = GExplosionSmokeEmitter;
emitter[2] = GrenadeSparksEmitter;
shakeCamera = true;
camShakeFreq = "10.0 6.0 9.0";
camShakeAmp = "20.0 20.0 20.0";
camShakeDuration = 0.5;
camShakeRadius = 20.0;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock GrenadeProjectileData(BasicGrenade)
{
projectileShapeName = "grenade_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.40;
damageRadius = 15.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 1500;
bubbleEmitTime = 1.0;
sound = GrenadeProjectileSound;
explosion = "GrenadeExplosion";
underwaterExplosion = "UnderwaterGrenadeExplosion";
velInheritFactor = 0.5;
splash = GrenadeSplash;
baseEmitter = GrenadeSmokeEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
grenadeElasticity = 0.35;
grenadeFriction = 0.2;
armingDelayMS = 1000;
muzzleVelocity = 47.00;
drag = 0.1;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(GrenadeLauncherAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_grenade.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some grenade launcher ammo";
computeCRC = true;
emap = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(GrenadeLauncher)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_grenade_launcher.dts";
image = GrenadeLauncherImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a grenade launcher";
computeCRC = true;
};
datablock ShapeBaseImageData(GrenadeLauncherImage)
{
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = GrenadeLauncher;
ammo = GrenadeLauncherAmmo;
offset = "0 0 0";
emap = true;
projectile = BasicGrenade;
projectileType = GrenadeProjectile;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = GrenadeSwitchSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.4;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = GrenadeFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = GrenadeReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = GrenadeDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};

View file

@ -0,0 +1,763 @@
//--------------------------------------
// Missile launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(MissileSwitchSound)
{
filename = "fx/weapons/missile_launcher_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(MissileFireSound)
{
filename = "fx/weapons/missile_fire.WAV";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(MissileProjectileSound)
{
filename = "fx/weapons/missile_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(MissileReloadSound)
{
filename = "fx/weapons/weapon.missilereload.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(MissileLockSound)
{
filename = "fx/weapons/missile_launcher_searching.WAV";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(MissileExplosionSound)
{
filename = "fx/explosions/explosion.xpl23.wav";
description = AudioBIGExplosion3d;
preload = true;
};
datablock AudioProfile(MissileDryFireSound)
{
filename = "fx/weapons/missile_launcher_dryfire.wav";
description = AudioClose3d;
preload = true;
effect = MissileDryFireEffect;
};
//----------------------------------------------------------------------------
// Splash Debris
//----------------------------------------------------------------------------
datablock ParticleData( MDebrisSmokeParticle )
{
dragCoeffiecient = 1.0;
gravityCoefficient = 0.10;
inheritedVelFactor = 0.1;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
textureName = "particleTest";
// useInvAlpha = true;
spinRandomMin = -60.0;
spinRandomMax = 60.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.0;
sizes[1] = 0.8;
sizes[2] = 0.8;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( MDebrisSmokeEmitter )
{
ejectionPeriodMS = 10;
periodVarianceMS = 1;
ejectionVelocity = 1.0; // A little oomph at the back end
velocityVariance = 0.2;
thetaMin = 0.0;
thetaMax = 40.0;
particles = "MDebrisSmokeParticle";
};
datablock DebrisData( MissileSplashDebris )
{
emitters[0] = MDebrisSmokeEmitter;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 0.3;
lifetimeVariance = 0.1;
numBounces = 1;
};
//----------------------------------------------------------------------------
// Missile smoke spike (for debris)
//----------------------------------------------------------------------------
datablock ParticleData( MissileSmokeSpike )
{
dragCoeffiecient = 1.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
lifetimeMS = 1000;
lifetimeVarianceMS = 100;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -60.0;
spinRandomMax = 60.0;
colors[0] = "0.6 0.6 0.6 1.0";
colors[1] = "0.4 0.4 0.4 0.5";
colors[2] = "0.4 0.4 0.4 0.0";
sizes[0] = 0.0;
sizes[1] = 1.0;
sizes[2] = 0.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( MissileSmokeSpikeEmitter )
{
ejectionPeriodMS = 7;
periodVarianceMS = 1;
ejectionVelocity = 1.0; // A little oomph at the back end
velocityVariance = 0.2;
thetaMin = 0.0;
thetaMax = 40.0;
particles = "MissileSmokeSpike";
};
//----------------------------------------------------------------------------
// Explosion smoke particles
//----------------------------------------------------------------------------
datablock ParticleData(MissileExplosionSmoke)
{
dragCoeffiecient = 0.3;
gravityCoefficient = -0.2;
inheritedVelFactor = 0.025;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
textureName = "special/Smoke/bigSmoke";
colors[0] = "1.0 0.7 0.0 1.0";
colors[1] = "0.4 0.4 0.4 0.5";
colors[2] = "0.4 0.4 0.4 0.0";
sizes[0] = 1.0;
sizes[1] = 3.0;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(MissileExplosionSmokeEMitter)
{
ejectionOffset = 0.0;
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 250;
particles = "MissileExplosionSmoke";
};
datablock DebrisData( MissileSpikeDebris )
{
emitters[0] = MissileSmokeSpikeEmitter;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 0.3;
lifetimeVariance = 0.02;
};
//---------------------------------------------------------------------------
// Explosions
//---------------------------------------------------------------------------
datablock ExplosionData(MissileExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
playSpeed = 1.5;
soundProfile = MissileExplosionSound;
faceViewer = true;
sizes[0] = "0.5 0.5 0.5";
sizes[1] = "0.5 0.5 0.5";
sizes[2] = "0.5 0.5 0.5";
emitter[0] = MissileExplosionSmokeEmitter;
debris = MissileSpikeDebris;
debrisThetaMin = 10;
debrisThetaMax = 170;
debrisNum = 8;
debrisNumVariance = 6;
debrisVelocity = 15.0;
debrisVelocityVariance = 2.0;
shakeCamera = true;
camShakeFreq = "6.0 7.0 7.0";
camShakeAmp = "70.0 70.0 70.0";
camShakeDuration = 1.0;
camShakeRadius = 7.0;
};
datablock ExplosionData(MissileSplashExplosion)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionScale = "1.0 1.0 1.0";
debris = MissileSplashDebris;
debrisThetaMin = 10;
debrisThetaMax = 80;
debrisNum = 10;
debrisVelocity = 10.0;
debrisVelocityVariance = 4.0;
sizes[0] = "0.35 0.35 0.35";
sizes[1] = "0.15 0.15 0.15";
sizes[2] = "0.15 0.15 0.15";
sizes[3] = "0.15 0.15 0.15";
times[0] = 0.0;
times[1] = 0.333;
times[2] = 0.666;
times[3] = 1.0;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData(MissileMist)
{
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 = "particleTest";
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(MissileMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 6.0;
velocityVariance = 4.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "MissileMist";
};
datablock ParticleData( MissileSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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( MissileSplashEmitter )
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 6;
velocityVariance = 3.0;
ejectionOffset = 0.0;
thetaMin = 60;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "MissileSplashParticle";
};
datablock SplashData(MissileSplash)
{
numSegments = 15;
ejectionFreq = 0.0001;
ejectionAngle = 45;
ringLifetime = 0.5;
lifetimeMS = 400;
velocity = 5.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
explosion = MissileSplashExplosion;
texture = "special/water2";
emitter[0] = MissileSplashEmitter;
emitter[1] = MissileMistEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//--------------------------------------------------------------------------
// Particle effects
//--------------------------------------
datablock ParticleData(MissileSmokeParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.02;
inheritedVelFactor = 0.1;
lifetimeMS = 1200;
lifetimeVarianceMS = 100;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
colors[0] = "1.0 0.75 0.0 0.0";
colors[1] = "0.5 0.5 0.5 1.0";
colors[2] = "0.3 0.3 0.3 0.0";
sizes[0] = 1;
sizes[1] = 2;
sizes[2] = 3;
times[0] = 0.0;
times[1] = 0.1;
times[2] = 1.0;
};
datablock ParticleEmitterData(MissileSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.5;
velocityVariance = 0.3;
thetaMin = 0.0;
thetaMax = 50.0;
particles = "MissileSmokeParticle";
};
datablock ParticleData(MissileFireParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 1.0;
lifetimeMS = 300;
lifetimeVarianceMS = 000;
textureName = "particleTest";
spinRandomMin = -135;
spinRandomMax = 135;
colors[0] = "1.0 0.75 0.2 1.0";
colors[1] = "1.0 0.5 0.0 1.0";
colors[2] = "1.0 0.40 0.0 0.0";
sizes[0] = 0;
sizes[1] = 1;
sizes[2] = 1.5;
times[0] = 0.0;
times[1] = 0.3;
times[2] = 1.0;
};
datablock ParticleEmitterData(MissileFireEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 15.0;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 0.0;
particles = "MissileFireParticle";
};
datablock ParticleData(MissilePuffParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 300;
textureName = "particleTest";
spinRandomMin = -135;
spinRandomMax = 135;
colors[0] = "1.0 1.0 1.0 0.5";
colors[1] = "0.7 0.7 0.7 0.0";
sizes[0] = 0.25;
sizes[1] = 1.0;
times[0] = 0.0;
times[1] = 1.0;
};
datablock ParticleEmitterData(MissilePuffEmitter)
{
ejectionPeriodMS = 50;
periodVarianceMS = 3;
ejectionVelocity = 0.5;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "MissilePuffParticle";
};
datablock ParticleData(MissileLauncherExhaustParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.01;
inheritedVelFactor = 1.0;
lifetimeMS = 500;
lifetimeVarianceMS = 300;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -135;
spinRandomMax = 135;
colors[0] = "1.0 1.0 1.0 0.5";
colors[1] = "0.7 0.7 0.7 0.0";
sizes[0] = 0.25;
sizes[1] = 1.0;
times[0] = 0.0;
times[1] = 1.0;
};
datablock ParticleEmitterData(MissileLauncherExhaustEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 20.0;
particles = "MissileLauncherExhaustParticle";
};
//--------------------------------------------------------------------------
// Debris
//--------------------------------------
datablock DebrisData( FlechetteDebris )
{
shapeName = "weapon_missile_fleschette.dts";
lifetime = 5.0;
minSpinSpeed = -320.0;
maxSpinSpeed = 320.0;
elasticity = 0.2;
friction = 0.3;
numBounces = 3;
gravModifier = 0.40;
staticOnMaxBounce = true;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock SeekerProjectileData(ShoulderMissile)
{
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 0.8;
damageRadius = 8.0;
radiusDamageType = $DamageType::Missile;
kickBackStrength = 2000;
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";
ImageSource = "MissileLauncherImage";
lifetimeMS = 30000;
muzzleVelocity = 10.0;
maxVelocity = 150.0;
turningSpeed = 110.0;
acceleration = 350.0;
proximityRadius = 3;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
flareDistance = 200;
flareAngle = 30;
sound = MissileProjectileSound;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = false;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(MissileLauncherAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some missiles";
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(MissileLauncher)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_missile.dts";
image = MissileLauncherImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a missile launcher";
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(MissileLauncherImage)
{
className = WeaponImage;
shapeFile = "weapon_missile.dts";
item = MissileLauncher;
ammo = MissileLauncherAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
projectile = ShoulderMissile;
projectileType = SeekerProjectile;
isSeeker = true;
seekRadius = 400;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.7; // the heat that must be present on a target to lock it.
// only target objects outside this range
minTargetingDistance = 40;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.4;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = MissileFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "DryFire";
stateTransitionOnTarget[7] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateSound[9] = MissileFireSound;
stateRecoil[3] = LightRecoil;
stateTimeoutValue[9] = 0.4;
stateSequence[3] = "Fire";
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
};

View file

@ -0,0 +1,745 @@
//--------------------------------------
// Mortar
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(MortarSwitchSound)
{
filename = "fx/weapons/mortar_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(MortarReloadSound)
{
filename = "fx/weapons/mortar_reload.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(MortarFireSound)
{
filename = "fx/weapons/mortar_fire.wav";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(MortarProjectileSound)
{
filename = "fx/weapons/mortar_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(MortarExplosionSound)
{
filename = "fx/weapons/mortar_explode.wav";
description = AudioBIGExplosion3d;
preload = true;
};
datablock AudioProfile(UnderwaterMortarExplosionSound)
{
filename = "fx/weapons/mortar_explode_UW.wav";
description = AudioBIGExplosion3d;
preload = true;
};
datablock AudioProfile(MortarDryFireSound)
{
filename = "fx/weapons/mortar_dryfire.wav";
description = AudioClose3d;
preload = true;
};
//----------------------------------------------------------------------------
// Bubbles
//----------------------------------------------------------------------------
datablock ParticleData(MortarBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 600;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
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.8;
sizes[1] = 0.8;
sizes[2] = 0.8;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(MortarBubbleEmitter)
{
ejectionPeriodMS = 9;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 0.1;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "MortarBubbleParticle";
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( MortarSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -1.4;
lifetimeMS = 300;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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.05;
sizes[1] = 0.2;
sizes[2] = 0.2;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( MortarSplashEmitter )
{
ejectionPeriodMS = 4;
periodVarianceMS = 0;
ejectionVelocity = 3;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 50;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "MortarSplashParticle";
};
datablock SplashData(MortarSplash)
{
numSegments = 10;
ejectionFreq = 10;
ejectionAngle = 20;
ringLifetime = 0.4;
lifetimeMS = 400;
velocity = 3.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = MortarSplashEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//---------------------------------------------------------------------------
// Mortar Shockwaves
//---------------------------------------------------------------------------
datablock ShockwaveData(UnderwaterMortarShockwave)
{
width = 6.0;
numSegments = 32;
numVertSegments = 6;
velocity = 10;
acceleration = 20.0;
lifetimeMS = 900;
height = 1.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.4 0.4 1.0 0.50";
colors[1] = "0.4 0.4 1.0 0.25";
colors[2] = "0.4 0.4 1.0 0.0";
mapToTerrain = true;
orientToNormal = false;
renderBottom = false;
};
datablock ShockwaveData(MortarShockwave)
{
width = 6.0;
numSegments = 32;
numVertSegments = 6;
velocity = 15;
acceleration = 20.0;
lifetimeMS = 500;
height = 1.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.4 1.0 0.4 0.50";
colors[1] = "0.4 1.0 0.4 0.25";
colors[2] = "0.4 1.0 0.4 0.0";
mapToTerrain = true;
orientToNormal = false;
renderBottom = false;
};
//--------------------------------------------------------------------------
// Mortar Explosion Particle effects
//--------------------------------------
datablock ParticleData( MortarCrescentParticle )
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent3";
colors[0] = "0.7 1.0 0.7 1.0";
colors[1] = "0.7 1.0 0.7 0.5";
colors[2] = "0.7 1.0 0.7 0.0";
sizes[0] = 4.0;
sizes[1] = 8.0;
sizes[2] = 9.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( MortarCrescentEmitter )
{
ejectionPeriodMS = 25;
periodVarianceMS = 0;
ejectionVelocity = 40;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "MortarCrescentParticle";
};
datablock ParticleData(MortarExplosionSmoke)
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.30; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 1250;
lifetimeVarianceMS = 500;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
textureName = "special/Smoke/bigSmoke";
colors[0] = "0.7 0.7 0.7 0.0";
colors[1] = "0.4 0.4 0.4 0.5";
colors[2] = "0.4 0.4 0.4 0.5";
colors[3] = "0.4 0.4 0.4 0.0";
sizes[0] = 5.0;
sizes[1] = 6.0;
sizes[2] = 10.0;
sizes[3] = 12.0;
times[0] = 0.0;
times[1] = 0.333;
times[2] = 0.666;
times[3] = 1.0;
};
datablock ParticleEmitterData(MortarExplosionSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionOffset = 8.0;
ejectionVelocity = 1.25;
velocityVariance = 1.2;
thetaMin = 0.0;
thetaMax = 90.0;
lifetimeMS = 500;
particles = "MortarExplosionSmoke";
};
//---------------------------------------------------------------------------
// Underwater Explosion
//---------------------------------------------------------------------------
datablock ParticleData(UnderwaterExplosionSparks)
{
dragCoefficient = 0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
textureName = "special/crescent3";
colors[0] = "0.4 0.4 1.0 1.0";
colors[1] = "0.4 0.4 1.0 1.0";
colors[2] = "0.4 0.4 1.0 0.0";
sizes[0] = 3.5;
sizes[1] = 3.5;
sizes[2] = 3.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterExplosionSparksEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 17;
velocityVariance = 4;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "UnderwaterExplosionSparks";
};
datablock ParticleData(MortarExplosionBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 600;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 0.4";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 2.0;
sizes[1] = 2.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.8;
times[2] = 1.0;
};
datablock ParticleEmitterData(MortarExplosionBubbleEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 7.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "MortarExplosionBubbleParticle";
};
datablock DebrisData( UnderwaterMortarDebris )
{
emitters[0] = MortarExplosionBubbleEmitter;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 1.5;
lifetimeVariance = 0.2;
numBounces = 1;
};
datablock ExplosionData(UnderwaterMortarSubExplosion1)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
delayMS = 100;
offset = 3.0;
playSpeed = 1.5;
sizes[0] = "0.75 0.75 0.75";
sizes[1] = "1.0 1.0 1.0";
sizes[2] = "0.5 0.5 0.5";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterMortarSubExplosion2)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
delayMS = 50;
offset = 3.0;
playSpeed = 0.75;
sizes[0] = "1.5 1.5 1.5";
sizes[1] = "1.5 1.5 1.5";
sizes[2] = "1.0 1.0 1.0";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterMortarSubExplosion3)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
delayMS = 0;
offset = 0.0;
playSpeed = 0.5;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "2.0 2.0 2.0";
sizes[2] = "1.5 1.5 1.5";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterMortarExplosion)
{
soundProfile = UnderwaterMortarExplosionSound;
shockwave = UnderwaterMortarShockwave;
shockwaveOnTerrain = true;
subExplosion[0] = UnderwaterMortarSubExplosion1;
subExplosion[1] = UnderwaterMortarSubExplosion2;
subExplosion[2] = UnderwaterMortarSubExplosion3;
emitter[0] = MortarExplosionBubbleEmitter;
emitter[1] = UnderwaterExplosionSparksEmitter;
shakeCamera = true;
camShakeFreq = "8.0 9.0 7.0";
camShakeAmp = "100.0 100.0 100.0";
camShakeDuration = 1.3;
camShakeRadius = 25.0;
};
//---------------------------------------------------------------------------
// Explosion
//---------------------------------------------------------------------------
datablock ExplosionData(MortarSubExplosion1)
{
explosionShape = "mortar_explosion.dts";
faceViewer = true;
delayMS = 100;
offset = 5.0;
playSpeed = 1.5;
sizes[0] = "0.5 0.5 0.5";
sizes[1] = "0.5 0.5 0.5";
times[0] = 0.0;
times[1] = 1.0;
};
datablock ExplosionData(MortarSubExplosion2)
{
explosionShape = "mortar_explosion.dts";
faceViewer = true;
delayMS = 50;
offset = 5.0;
playSpeed = 1.0;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "1.0 1.0 1.0";
times[0] = 0.0;
times[1] = 1.0;
};
datablock ExplosionData(MortarSubExplosion3)
{
explosionShape = "mortar_explosion.dts";
faceViewer = true;
delayMS = 0;
offset = 0.0;
playSpeed = 0.7;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "2.0 2.0 2.0";
times[0] = 0.0;
times[1] = 1.0;
};
datablock ExplosionData(MortarExplosion)
{
soundProfile = MortarExplosionSound;
shockwave = MortarShockwave;
shockwaveOnTerrain = true;
subExplosion[0] = MortarSubExplosion1;
subExplosion[1] = MortarSubExplosion2;
subExplosion[2] = MortarSubExplosion3;
emitter[0] = MortarExplosionSmokeEmitter;
emitter[1] = MortarCrescentEmitter;
shakeCamera = true;
camShakeFreq = "8.0 9.0 7.0";
camShakeAmp = "100.0 100.0 100.0";
camShakeDuration = 1.3;
camShakeRadius = 25.0;
};
//---------------------------------------------------------------------------
// Smoke particles
//---------------------------------------------------------------------------
datablock ParticleData(MortarSmokeParticle)
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.3; // rises slowly
inheritedVelFactor = 0.125;
lifetimeMS = 1200;
lifetimeVarianceMS = 200;
useInvAlpha = true;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
animateTexture = false;
textureName = "special/Smoke/bigSmoke";
colors[0] = "0.7 1.0 0.7 0.5";
colors[1] = "0.3 0.7 0.3 0.8";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 1.0;
sizes[1] = 2.0;
sizes[2] = 4.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(MortarSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 3;
ejectionVelocity = 2.25;
velocityVariance = 0.55;
thetaMin = 0.0;
thetaMax = 40.0;
particles = "MortarSmokeParticle";
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock GrenadeProjectileData(MortarShot)
{
projectileShapeName = "mortar_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 1.0;
damageRadius = 20.0;
radiusDamageType = $DamageType::Mortar;
kickBackStrength = 2500;
explosion = "MortarExplosion";
underwaterExplosion = "UnderwaterMortarExplosion";
velInheritFactor = 0.5;
splash = MortarSplash;
depthTolerance = 10.0; // depth at which it uses underwater explosion
baseEmitter = MortarSmokeEmitter;
bubbleEmitter = MortarBubbleEmitter;
grenadeElasticity = 0.15;
grenadeFriction = 0.4;
armingDelayMS = 2000;
muzzleVelocity = 63.7;
drag = 0.1;
sound = MortarProjectileSound;
hasLight = true;
lightRadius = 4;
lightColor = "0.05 0.2 0.05";
hasLightUnderwaterColor = true;
underWaterLightColor = "0.05 0.075 0.2";
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(MortarAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_mortar.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some mortar ammo";
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(Mortar)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_mortar.dts";
image = MortarImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a mortar gun";
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(MortarImage)
{
className = WeaponImage;
shapeFile = "weapon_mortar.dts";
item = Mortar;
ammo = MortarAmmo;
offset = "0 0 0";
emap = true;
projectile = MortarShot;
projectileType = GrenadeProjectile;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MortarSwitchSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
//stateSound[2] = MortarIdleSound;
stateName[3] = "Fire";
stateSequence[3] = "Recoil";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.8;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateSound[3] = MortarFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.0;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MortarReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = MortarDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};

View file

@ -0,0 +1,443 @@
//--------------------------------------
// Plasma rifle
//--------------------------------------
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(PlasmaSwitchSound)
{
filename = "fx/weapons/plasma_rifle_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(PlasmaFireSound)
{
filename = "fx/weapons/plasma_rifle_fire.wav";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(PlasmaIdleSound)
{
filename = "fx/weapons/plasma_rifle_idle.wav";
description = ClosestLooping3d;
preload = true;
};
datablock AudioProfile(PlasmaReloadSound)
{
filename = "fx/weapons/plasma_rifle_reload.wav";
description = Audioclosest3d;
preload = true;
};
datablock AudioProfile(plasmaExpSound)
{
filename = "fx/explosions/explosion.xpl10.wav";
description = AudioExplosion3d;
};
datablock AudioProfile(PlasmaProjectileSound)
{
filename = "fx/weapons/plasma_rifle_projectile.WAV";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(PlasmaDryFireSound)
{
filename = "fx/weapons/plasma_dryfire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(PlasmaFireWetSound)
{
filename = "fx/weapons/plasma_fizzle.wav";
description = AudioClose3d;
preload = true;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock ParticleData(PlasmaExplosionParticle)
{
dragCoefficient = 2;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 750;
lifetimeVarianceMS = 150;
textureName = "particleTest";
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.56 0.36 0.26 0.0";
sizes[0] = 0.5;
sizes[1] = 2;
};
datablock ParticleEmitterData(PlasmaExplosionEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 5;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "PlasmaExplosionParticle";
};
datablock ExplosionData(PlasmaBoltExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
soundProfile = plasmaExpSound;
particleEmitter = PlasmaExplosionEmitter;
particleDensity = 150;
particleRadius = 1.25;
faceViewer = true;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "1.0 1.0 1.0";
times[0] = 0.0;
times[1] = 1.5;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData(PlasmaMist)
{
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 = "particleTest";
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(PlasmaMistEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 85;
thetaMax = 85;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
lifetimeMS = 250;
particles = "PlasmaMist";
};
datablock ParticleData( PlasmaSplashParticle2 )
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.03; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 600;
lifetimeVarianceMS = 300;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.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] = 1.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( PlasmaSplashEmitter2 )
{
ejectionPeriodMS = 25;
ejectionOffset = 0.2;
periodVarianceMS = 0;
ejectionVelocity = 2.25;
velocityVariance = 0.50;
thetaMin = 0.0;
thetaMax = 30.0;
lifetimeMS = 250;
particles = "PlasmaSplashParticle2";
};
datablock ParticleData( PlasmaSplashParticle )
{
dragCoefficient = 1;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
textureName = "special/droplet";
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( PlasmaSplashEmitter )
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 3;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 60;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "PlasmaSplashParticle";
};
datablock SplashData(PlasmaSplash)
{
numSegments = 15;
ejectionFreq = 0.0001;
ejectionAngle = 45;
ringLifetime = 0.5;
lifetimeMS = 400;
velocity = 5.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = PlasmaSplashEmitter;
emitter[1] = PlasmaSplashEmitter2;
emitter[2] = PlasmaMistEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock ParticleData(PlasmaRifleParticle)
{
dragCoefficient = 2.75;
gravityCoefficient = 0.1;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 550;
lifetimeVarianceMS = 0;
textureName = "particleTest";
colors[0] = "0.46 0.36 0.26 1.0";
colors[1] = "0.46 0.36 0.26 0.0";
sizes[0] = 0.25;
sizes[1] = 0.20;
};
datablock ParticleEmitterData(PlasmaRifleEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 12;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = true;
particles = "PlasmaRifleParticle";
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock LinearFlareProjectileData(PlasmaBolt)
{
projectileShapeName = "plasmabolt.dts";
scale = "2.0 2.0 2.0";
faceViewer = true;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.45;
damageRadius = 4.0;
kickBackStrength = 0.0;
radiusDamageType = $DamageType::Plasma;
explosion = "PlasmaBoltExplosion";
splash = PlasmaSplash;
dryVelocity = 55.0;
wetVelocity = -1;
velInheritFactor = 0.3;
fizzleTimeMS = 2000;
lifetimeMS = 3000;
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.75 0.25";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
sound = PlasmaProjectileSound;
fireSound = PlasmaFireSound;
wetFireSound = PlasmaFireWetSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "1 0.75 0.25";
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(PlasmaAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_plasma.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some plasma gun ammo";
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(Plasma)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = PlasmaImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a plasma gun";
};
datablock ShapeBaseImageData(PlasmaImage)
{
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = Plasma;
ammo = PlasmaAmmo;
offset = "0 0 0";
projectile = PlasmaBolt;
projectileType = LinearFlareProjectile;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = PlasmaFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.6;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = PlasmaReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = PlasmaDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.5;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};

View file

@ -0,0 +1,203 @@
//--------------------------------------------------------------------------
// Shock Lance
//
//
//--------------------------------------------------------------------------
datablock AudioProfile(ShockLanceSwitchSound)
{
filename = "fx/weapons/shocklance_activate.wav";
description = AudioClosest3d;
preload = true;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock AudioProfile(ShockLanceHitSound)
{
filename = "fx/weapons/shocklance_fire.WAV";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(ShockLanceReloadSound)
{
filename = "fx/weapons/shocklance_reload.WAV";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(ShockLanceDryFireSound)
{
filename = "fx/weapons/shocklance_dryfire.WAV";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(ShockLanceMissSound)
{
filename = "fx/weapons/shocklance_miss.WAV";
description = AudioExplosion3d;
preload = true;
};
//--------------------------------------------------------------------------
// Particle data
//--------------------------------------------------------------------------
//--------------------------------------
// Projectile
//--------------------------------------
datablock ShockLanceProjectileData(BasicShocker)
{
directDamage = 0.45;
radiusDamageType = $DamageType::ShockLance;
kickBackStrength = 2500;
velInheritFactor = 0;
sound = "";
zapDuration = 1.0;
impulse = 1800;
boltLength = 14.0;
extension = 14.0; // script variable indicating distance you can shock people from
lightningFreq = 25.0;
lightningDensity = 3.0;
lightningAmp = 0.25;
lightningWidth = 0.05;
shockwave = ShocklanceHit;
boltSpeed[0] = 2.0;
boltSpeed[1] = -0.5;
texWrap[0] = 1.5;
texWrap[1] = 1.5;
startWidth[0] = 0.3;
endWidth[0] = 0.6;
startWidth[1] = 0.3;
endWidth[1] = 0.6;
texture[0] = "special/shockLightning01";
texture[1] = "special/shockLightning02";
texture[2] = "special/shockLightning03";
texture[3] = "special/ELFBeam";
emitter[0] = ShockParticleEmitter;
};
datablock ShockLanceProjectileData(S3Shocker) {
directDamage = 0.50;
radiusDamageType = $DamageType::ShockLance;
kickBackStrength = 2500;
velInheritFactor = 0;
sound = "";
zapDuration = 1.0;
impulse = 1800;
boltLength = 30.0;
extension = 30.0; // script variable indicating distance you can shock people from
lightningFreq = 25.0;
lightningDensity = 3.0;
lightningAmp = 0.25;
lightningWidth = 0.05;
shockwave = ShocklanceHit;
boltSpeed[0] = 2.0;
boltSpeed[1] = -0.5;
texWrap[0] = 1.5;
texWrap[1] = 1.5;
startWidth[0] = 0.3;
endWidth[0] = 0.6;
startWidth[1] = 0.3;
endWidth[1] = 0.6;
texture[0] = "special/shockLightning01";
texture[1] = "special/shockLightning02";
texture[2] = "special/shockLightning03";
texture[3] = "special/ELFBeam";
emitter[0] = ShockParticleEmitter;
};
//--------------------------------------
// Rifle and item...
//--------------------------------------
datablock ItemData(ShockLance)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_shocklance.dts";
image = ShockLanceImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a shocklance";
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(ShockLanceImage)
{
classname = WeaponImage;
shapeFile = "weapon_shocklance.dts";
item = ShockLance;
offset = "0 0 0";
emap = true;
projectile = BasicShocker;
usesEnergy = true;
missEnergy = 0;
hitEnergy = 15;
minEnergy = 15; // needs to change to be datablock's energy drain for a hit
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSound[0] = ShockLanceSwitchSound;
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.5;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateSound[3] = ShockLanceDryFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.0;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = ShockLanceReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ShockLanceDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "Ready";
stateName[7] = "CheckWet";
stateTransitionOnWet[7] = "DryFire";
stateTransitionOnNotWet[7] = "Fire";
};

View file

@ -0,0 +1,285 @@
//--------------------------------------------------------------------------
// Sniper rifle
//
//
//--------------------------------------------------------------------------
datablock AudioProfile(SniperRifleSwitchSound)
{
filename = "fx/weapons/sniper_activate.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(SniperRifleFireSound)
{
filename = "fx/weapons/sniper_fire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SniperRifleFireWetSound)
{
filename = "fx/weapons/sniper_underwater.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SniperRifleDryFireSound)
{
filename = "fx/weapons/chaingun_dryfire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(SniperRifleProjectileSound)
{
filename = "fx/weapons/sniper_miss.wav";
description = AudioClose3d;
preload = true;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( SniperSplashParticle )
{
dragCoeffiecient = 0.4;
gravityCoefficient = -0.03; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 600;
lifetimeVarianceMS = 300;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.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] = 1.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( SniperSplashEmitter )
{
ejectionPeriodMS = 25;
ejectionOffset = 0.2;
periodVarianceMS = 0;
ejectionVelocity = 2.25;
velocityVariance = 0.50;
thetaMin = 0.0;
thetaMax = 30.0;
lifetimeMS = 250;
particles = "SniperSplashParticle";
};
datablock SplashData( SniperSplash )
{
numSegments = 5;
ejectionFreq = 0.0001;
ejectionAngle = 45;
ringLifetime = 0.5;
lifetimeMS = 400;
velocity = 5.0;
startRadius = 0.0;
acceleration = -3.0;
texWrap = 5.0;
texture = "special/water2";
emitter[0] = SniperSplashEmitter;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 1.0";
colors[2] = "0.7 0.8 1.0 0.0";
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;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock AudioProfile(sniperExpSound)
{
filename = "fx/weapons/sniper_impact.WAV";
description = AudioClosest3d;
preload = true;
};
datablock ParticleData(SniperExplosionParticle1)
{
dragCoefficient = 0.65;
gravityCoefficient = 0.3;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 150;
textureName = "particleTest";
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.56 0.36 0.26 0.0";
sizes[0] = 0.0625;
sizes[1] = 0.2;
};
datablock ParticleEmitterData(SniperExplosionEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 0.75;
velocityVariance = 0.25;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "SniperExplosionParticle1";
};
datablock ExplosionData(SniperExplosion)
{
explosionShape = "energy_explosion.dts";
soundProfile = sniperExpSound;
particleEmitter = SniperExplosionEmitter;
particleDensity = 150;
particleRadius = 0.25;
faceViewer = false;
};
//--------------------------------------
// Projectile
//--------------------------------------
datablock SniperProjectileData(BasicSniperShot)
{
directDamage = 0.4;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
sound = SniperRifleProjectileSound;
explosion = "SniperExplosion";
splash = SniperSplash;
directDamageType = $DamageType::Laser;
maxRifleRange = 1000;
rifleHeadMultiplier = 1.3;
beamColor = "1 0.1 0.1";
fadeTime = 1.0;
startBeamWidth = 0.145;
endBeamWidth = 0.25;
pulseBeamWidth = 0.5;
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 400.0;
pulseSpeed = 6.0;
pulseLength = 0.150;
lightRadius = 1.0;
lightColor = "0.3 0.0 0.0";
textureName[0] = "special/flare";
textureName[1] = "special/nonlingradient";
textureName[2] = "special/laserrip01";
textureName[3] = "special/laserrip02";
textureName[4] = "special/laserrip03";
textureName[5] = "special/laserrip04";
textureName[6] = "special/laserrip05";
textureName[7] = "special/laserrip06";
textureName[8] = "special/laserrip07";
textureName[9] = "special/laserrip08";
textureName[10] = "special/laserrip09";
textureName[11] = "special/sniper00";
};
//--------------------------------------
// Rifle and item...
//--------------------------------------
datablock ItemData(SniperRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = SniperRifleImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a sniper rifle";
computeCRC = true;
};
datablock ShapeBaseImageData(SniperRifleImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = SniperRifle;
projectile = BasicSniperShot;
projectileType = SniperProjectile;
armThread = looksn;
usesEnergy = true;
minEnergy = 6;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSound[0] = SniperRifleSwitchSound;
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.5;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateName[5] = "CheckWet";
stateTransitionOnWet[5] = "DryFire";
stateTransitionOnNotWet[5] = "Fire";
stateName[6] = "NoAmmo";
stateTransitionOnAmmo[6] = "Reload";
stateTransitionOnTriggerDown[6] = "DryFire";
stateSequence[6] = "NoAmmo";
stateName[7] = "DryFire";
stateSound[7] = SniperRifleDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "Ready";
};

View file

@ -0,0 +1,143 @@
//--------------------------------------------------------------------------
// Targeting laser
//
//--------------------------------------------------------------------------
datablock AudioProfile(TargetingLaserSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(TargetingLaserPaintSound)
{
filename = "fx/weapons/targetinglaser_paint.wav";
description = CloseLooping3d;
preload = true;
};
//--------------------------------------
// Projectile
//--------------------------------------
datablock TargetProjectileData(BasicTargeter)
{
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
maxRifleRange = 1000;
beamColor = "1.0 0.1 0.1";
startBeamWidth = 0.1;
pulseBeamWidth = 0.15;
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 400.0;
pulseSpeed = 6.0;
pulseLength = 0.150;
textureName[0] = "special/nonlingradient";
textureName[1] = "special/flare";
textureName[2] = "special/pulse";
textureName[3] = "special/expFlare";
beacon = true;
};
//--------------------------------------
// Rifle and item...
//--------------------------------------
datablock ItemData(TargetingLaser)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_targeting.dts";
image = TargetingLaserImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a targeting laser rifle";
computeCRC = true;
};
datablock ShapeBaseImageData(TargetingLaserImage)
{
className = WeaponImage;
shapeFile = "weapon_targeting.dts";
item = TargetingLaser;
offset = "0 0 0";
projectile = BasicTargeter;
projectileType = TargetProjectile;
deleteLastProjectile = true;
usesEnergy = true;
minEnergy = 3;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = TargetingLaserSwitchSound;
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateTransitionOnAmmo[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateEnergyDrain[3] = 3;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateTransitionOnTriggerUp[3] = "Deconstruction";
stateTransitionOnNoAmmo[3] = "Deconstruction";
stateSound[3] = TargetingLaserPaintSound;
stateName[4] = "NoAmmo";
stateTransitionOnAmmo[4] = "Ready";
stateName[5] = "Deconstruction";
stateScript[5] = "deconstruct";
stateTransitionOnTimeout[5] = "Ready";
};
function TargetingLaserImage::onFire(%data,%obj,%slot) {
if(%obj.TagBeac) {
%obj.TagBeac.delete();
%obj.TagBeac = "";
}
%p = Parent::onFire(%data, %obj, %slot);
%p.setTarget(%obj.team);
}
function TargetingLaserImage::deconstruct(%data, %obj, %slot) {
%pos = %obj.lastProjectile.getTargetPoint();
if(%obj.client.TagBeac) {
%obj.client.TagBeac.delete();
%obj.client.TagBeac = "";
}
%obj.client.TagBeac = new BeaconObject() {
dataBlock = "BomberBeacon";
beaconType = "vehicle";
position = %pos;
};
%obj.client.TagBeac.playThread($AmbientThread, "ambient");
%obj.client.TagBeac.team = %obj.team;
%obj.client.TagBeac.sourceObject = %obj;
%obj.client.TagBeac.setTarget(%obj.team);
MissionCleanup.add(%obj.client.TagBeac);
Parent::deconstruct(%data, %obj, %slot);
}