Author Topic: HL2 Pulse Rifle  (Read 4691 times)

As another test, I wanted to edit one of the two-projectile left and right click weapons to be like the HL2 Pulse Rifle. A few questions:
1: The energy ball projectile would work if edited into a weapon, right?
2: Does anybody know of any weapons where the second (right click) fire is easily editible? All of the ones I've found (G36C, Portal Gun, MP7) are second-fired with another DTS file, which I cannot edit (what program? Tourque?)?
I'd appreciate some help, this would be one of my cooler edits, if it were to work.

You shouldn't have to open a dts file.  That's just a model.

Oh yeah, like in the G36C, theres a "backup.cs" that looks like it. Any idea what part of it to edit, to change the projectile? There's going to be a bit of renaming, too. Here's the backup.cs:
Code: [Select]
datablock AudioProfile(grenadeExplosionSound)
{
   filename    = "Add-Ons/Weapon_Rocket_Launcher/tntExplode.wav";
   description = AudioClose3d;
   preload     = false;
};
datablock AudioProfile(grenadeFireSound)
{
   filename    = "Add-Ons/Weapon_Rocket_Launcher/rocketFire.wav";
   description = AudioClosest3d;
   preload     = true;
};

datablock ParticleData(grenadeFireParticle)
{
   dragCoefficient      = 3;
   gravityCoefficient   = -1;
   inheritedVelFactor   = 1;
   constantAcceleration = 0.0;
   lifetimeMS           = 1000;
   lifetimeVarianceMS   = 500;
   textureName          = "base/data/particles/cloud";
   spinSpeed       = 10.0;
   spinRandomMin    = -150.0;
   spinRandomMax     = 150.0;
   colors[0]     = "1 0.5 0 0.4";
   colors[1]     = "1 0.2 0 0.3";
   colors[2]     = "1 0 0 0";
   sizes[0]      = 0.5;
   sizes[1]      = 0.35;
   sizes[2]      = 0.25;
useInvAlpha = false;
};
datablock ParticleEmitterData(grenadeFireEmitter)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   ejectionVelocity = 0.25;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 90;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "grenadeFireParticle";
};

datablock DebrisData(grenadeDebris)
{
   emitters = "grenadeFireEmitter";

   shapeFile = "base/data/shapes/empty.dts";
   lifetime = 0.8;
   lifetimeVariance = 0.3;
   minSpinSpeed = 0;
   maxSpinSpeed = 1;
   elasticity = 0.3;
   friction = 0.2;
   numBounces = 5;
   staticOnMaxBounce = true;
   fade = true;
   gravModifier = 2;
};

datablock ParticleData(grenadeTrailParticle)
{
   dragCoefficient = 3.0;
   windCoefficient = 0.0;
   gravityCoefficient = 0.0;
   inheritedVelFactor = 0.0;
   constantAcceleration = 0.0;
   lifetimeMS = 600;
   lifetimeVarianceMS = 0;
   spinSpeed = 10.0;
   spinRandomMin = -50.0;
   spinRandomMax = 50.0;
   useInvAlpha = true;
   animateTexture = false;
   textureName = "base/data/particles/thinring";
   colors[0] = "0.75 0.75 0.75 0.9";
   colors[1] = "0.75 0.75 0.75 0.4";
   colors[2] = "1 1 1 0.0";
   sizes[0] = 0.15;
   sizes[1] = 0.25;
   sizes[2] = 0.05;
   times[0] = 0.0;
   times[1] = 0.1;
   times[2] = 1.0;
};

datablock ParticleEmitterData(grenadeTrailEmitter)
{
   ejectionPeriodMS = 15;
   periodVarianceMS = 0;
   ejectionVelocity = 0;
   velocityVariance = 0;
   ejectionOffset = 0;
   thetaMin         = 0.0;
   thetaMax         = 90.0; 
   particles = grenadeTrailParticle;
};

datablock ParticleData(grenadeExplosionParticle)
{
   dragCoefficient = 0.4;
   windCoefficient = 0.0;
   gravityCoefficient = -0.5;
   inheritedVelFactor = 0.2;
   constantAcceleration = 0.0;
   lifetimeMS = 100;
   lifetimeVarianceMS = 15;
   spinSpeed = 10;
   spinRandomMin = -1000.0;
   spinRandomMax = 1000.0;
   useInvAlpha = false;
   animateTexture = false;
   textureName = "base/data/particles/star1";
   colors[0] = "1 0 0 1";
   colors[1] = "1 1 0 0";
   sizes[0] = 25;
   sizes[1] = 50;
};

datablock ParticleEmitterData(grenadeExplosionEmitter)
{
   ejectionPeriodMS = 4;
   periodVarianceMS = 0;
   lifeTimeMS    = 250;
   ejectionVelocity = 25;
   velocityVariance = 5;
   ejectionOffset   = 3;
   thetaMin         = 0;
   thetaMax         = 80;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "grenadeExplosionParticle";
};

datablock ParticleData(grenadeExplosionParticle2)
{
dragCoefficient = 3;
windCoefficient = 0.5;
gravityCoefficient = -0.1;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 2500;
lifetimeVarianceMS = 500;
spinSpeed = 10.0;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
useInvAlpha = false;
animateTexture = false;
textureName = "base/data/particles/cloud";

colors[0] = "1 0,1 0 0.8";
colors[1] = "1 0.5 0 0.6";
colors[2] = "1 0 0 0";
sizes[0] = 5;
sizes[1] = 3.5;
sizes[2] = 5;
};

