Building Scripts

Building scripts define all buildings that can be built by the player and used as functional buildings (Tech upgrades, Beam gates and so on). This article contains building script-specific information. See another article for the general scripting guidelines.


new_building 	11
    	model  		= 	kraftwerk
    	name   		= 	Kraftwerk2
    	sec_type  	= 	201
    	type_icon 	= 	T
    	power  		= 	128
    	energy 		= 	175000
	sbact_act     	= 	0
    	sbact_vehicle 	= 	104
    	sbact_pos_x   	= 	200
    	sbact_pos_y   	= 	-200
    	sbact_pos_z   	= 	200
    	sbact_dir_x   	=    	0
    	sbact_dir_y   	=    	0
    	sbact_dir_z   	=   	-1

Building Keywords

new_building starts a new building definition. It's followed by the building number which can be 1 to 255. Number 0 may work but it may cause glitches.
modify_building starts a building modifier
end ends these

enable (e.g. enable = 1) can be used to enable the building for a faction by default.

model defines the building type which determines the announcement which is played when the building is created. Available building types are:

  • kraftwerk is power station
  • defcenter is flak station
  • radar is radar station
  • building is a generic building which is used with buildings that are not meant to be built, such as beam gates

name defines the building name. Name should contain underscores instead of spaces. Note that language.dll overrides this.
sec_type defines the sector type. Sector types are defined in SDF files
type_icon defines the icon which can be seen in the creation menu. Note that it's not displayed on the map.
energy is the energy required to create the building. This value is divided by 100 to get the value seen in the game.

power defines the power output. It is only used with power stations. It's not known FIXME if it works with other building types (models). 32 units usually equal to one white block on the map but there's some inconsistency in the stock scripts. Trial and error may be needed.


One or more turrets, internally called “sbact”, can be mounted on buildings. Flak guns and radar antennas are defined here. Turrets can be mounted on power stations, flak stations and radars. It's currently unknown FIXME if they can be mounted on “building” type buildings.

sbact_act starts a turret definition and contains the ordinal number of the turret. The first turret is number 0. Note that turret definitions don't have an ending keyword so they should be in a strict order.
sbact_vehicle defines the turret unit which is a vehicle. The vehicles are usually “gun” type but other vehicles can be used too.

These coordinates define the location of the turret. They are relative to the center of the sector. Note that y-coordinate is always negative.

These define the direction vector of the turret (where the turret is facing) when the building is created.

modding/building_script.txt · Last modified: 2014/01/08 07:09 by Ormu
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0