Author Topic: Buffing weapon damage/fire rate?  (Read 1029 times)

How do I edit a weapon's fire rate, damage, and explosive power? I want to make weak weapons stronger.

In for example the Rocket Launcher you have this code in the datablock ExplosionData:
Code: [Select]
   damageRadius = 3;
   radiusDamage = 100;
The damageRadius is how big the explosion is, the radiusDamage is how much damage it does.

Next to the explosion damage, the projectile (datablock ProjectileData) also does directDamage when it directly hits a player:
Code: [Select]
   directDamage        = 30;
For the firerate I am going to use the CrystalStorm, which is about the same as an automatic gun.
To edit the firerate, you need to edit the states of the weapon which can be found in the datablock ShapeBaseImageData:
Code: [Select]
  stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.15;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "reload";
stateTimeoutValue[2]            = 0.1;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;

stateName[3] = "Reload";
stateSequence[3]                = "Reload";
stateTransitionOnTriggerDown[3]  = "Fire";
stateTransitionOnTriggerUp[3]     = "Ready";
stateSequence[3] = "Ready";
State 0 gets called when the player selects the weapon and gets switched to State 1.
When the player fires, it goes to State 2 to fire and depending on the firerate goes to State 3 shortly thereafter.
If in State 3 the player is still holding down the button, it goes back to State 2 to fire an other shot.
If the trigger is released, it goes back to State 1.

You can probably figure out what each variable of the States does by just reading their name.
The one you want is the stateTimeoutValue.
It is the time between each shot, so the lower the number the faster it shoots.

Lots of guns have a much more difficult state sequence.
Especially those with ammo and reload animations.
But as long as you read, you can figure out what they do.

So, what should I edit to make it shoot faster?

The one you want is the stateTimeoutValue.
It is the time between each shot, so the lower the number the faster it shoots.

Thanks.
Is there a way to increase ammo count for weapons (like T+T and Gcat's weapons)