Weapon ODFs
Posted: Sun Dec 11, 2005 10:35 am
Edit: As I said in the original post, I'm looking at weapon ODFs in order to make a "realism" mod. Since then I've found out most of what I need to know, and the gaps aren't particularly important for what I'm doing. I've posted my findings here for reference, in case anyone else finds them useful or interesting. I've concentrated on the stuff that determines how the weapon performs. There are other values which control sound and graphics which I'm not bothered about at the moment.
Thanks to everyone who posted replies. Your suggestions were useful and pointed me in the right direction. I've incorporated some of your information into the summary below. It should be obvious from the replies who can take credit for what.
Edit again: I've now added stuff about grenades. I still haven't looked at vehicles.
WEAPON ODF:
TargetEnemy
TargetNeutral
TargetFriendly
TargetPerson
TargetAnimal
TargetDroid
TargetVehicle
TargetBuilding
//These control what kind of targets missile launchers can lock onto. They also tell the AI what it should fire at with the selected weapon. If a target comes into range which this weapon can't target, bot will change to another weapon which can, if one is available. 1=can target; 0=can't.
//Also seems to be relationship between damage of weapon and hitpoints of target. If ratio between hitpoints of target and damage weapon can do to that target is 100:1 or more, bot will completely ignore target.
//Homing depends on weapon class being "launcher" and ordnance class being "missile". If weapon class is not launcher, lock on sound and graphics will not appear, but projectile will still home if ordnance class is missile.
MinRange
OptimalRange
MaxRange
//Tells AI bots when to use weapons. Independent of actual range (calculated by Velocity * LifeSpan in ordnance ODF). Limited by visual range of bot (can't see infantry at more than 64 metres, but can see vehicles further away. Possibly depends on size. Doesn't seem to be influenced by AISizeType). If within visual range, bot will always open fire at MaxRange even if this is out of actual range and has no effect. If target comes within MinRange bot will stop using weapon and switch to another if available. No evidence that OptimalRange has any influence.
LockOnRange
LockTime
LockOnAngle
//Lock-on for homing weapons (and possibly console auto-aim as well). LockOnRange seems to be independent of MaxRange and actual range.
ZoomMin // magnification for sight, first click
ZoomMax // magnification for sight, second click (if different from above)
ZoomRate// Rate at which scope zooms. If set to 0.0, first click turns scope on at minimum magnification and second click takes it straight to maximum. If set at mroe than 0, first click turns scope on at minimum magnification and second click turns it off. While it is on, forward and back keys can be used to zoom in and out at the rate specified.
YawSpread // horizontal deviation from aim (negative=right, positive=left)
PitchSpread // vertical deviation from aim
//These two spread values affect every shot including the first one. Spread is random up to the maximum specified above. Number seems to represent maximum deviation in metres at a range of 64 metres.
SpreadPerShot //cumulative spread which increases with each shot in a fully automatic burst. Not same units as other spread/patterns. 2 seems to be roughly equivalent to about 1m spread in 64m.
SpreadRecoverRate //presumably how fast weapon recovers from cumulative spread. Not sure exactly what the number means, but usually set at 4.8
SpreadThreshold //Determines after how many shots the SpreadPerShot kicks in. If set to 0, spread will affect second shot (first shot is never affected). Hard to tell exactly what values above 0 mean.
SpreadLimit //upper limit of cumulative spread. Probably uses same units as SpreadPerShot.
StandStillSpread //no effect
StandMoveSpread //random spread all directions, 1m in 64m
CrouchStillSpread //no effect
CrouchMoveSpread //random spread all directions, 1m in 64m
ProneStillSpread //no effect
ProneMoveSpread //not used: can't move and fire when prone
KickStrength //Self-explanatory. Not sure what units or maximum value are, but seems to be per shot, so will be multiplied for a salvo with more than one shot. Only found in some weapon ODFs (eg sniper rifle) but seems like it can be added to any weapon.
KickBuildup //Don't know what this does, if anything. Not always found with KickStrength. Only seen it in bowcaster so far.
KickSpread //Not sure what this does. Possibly has no effect, or needs to be combined with some other value. Found it in bowcaster ODF.
SpreadRecover //Not sure about this either. Seems to be associated with KickSpread, again found in bowcaster.
RoundsPerClip
ReloadTime
ShotDelay
//all self-explanatory
TriggerSingle //0= fully automatic; 1=semi-automatic
MaxPressedTime //controls charge for weapons like bowcaster. 0.0 means no charge.
NextCharge //determines effect of charge for specified time. Can have several NextCharge statements, followed by lines pointing to different ordnance odf, adding shots to salvo, specifying shot pattern/spread etc.
//Most weapom classes can have charge, but it looks like "launcher" class can't.
SalvoCount //number of salvos per trigger press
ShotsPerSalvo //number of simultaneous shots per salvo. Defaults to 1 if value not specified
SalvoDelay //delay between salvos in seconds
InitialSalvoDelay //delay from trigger press to first salvo
SalvoTime //can't tell what this does. Usually set to 0
ShotPatternCount
ShotPatternPitchYaw
//Similar to first kind of Spread, but you can specify exact pitch and yaw for each individual shot rather than it being random.
//Pitch and Yaw seem to be expressed as metres deviation per 64 metres travelled (roughly). Spread Pitch and Yaw, and stance spread appear to use the same units (hard to be precise because of randomness).
OrdnanceName //points to ord.odf file for weapon
FirePointName //hardpoint where projectile appears to come from
ChargeRateLight
MaxChargeStrengthLight
ChargeDelayLight
ChargeRateHeavy
MaxChargeStrengthHeavy
ChargeDelayHeavy
//no effect, even with charge weapons like bowcaster. Charge is determined by MaxPressedTime
RecoilLengthLight
RecoilLengthHeavy
RecoilStrengthLight
RecoilStrengthHeavy
RecoilDecayLight
RecoilDecayHeavy
//Probably not used (commented out in some files). Could be for vibrating game controllers.
ShotElevate //For grenade class, sends the grenade higher than aim point (contributes to curve, along with gravity). Has no effect on "cannon" class
ORDNANCE ODF:
LifeSpan //lifespan of projectile in seconds. When time expires, it will disappear
Velocity //speed of projectile in metres per second
//actual range of weapon is calculated by multiplying LifeSpan and Velocity (divide by 8 to get number of ZE squares). It has absolutely nothing to do with MaxRange value in weapon ODF.
Gravity //how much projectile is affected by gravity. 1.0 is normal. Even laser bolts are affected. Normally they move too fast for it to make a difference, but if you slow them down you can see them falling. Set to 0.0 to make them immune to gravity.
MaxDamage //damage done to target when hit. Modified by Scale for target type.
VehicleScale
ShieldScale
PersonScale
DroidScale
BuildingScale
//MaxDamage is multiplied by this figure to get actual damage done to target of each type. 0.0 means weapon cannot damage this type at all. Recharge droids seem to be Building type (Edit: not Person as I said before), not Droid type.
ORDNANCE ODF (GRENADES):
ClassLabel //Ordnance class can be "shell" or "sticky". If in "sticky" class, does not necessarily stick to anything - has values specifying whether it sticks to each target type (Person, Vehicle etc). "sticky" class grenades have delayed explosion, whereas "shell" class explodes on impact.
ExplosionExpire //points to explosion ODF file to use when grenade expires. Used by sticky class, which always explodes after delay and never on impact. Also used by shell class: will explode at end of LifeSpan if it doesn't hit anything. If not specified will just disappear on expiry.
ExplosionImpact //points to explosion ODF file to use when grenade hits something. Seems to be only used by shell class, which always explodes on impact and never after delay. If not specified will just disappear on impact.
LifeSpan //for "sticky" class determines delay from coming to rest until explosion. Doesn't affect range (unlike LifeSpan * Velocity for "bolt" class). For "shell" class determines time at which the grenade explodes if it doesn't hit anything (eg if gravity set to 0, it will never hit the ground!). If not specified for "shell" seems to default to about 3 to 3.5 seconds, but "sticky" can be longer.
Gravity //determines effect of gravity/steepness of ballistic curve. If set to 0, grenade will never fall to earth.
Rebound //shouldn't affect shell as always explode on impact. Can't tell how it affects sticky. Range of values from 0 to 1 seems to produce same bounce effect.
Friction //can't tell what it does, if anything. Possibly controls how far sticky grenades will roll after landing.
Damage //damage done by grenade on impact, regardless of explosion. eg if a sticky bounces off something it will take this much damage, (modified by Scale for target type as with bolt).
StickPerson etc //one for each target type. Recharge droids are Building, not Droid. When destroyed, they are BuildingDead
EXPLOSION ODF:
Damage //damage caused by explosion. Modified by Scale as usual
DamageRadiusInner //models within this radius (metres) take full damage
DamageRadiusOuter //models within this radius (metres) take half damage
Push //force of explposion which throws models within range. Not distance in metres.
PushRadiusInner //models within this radius (metres) take full push
PushRadiusOuter //models within this radius (metres) take half push
Shake //strength of vibration caused by explosion. Seems to be mostly cosmetic (apart from disrupting aim)
ShakeLength //duration of above in seconds
ShakeRadiusInner //radius for full shake
ShakeRadiusOuter //radius for half shake
Thanks to everyone who posted replies. Your suggestions were useful and pointed me in the right direction. I've incorporated some of your information into the summary below. It should be obvious from the replies who can take credit for what.
Edit again: I've now added stuff about grenades. I still haven't looked at vehicles.
WEAPON ODF:
TargetEnemy
TargetNeutral
TargetFriendly
TargetPerson
TargetAnimal
TargetDroid
TargetVehicle
TargetBuilding
//These control what kind of targets missile launchers can lock onto. They also tell the AI what it should fire at with the selected weapon. If a target comes into range which this weapon can't target, bot will change to another weapon which can, if one is available. 1=can target; 0=can't.
//Also seems to be relationship between damage of weapon and hitpoints of target. If ratio between hitpoints of target and damage weapon can do to that target is 100:1 or more, bot will completely ignore target.
//Homing depends on weapon class being "launcher" and ordnance class being "missile". If weapon class is not launcher, lock on sound and graphics will not appear, but projectile will still home if ordnance class is missile.
MinRange
OptimalRange
MaxRange
//Tells AI bots when to use weapons. Independent of actual range (calculated by Velocity * LifeSpan in ordnance ODF). Limited by visual range of bot (can't see infantry at more than 64 metres, but can see vehicles further away. Possibly depends on size. Doesn't seem to be influenced by AISizeType). If within visual range, bot will always open fire at MaxRange even if this is out of actual range and has no effect. If target comes within MinRange bot will stop using weapon and switch to another if available. No evidence that OptimalRange has any influence.
LockOnRange
LockTime
LockOnAngle
//Lock-on for homing weapons (and possibly console auto-aim as well). LockOnRange seems to be independent of MaxRange and actual range.
ZoomMin // magnification for sight, first click
ZoomMax // magnification for sight, second click (if different from above)
ZoomRate// Rate at which scope zooms. If set to 0.0, first click turns scope on at minimum magnification and second click takes it straight to maximum. If set at mroe than 0, first click turns scope on at minimum magnification and second click turns it off. While it is on, forward and back keys can be used to zoom in and out at the rate specified.
YawSpread // horizontal deviation from aim (negative=right, positive=left)
PitchSpread // vertical deviation from aim
//These two spread values affect every shot including the first one. Spread is random up to the maximum specified above. Number seems to represent maximum deviation in metres at a range of 64 metres.
SpreadPerShot //cumulative spread which increases with each shot in a fully automatic burst. Not same units as other spread/patterns. 2 seems to be roughly equivalent to about 1m spread in 64m.
SpreadRecoverRate //presumably how fast weapon recovers from cumulative spread. Not sure exactly what the number means, but usually set at 4.8
SpreadThreshold //Determines after how many shots the SpreadPerShot kicks in. If set to 0, spread will affect second shot (first shot is never affected). Hard to tell exactly what values above 0 mean.
SpreadLimit //upper limit of cumulative spread. Probably uses same units as SpreadPerShot.
StandStillSpread //no effect
StandMoveSpread //random spread all directions, 1m in 64m
CrouchStillSpread //no effect
CrouchMoveSpread //random spread all directions, 1m in 64m
ProneStillSpread //no effect
ProneMoveSpread //not used: can't move and fire when prone
KickStrength //Self-explanatory. Not sure what units or maximum value are, but seems to be per shot, so will be multiplied for a salvo with more than one shot. Only found in some weapon ODFs (eg sniper rifle) but seems like it can be added to any weapon.
KickBuildup //Don't know what this does, if anything. Not always found with KickStrength. Only seen it in bowcaster so far.
KickSpread //Not sure what this does. Possibly has no effect, or needs to be combined with some other value. Found it in bowcaster ODF.
SpreadRecover //Not sure about this either. Seems to be associated with KickSpread, again found in bowcaster.
RoundsPerClip
ReloadTime
ShotDelay
//all self-explanatory
TriggerSingle //0= fully automatic; 1=semi-automatic
MaxPressedTime //controls charge for weapons like bowcaster. 0.0 means no charge.
NextCharge //determines effect of charge for specified time. Can have several NextCharge statements, followed by lines pointing to different ordnance odf, adding shots to salvo, specifying shot pattern/spread etc.
//Most weapom classes can have charge, but it looks like "launcher" class can't.
SalvoCount //number of salvos per trigger press
ShotsPerSalvo //number of simultaneous shots per salvo. Defaults to 1 if value not specified
SalvoDelay //delay between salvos in seconds
InitialSalvoDelay //delay from trigger press to first salvo
SalvoTime //can't tell what this does. Usually set to 0
ShotPatternCount
ShotPatternPitchYaw
//Similar to first kind of Spread, but you can specify exact pitch and yaw for each individual shot rather than it being random.
//Pitch and Yaw seem to be expressed as metres deviation per 64 metres travelled (roughly). Spread Pitch and Yaw, and stance spread appear to use the same units (hard to be precise because of randomness).
OrdnanceName //points to ord.odf file for weapon
FirePointName //hardpoint where projectile appears to come from
ChargeRateLight
MaxChargeStrengthLight
ChargeDelayLight
ChargeRateHeavy
MaxChargeStrengthHeavy
ChargeDelayHeavy
//no effect, even with charge weapons like bowcaster. Charge is determined by MaxPressedTime
RecoilLengthLight
RecoilLengthHeavy
RecoilStrengthLight
RecoilStrengthHeavy
RecoilDecayLight
RecoilDecayHeavy
//Probably not used (commented out in some files). Could be for vibrating game controllers.
ShotElevate //For grenade class, sends the grenade higher than aim point (contributes to curve, along with gravity). Has no effect on "cannon" class
ORDNANCE ODF:
LifeSpan //lifespan of projectile in seconds. When time expires, it will disappear
Velocity //speed of projectile in metres per second
//actual range of weapon is calculated by multiplying LifeSpan and Velocity (divide by 8 to get number of ZE squares). It has absolutely nothing to do with MaxRange value in weapon ODF.
Gravity //how much projectile is affected by gravity. 1.0 is normal. Even laser bolts are affected. Normally they move too fast for it to make a difference, but if you slow them down you can see them falling. Set to 0.0 to make them immune to gravity.
MaxDamage //damage done to target when hit. Modified by Scale for target type.
VehicleScale
ShieldScale
PersonScale
DroidScale
BuildingScale
//MaxDamage is multiplied by this figure to get actual damage done to target of each type. 0.0 means weapon cannot damage this type at all. Recharge droids seem to be Building type (Edit: not Person as I said before), not Droid type.
ORDNANCE ODF (GRENADES):
ClassLabel //Ordnance class can be "shell" or "sticky". If in "sticky" class, does not necessarily stick to anything - has values specifying whether it sticks to each target type (Person, Vehicle etc). "sticky" class grenades have delayed explosion, whereas "shell" class explodes on impact.
ExplosionExpire //points to explosion ODF file to use when grenade expires. Used by sticky class, which always explodes after delay and never on impact. Also used by shell class: will explode at end of LifeSpan if it doesn't hit anything. If not specified will just disappear on expiry.
ExplosionImpact //points to explosion ODF file to use when grenade hits something. Seems to be only used by shell class, which always explodes on impact and never after delay. If not specified will just disappear on impact.
LifeSpan //for "sticky" class determines delay from coming to rest until explosion. Doesn't affect range (unlike LifeSpan * Velocity for "bolt" class). For "shell" class determines time at which the grenade explodes if it doesn't hit anything (eg if gravity set to 0, it will never hit the ground!). If not specified for "shell" seems to default to about 3 to 3.5 seconds, but "sticky" can be longer.
Gravity //determines effect of gravity/steepness of ballistic curve. If set to 0, grenade will never fall to earth.
Rebound //shouldn't affect shell as always explode on impact. Can't tell how it affects sticky. Range of values from 0 to 1 seems to produce same bounce effect.
Friction //can't tell what it does, if anything. Possibly controls how far sticky grenades will roll after landing.
Damage //damage done by grenade on impact, regardless of explosion. eg if a sticky bounces off something it will take this much damage, (modified by Scale for target type as with bolt).
StickPerson etc //one for each target type. Recharge droids are Building, not Droid. When destroyed, they are BuildingDead
EXPLOSION ODF:
Damage //damage caused by explosion. Modified by Scale as usual
DamageRadiusInner //models within this radius (metres) take full damage
DamageRadiusOuter //models within this radius (metres) take half damage
Push //force of explposion which throws models within range. Not distance in metres.
PushRadiusInner //models within this radius (metres) take full push
PushRadiusOuter //models within this radius (metres) take half push
Shake //strength of vibration caused by explosion. Seems to be mostly cosmetic (apart from disrupting aim)
ShakeLength //duration of above in seconds
ShakeRadiusInner //radius for full shake
ShakeRadiusOuter //radius for half shake