Components.txt (SEV)

From SEWiki
Jump to: navigation, search

Introduction

Components are the bread and butter of unit design. They include weapons, computers, life support systems, and anything else which may be required to make a unit functional. All units whether they be Troops, Ships, Satellites, etc., use Components to dictate their capabilities. One each design, there are minimum and maximum requirements for a unit to fulfill before it is actually a usable design. Because components are such an important aspect of design, it references many other files in order to dispense abilities to the unit that is carrying it. Components.txt is the data file which contains information on all the types of components found in the game.

File Description

This is one of the largest data files, since Space Empires V has so many different components, and each component has so many different properties. Additionally, for each component, there are many optional fields depending on the values of previous fields. This can make for both very large and small component definitions.

Unlike in Space Empires IV, there is only one entry for an entire family of components (the file allows level-based formulas so that a component might, say, cost 1000 + [%Level%] * 100 minerals), and they are indexed by name rather than by "family number". These changes are a great boon to modders, obviating the need for tools such as the templatizer.

Data Fields

Field name Type Description, Use and Specific Allowed Values
Name Text The name of this component.
Description Text The description of this component.
Picture Number Integer The picture index of this component in the se5\pictures\components directory.
Maximum Level Integer The maximum level of this component that can be attained.
Tonnage Space Taken Formula Formula A formula which returns the amount of tonnage space that this component takes on a vehicle.
Tonnage Structure Formula Formula A formula which returns the amount of tonnage structure of this component. The tonnage structure is the amount of damage this component can take before its destroyed.
Cost Minerals Formula Formula A formula which returns the minerals cost of this component.
Cost Organics Formula Formula A formula which returns the organics cost of this component.
Cost Radioactives Formula Formula A formula which returns the radioactives cost of this component.
Supply Amount Used Formula Formula A formula which returns the amount of supply used by this component. The supply is used when the component is used. A weapon uses the supply when it is fired, an engine used the supply when the ship moves.
Ordnance Amount Used Formula Formula A formula which returns the amount of ordnance that this component uses when it is activated.
Can Be Placed On Vehicle Types Text List The vehicle types that this mount can be placed on. Allowed values are: Ship, Base, Planet, Seeker, Beam, Bolt, Building, [One of the types in VehicleUnitTypes.txt]
Can Be Placed In Ship Sections Text List The sections on a ship where this component can be placed. The default sections for ships are Armor, Inner Hull, and Outer Hull.
Component Type List Text List A list of the types of this component. A type can be any value you want. This is only used by abilities or requirements which require a certain component type.
General Group Any Text The general group for this component. The general group is the filter displayed in the Create Design window.
Custom Group Integer A custom group number for this component. A custom group is only used by the ability “Constructed Planet – Requirements”.
Number Of Requirements Number The number of requirements for this object. Requirements specify when this object can be used.
Requirements Evaluation Availability Bool/Number List This requirement determines whether this object is available to the player (it is displayed in a list to choose from). This field can be one of the following: TRUE (this object is always available), FALSE (this object is never available), AND (all requirements must be TRUE for this object to be available), OR (any of the Malfador Machinations Page 7 Space Empires V: Modding requirements must be TRUE for this object to be available), number (this specific requirement must be TRUE for this object to be available), a number list (all of the listed requirements must be TRUE for this object to be available).
Requirements Evaluation Allows Placement Bool/Number List This requirement determines whether this object can be placed on a vehicle design. The allowed values are the same as for “Requirements Evaluation Availability”.
Requirements Evaluation Allows Usage Bool/Number List This requirement determines whether this object can be activated when it is on a vehicle. The allowed values are the same as for “Requirements Evaluation Availability
Requirement # Description Any Text A description for this requirement that is displayed to the player.
Requirement # Formula Formula A formula which returns TRUE or FALSE. The following variables can be used in the formula: [%Level%] – The level of the object.
Number Of Abilities Number The number of abilities that this object has.
Ability # Type Text The type of the ability. Ability types are listed in the section Ability Types.
Ability # Description Text The description of this ability shown in the game. To reference a value you can use the flags [%Amount1%] and [%Amount2%].
Ability # Scope Text The scope of this ability. The scope refers to how far this ability extends from an object. See the section Ability Scopes.
Ability # Range Formula Formula For an ability scope that is ranged, this is the range at which the ability effects in sectors.
Ability # Amount 1 Formula F:Any The Amount 1 for this ability. Based on the ability type, either Amount 1, Amount 2, or both may be used to give the ability is values. See Ability Types to determine which ability amounts are used for this ability type.
Ability # Amount 2 Formula F:Any The Amount 2 for this ability. Based on the ability type, either Amount 1, Amount 2, or both may be used to give the ability is values. See Ability Types to determine which ability amounts are used for this ability type.
Weapon Type Text Whether this component is a weapon, and if so, what weapon type it is. The “Weapon” fields are only needed in Components.txt if this field is not “None”. Valid weapon types:

None – This not a weapon.
Direct Fire – This weapon fires and immediately hits or misses its target.
Seeking – This weapon is fired and tracks after its target until it hits it.
Point Defense – This weapon is fired against in-coming seekers or attacking fighters.
Warhead – This weapon detonates when the vehicle carrying it hits another vehicle.

If the Weapon Type is not None these additional fields are used for describing the weapons behavior.

