Initial commit

This commit is contained in:
Brian Beck 2025-09-11 16:56:30 -07:00
parent 2211ed7650
commit ebb3dc9cdd
10121 changed files with 801 additions and 4 deletions

View file

@ -0,0 +1,204 @@
//--------------------------------------------------------------------------
// ELF Gun
//--------------------------------------------------------------------------
datablock EffectProfile(ELFGunSwitchEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ELFGunFireEffect)
{
effectname = "weapons/ELF_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ELFGunFireWetEffect)
{
effectname = "weapons/ELF_underwater";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock AudioProfile(ELFGunSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
effect = ELFGunSwitchEffect;
};
datablock AudioProfile(ELFGunFireSound)
{
filename = "fx/weapons/ELF_fire.wav";
description = CloseLooping3d;
preload = true;
effect = ELFGunFireEffect;
};
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;
effect = ELFGunFireEffect;
};
//--------------------------------------
// 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,337 @@
//--------------------------------------
// Default blaster
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(BlasterSwitchEffect)
{
effectname = "weapons/blaster_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(BlasterFireEffect)
{
effectname = "weapons/blaster_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(BlasterSwitchSound)
{
filename = "fx/weapons/blaster_activate.wav";
description = AudioClosest3d;
preload = true;
effect = BlasterSwitchEffect;
};
datablock AudioProfile(BlasterFireSound)
{
filename = "fx/weapons/blaster_fire.WAV";
description = AudioDefault3d;
preload = true;
effect = BlasterFireEffect;
};
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.15;
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,193 @@
// ------------------------------------------------------------------
// Deployable camera script
//
// Cameras will occupy grenade slots vice backpack slots. The player
// will "throw" them like grenades, and they should stick to (and
// deploy on) interior surfaces and terrain.
// ------------------------------------------------------------------
$TeamDeployableMax[DeployedCamera] = 15;
// ------------------------------------------
// force-feedback effect datablocks
// ------------------------------------------
datablock EffectProfile(CameraGrenadeActivateEffect)
{
effectname = "weapons/grenade_camera_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(CameraGrenadeAttachEffect)
{
effectname = "weapons/grenade_camera_activate";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(CameraGrenadeExplosionEffect)
{
effectname = "explosions/explosion.xpl10";
minDistance = 10;
maxDistance = 30;
};
// ------------------------------------------
// sound datablocks
// ------------------------------------------
datablock AudioProfile(CameraGrenadeActivateSound)
{
filename = "fx/weapons/grenade_camera_activate.wav";
description = AudioClosest3d;
preload = true;
effect = CameraGrenadeActivateEffect;
};
datablock AudioProfile(CameraGrenadeAttachSound)
{
filename = "fx/weapons/grenade_camera_attach.wav";
description = AudioClosest3d;
preload = true;
effect = CameraGrenadeAttachEffect;
};
datablock AudioProfile(CameraGrenadeExplosionSound)
{
filename = "fx/explosions/explosion.xpl10.wav";
description = AudioExplosion3d;
preload = true;
effect = CameraGrenadeExplosionEffect;
};
//--------------------------------------------------------------------------
// Camera explosion particle effects
//--------------------------------------------------------------------------
datablock ExplosionData(CameraGrenadeExplosion)
{
soundProfile = CameraGrenadeExplosionSound;
faceViewer = true;
explosionShape = "effect_plasma_explosion.dts";
playSpeed = 1.0;
sizes[0] = "0.2 0.2 0.2";
sizes[1] = "0.3 0.3 0.3";
};
// ------------------------------------------
// other datablocks
// ------------------------------------------
datablock ItemData(CameraGrenadeThrown)
{
shapeFile = "camera.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.8;
sticky = true;
emap = true;
};
datablock ItemData(CameraGrenade)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "camera.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = CameraGrenadeThrown;
pickUpName = "a deployable camera";
computeCRC = true;
emap = true;
};
datablock SensorData(CameraSensorObject)
{
detects = true;
detectsUsingLOS = true;
detectionPings = false;
detectsPassiveJammed = true;
detectsActiveJammed = false;
detectRadius = 40;
detectsFOVOnly = true;
useObjectFOV = true;
};
datablock TurretData(TurretDeployedCamera) : TurretDamageProfile
{
className = CameraTurret;
shapeFile = "camera.dts";
mass = 0.7;
maxDamage = 0.2;
destroyedLevel = 0.2;
disabledLevel = 0.2;
repairRate = 0;
explosion = CameraGrenadeExplosion;
thetaMin = 0;
thetaMax = 180;
//thetaNull = 90;
deployedObject = true;
isShielded = false;
energyPerDamagePoint = 40;
maxEnergy = 30;
renderWhenDestroyed = false;
rechargeRate = 0.05;
cameraDefaultFov = 150;
cameraMinFov = 150;
cameraMaxFov = 150;
neverUpdateControl = true;
canControl = true;
canObserve = true;
observeThroughObject = true;
cmdCategory = "DSupport";
cmdIcon = CMDCameraIcon;
cmdMiniIconName = "commander/MiniIcons/com_camera_grey";
targetNameTag = 'Deployed';
targetTypeTag = 'Camera';
sensorData = CameraSensorObject;
sensorRadius = CameraSensorObject.detectRadius;
firstPersonOnly = true;
observeParameters = "0.5 4.5 4.5";
debrisShapeName = "debris_generic_small.dts";
debris = SmallShapeDebris;
};
datablock TurretImageData(DeployableCameraBarrel)
{
shapeFile = "turret_muzzlepoint.dts";
usesEnergy = false;
// Turret parameters
activationMS = 100;
deactivateDelayMS = 100;
thinkTimeMS = 100;
degPerSecTheta = 180;
degPerSecPhi = 360;
};
//------------------------------------------------------------------------------
// Functions:
//------------------------------------------------------------------------------
function CameraGrenadeThrown::onCollision( %data, %obj, %col )
{
// Do nothing...
}

View file

@ -0,0 +1,675 @@
//--------------------------------------
// Chaingun
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(ChaingunSwitchEffect)
{
effectname = "weapons/chaingun_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ChaingunFireEffect)
{
effectname = "weapons/chaingun_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ChaingunSpinUpEffect)
{
effectname = "weapons/chaingun_spinup";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ChaingunSpinDownEffect)
{
effectname = "weapons/chaingun_spindown";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ChaingunDryFire)
{
effectname = "weapons/chaingun_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(ChaingunSwitchSound)
{
filename = "fx/weapons/chaingun_activate.wav";
description = AudioClosest3d;
preload = true;
effect = ChaingunSwitchEffect;
};
datablock AudioProfile(ChaingunFireSound)
{
filename = "fx/weapons/chaingun_fire.wav";
description = AudioDefaultLooping3d;
preload = true;
effect = ChaingunFireEffect;
};
datablock AudioProfile(ChaingunProjectile)
{
filename = "fx/weapons/chaingun_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(ChaingunImpact)
{
filename = "fx/weapons/chaingun_impact.WAV";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(ChaingunSpinDownSound)
{
filename = "fx/weapons/chaingun_spindown.wav";
description = AudioClosest3d;
preload = true;
effect = ChaingunSpinDownEffect;
};
datablock AudioProfile(ChaingunSpinUpSound)
{
filename = "fx/weapons/chaingun_spinup.wav";
description = AudioClosest3d;
preload = true;
effect = ChaingunSpinUpEffect;
};
datablock AudioProfile(ChaingunDryFireSound)
{
filename = "fx/weapons/chaingun_dryfire.wav";
description = AudioClose3d;
preload = true;
effect = ChaingunDryFire;
};
datablock AudioProfile(ShrikeBlasterProjectileSound)
{
filename = "fx/vehicles/shrike_blaster_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
//--------------------------------------------------------------------------
// Splash
//--------------------------------------------------------------------------
datablock ParticleData( ChaingunSplashParticle )
{
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( ChaingunSplashEmitter )
{
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 = "ChaingunSplashParticle";
};
datablock SplashData(ChaingunSplash)
{
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] = ChaingunSplashEmitter;
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(ChaingunFireParticle)
{
dragCoefficient = 2.75;
gravityCoefficient = 0.1;
inheritedVelFactor = 0.0;
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(ChaingunFireEmitter)
{
ejectionPeriodMS = 6;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 12;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = true;
particles = "ChaingunFireParticle";
};
//--------------------------------------------------------------------------
// Explosions
//--------------------------------------
datablock ParticleData(ChaingunExplosionParticle1)
{
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(ChaingunExplosionEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 0.75;
velocityVariance = 0.25;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "ChaingunExplosionParticle1";
};
datablock ParticleData(ChaingunImpactSmokeParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.2;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 200;
useInvAlpha = true;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
textureName = "particleTest";
colors[0] = "0.7 0.7 0.7 0.0";
colors[1] = "0.7 0.7 0.7 0.4";
colors[2] = "0.7 0.7 0.7 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(ChaingunImpactSmoke)
{
ejectionPeriodMS = 8;
periodVarianceMS = 1;
ejectionVelocity = 1.0;
velocityVariance = 0.5;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 35;
overrideAdvances = false;
particles = "ChaingunImpactSmokeParticle";
lifetimeMS = 50;
};
datablock ParticleData(ChaingunSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 300;
lifetimeVarianceMS = 0;
textureName = "special/spark00";
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.6;
sizes[1] = 0.2;
sizes[2] = 0.05;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(ChaingunSparkEmitter)
{
ejectionPeriodMS = 4;
periodVarianceMS = 0;
ejectionVelocity = 4;
velocityVariance = 2.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 50;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "ChaingunSparks";
};
datablock ExplosionData(ChaingunExplosion)
{
soundProfile = ChaingunImpact;
emitter[0] = ChaingunImpactSmoke;
emitter[1] = ChaingunSparkEmitter;
faceViewer = false;
};
datablock ShockwaveData(ScoutChaingunHit)
{
width = 0.5;
numSegments = 13;
numVertSegments = 1;
velocity = 0.5;
acceleration = 2.0;
lifetimeMS = 900;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
texture[0] = "special/shockwave5";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.3 1.0 0.5";
colors[2] = "0.0 0.0 1.0 0.0";
};
datablock ParticleData(ScoutChaingunExplosionParticle1)
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent4";
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.3 1.0 1.0";
colors[2] = "0.0 0.0 1.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(ScoutChaingunExplosionEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 2;
velocityVariance = 1.5;
ejectionOffset = 0.0;
thetaMin = 80;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "ScoutChaingunExplosionParticle1";
};
datablock ExplosionData(ScoutChaingunExplosion)
{
soundProfile = blasterExpSound;
shockwave = ScoutChaingunHit;
emitter[0] = ScoutChaingunExplosionEmitter;
};
//--------------------------------------------------------------------------
// Particle effects
//--------------------------------------
datablock DebrisData( ShellDebris )
{
shapeName = "weapon_chaingun_ammocasing.dts";
lifetime = 3.0;
minSpinSpeed = 300.0;
maxSpinSpeed = 400.0;
elasticity = 0.5;
friction = 0.2;
numBounces = 3;
fade = true;
staticOnMaxBounce = true;
snapOnMaxBounce = true;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock DecalData(ChaingunDecal1)
{
sizeX = 0.05;
sizeY = 0.05;
textureName = "special/bullethole1";
};
datablock DecalData(ChaingunDecal2) : ChaingunDecal1
{
textureName = "special/bullethole2";
};
datablock DecalData(ChaingunDecal3) : ChaingunDecal1
{
textureName = "special/bullethole3";
};
datablock DecalData(ChaingunDecal4) : ChaingunDecal1
{
textureName = "special/bullethole4";
};
datablock DecalData(ChaingunDecal5) : ChaingunDecal1
{
textureName = "special/bullethole5";
};
datablock DecalData(ChaingunDecal6) : ChaingunDecal1
{
textureName = "special/bullethole6";
};
datablock TracerProjectileData(ChaingunBullet)
{
doDynamicClientHits = true;
directDamage = 0.0825;
directDamageType = $DamageType::Bullet;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
dryVelocity = 425.0;
wetVelocity = 100.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.10;
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;
};
//--------------------------------------------------------------------------
// Scout Projectile
//--------------------------------------
datablock TracerProjectileData(ScoutChaingunBullet)
{
doDynamicClientHits = true;
directDamage = 0.125;
explosion = "ScoutChaingunExplosion";
splash = ChaingunSplash;
directDamageType = $DamageType::ShrikeBlaster;
kickBackStrength = 0.0;
sound = ShrikeBlasterProjectileSound;
dryVelocity = 425.0;
wetVelocity = 100.0;
velInheritFactor = 1.0;
fizzleTimeMS = 1000;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 45.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = "1.0 1.0 1.0 1.0";
tracerTex[0] = "special/shrikeBolt";
tracerTex[1] = "special/shrikeBoltCross";
tracerWidth = 0.55;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(ChaingunAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some chaingun ammo";
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(ChaingunImage)
{
className = WeaponImage;
shapeFile = "weapon_chaingun.dts";
item = Chaingun;
ammo = ChaingunAmmo;
projectile = ChaingunBullet;
projectileType = TracerProjectile;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
projectileSpread = 8.0 / 1000.0;
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.5;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
stateSound[4] = ChaingunFireSound;
//stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
//
stateTimeoutValue[4] = 0.15;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 1.0;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 0.5;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
};
datablock ItemData(Chaingun)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_chaingun.dts";
image = ChaingunImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a chaingun";
computeCRC = true;
emap = true;
};

View file

@ -0,0 +1,208 @@
// grenade (thrown by hand) script
// ------------------------------------------------------------------------
datablock EffectProfile(ConcussionGrenadeThrowEffect)
{
effectname = "weapons/grenade_throw";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ConcussionGrenadeSwitchEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ConcussionGrenadeExplosionEffect)
{
effectname = "explosions/grenade_explode";
minDistance = 10;
maxDistance = 50;
};
datablock AudioProfile(ConcussionGrenadeExplosionSound)
{
filename = "fx/weapons/grenade_explode.wav";
description = AudioExplosion3d;
preload = true;
effect = ConcussionGrenadeExplosionEffect;
};
// ------------------------------------------------------
// z0dd - ZOD, 5/8/02. Duplicate datablock, waste of mem.
//datablock AudioProfile(ConcussionGrenadeExplosionSound)
//{
// filename = "fx/weapons/grenade_explode.wav";
// description = AudioExplosion3d;
// preload = true;
// effect = ConcussionGrenadeExplosionEffect;
//};
// ------------------------------------------------------
//--------------------------------------------------------------------------
// Sparks
//--------------------------------------------------------------------------
datablock ParticleData(ConcussionGrenadeSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
textureName = "special/bigSpark";
colors[0] = "0.56 0.36 1.0 1.0";
colors[1] = "0.56 0.36 1.0 1.0";
colors[2] = "1.0 0.36 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.25;
sizes[2] = 0.25;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(ConcussionGrenadeSparkEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 12;
velocityVariance = 6.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "ConcussionGrenadeSparks";
};
datablock ParticleData( ConcussionGrenadeCrescentParticle )
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent3";
colors[0] = "0.8 0.8 1.0 1.00";
colors[1] = "0.8 0.5 1.0 0.20";
colors[2] = "0.2 0.8 1.0 0.0";
sizes[0] = 2.0;
sizes[1] = 4.0;
sizes[2] = 5.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( ConcussionGrenadeCrescentEmitter )
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 20;
velocityVariance = 10.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "ConcussionGrenadeCrescentParticle";
};
//--------------------------------------------------------------------------
// Shockwave
//--------------------------------------------------------------------------
datablock ShockwaveData(ConcussionGrenadeShockwave)
{
width = 4.0;
numSegments = 20;
numVertSegments = 2;
velocity = 5;
acceleration = 10.0;
lifetimeMS = 1000;
height = 1.0;
is2D = true;
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.8 0.8 1.0 1.00";
colors[1] = "0.8 0.5 1.0 0.20";
colors[2] = "0.2 0.8 1.0 0.0";
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------------------------------------------
datablock ExplosionData(ConcussionGrenadeExplosion)
{
soundProfile = ConcussionGrenadeExplosionSound;
shockwave = ConcussionGrenadeShockwave;
emitter[0] = ConcussionGrenadeSparkEmitter;
emitter[1] = ConcussionGrenadeCrescentEmitter;
shakeCamera = true;
camShakeFreq = "4.0 5.0 4.5";
camShakeAmp = "140.0 140.0 140.0";
camShakeDuration = 1.0;
camShakeRadius = 15.0;
};
//--------------------------------------------------------------------------
// Item Data
//--------------------------------------------------------------------------
datablock ItemData(ConcussionGrenadeThrown)
{
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.5;
explosion = ConcussionGrenadeExplosion;
damageRadius = 15.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 3500;
computeCRC = true;
};
datablock ItemData(ConcussionGrenade)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = ConcussionGrenadeThrown;
pickUpName = "some concussion grenades";
isGrenade = true;
};
//--------------------------------------------------------------------------
// Functions:
//--------------------------------------------------------------------------
function ConcussionGrenadeThrown::onCollision( %data, %obj, %col )
{
// Do nothing...
}

View file

@ -0,0 +1,483 @@
//--------------------------------------
// Disc launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(DiscFireEffect)
{
effectname = "weapons/spinfusor_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(DiscSwitchEffect)
{
effectname = "weapons/spinfusor_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(DiscDryFireEffect)
{
effectname = "weapons/spinfusor_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(DiscIdleEffect)
{
effectname = "weapons/spinfusor_idle";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(DiscReloadEffect)
{
effectname = "weapons/spinfusor_reload";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(DiscExpEffect)
{
effectname = "explosions/grenade_explode";
minDistance = 5;
maxDistance = 20;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(DiscSwitchSound)
{
filename = "fx/weapons/blaster_activate.wav";
description = AudioClosest3d;
preload = true;
effect = DiscSwitchEffect;
};
datablock AudioProfile(DiscLoopSound)
{
filename = "fx/weapons/spinfusor_idle.wav";
description = ClosestLooping3d;
effect = DiscIdleEffect;
};
datablock AudioProfile(DiscFireSound)
{
filename = "fx/weapons/spinfusor_fire.wav";
description = AudioDefault3d;
preload = true;
effect = DiscFireEffect;
};
datablock AudioProfile(DiscReloadSound)
{
filename = "fx/weapons/spinfusor_reload.wav";
description = AudioClosest3d;
preload = true;
effect = DiscReloadEffect;
};
datablock AudioProfile(discExpSound)
{
filename = "fx/weapons/spinfusor_impact.wav";
description = AudioExplosion3d;
preload = true;
effect = DiscExpEffect;
};
datablock AudioProfile(underwaterDiscExpSound)
{
filename = "fx/weapons/spinfusor_impact_UW.wav";
description = AudioExplosion3d;
preload = true;
effect = DiscExpEffect;
};
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;
effect = DiscDryFireEffect;
};
//--------------------------------------------------------------------------
// 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,145 @@
// grenade (thrown by hand) script
// ------------------------------------------------------------------------
datablock AudioProfile(FlareGrenadeBurnSound)
{
filename = "fx/weapons/grenade_flare_burn.wav";
description = CloseLooping3d;
preload = true;
};
datablock AudioProfile(FlareGrenadeExplosionSound)
{
filename = "fx/weapons/grenade_flare_burn.wav";
description = CloseLooping3d;
preload = true;
};
//--------------------------------------------------------------------------
// Particle effects
//--------------------------------------
datablock ParticleData(FlareParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.15;
inheritedVelFactor = 0.5;
lifetimeMS = 1800;
lifetimeVarianceMS = 200;
textureName = "special/flareSpark";
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 1.0";
colors[2] = "1.0 1.0 1.0 0.0";
sizes[0] = 0.6;
sizes[1] = 0.3;
sizes[2] = 0.1;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(FlareEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 90.0;
orientParticles = true;
orientOnVelocity = false;
particles = "FlareParticle";
};
//--------------------------------------------------------------------------
// Explosion - Flare Grenade
//--------------------------------------
datablock ExplosionData(FlareGrenadeExplosion)
{
explosionShape = "energy_explosion.dts";
soundProfile = FlareGrenadeExplosionSound;
faceViewer = true;
explosionScale = "0.1 0.1 0.1";
};
//--------------------------------------------------------------------------
// Projectile - Flare Grenade
//--------------------------------------
datablock FlareProjectileData(FlareGrenadeProj)
{
projectileShapeName = "grenade_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = false;
kickBackStrength = 1500;
useLensFlare = false;
sound = FlareGrenadeBurnSound;
explosion = FlareGrenadeExplosion;
velInheritFactor = 0.5;
texture[0] = "special/flare3";
texture[1] = "special/LensFlare/flare00";
size = 4.0;
baseEmitter = FlareEmitter;
grenadeElasticity = 0.35;
grenadeFriction = 0.2;
armingDelayMS = 6000;
muzzleVelocity = 15.0;
drag = 0.1;
gravityMod = 0.15;
};
datablock ItemData(FlareGrenadeThrown)
{
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.4;
sticky = false;
gravityMod = 0.15;
maxVelocity = 10;
computeCRC = true;
};
datablock ItemData(FlareGrenade)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = FlareGrenadeThrown;
pickUpName = "some flare grenades";
isGrenade = true;
computeCRC = true;
};
//------------------------------------------------------------------------------
// Functions:
//------------------------------------------------------------------------------
function FlareGrenadeThrown::onCollision( %data, %obj, %col )
{
// Do nothing...
}

View file

@ -0,0 +1,69 @@
// grenade (thrown by hand) script
// ------------------------------------------------------------------------
datablock EffectProfile(FlashGrenadeExplosionEffect)
{
effectname = "explosions/grenade_flash_explode";
minDistance = 10;
maxDistance = 30;
};
datablock AudioProfile(FlashGrenadeExplosionSound)
{
filename = "fx/explosions/grenade_flash_explode.wav";
description = AudioExplosion3d;
preload = true;
effect = FlashGrenadeExplosionEffect;
};
datablock ExplosionData(FlashGrenadeExplosion)
{
explosionShape = "disc_explosion.dts";
soundProfile = FlashGrenadeExplosionSound;
faceViewer = true;
};
datablock ItemData(FlashGrenadeThrown)
{
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.4;
explosion = FlashGrenadeExplosion;
indirectDamage = 0.5;
damageRadius = 10.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 1000;
computeCRC = true;
maxWhiteout = 1.2;
};
datablock ItemData(FlashGrenade)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = FlashGrenadeThrown;
pickUpName = "some flash grenades";
isGrenade = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Functions:
//--------------------------------------------------------------------------
function FlashGrenadeThrown::onCollision( %data, %obj, %col )
{
// Do nothing...
}

View file

@ -0,0 +1,374 @@
// ------------------------------------------------------------------------
// grenade (thrown by hand) script
// ------------------------------------------------------------------------
datablock EffectProfile(GrenadeThrowEffect)
{
effectname = "weapons/grenade_throw";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(GrenadeSwitchEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock AudioProfile(GrenadeThrowSound)
{
filename = "fx/weapons/throw_grenade.wav";
description = AudioClose3D;
preload = true;
effect = GrenadeThrowEffect;
};
datablock AudioProfile(GrenadeSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3D;
preload = true;
effect = GrenadeSwitchEffect;
};
//**************************************************************************
// Hand Grenade underwater fx
//**************************************************************************
//--------------------------------------------------------------------------
// Underwater Hand Grenade Particle effects
//--------------------------------------------------------------------------
datablock ParticleData(HandGrenadeExplosionBubbleParticle)
{
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] = 0.75;
sizes[1] = 0.75;
sizes[2] = 0.75;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(HandGrenadeExplosionBubbleEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 2.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "HandGrenadeExplosionBubbleParticle";
};
datablock ParticleData(UnderwaterHandGrenadeExplosionSmoke)
{
dragCoeffiecient = 105.0;
gravityCoefficient = -0.0; // rises slowly
inheritedVelFactor = 0.025;
constantAcceleration = -1.0;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "0.4 0.4 1.0 1.0";
colors[1] = "0.4 0.4 1.0 0.5";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 1.0;
sizes[1] = 3.0;
sizes[2] = 5.0;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterHandGrenadeExplosionSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 5.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 250;
particles = "UnderwaterHandGrenadeExplosionSmoke";
};
datablock ParticleData(UnderwaterHandGrenadeSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
textureName = "special/droplet";
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.25;
sizes[2] = 0.25;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterHandGrenadeSparkEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 6.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "UnderwaterHandGrenadeSparks";
};
datablock ExplosionData(UnderwaterHandGrenadeSubExplosion1)
{
offset = 1.0;
emitter[0] = UnderwaterHandGrenadeExplosionSmokeEmitter;
emitter[1] = UnderwaterHandGrenadeSparkEmitter;
};
datablock ExplosionData(UnderwaterHandGrenadeSubExplosion2)
{
offset = 1.0;
emitter[0] = UnderwaterHandGrenadeExplosionSmokeEmitter;
emitter[1] = UnderwaterHandGrenadeSparkEmitter;
};
datablock ExplosionData(UnderwaterHandGrenadeExplosion)
{
soundProfile = GrenadeExplosionSound;
emitter[0] = UnderwaterHandGrenadeExplosionSmokeEmitter;
emitter[1] = UnderwaterHandGrenadeSparkEmitter;
emitter[2] = HandGrenadeExplosionBubbleEmitter;
subExplosion[0] = UnderwaterHandGrenadeSubExplosion1;
subExplosion[1] = UnderwaterHandGrenadeSubExplosion2;
shakeCamera = true;
camShakeFreq = "12.0 13.0 11.0";
camShakeAmp = "35.0 35.0 35.0";
camShakeDuration = 1.0;
camShakeRadius = 15.0;
};
//**************************************************************************
// Hand Grenade effects
//**************************************************************************
//--------------------------------------------------------------------------
// Grenade Particle effects
//--------------------------------------------------------------------------
datablock ParticleData(HandGrenadeExplosionSmoke)
{
dragCoeffiecient = 105.0;
gravityCoefficient = -0.0; // rises slowly
inheritedVelFactor = 0.025;
constantAcceleration = -0.80;
lifetimeMS = 1250;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "1.0 0.7 0.0 1.0";
colors[1] = "0.2 0.2 0.2 1.0";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 1.0;
sizes[1] = 3.0;
sizes[2] = 5.0;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(HandGrenadeExplosionSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 10.25;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 250;
particles = "HandGrenadeExplosionSmoke";
};
datablock ParticleData(HandGrenadeSparks)
{
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.25;
sizes[2] = 0.25;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(HandGrenadeSparkEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionVelocity = 18;
velocityVariance = 6.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "HandGrenadeSparks";
};
//----------------------------------------------------
// Explosion
//----------------------------------------------------
datablock ExplosionData(HandGrenadeSubExplosion1)
{
offset = 2.0;
emitter[0] = HandGrenadeExplosionSmokeEmitter;
emitter[1] = HandGrenadeSparkEmitter;
};
datablock ExplosionData(HandGrenadeSubExplosion2)
{
offset = 2.0;
emitter[0] = HandGrenadeExplosionSmokeEmitter;
emitter[1] = HandGrenadeSparkEmitter;
};
datablock ExplosionData(HandGrenadeExplosion)
{
soundProfile = GrenadeExplosionSound;
emitter[0] = HandGrenadeExplosionSmokeEmitter;
emitter[1] = HandGrenadeSparkEmitter;
subExplosion[0] = HandGrenadeSubExplosion1;
subExplosion[1] = HandGrenadeSubExplosion2;
shakeCamera = true;
camShakeFreq = "12.0 13.0 11.0";
camShakeAmp = "35.0 35.0 35.0";
camShakeDuration = 1.0;
camShakeRadius = 15.0;
};
datablock ItemData(GrenadeThrown)
{
className = Weapon;
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.5;
explosion = HandGrenadeExplosion;
underwaterExplosion = UnderwaterHandGrenadeExplosion;
indirectDamage = 0.4;
damageRadius = 10.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 2000;
computeCRC = true;
};
datablock ItemData(Grenade)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "grenade.dts";
mass = 0.7;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = GrenadeThrown;
pickUpName = "some grenades";
isGrenade = true;
computeCRC = true;
};

View file

@ -0,0 +1,786 @@
//--------------------------------------
// Grenade launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(GrenadeSwitchEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(GrenadeFireEffect)
{
effectname = "weapons/grenadelauncher_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(GrenadeDryFireEffect)
{
effectname = "weapons/grenadelauncher_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(GrenadeReloadEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(GrenadeExplosionEffect)
{
effectname = "explosions/grenade_explode";
minDistance = 10;
maxDistance = 35;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(GrenadeSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
effect = GrenadeSwitchEffect;
};
datablock AudioProfile(GrenadeFireSound)
{
filename = "fx/weapons/grenadelauncher_fire.wav";
description = AudioDefault3d;
preload = true;
effect = GrenadeFireEffect;
};
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;
effect = GrenadeReloadEffect;
};
datablock AudioProfile(GrenadeExplosionSound)
{
filename = "fx/weapons/grenade_explode.wav";
description = AudioExplosion3d;
preload = true;
effect = GrenadeExplosionEffect;
};
datablock AudioProfile(UnderwaterGrenadeExplosionSound)
{
filename = "fx/weapons/grenade_explode_UW.wav";
description = AudioExplosion3d;
preload = true;
effect = GrenadeExplosionEffect;
};
datablock AudioProfile(GrenadeDryFireSound)
{
filename = "fx/weapons/grenadelauncher_dryfire.wav";
description = AudioClose3d;
preload = true;
effect = GrenadeDryFireEffect;
};
//----------------------------------------------------------------------------
// 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,341 @@
// ----------------------------------------------
// mine script
// ----------------------------------------------
$TeamDeployableMax[MineDeployed] = 20;
// ----------------------------------------------
// force-feedback datablocks
// ----------------------------------------------
datablock EffectProfile(MineExplosionEffect)
{
effectname = "explosions/mine_detonate";
minDistance = 10;
maxDistance = 50;
};
// ----------------------------------------------
// audio datablocks
// ----------------------------------------------
datablock AudioProfile(MineDeploySound)
{
filename = "fx/weapons/mine_deploy.wav";
description = AudioClose3D;
preload = true;
};
datablock AudioProfile(MineExplosionSound)
{
filename = "fx/weapons/mine_detonate.wav";
description = AudioBIGExplosion3d;
preload = true;
effect = MineExplosionEffect;
};
datablock AudioProfile(UnderwaterMineExplosionSound)
{
filename = "fx/weapons/mine_detonate_UW.wav";
description = AudioBIGExplosion3d;
preload = true;
effect = MineExplosionEffect;
};
//--------------------------------------------------------------------------
// Mine Particle effects
//--------------------------------------------------------------------------
datablock ParticleData(MineExplosionBubbleParticle)
{
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(MineExplosionBubbleEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 2.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "MineExplosionBubbleParticle";
};
datablock ParticleData( UnderwaterMineCrescentParticle )
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent3";
colors[0] = "0.5 0.5 1.0 1.0";
colors[1] = "0.5 0.5 1.0 1.0";
colors[2] = "0.5 0.5 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( UnderwaterMineCrescentEmitter )
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "UnderwaterMineCrescentParticle";
};
datablock ParticleData(UnderwaterMineExplosionSmoke)
{
dragCoeffiecient = 105.0;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.025;
constantAcceleration = -1.0;
lifetimeMS = 1200;
lifetimeVarianceMS = 00;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "0.7 0.7 1.0 1.0";
colors[1] = "0.3 0.3 1.0 1.0";
colors[2] = "0.0 0.0 1.0 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(UnderwaterMineExplosionSmokeEmitter)
{
ejectionPeriodMS = 8;
periodVarianceMS = 0;
ejectionVelocity = 4.25;
velocityVariance = 1.25;
thetaMin = 0.0;
thetaMax = 80.0;
lifetimeMS = 250;
particles = "UnderwaterMineExplosionSmoke";
};
datablock ExplosionData(UnderwaterMineExplosion)
{
explosionShape = "disc_explosion.dts";
playSpeed = 1.0;
sizes[0] = "0.4 0.4 0.4";
sizes[1] = "0.4 0.4 0.4";
soundProfile = UnderwaterMineExplosionSound;
faceViewer = true;
emitter[0] = UnderwaterMineExplosionSmokeEmitter;
emitter[1] = UnderwaterMineCrescentEmitter;
emitter[2] = MineExplosionBubbleEmitter;
shakeCamera = true;
camShakeFreq = "8.0 7.0 9.0";
camShakeAmp = "50.0 50.0 50.0";
camShakeDuration = 1.0;
camShakeRadius = 10.0;
};
//--------------------------------------------------------------------------
// Mine Particle effects
//--------------------------------------------------------------------------
datablock ParticleData( MineCrescentParticle )
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent3";
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.5;
sizes[1] = 1.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData( MineCrescentEmitter )
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "MineCrescentParticle";
};
datablock ParticleData(MineExplosionSmoke)
{
dragCoeffiecient = 105.0;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.025;
lifetimeMS = 1200;
lifetimeVarianceMS = 00;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "1.0 0.7 0.0 1.0";
colors[1] = "0.2 0.2 0.2 1.0";
colors[2] = "0.0 0.0 0.0 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(MineExplosionSmokeEmitter)
{
ejectionPeriodMS = 8;
periodVarianceMS = 0;
ejectionVelocity = 4.25;
velocityVariance = 1.25;
thetaMin = 0.0;
thetaMax = 80.0;
lifetimeMS = 250;
particles = "MineExplosionSmoke";
};
datablock ExplosionData(MineExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
playSpeed = 1.0;
sizes[0] = "0.5 0.5 0.5";
sizes[1] = "0.5 0.5 0.5";
soundProfile = MineExplosionSound;
faceViewer = true;
emitter[0] = MineExplosionSmokeEmitter;
emitter[1] = MineCrescentEmitter;
shakeCamera = true;
camShakeFreq = "8.0 7.0 9.0";
camShakeAmp = "50.0 50.0 50.0";
camShakeDuration = 1.0;
camShakeRadius = 10.0;
};
// ----------------------------------------------
// Item datablocks
// ----------------------------------------------
datablock ItemData(MineDeployed)
{
className = Weapon;
shapeFile = "mine.dts";
mass = 0.75;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 3;
maxDamage = 0.2;
explosion = MineExplosion;
underwaterExplosion = UnderwaterMineExplosion;
indirectDamage = 0.55;
damageRadius = 6.0;
radiusDamageType = $DamageType::Mine;
kickBackStrength = 1500;
aiAvoidThis = true;
dynamicType = $TypeMasks::DamagableItemObjectType;
spacing = 6.0; // how close together mines can be
proximity = 2.5; // how close causes a detonation (by player/vehicle)
armTime = 2200; // 2.2 seconds to arm a mine after it comes to rest
maxDepCount = 9; // try to deploy this many times before detonating
computeCRC = true;
};
datablock ItemData(Mine)
{
className = HandInventory;
catagory = "Handheld";
shapeFile = "ammo_mine.dts";
mass = 1;
elasticity = 0.2;
friction = 0.7;
pickupRadius = 2;
thrownItem = MineDeployed;
pickUpName = "some mines";
computeCRC = true;
};

View file

@ -0,0 +1,795 @@
//--------------------------------------
// Missile launcher
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(MissileSwitchEffect)
{
effectname = "weapons/missile_launcher_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(MissileFireEffect)
{
effectname = "weapons/missile_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(MissileDryFireEffect)
{
effectname = "weapons/missile_launcher_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(MissileExplosionEffect)
{
effectname = "explosions/explosion.xpl23";
minDistance = 10;
maxDistance = 30;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(MissileSwitchSound)
{
filename = "fx/weapons/missile_launcher_activate.wav";
description = AudioClosest3d;
preload = true;
effect = MissileSwitchEffect;
};
datablock AudioProfile(MissileFireSound)
{
filename = "fx/weapons/missile_fire.WAV";
description = AudioDefault3d;
preload = true;
effect = MissileFireEffect;
};
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;
effect = MissileExplosionEffect;
};
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";
lifetimeMS = 6000;
muzzleVelocity = 10.0;
maxVelocity = 80.0;
turningSpeed = 110.0;
acceleration = 200.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,797 @@
//--------------------------------------
// Mortar
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(MortarSwitchEffect)
{
effectname = "weapons/mortar_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(MortarFireEffect)
{
effectname = "weapons/mortar_fire";
minDistance = 2.5;
maxDistance = 5.0;
};
datablock EffectProfile(MortarReloadEffect)
{
effectname = "weapons/mortar_reload";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(MortarDryFireEffect)
{
effectname = "weapons/mortar_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(MortarExplosionEffect)
{
effectname = "explosions/explosion.xpl03";
minDistance = 30;
maxDistance = 65;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(MortarSwitchSound)
{
filename = "fx/weapons/mortar_activate.wav";
description = AudioClosest3d;
preload = true;
effect = MortarSwitchEffect;
};
datablock AudioProfile(MortarReloadSound)
{
filename = "fx/weapons/mortar_reload.wav";
description = AudioClosest3d;
preload = true;
effect = MortarReloadEffect;
};
// DELETE IF NOT NEEDED
//datablock AudioProfile(MortarIdleSound)
//{
// filename = "fx/weapons/weapon.mortarIdle.wav";
// description = ClosestLooping3d;
// preload = true;
//};
datablock AudioProfile(MortarFireSound)
{
filename = "fx/weapons/mortar_fire.wav";
description = AudioDefault3d;
preload = true;
effect = MortarFireEffect;
};
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;
effect = MortarExplosionEffect;
};
datablock AudioProfile(UnderwaterMortarExplosionSound)
{
filename = "fx/weapons/mortar_explode_UW.wav";
description = AudioBIGExplosion3d;
preload = true;
effect = MortarExplosionEffect;
};
datablock AudioProfile(MortarDryFireSound)
{
filename = "fx/weapons/mortar_dryfire.wav";
description = AudioClose3d;
preload = true;
effect = MortarDryFireEffect;
};
//----------------------------------------------------------------------------
// 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,493 @@
//--------------------------------------
// Plasma rifle
//--------------------------------------
//--------------------------------------------------------------------------
// Force-Feedback Effects
//--------------------------------------
datablock EffectProfile(PlasmaSwitchEffect)
{
effectname = "weapons/plasma_rifle_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(PlasmaFireEffect)
{
effectname = "weapons/plasma_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(PlasmaDryFireEffect)
{
effectname = "weapons/plasma_dryfire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(PlasmaIdleEffect)
{
effectname = "weapons/plasma_rifle_idle";
minDistance = 2.5;
};
datablock EffectProfile(PlasmaReloadEffect)
{
effectname = "weapons/plasma_rifle_reload";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(PlasmaExpEffect)
{
effectname = "explosions/explosion.xpl10";
minDistance = 10;
maxDistance = 25;
};
//--------------------------------------------------------------------------
// Sounds
//--------------------------------------
datablock AudioProfile(PlasmaSwitchSound)
{
filename = "fx/weapons/plasma_rifle_activate.wav";
description = AudioClosest3d;
preload = true;
effect = PlasmaSwitchEffect;
};
datablock AudioProfile(PlasmaFireSound)
{
filename = "fx/weapons/plasma_rifle_fire.wav";
description = AudioDefault3d;
preload = true;
effect = PlasmaFireEffect;
};
datablock AudioProfile(PlasmaIdleSound)
{
filename = "fx/weapons/plasma_rifle_idle.wav";
description = ClosestLooping3d;
preload = true;
//effect = PlasmaIdleEffect;
};
datablock AudioProfile(PlasmaReloadSound)
{
filename = "fx/weapons/plasma_rifle_reload.wav";
description = Audioclosest3d;
preload = true;
effect = PlasmaReloadEffect;
};
datablock AudioProfile(plasmaExpSound)
{
filename = "fx/explosions/explosion.xpl10.wav";
description = AudioExplosion3d;
effect = PlasmaExpEffect;
};
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;
effect = PlasmaDryFireEffect;
};
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,297 @@
//--------------------------------------------------------------------------
// Shock Lance
//
//
//--------------------------------------------------------------------------
datablock EffectProfile(ShockLanceSwitchEffect)
{
effectname = "weapons/shocklance_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ShockLanceFireEffect)
{
effectname = "weapons/shocklance_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(ShockLanceReloadEffect)
{
effectname = "weapons/shocklance_reload";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock AudioProfile(ShockLanceSwitchSound)
{
filename = "fx/weapons/shocklance_activate.wav";
description = AudioClosest3d;
preload = true;
effect = ShockLanceSwitchEffect;
};
//--------------------------------------------------------------------------
// Explosion
//--------------------------------------
datablock AudioProfile(ShockLanceHitSound)
{
filename = "fx/weapons/shocklance_fire.WAV";
description = AudioClose3d;
preload = true;
effect = ShockLanceFireEffect;
};
datablock AudioProfile(ShockLanceReloadSound)
{
filename = "fx/weapons/shocklance_reload.WAV";
description = AudioClosest3d;
preload = true;
effect = ShockLanceReloadEffect;
};
datablock AudioProfile(ShockLanceDryFireSound)
{
filename = "fx/weapons/shocklance_dryfire.WAV";
description = AudioClose3d;
preload = true;
effect = ShockLanceReloadEffect;
};
datablock AudioProfile(ShockLanceMissSound)
{
filename = "fx/weapons/shocklance_miss.WAV";
description = AudioExplosion3d;
preload = true;
};
//--------------------------------------------------------------------------
// Particle data
//--------------------------------------------------------------------------
datablock ParticleData(ShockParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -100.0;
spinRandomMax = 100.0;
numParts = 50;
animateTexture = true;
framesPerSec = 26;
animTexName[00] = "special/Explosion/exp_0002";
animTexName[01] = "special/Explosion/exp_0004";
animTexName[02] = "special/Explosion/exp_0006";
animTexName[03] = "special/Explosion/exp_0008";
animTexName[04] = "special/Explosion/exp_0010";
animTexName[05] = "special/Explosion/exp_0012";
animTexName[06] = "special/Explosion/exp_0014";
animTexName[07] = "special/Explosion/exp_0016";
animTexName[08] = "special/Explosion/exp_0018";
animTexName[09] = "special/Explosion/exp_0020";
animTexName[10] = "special/Explosion/exp_0022";
animTexName[11] = "special/Explosion/exp_0024";
animTexName[12] = "special/Explosion/exp_0026";
animTexName[13] = "special/Explosion/exp_0028";
animTexName[14] = "special/Explosion/exp_0030";
animTexName[15] = "special/Explosion/exp_0032";
animTexName[16] = "special/Explosion/exp_0034";
animTexName[17] = "special/Explosion/exp_0036";
animTexName[18] = "special/Explosion/exp_0038";
animTexName[19] = "special/Explosion/exp_0040";
animTexName[20] = "special/Explosion/exp_0042";
animTexName[21] = "special/Explosion/exp_0044";
animTexName[22] = "special/Explosion/exp_0046";
animTexName[23] = "special/Explosion/exp_0048";
animTexName[24] = "special/Explosion/exp_0050";
animTexName[25] = "special/Explosion/exp_0052";
colors[0] = "0.5 0.5 1.0 1.0";
colors[1] = "0.5 0.5 1.0 0.5";
colors[2] = "0.25 0.25 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(ShockParticleEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 0.25;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 30.0;
particles = "ShockParticle";
};
//--------------------------------------------------------------------------
// Shockwave
//--------------------------------------------------------------------------
datablock ShockwaveData( ShocklanceHit )
{
width = 0.5;
numSegments = 20;
numVertSegments = 1;
velocity = 0.25;
acceleration = 1.0;
lifetimeMS = 600;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
texture[0] = "special/shocklanceHit";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 0.5";
colors[2] = "1.0 1.0 1.0 0.0";
};
//--------------------------------------
// 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;
};
//--------------------------------------
// 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,310 @@
//--------------------------------------------------------------------------
// Sniper rifle
//
//
//--------------------------------------------------------------------------
datablock EffectProfile(SniperRifleSwitchEffect)
{
effectname = "weapons/sniper_activate";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(SniperRifleFireEffect)
{
effectname = "weapons/sniper_fire";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(SniperRifleFireWetEffect)
{
effectname = "weapons/sniper_underwater";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock AudioProfile(SniperRifleSwitchSound)
{
filename = "fx/weapons/sniper_activate.wav";
description = AudioClosest3d;
preload = true;
effect = SniperRifleSwitchEffect;
};
datablock AudioProfile(SniperRifleFireSound)
{
filename = "fx/weapons/sniper_fire.wav";
description = AudioClose3d;
preload = true;
effect = SniperRifleFireEffect;
};
datablock AudioProfile(SniperRifleFireWetSound)
{
filename = "fx/weapons/sniper_underwater.wav";
description = AudioClose3d;
preload = true;
effect = SniperRifleFireWetEffect;
};
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,129 @@
//--------------------------------------------------------------------------
// Targeting laser
//
//--------------------------------------------------------------------------
datablock EffectProfile(TargetingLaserSwitchEffect)
{
effectname = "weapons/generic_switch";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock EffectProfile(TargetingLaserPaintEffect)
{
effectname = "weapons/targetinglaser_paint";
minDistance = 2.5;
maxDistance = 2.5;
};
datablock AudioProfile(TargetingLaserSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
effect = TargetingLaserSwitchEffect;
};
datablock AudioProfile(TargetingLaserPaintSound)
{
filename = "fx/weapons/targetinglaser_paint.wav";
description = CloseLooping3d;
preload = true;
effect = TargetingLaserPaintEffect;
};
//--------------------------------------
// Projectile
//--------------------------------------
datablock TargetProjectileData(BasicTargeter)
{
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
maxRifleRange = 1000;
beamColor = "0.1 1.0 0.1";
startBeamWidth = 0.20;
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";
};