UFO-Scripts/basemangement.ufo
Jump to navigation
Jump to search
Bases
Buildings
- name (V_TRANSLATION_STRING)
- The name of the facility
- image (V_STRING)
- The picture for this facility, as seen on the base screen, relative to Template:Path
- fixcosts (V_INT)
- The construction cost for this facility
- depends (V_STRING)
- Facilities need the things listed here to function.
- type (V_STRING)
- The type this facility belongs to. Used for upgrades.
hangar, lab, hospital, quarters, workshop - build_time (V_INT)
- The time (in days) this facility takes to construct
- varcosts (V_INT)
- The monthely maintenance cost for this facility
- map_name (V_STRING)
- The name of the map tile for this facility (in Template:Path)
- pedia (V_STRING)
- The tech ID that has the UFOpaedia entry for this facility
- needs (V_STRING)
- Additional sections of this facility. Used for facilities larger than 1 tile
- capacity (V_INT)
- The capacity of this facility. The meaning of the value depends on the building type.
- onconstruct (V_STRING)
- The name of the script to be run when this facility is built up. Don't add a ; at the end.
- ondestroy (V_STRING)
- The name of the script to be run when this facility is destroyed. Don't add a ; at the end.
- visible (V_BOOL)
- Sets whether this facility is visible on the base screen. Set the first part of a building to 1 all others to 0 otherwise all building-parts will be on the list
- max_count (V_INT)
- No base may have more than this amount of this facility
- starting_employees (V_INT)
- The amount of employees that come with this building
- level (V_FLOAT)
- building level
- mandatory (V_BOOL)
- Automatically construct this building when a base is set up.
Example
building building_hangar
{
name "_Large Hangar"
image base/drop2
fixcosts 68000
depends building_powerplant
build_time 8
varcosts 5500
map_name "drop"
pedia rs_building_large_hangar
type hangar
needs building_hangar2
ondestroy "building_ondestroy"
starting_employees 8 //Number of soldiers in dropship when first base is built
capacity 1
}
building building_hangar2
{
name "_Large Hangar"
image base/drop1
pedia rs_building_large_hangar
visible false // no 'needs' field here!
}
Base Templates
basetemplate templateName
- building_name (V_POS)
- Pair: id of building - position in basescreen.
basetemplate balanced {
building_entrance "2 4"
building_quarters "4 3"
building_quarters "3 3"
building_aliencontainment "0 1"
building_storage "3 4"
building_powerplant "4 4"
building_command "4 2"
building_hangar "0 3"
building_intercept "1 3"
building_workshop "4 0"
building_radar "1 4"
building_lab "3 1"
building_hospital "3 2"
}