Zum Hauptinhalt springen

Statistics and Modifiers

Statistics are authored in an abstract UPDA_WeaponStatsBase or its Range, Melee and Throwable subclasses. A master references one through Stats. The concrete subclasses currently add no fields; all stat groups live on the base.

Source: Public/Data/Stats, Public/Data/Weapon/PDA_WeaponStatModificator.h, Public/Data/WeaponStructs.h and Private/Manager/WeaponRuntimeBuilder.cpp.

Stat Groups​

GroupRepresentative fields
MetaStatsEquipTime, movement multipliers
MeleeDamageDamage, HeavyAttackMultiplier
WeaponMeleeRange / runtime MeleeRangeAttackRange, AttackAngle
MeleeTimingsAttackCooldown, WindUpTime
MeleeHandlingStaminaCostLight, StaminaCostHeavy
MeleeImpactKnockbackForce, HitStopDuration
BallisticsDamage, EffectiveRange, MaxRange, MuzzleVelocity, PenetrationPower
FireFireRateRPM, FireWarmupTime, BurstCount, BurstPauseTime
AccuracySpread, SpreadPerShot, SpreadRecovery
RecoilRecoilVertical, RecoilHorizontal, RecoilRandomness, Kickback, KickbackRecovery
HandlingAimDownSightTime, ReloadTime, MoveSpeedMultiplier, SprintOutTime
HeatHeatPerShot, HeatCooldownRate, OverheatThreshold
ReliabilityJamChance
ThrowStatsThrowForce, ThrowCooldown, FuseTime
ExplosionDamageExplosionDamage, ExplosionRadius, DamageFalloffExponent, SelfDamageMultiplier

StatID and WeaponType identify the stat asset. The default JamChance on the base asset is 0.002; the runtime structure starts at 0 before the builder copies the base. Full field defaults are listed in Header Reference.

UPDA_WeaponStatModificator​

The modifier asset contains ModifierID, ModifierTags, Condition, WeaponModifierFilter, bCanStack, MaxStacks, Duration and the Meta/Melee/Throw/Explosion/Damage/Fire/Accuracy/Recoil/Reload/Ammo modifier groups.

Part.StatModifiers contains hard references. The runtime stat pass starts from Master.Stats, resolves the registered build's part assets, merges Master.WeaponTags with all Part.PartTags, then collects modifiers in build-part and modifier-array order.

Both Condition and WeaponModifierFilter must pass exact required/blocked tag checks against that merged effective-tag container. Empty filters pass. ModifierTags, Duration, bCanStack and MaxStacks are not enforced by this calculation pass.

Calculation Order​

For fields with additive and multiplicative terms, the builder applies each modifier sequentially:

value = (value + modifier.Add) * modifier.Mult

Example: base damage 30, modifier A (+10, ×1.2), then modifier B (+5, ×1) yields 53. Swapping them yields 54. Keep modifier ordering intentional; this is not a global sum-then-product calculation.

BurstCountAdd is rounded to an integer and added. HeatPerShot uses Ammo.HeatAdd; HeatCooldownRate uses Ammo.HeatDissipationMult. Ammo.MagazineSizeAdd is declared but is not applied to FWeaponRuntimeStats, which has no magazine-size field.

Normalization​

NormalizeStats runs after each modifier and at the end. It clamps most magnitudes/timings to zero or above, AttackAngle to 0–180, FireRateRPM and BurstCount to at least 1, JamChance to 0–1, and MaxRange to at least EffectiveRange.

Runtime Scope​

The calculated FWeaponRuntimeStats is replicated on the actor. It is configuration-derived data, not current ammo, reserve ammo or durability.

The fire loop uses FireRateRPM for shot intervals. Several other authored fields describe values for extension without a completed consumer in the present routed gameplay. Burst counters are component values initialized to 3; do not assume every Fire stat is fully connected. Implement timed modifiers, stack policy, damage, recoil and reserve-ammunition behavior where needed.