Facilities.txt (SEV)
From SEWiki
Contents |
File Description
Facilities.txt is the data file which contains information on all of the planetary facilities found in the game. This is one of the largest data files, since Space Empires V has so many different facilities, and each facility has so many different properties. Unlike in Space Empires IV, there is only one entry for an entire family of facility (the file allows level-based formulas so that a component might, say, cost 10000 + [%Level%] * 1000 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
| Name | Value Type | Description, Use and Specific Allowed Values |
|---|---|---|
| Name | Any Text | The name of the Facility. |
| Description | Any Text | A description of the facility that is displayed to the game player. |
| Facility Group | Any Text | Facilities are grouped in the construction queue screen according to this value. |
| XFile Class Name | Reference | A reference to the .x model used to render the facility in ground combat. |
| Picture Number | Integer | The picture that the Facility uses for its little icon. The facilities pictures can be found in Space Empires V\Pictures\Facilities\ folder. For every facility, there are two 24 bit bitmap files, one large and one small. The number tells the game which picture square to use according to the naming convention. Unlike the picture sheets, you cannot change the dimensions of these pictures without modifying the UI of the game itself. |
| Maximum Level | Integer | The maximum amount of levels that can be attained for this facility. |
| Tonnage Space Taken Formula | Formula | The amount of space taken on the planet when building that facility. |
| Tonnage Structure Formula | Formula | The amount of "hit points" that the facility has when the planet is attacked, either during bombardment or during ground combat. |
| Cost Minerals Formula Cost Organics Formula | Formula | The cost (in mineral resources) of building that facility. Constructed facilities require maintenance to be paid each turn. The amount of maintenance is a percentage of build cost, determined by the Empire Starting Facility Percent Maint Cost setting. |
Number of Requirements
Requirements Evalutation Availability Requirements Evaluation Allows Placement Requirements Evaluation Allows Usage Requirement <n> Description Requirement <n> Formula | Requirement | Number of Requirements is the number of requirements that must be satisfied to unlock this facility for construction. Below this are the formulas and text description of the requirements. In facilities, the first requirement additionally sets the level and level progression of the facility as it relates to the tech tree. Additional requirements may include minimum levels of other tech areas, maximum levels (eg: for exclusive tech areas), racial traits, limitations on the number of facilities on a planet or system, and other fancy things modders may possibly come up with in the future. |
Number Of Abilities
Ability 1 Type Ability 1 Description Ability 1 Scope Ability 1 Range Formula Ability 1 Amount 1 Formula Ability 1 Amount 2 Formula | Ability | Number Of Abilities is the number of abilities the the facility disposes to the empire that uses it. It is here that one can modify the amount of research or resources that a building gives. Nearly all of the abilities are formula based adding an amount of something. |
Sample Faclity Code
Here is an example of the code within the Facilities.txt that shows the Space Port, included in the Stock SEV game. From first glance, you should be able to notice some things right away. The first is, of course, the Name, Description, and Facility Group. The describe the Facility to the player.
Name := Space Port
Description := Facility which processes all generated resources in its system and makes them available for the empire.
Facility Group := Resource Extraction
XFile Class Name := Spaceport
Picture Number := 2
Maximum Level := 1
Tonnage Space Taken Formula := 1000
Tonnage Structure Formula := 1000 + (([%Level%] - 1) * 20)
Cost Minerals Formula := 6000 + (([%Level%] - 1) * 600)
Cost Organics Formula := 0
Cost Radioactives Formula := 0
Number Of Requirements := 1
Requirements Evaluation Availability := AND
Requirements Evaluation Allows Placement := TRUE
Requirements Evaluation Allows Usage := TRUE
Requirement 1 Description := Empire must have at least tech level 1 in Industry.
Requirement 1 Formula := Get_Empire_Tech_Level("Industry") >= (1 + ([%Level%] - 1))
Number Of Abilities := 1
Ability 1 Type := Points Added to Empire Pool
Ability 1 Description := All points generated in this system are automatically transported to the [%ScopePlayerName%].
Ability 1 Scope := System - This Player
Ability 1 Range Formula := 0
Ability 1 Amount 1 Formula := 0
Ability 1 Amount 2 Formula := 0
Data File Usage
While Facilities.txt is undoubtedly one of the most important files in the game, it actually is one of the least utilized by the other files in Space Empires V.
Uses Files
Data\TechAreas.txt - To obtain information for Tech based requirements
Used By
(list may be incomplete)