datablock ParticleEmitterData(grenadeExplosionEmitter2)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   lifetimeMS       = 150;
   ejectionVelocity = 40;
   velocityVariance = 15;
   ejectionOffset   = 0.5;
   thetaMin         = 0;
   thetaMax         = 85;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "grenadeExplosionParticle2";
};

datablock ParticleData(grenadeExplosionParticle3)
{
dragCoefficient = 1;
windCoefficient = 1;
gravityCoefficient = -0.35;
inheritedVelFactor = 0.2;
constantAcceleration = 0;
lifetimeMS = 2500;
lifetimeVarianceMS = 500;
spinSpeed = 10;
spinRandomMin = -200;
spinRandomMax = 200;
useInvAlpha = false;
animateTexture = false;
textureName = "base/data/particles/cloud";

colors[0] = "1 0.5 0 0.8";
colors[1] = "1 0.75 0 0.4";
colors[2] = "1 1 0 0.1";
sizes[0] = 5;
sizes[1] = 3;
sizes[2] = 0;
times[0] = 0;
times[1] = 0.75;
times[2] = 1;
};

datablock ParticleEmitterData(grenadeExplosionEmitter3)
{
   ejectionPeriodMS = 1;
   periodVarianceMS = 0;
   lifetimeMS       = 100;
   ejectionVelocity = 13;
   velocityVariance = 10;
   ejectionOffset   = 1;
   thetaMin         = 0;
   thetaMax         = 87;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "grenadeExplosionParticle3";
};

datablock ExplosionData(grenadeExplosion)
{
   explosionShape = "Add-Ons/Weapon_Rocket_Launcher/explosionSphere1.dts";
   lifeTimeMS = 150;

   particleEmitter = grenadeFireEmitter;
   particleDesnity = 300;
   particleRadius = 12;

   debris = grenadeDebris;
   debrisNum = 30;
   debrisNumVariance = 5;
   debrisPhiMin = 0;
   debrisPhiMax = 360;
   debrisThetaMin = 0;
   debrisThetaMax = 90;
   debrisVelocity = 75;
   debrisVelocityVariance = 10;

   soundProfile = grenadeExplosionSound;

   emitter[0] = grenadeExplosionEmitter;
   emitter[1] = grenadeExplosionEmitter2;
   emitter[2] = grenadeExplosionEmitter3;

   faceViewer     = true;
   explosionScale = "1 1 1";

   shakeCamera = true;
   camShakeFreq = "7.0 8.0 7.0";
   camShakeAmp = "5.0 5.0 5.0";
   camShakeDuration = 1;
   camShakeRadius = 15;

   lightStartRadius = 100;
   lightEndRadius = 25;
   lightStartColor = "1 1 1";
   lightEndColor = "1 1 1";

   impulseRadius = 16;
   impulseForce = 5000;

   radiusDamage = 160;
   damageRadius = 11;
};

//projectile
AddDamageType("GrenadeRadius",'<bitmap:add-ons/Weapon_G36C/CI_grenadeRadius> %1','%2 <bitmap:add-ons/Weapon_G36C/CI_grenadeRadius> %1',1.5,0);

datablock ProjectileData(glrenadeProjectile)
{
   projectileShapeName = "./grenade.dts";
   directDamage        = 0;
   directDamageType  = $DamageType::GrenadeRadius;
   radiusDamageType  = $DamageType::GrenadeRadius;
   impactImpulse    = 1500;
   verticalImpulse   = 100;
   explosion           = grenadeExplosion;
   particleEmitter     = grenadeTrailEmitter;

   brickExplosionRadius = 10;
   brickExplosionImpact = false;
   brickExplosionForce  = 50;
   brickExplosionMaxVolume = 250;
   brickExplosionMaxVolumeFloating = 400;

   muzzleVelocity      = 40;
   velInheritFactor    = 1;

   armingDelay         = 5000;
   lifetime            = 5000;
   fadeDelay           = 5000;
   bounceElasticity    = 0.35;
   bounceFriction      = 0;
   isBallistic         = true;
   gravityMod = 1;
   explodeOnDeath = true;

   hasLight    = false;
};

OSIPR?
And you stole my idea, I'm doing a regular pulse rifle. >:O

Racer's busy working on one.

Aah, but this is going to be a personal one, I guess...


huhwha? I'm not done... Still need an editable weapon.

huhwha? I'm not done... Still need an editable weapon.
Don't give us any of that editing stuff, we want a new weapon.

I can't make a new one.... Not good at it...

Its Done by Racer or StratoFortess too late :D


OSIPR?
And you stole my idea, I'm doing a regular pulse rifle. >:O

Just because the names are similar it doesn't mean he's stealing your idea. The M41A and AR2 are completely different.


As another test, I wanted to edit one of the two-projectile left and right click weapons to be like the HL2 Pulse Rifle. A few questions:
1: The energy ball projectile would work if edited into a weapon, right?
2: Does anybody know of any weapons where the second (right click) fire is easily editible? All of the ones I've found (G36C, Portal Gun, MP7) are second-fired with another DTS file, which I cannot edit (what program? Tourque?)?
I'd appreciate some help, this would be one of my cooler edits, if it were to work.
1. Yes. Use forceRequiredAddOn and give credit, please.
2. Look at the Flak Cannon.