Facility.txt (SEIV)
From SEWiki
Facilities are the building blocks which allow the player to make use of planetary colonies.
Homeworld Facility Placement
First, we will take a look at how SE4 determines the starting facilities on a homeworld planet. This is unfortunately hard-coded, and so the starting facility lineup can only be altered indirectly. Here is how it works:
The facilities on the homeworld will be added as follows (all must be available with starting technology):
- The last facility with the Spaceport ability in the file.
- The last facility with the Space Yard ability in the file.
- The last facility with the Resupply ability in the file.
- One facility that has the highest level of the Resource Generation - Organics ability.
- One facility that has the highest level of the Resource Generation - Radioactives ability.
- One facility that has the highest level of the Resource Generation - Minerals ability.
- One facility that has the highest level of the Point Generation - Research ability.
- Repeat 6 & 7 until the planet is filled.
Position in the file is irrelevant for the resource/research facilities. Technically, the Mineral facilities are added before the Organics and Radioactives ones (at least the first one is). But, they are presented in this order for ease of reading. There is 0 difference for in-game effects (unless you mod the planet used as a homeworld to only have 4 facility slots, of course).
Facility Properties
Now we shall take a look at a sample facility.
Name := Space Yard Facility I Description := Large construction facility which allows the construction of ships in space. Facility Group := Space Yard Facility Family := 38 Roman Numeral := 1 Restrictions := None Pic Num := 16 Cost Minerals := 10000 Cost Organics := 0 Cost Radioactives := 0 Number of Tech Req := 1 Tech Area Req 1 := Space Yards Tech Level Req 1 := 1 Number of Abilities := 4 Ability 1 Type := Space Yard Ability 1 Descr := Can construct with 2000 minerals per turn. Ability 1 Val 1 := 1 Ability 1 Val 2 := 2000 Ability 2 Type := Space Yard Ability 2 Descr := Can construct with 2000 organics per turn. Ability 2 Val 1 := 2 Ability 2 Val 2 := 2000 Ability 3 Type := Space Yard Ability 3 Descr := Can construct with 2000 radioactives per turn. Ability 3 Val 1 := 3 Ability 3 Val 2 := 2000 Ability 4 Type := Component Repair Ability 4 Descr := Can repair 5 components per turn. Ability 4 Val 1 := 5 Ability 4 Val 2 := 0
The Space Yard is a good example to work off of.
Name := Space Yard Facility I
Like components, the name of facilities should have the appropriate Roman Numeral on the end, unless it is the only facility in it's family.
Facility Group := Space Yard
This line tells SEIV where to place the facility in the list in the Construction Window for planets.
Facility Family := 38
This tells SEIV what facilities belong in the same family. Two facilities are in the same family if they have the same family number. This is used to determine what facilities are upgraded to what with the Upgrade button, in conjunction with the Roman Numeral. It is also used to determine what gets hidden when the user selects the "Only Latest" button. When this button is selected, only the last available facility in the family is displayed in the construction window.
Roman Numeral := 1
This tells SEIV which facilities within a family are "more advanced" than others. The higher the Roman Numeral, the more advanced it is. A higher Roman Numeral facility within the same family will make a facility upgradable if it is placed immediately after it in Facility.txt. The Space Yard I can be upgraded to the Space Yard II because they are in the same Family and the SY II has a higher Roman Numeral than the SY I. It can range from 0-20. The Name of a facility should end with the Roman Numeral assigned to it, unless it is 0. If the Roman Numeral is 0, then there is no Roman Numeral assigned to it. This is used for facilities that are the only member of their family, like Spaceports.
Restrictions := None
This line is not used by SEIV.
Cost Minerals := 10000 Cost Organics := 0 Cost Radioactives := 0
These lines determine the cost of building the facility. When upgrading a facility to a more advanced version, the build costs are multiplied by the Upgrade Facility Cost Percent line in Settings.txt to determine the cost to upgrade.
Number of Tech Req := 1 Tech Area Req 1 := Space Yards Tech Level Req 1 := 1
These lines determine the technologies required to be able to build the facility. Do not set the Number of Tech Req to a number greater than the number of Tech Reqs defined for the facility.
Number of Abilities := 4 Ability 1 Type := Space Yard Ability 1 Descr := Can construct with 2000 minerals per turn. Ability 1 Val 1 := 1 Ability 1 Val 2 := 2000
These lines determine the abilities that the facility has. Do not set the Number of Abilities to a number greater than the number of Abilities defined for the facility.
