Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Scourge of Ages on September 05, 2010, 02:37:19 am

Title: Calculating weapon damage
Post by: Scourge of Ages on September 05, 2010, 02:37:19 am
In my weapon .tbm, I have three weapons, a machine gun, a cycle cannon, and a standard cannon. When trying to calculate the damage potentials, I found that the machine gun had ridiculously more power than the cannon, which was weird.

My question: Is damage calculated by "bullet" or by pull of the trigger, or by second?

Here's the weapons:
Code: [Select]
Machine Gun
$Fire Wait:           0.15
$Damage:            8

Cannon (cycle - designed for a three point weapon, the secondary slot on an Ursa)
$Fire Wait:           0.9
$Damage:            20

Cannon (standard)
$Fire Wait:           0.3
$Damage:            17
Logic would seem dictate that I gimp the machine gun to bring it in line more with the cannons.
EDIT: Oh yeah, I intended for both versions of the cannon to have roughly the same total DPS.
Title: Re: Calculating weapon damage
Post by: Shivan Hunter on September 05, 2010, 03:46:35 am
Damage is calculated per 'bullet'. A weapon that does 5 damage on a two-firingpoint bank will do 10 on a 4-firingpoint bank.

Just going by these values, the DPS of one bullet (damage per bullet over time) of the Machine Gun is about the same as that of the Cannon (standard) and ridiculously more than that of the Cannon (cycle).

The cycle flag changes the time between individual shots so as to keep the time between total shots- and thus DPS- constant.

To balance a normal weapon and a cycle weapon equally, they should have the same cooldown and damage values (the cycle might do a bit less damage to compensate for the fact that slower-firing weapons are difficult to aim).
Title: Re: Calculating weapon damage
Post by: Trivial Psychic on September 05, 2010, 07:40:59 am
What are the different shield, hull, and subsystem damage values... as these can have an effect as well.
Title: Re: Calculating weapon damage
Post by: esarai on September 05, 2010, 07:50:16 am
Those values are sort of a damage scaler in percent.  Multiply the base damage of the weapon by the shield, hull and subsystem values to find how much damage will be done against each.
Title: Re: Calculating weapon damage
Post by: Timerlane on September 05, 2010, 11:03:22 am
FWIW, I'd tend to argue that 'machine gun' cannons should do at least somewhat more DPS, due to the fact that it takes more precision to maintain a tracking shot over time(especially if the cannon has a lower-end shot velocity) than to line up a snap shot and fire a single salvo of high single-shot power cannon.

It depends on what you intend to shoot it at, I suppose. For an example, I think the Balor's fun for the dakka, but if I'm trying to kill a Fury-AI Dragon, which I may only see for a second or two at a time as it continually circles me, I'd rather blast it with a full salvo of Prom-S than try to keep it in the exact same spot in a cycle-stream.

Cont'd: Also, maintaining a tracking shot over time forces a somewhat inflexible flight pattern(thinking particularly if you're under fire), as you basically have to follow your opponent perfectly in order to do the same damage over time as the single-shot power cannon can, though the latter would have the option of jinking in between shots without worrying about affecting its damage rate very much.
Title: Re: Calculating weapon damage
Post by: Aardwolf on September 05, 2010, 01:35:05 pm
Those values are sort of a damage scaler in percent.  Multiply the base damage of the weapon by the shield, hull and subsystem values to find how much damage will be done against each.

Not 'percent' at all. It's a straight coefficient, no 100's or 0.01's involved whatsoever.
Title: Re: Calculating weapon damage
Post by: Scourge of Ages on September 05, 2010, 03:04:29 pm
All the weapons have the same hull/shield/subsystem factors, so I just left those out here. That part seems to be pretty straightforward.

So theoretically, if I set the cannons up like this:
Code: [Select]
Cannon A (cycle - two points)
$Fire Wait:           0.3
$Damage:            20

Cannon B (standard - two points)
$Fire Wait:           0.3
$Damage:            20

Cannon C (cycle - three points)
$Fire Wait:           0.3
$Damage:            20
Cannons A and B would do the same DPS (versus a stationary target), while cannon 3 would do 50% more?

And to clarify, is the two-point Cannon B 20 damage per trigger pull, or 20 damage per bullet for 40 damage per trigger?
Title: Re: Calculating weapon damage
Post by: Droid803 on September 05, 2010, 03:10:15 pm
Yes.
Cycle does the same damage per firepoint per second as a regular weapon.

In other words, having the cycle tag does not change damage output. At all. Only how the damage is outputted.