1 |
[b]TL;DR:[/b] Scorcher damage decreases linearly with range to near-zero at max range. I don't think flamethrower weapons have damage fall-off at range.
|
1 |
[b]TL;DR:[/b] Scorcher damage decreases linearly with range to near-zero at max range. I don't think flamethrower weapons have damage fall-off at range.
|
2 |
\n
|
2 |
\n
|
3 |
--
|
3 |
--
|
4 |
\n
|
4 |
\n
|
5 |
As best I can tell the fallOffRate weapon parameter has to do with visuals, not weapon damage.
|
5 |
As best I can tell the fallOffRate weapon parameter has to do with visuals, not weapon damage.
|
6 |
\n
|
6 |
\n
|
7 |
The relevant parameters for Scorcher seem to be:
|
7 |
The relevant parameters for Scorcher seem to be:
|
8 |
https://github.com/ZeroK-RTS/Zero-K/blob/master/units/vehraid.lua#L99-L101
|
8 |
https://github.com/ZeroK-RTS/Zero-K/blob/master/units/vehraid.lua#L99-L101
|
9 |
[quote]dynDamageExp = 1,
|
9 |
[quote]dynDamageExp = 1,
|
10 |
dynDamageInverted = false,
|
10 |
dynDamageInverted = false,
|
11 |
dynDamageRange = 270,[/quote]
|
11 |
dynDamageRange = 270,[/quote]
|
12 |
Pyro
and
commander
flamethrower
leave
these
as
default
and
do
not
have
damage
fall-off.
At
least
not
using
this
mechanism.
|
12 |
Pyro
and
commander
flamethrower
leave
these
as
default
and
do
not
have
damage
fall-off.
At
least
not
using
this
mechanism.
Shotguns,
for
example,
do
not
use
this
mechanism
but
not
all
projectiles
will
necessarily
hit
a
target
at
max
range,
so
there
is
more
than
one
way
that
a
weapon
may
happen
to
do
less
damage
at
range.
|
13 |
Also note
|
13 |
Also note
|
14 |
[quote]range = 262,[/quote]
|
14 |
[quote]range = 262,[/quote]
|
15 |
\n
|
15 |
\n
|
16 |
The corresponding definitions in the Spring engine:
|
16 |
The corresponding definitions in the Spring engine:
|
17 |
https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/WeaponDef.cpp#L151-L154
|
17 |
https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/WeaponDef.cpp#L151-L154
|
18 |
[quote]WEAPONTAG(bool, dynDamageInverted, damages.dynDamageInverted).defaultValue(false).description("If true the damage curve is inverted i.e. the weapon does more damage at greater ranges as opposed to less.");
|
18 |
[quote]WEAPONTAG(bool, dynDamageInverted, damages.dynDamageInverted).defaultValue(false).description("If true the damage curve is inverted i.e. the weapon does more damage at greater ranges as opposed to less.");
|
19 |
WEAPONTAG(float, dynDamageExp, damages.dynDamageExp).defaultValue(0.0f).description("Exponent of the range-dependent damage formula, the default of 0.0 disables dynamic damage, [b][u]1.0 means linear scaling[/u][/b] , 2.0 quadratic and so on.");
|
19 |
WEAPONTAG(float, dynDamageExp, damages.dynDamageExp).defaultValue(0.0f).description("Exponent of the range-dependent damage formula, the default of 0.0 disables dynamic damage, [b][u]1.0 means linear scaling[/u][/b] , 2.0 quadratic and so on.");
|
20 |
WEAPONTAG(float, dynDamageMin, damages.dynDamageMin).defaultValue(0.0f).description("The minimum floor value that range-dependent damage can drop to.");
|
20 |
WEAPONTAG(float, dynDamageMin, damages.dynDamageMin).defaultValue(0.0f).description("The minimum floor value that range-dependent damage can drop to.");
|
21 |
WEAPONTAG(float, dynDamageRange, damages.dynDamageRange).defaultValue(0.0f).description("If set to non-zero values the weapon will use this value in the range-dependant damage formula instead of the actual range.");[/quote]
|
21 |
WEAPONTAG(float, dynDamageRange, damages.dynDamageRange).defaultValue(0.0f).description("If set to non-zero values the weapon will use this value in the range-dependant damage formula instead of the actual range.");[/quote]
|
22 |
\n
|
22 |
\n
|
23 |
The actual function which applies these definitions seems to be
|
23 |
The actual function which applies these definitions seems to be
|
24 |
https://github.com/spring/spring/blob/develop/rts/Sim/Misc/DamageArray.cpp#L77
|
24 |
https://github.com/spring/spring/blob/develop/rts/Sim/Misc/DamageArray.cpp#L77
|