Weapon.ini
This is 'moderately' modified from the Generals files. Firstly, the weapon entries now contain nuggets to define certain areas. For example, where previously you would have used:
Code:
PrimaryDamage = xx.xx
PrimaryDamageRadius = xx.xx
...you now add a DamageNugget to the weapon entry to define the damage caused:
Code:
; DamageNugget
; Damage = 1
; Radius = 0.0
; DelayTime = 0
; DamageType = SLASH
; DamageFXType = SWORD_SLASH
; DeathType = NORMAL
; DamageScalar = 250% NONE +MordorFellBeast +MordorWitchKingOnFellBeast +GondorGwaihir
; End
Definitions:
Damage The damage caused by this weapon
Radius Radius effect of the damage
DelayTime How long to wait before applying the damage
DamageType Cross-referenced with unit armor to set how much damage is actually received by the unit
DamageFXType Sets which Hit animation is played by damaged unit
DeathType Which death type this will induce if it kills the targeted unit
DamageScalar How much to increase the damage when fired at these units (allows fine tuning even if armor has to remain the same)
Another difference is that Projectile weapons no longer contain the projectile data and the damage data in the same weapon entry, for example:
Code:
;------------------------------------------------------------------------------
Weapon LegolasBow
AttackRange = LEGOLAS_BOW_RANGE
WeaponSpeed = 321 ; dist/sec
MinWeaponSpeed = 241
MaxWeaponSpeed = 481 ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
FireFX = FX_RohanArcherBowWeapon
ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
HitPercentage = 100 ;When this weapon is used it will hit exactly 100% of the time.
ScatterRadius = 5.0 ;When this weapon misses it can randomly miss by as much as this distance.
AcceptableAimDelta = 20 ; prevent twitchy reaiming in horde on horde
DelayBetweenShots = LEGOLAS_DELAYBETWEENSHOTS ; time between shots, msec
PreAttackDelay = LEGOLAS_PREATTACKDELAY ; 1467 is the prep time for archer.
PreAttackType = PER_POSITION ; Do the delay each time we attack a new target
FiringDuration = LEGOLAS_FIRINGDURATION ; Duration of the archer firing shot is 500ms.
ClipSize = 1
AutoReloadsClip = Yes
AutoReloadWhenIdle = 1
ClipReloadTime = Min:LEGOLAS_RELOADTIME_MIN Max:LEGOLAS_RELOADTIME_MAX
ContinuousFireOne = 0
ContinuousFireCoast = LEGOLAS_RELOADTIME_MAX
AntiAirborneVehicle = Yes
AntiAirborneMonster = Yes
ProjectileNugget ; Default Arrow
ProjectileTemplateName = GoodFactionArrow
WarheadTemplateName = LegolasBowWarhead
End
End
;-----------------------------------
Weapon LegolasBowWarhead
ProjectileCollidesWith = ALLIES ENEMIES NEUTRAL STRUCTURES WALLS
RadiusDamageAffects = ENEMIES NEUTRALS NOT_SIMILAR
HitStoredTarget = Yes ; Always hits initial target.
DamageNugget ; A basic Nugget that just does damage
Damage = LEGOLAS_BOW_DAMAGE
;DamageScalar = 25000% NONE +MordorMumakil
Radius = 0.0 ; HitStoredTarget means we hurt the person we launched at. And nobody else. So a miss hurts nobody.
DelayTime = 0
DamageType = HERO_RANGED
DamageFXType = GOOD_ARROW_PIERCE
DeathType = NORMAL
End
End
From this we can see that the Bow weapon uses a ProjectileNugget to create the projectile, but does no actual damage
Code:
ProjectileNugget Default Arrow
ProjectileTemplateName = GoodFactionArrow
WarheadTemplateName = LegolasBowWarhead
End
The projectile object is set by ProjectileTemplateName and the weapon fired when this arrow hits in WarheadTemplateName.
Non-Nugget Code - Definitions later...
LeechRangeWeapon
AttackRange
MinimumAttackRange
MeleeWeapon
WeaponSpeed
ProjectileFilterInContainer
MinWeaponSpeed
MaxWeaponSpeed
FireFX
PlayFXWhenStealthed
RadiusDamageAffects
CanFireWhileMoving
;CanFireWhileCharging
DamageDealtAtSelfPosition
HitStoredTarget
ScaleWeaponSpeed
HitPercentage
ScatterRadius
ScatterIndependently
AcceptableAimDelta
DelayBetweenShots
PreAttackDelay
PreAttackRandomAmount
PreAttackType
FiringDuration
RequireFollowThru
OverrideVoiceAttackSound
;OverrideVoiceAttackAirSound
;OverrideVoiceAttackStructureSound
;OverrideVoiceAttackMachineSound
IsAimingWeapon
NoVictimNeeded
ClipSize
AutoReloadsClip
AutoReloadWhenIdle
ClipReloadTime
IdleAfterFiringDelay
HoldAfterFiringDelay
ContinuousFireOne
ContinuousFireCoast
AntiAirborneVehicle
AntiAirborneMonster
PreferredTargetBone
HitPassengerPercentage
CanBeDodged