MTW Unit Prod File

From Totalwar.org
Jump to: navigation, search

The unit_prod file for a campaign describes the cost, requirements, stats, and abilities of the units available within the campaign. The location of the unit_prod file for a specific campaign is specified the startpos file for the campaign, on the key line "Prodfiles::". For the main campaign, the unit_prod file is "Medieval - Total War\CRUSADERS_UNIT_PROD11.TXT", for the Viking Invasion campaign, the unit_prod file is "Medieval - Total War\VIKINGS_UNIT_PROD.TXT".

This file, along with the build_prod.txt file, essentially define the tech tree for the chosen campaign.

Contents

Column names and effects

These are the columns described in the unit_prod file.

Name/Identifier

This is the internal name of the unit. The location files may give the unit a different name for the player within the game, but the unit is referred to in the startpos files with this name.

Unit Type

Different capabilities based on the entries. Hardcoded abilities with ships and agents. INFANTRY, ARTILLERY, CAVALRY, MOUNT, SHIP, ASSASSIN, SPY, EMISSARY, BISHOP, CARDINAL, INQUISITOR, GRAND_INQUISITOR, PRIEST, ORTHODOX_BISHOP, MULLAH, ULAMA, PRINCESS, CRUSADE, JIHAD

Cost Integer

The recruitment cost of the unit at the default size.

Support Cost Integer

Support cost factor of the unit. The total support cost per year will be this value, times the number of men in the unit, divided by 8, rounded down.

Production Time

Number of turns it takes to build the unit. When playing on Huge sizes, if the unit size is scaleable (see below) then this time is doubled.

Starting Honour

Honour adjustment used for balancing. In the vanilla game, this is used to decrease the starting accuracy of certain siege weapons.

Unit Base Strength

A value used when determining the results of auto-calc'ed battles, retreat decisions, and morale adjustments.

Number of Men

Number of men in the unit when recruited at default size.

Honour Step Value

Number of kills necessary to level up valour for each man. Used to balance the valour leveling for certain units.

General Candidate

Used to determine the chances of a general present in unit. Used to keep army generals from appearing in the artillery crews. PREFERRED, OK, or DISCOURAGED.

Rebelling Troop Mixes

Chances of the unit being present in various rebellion types.

Ruler ID Troop Advantage

Factions listed here get a recruitment discount on the unit.

Region ID Troop Advantage

Specifies which provinces will give the unit a +1 valour bonus if recruited/retrained in the province. Some of these are hidden in the game, as the province scrolls will only show 1 unit, and if the province is the first one listed.

Dojo Advantage

Not used.

Unit Choices (AI)

Affects the recruitment weighting chances for the unit based on AI faction personality.

Unit Specialty Building Influences

Not used.

Buildings Necessary

Specifies the building requirements to recruit/retrain the unit.

Unit Class

Roles the unit can be good at, used by the AI to determine how to used them in combat.

Morale Bonus

No idea.

Applicable Periods

Specifies the time periods that the unit can be recruited/retrained in. EARLY, HIGH, LATE, or ALL_PERIODS.

Scaleable

Specifies if the unit scales with the unit size selected for the game. This is set to no for royal units and artillery crews in vanilla.

Stats and General Info

22 columns denoting various features of the unit. The column entries are set with ATTRIBUTE(VALUE).

HEIGHT

Height of the unit's troop model?

RADIUS

Radius occupied around the center of the model?

SCALE

Scaling factor of the unit's model?

PROJECTILE_TYPE

Indicates if the unit is equipped with a particular missile weapon. This value is hardcoded to match an entry in the PROJECTILESTATS.TXT file.

SAMURAI

Specifies if this unit is Elite.

MARCH_SPEED

Specifies the march speed of the unit.

RUN_SPEED

Specifies the running speed of the unit.

CHARGE_SPEED

Specifies the charging speed of the unit.

MIN_TURNSPEED

Lowest speed necessary to begin a turn?

MAX_TURNSPEED

Highest speed possible when turning?

TURN_TO_MOTION_SPEED

Speed while turning?

MAX_INMOTION_TURN

?

FORMATION_WIDTH_SPACING

Distance between models within a rank when the unit is in formation.

FORMATION_LENGTH_SPACING