Field name Type Description
Weapon Delivery Type Text The delivery type of this weapon. This is used for abilities which are based on delivery type like “Weapon Delivery Type Damage Received Modifier Percent”.
Weapon Target Type List Text List The types of targets that this weapon can be fired on. A target type can be any valid vehicle type such as: Ship, Base, Planet, Seeker, Beam, Bolt, Building, [One of the types in VehicleUnitTypes.txt]
Weapon Damage Type Formula Damage Type The damage type that this weapon does. This field must be one of the values from the DamageTypes.txt file.
Weapon Space At Range Distance Increment Decimal This is the increment of range used in the fields “Weapon Space Min Damage At Range”, “Weapon Space Max Damage At Range”, and “Weapon Space To Hit Modifier At Range”.
Weapon Space Min Damage At Range Decimal This is a list of minimum damages done by the weapon at range in space. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Space Max Damage At Range Decimal This is a list of maximum damages done by the weapon at range in space. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Space To Hit Modifier At Range Decimal This is a list of to-hit modifiers applied to the weapon at range in space. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Space Min Damage Modifier Formula Formula This formula specifies the minimum damage at a given range in space. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. Final damage is computed as a random number between the minimum and maximum damage.
Weapon Space Max Damage Modifier Formula Formula This formula specifies the maximum damage at a given range in space. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. Final damage is computed as a random number between the minimum and maximum damage.
Weapon Space To Hit Modifier Formula Formula This formula specifies the to-hit modifier at a given range in space. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. The to-hit modifier is applied to the chance to hit targets with this weapon with negative values making it harder to hit a target.
Weapon Ground At Range Distance Increment Decimal This is the increment of range used in the fields “Weapon Ground Min Damage At Range”, “Weapon Ground Max Damage At Range”, and “Weapon Ground To Hit Modifier At Range”.
Weapon Ground Min Damage At Range Decimal This is a list of minimum damages done by the weapon at range in ground combat. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Ground Max Damage At Range Decimal This is a list of maximum damages done by the weapon at range in ground combat. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Ground To Hit Modifier At Range Decimal This is a list of to-hit modifiers applied to the weapon at range in ground combat. Each entry should be separated by a space. The first entry is range 0, and each subsequent entry is +”Weapon Space At Range Distance Increment“ range in distance.
Weapon Ground Min Damage Modifier Formula Formula This formula specifies the minimum damage at a given range in ground combat. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. Final damage is computed as a random number between the minimum and maximum damage.
Weapon Ground Max Damage Modifier Formula Formula This formula specifies the maximum damage at a given range in ground combat. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. Final damage is computed as a random number between the minimum and maximum damage.
Weapon Ground To Hit Modifier Formula Formula This formula specifies the to-hit modifier at a given range in ground combat. The variable [%Range%] represents the range, and the variable [%Level%] represents the level of the component. The to-hit modifier is applied to the chance to hit targets with this weapon with negative values making it harder to hit a target.
Weapon Reload Rate MS Formula Formula This formula returns the time it takes to reload this weapon in milliseconds.
Weapon Display Type Text This is how this weapon will be displayed in combat. Valid values are:

Bolt – This is valid only for direct fire weapons. A burst of energy fired at the target vehicle.
Beam – This is valid only for direct fire weapons. A sustained energy beam from the source vehicle to the target vehicle.
Torpedo – This is valid only for seeking weapons. A ball of energy that seeks after its target and can turn instantly.
Directed Torpedo – This is valid only for seeking weapons. A directed energy that seeks after is target and turns with a turn rate.

Weapon Space Display Effect Name Text The name of the effect in the BitmapEffects_SpaceCombat.txt to use for display of the weapon.
Weapon Ground Display Effect Name Text The name of the effect in the BitmapEffects_GroundCombat.txt to use for display of the weapon.
Weapon Explosion Effect Name Text The name of the effect in the BitmapEffects to used for the explosion of the weapon.
Weapon Sound Effect Name Text The name of the sound effect in the SoundEffects.txt file to use when the weapon fires.

Depending on the Weapon Display Type other additional fields are used to describe their behavior.

Field name Type Description
Weapon Bolt Speed Decimal The speed at which the bolt moves through space. Only used for Weapon Display Type – Bolt.
Weapon Beam Burn Color Color The color of the burn when the beam hits a target. Only used for Weapon Display Type – Beam.
Weapon Beam Duration Decimal The length of time in milliseconds that the beam lasts. Only used for Weapon Display Type – Beam.
Weapon Beam Speed Decimal The speed at which the beam moves from source to target. Only used for Weapon Display Type – Beam.
Weapon Seeker Speed Formula Formula A formula which returns the speed of the seeker. Only used for Weapon Display Type – Torpedo or Directed Torpedo.
Weapon Seeker Turn Rate Decimal The rate at which this seeker can turn. Only used for Weapon Display Type – Directed Torpedo.
Weapon Seeker Tonnage Structure Formula Formula A formula which returns the tonnage structure of the seeker (the damage it can take before being destroyed). Only used for Weapon Display Type – Torpedo or Directed Torpedo.
Weapon Seeker Defense Modifier Formula Formula A formula which returns the to-hit modifier of the seeker. Only used for Weapon Display Type – Torpedo or Directed Torpedo.

Sample Component Code

Data File Usage

This file references the types and values described in many other files. While it grabs widely from other files, it is rarely used itself.

Uses Files

Used By

(list may be incomplete)

Sources: SE5_Modding.pdf for SEV 1.25 © Aaron Hall 2006-2007; Components.txt