MTW Projectile Stats

From Totalwar.org
Jump to: navigation, search

Introduction

PROJECTILESTATS.TXT is the file used to describe the capabilities of the various missile weapons in MTW. Units in the UNIT_PROD.TXT file reference one of these weapons if they are capable of missile fire. This is done with the PROJECTILE_TYPE field in the UNIT_PROD.TXT files. PROJECTILE_TYPE(NONE) denotes no missile weapon, while PROJECTILE_TYPE(SBOW) would give a unit the Shortbow missile capability. UNIT_PROD.TXT also has an AMMO field, to denote the number of shots each model has. The rest of the missile statistics are kept in the PROJECTILESTATS.TXT file.

This file also has entries for "unmanned" weapons seen in castle assaults. "arrow_from_model", "bolt_from_model", and "bullet_from_model" are used to describe to castle defence projectiles. "torch" becomes the weapon a unit uses when assaulting a fortress gate, and "boiling_oil" describes the projectile used on said gate-crashers.

The rows in PROJECTILESTATS.TXT are ordered to match an internal enumerated type, which matches up to PROJECTILE_TYPE in UNIT_PROD.TXT. So the rows should not be changed, and new rows may not be added.

Field Explanations

Name

The name of the weapon being described. Fairly self-explanatory. "mountedlongbow" is used to describe the bow used by cavalry. "ninjastar" is unused in MTW.

Length

This is possibly the length of the projectile, not sure.

Freq

Not used.

Range

The range of the missile weapon. The value is multiplied by 0.02 to give the range in meters. This is the range at which the missile cursor will turn green when placed over a target.

Velocity

This is the speed of the projectile. This value also gives the true range of the weapon, as it affects the trajectory of the projectile. (Velocity ^ 2) / 4, or something like that.

Accuracy

Accuracy is the chance that the missile will hit it's intended target. This gets adjusted by the unit's valour and the range to target.

Lethality

This value is multiplied against the base kill chance (0.18) to determine the percent chance to wound. Can be greater than 1, but (lethality * 0.18) should not exceed 1.

Power

The amount of hit points to a man or structure caused by a successful hit.

ArmourMod

ArmourMod is multiplied against the armour rating of the target to adjust the armour's ability to withstand the shot.

ReloadTime

The number of frames (seconds?) it take to reload after a shot. Not used by artillery.

ShootImmediately

If true, a unit can fire immediately once the target is selected and in range. Generally this applies to triggered weapons like crossbows and guns.

ReloadMoving

If true, time the unit spends moving can be applied to the ReloadTime value in between shots. This is generally true for thrown weapons only.

IsGun

Set to true if the weapon is a gunpowder weapon. This is used to shoot in revolving ranks.

TryHigh

Allows a weapon to be shot in a high arc, if the direct fire path is obstructed.

FireInRain

If true, the weapon may be fired while raining. Personal firearms and grenades are useless in rain.

MinAngle

This shows the lowest firing angle a shot can be made at. Personal missile weapons can generally fire at -20 degrees, while artillery is more limited and may even need to arc the shot.

MaxAngle

The maximum firing angle of a shot. Artillery like catapults and mortars can fire at very high angles.

AccColDec

Set to true, this projectile will use accurate collision detection. Should be used for artillery only, as it's computationally expensive.

LaunchFX

The sound effect used when shooting. This is used by artillery pieces only. The possible values are internal to the engine (i.e. not moddable).

Model

The graphical model of the missile weapon. This is used by artillery pieces only.

bounce

Denotes whether the projectile can bounce on impact. This is used by artillery pieces only.

minCrew

The minimum number of crew members needed to fire a weapon. Used by artillery pieces only.

numSoldiers

The number of crew members needed to fire an artillery piece at full effectiveness. Effectiveness = Max crew / (numSoldiers - minCrew)

TurnSpeed

The traversing speed of an artillery piece. A value of zero means the piece cannot be turned.

NotUsed

Set to 80 for artillery pieces, 0 for personal missile weapons. No idea.

ArtilleryReload

Reload time for artillery pieces. 10 seconds of game time equals a value of 140 here.

FieldOfFire

The angle of fire possible of an artillery piece without traversing the weapon. If TurnSpeed is 0, this is the effective firing arc of the weapon.

NumSafeShots

Number of shots an artillery piece can shoot before the weapon becomes dangerous.

Safety

Percentage chance after NumSafeShots for a misfire.

HitGround, HitTree, HitSoldier, HitWood, HitStone

Determines what a projectile will do when it hits the ground, trees, men, wood, or stone. The options are REMOVE, PENETRATE, BOUNCE, and EXPLODE.

BlastRadius

The radius of a projectile blast. BlastRadius * 0.02 = radius in meters.

BlastKillChance

The chance to kill a target caught in the blast radius.

AimAdjust

Adjustment of the aim point from a standard aim point. Set for ballistas only, maybe due to low angle shot?

CustomBattleCost

Florin cost removed from the unit before unit upgrades are figured in. This is used for custom and multiplayer.

FlamingProjectile

Used to determine what projectile will be fired against wooden structures (if flaming projectiles are possible). This value will point to another projectile type (FLAMING_ARROW, FLAMING_ROCK, FLAMING_TREBUCHET, FLAMING_MANGONEL).

IsFlaming

Set to true if this projectile is flaming. Allows for secondary projectile types for against wooden structures.

Kill Chance

Accuracy provides the percentage chance to hit the target. A missed shot may still hit someone/somewhere else. The ArmourMod modifier is applied against the target's armour value, an ArmourMod value of 0 ignores armour, a value of 1 does no armour modification, while a 0.5 would halve the target's armour value. The Lethality is multiplied against the base kill chance (0.18) to determine if the shot causes wounds. The Power will determine the number of hit points of damage done by the projectile.

(Need to verify this section) Not sure how the target's modified armour becomes part of the equation. Does it lower the base kill chance? A units valour level affects the accuracy value only, a higher valour increases the accuracy by TBD.

Modding PROJECTILESTATS.TXT

The file should be modded with the GnomeEditor (TBD provide link to Org files here). For MTW, only 1 new weapon can be created, this should use the "ninjastar" (use PROJECTILE_TYPE(NINJ) in UNIT_PROD.TXT) row that is unused. Care should be taken when modifying existing missile stats so as to not unbalance the game.

Links

TBD - Add links to GnomeEditor