Distance between ranks when the unit is in formation.

ENGAGEMENT_THRESHOLD

Weighting factor used to determine whether the unit will engage a unit that comes near it.

CHARGE_BONUS

The unit's charge bonus added into the kill chance when the unit is charging.

MELEE_BONUS

The unit'sbase attack value used in the kill chance computation.

DEFENCE_BONUS

The unit's base defense value used in the kill chance computation.

ARMOUR_LEVEL

The unit's base armour level (with shield?).

HONOUR_LEVEL

The unit's base morale.

AMMO

If the unit has missile weapons, the number of shots is specified here.

FORMATIONS_PREFERRED_NUM_ROWS

The number of ranks the AI will set the unit in.

Invisible

Specifies if the unit can hide anywhere, as opposed to just in woods. For agents, setting this to yes will hide the agent from opponent factions, and makes the agent susceptible to counterspying and Border Fort capture.

Unit Specialties

No idea. AI preference for garrisons?

Tooltip Labels

Mainly used for agent tooltip designations, when the cursor is over a campaign map piece.

Mount Type

Specifies the mount type of a cavalry unit (used for graphical depictions?). NONE, HORSE, or CAMEL.

Body Type

Used for graphical depiction of the unit.

Faction Leader

If a faction is listed, that factions royals will use this unit to represent the leader and princes.

Faction Association

Factions that the unit is available to.

Region Label

Regions that the unit can be recruited/retrained in. This is used to restrict recruitment/retraining of region-specific units to their historical provinces.

Formation Suitability

Determines where in the combat deployment formations the unit will be placed.

Task Suitability

Not used.

Culture

Culture that the unit is available to. To recruit this unit, a faction must belong to the specified culture(CATHOLIC, MUSLIM, ORTHODOX, or PAGAN).

Ship Info

Specifies the statistics of ship units. They are listed in the order of "range, attack, defense, speed, strength".

Supporting Ranks

The number of ranks capable of supporting action in combat. This is set to 2 ranks for spears, and 4 ranks for pikes.

Morale Effects

Specifies if the unit is subject to specific discipline rules.

  • DISCIPLINED - This specifies that the unit is Disciplined.
  • UNCONTROLLED - This specifies that the unit is Impetuous.

Unit Spacing

Shield Type

The type of shield and the protective value added to defense that the unit uses. The protective bonus can be modified by the next two fields.

  • NONE: no defense bonus
  • SMALL: +1 defense
  • LARGE: +2 defense
  • PAVISE: +3 defense
  • CAV: +1 defense

Melee with Shield

Specifies whether the unit uses it's shield in melee. This is used to eliminate the melee combat shield bonus for units using two-handed weapons.

Shield Modifier

Multiplier for the shield rating, used for balancing/graphics purposes. A value between 0 and 1, multiplied against the protective value of the unit's shield type.

Armour Piercing Weapon

Specifies whether the unit has an armour piercing melee attack.

Cavalry Attack Bonus

Unit attack bonus giving when fighting against cavalry. +1 for spearmen, +2 for pikemen, +3 for polearms/halberdiers are in place in the vanilla game.

Cavalry Defense Bonus

Unit defense bonus when fighting cavalry. +1 for polearms/halberdiers, +4 for spearmen, +6 for pikemen are in place for the vanilla game.

Feared Units

Units that this unit fears. This is used to determine whether the fear penalties are applied in combat.

Zeal Effects

Affect on province zeal when the unit is situated in a province (agents only?).

Faith Effects

Affect on province religious faiths when the unit is situated in a province (agents only?). This is used to determine how well the unit propagates the various faiths. All of the religions can be affected from this column, not just the main 4 cultures.

Dismounts to

Unit type that a cavalry unit can dismount to.

Dismount in open battle

Specifies if a cavalry unit can be dismounted for any battle, or just for siege battles.

Weapon type

Melee weapon type (for animations?) SWORD, SPEAR, AXE, CLUB are defined.

Mercenary Unit

Specifies if the unit can appear as a mercenary, and during what time period it would be available.

Modding

The unit_prod.txt, build_prod.txt, and projectilestats.txt files can be easily modified using the Gnome Unit Editor.



TBD - need better formatting and description text