Table of Contents

Building Commands

These commands allow you to construct buildings from console or script, and control the stocks of the building (e.g. Add items to the building stocks and set their prices)

Building Construction

addbuilding*addbuilding [BUILDING_TYPE],[OWNER_ID],[MapX],[MapY],“Building Name”,( [ConstructionMaterials1], [ConstructionMaterials2] )
Adds a new building to the map and broadcasts the details to all players.
addbuildingtoworld*addbuildingtoworld [BUILDING_TYPE],[OWNER_ID],[WorldX],[WorldY],“Building Name”,( [ConstructionMaterials1], [ConstructionMaterials2] )
Same as addbuilding but using world coordinates instead of map coordinates
buildingconstruct .. *buildingconstruct [PLAYERNAME] [BuildingCode]
Activates the building construction UI allowing the player to place the building

Building Stocks

addtostocks*addtostocks [buildingID],[quantity],[item name]
Adds the item to the building stocks
removefromstocks*removefromstocks buildingID,quantity,item name
Removes an item from the building's stocks
setbuyprice*setbuyprice [BUILDINGRECORD_NUM],[ITEMNAME],[PRICE]
Sets the buy price for the named item at the building
setsellprice*setsellprice [BUILDINGRECORD_NUM],[ITEMNAME],[PRICE]
Sets the sell price for the named item at the building

Building Sale & Employee commands

addemployee*addemployee <BUILDING_NUM> <NAME>
Adds an employee to the building
buildingmaxemployed*buildingmaxemployed [BUILDING_NUM] [VALUE 0 - 16]
Sets the upper limit for number of employees allowed in this building
buildingsaleprice .. *buildingsaleprice <BUILDING_NUM> <SELL_PRICE>
Sets the building sale price (0 means the building is not for sale)
removeemployee*removeemployee [BUILDING_NUM] [NAME]
Removes an employee from the building
setwage*setwage BuildingNum wage
Sets the wage for the building

Building Script commands

buildingparam*buildingparam [BUILDING_RECORDNUM] [PARAM_VALUE 0-255]
Sets the 'BuildingScriptParam' value for a particular building. This value is accessed from building script events using $gBuildingScriptParam
dobuildingtask*dobuildingtask [player] [buildingnum] [taskcode] [text]
Activates a building task for the player & building

World administration commands for Buildings

buildetails
Prints details of the nearest building
buildinglimits
Prints a message indicating the limits for building on this world (e.g. max number of buildings you can own)
buildingteams
Prints the number of buildings currently assigned to teams.
changebuilding*changebuilding [BUILDING_RECORDNUM] [NEW_BUILDING_TYPE_NUM]
Changes an existing building to a different type.
cleardestroyedbuildings
Clears any references to destroyed buildings from the map file. (Destroyed buildings are not automatically removed from the map as you may wish to restore them).
clearlostbuildings
Clears up any buildings that exist in the .bui file but don't exist in the map. (Shouldn't happen unless something has gone odd, or you've been fiddling with your files in some unpleasant way).
deleteallbuildings
Deletes all building records from the game and removes them from the map.
demolishallbuildings
Demolishes all buildings on the map. (Note that normally building records never get fully deleted (For game modes where a demolished building can get restored etc). To fully delete all the buildings from your world, use *deleteallbuildings
demolishplayerbuildings .. *demolishplayerbuildings [PLAYER]
Removes all the player's buildings from the map (except ones that have been flagged in the buildings editor with 'Can't demolish'
employeerecount*employeerecount
Used to make sure that all buildings have the correct employee details. (Mostly useful if you've been fiddling with data files or backups or something odd).
movebuildinghere*movebuildinghere [BUILDING_RECORD_NUMBER]
Moves the specified building to your current location
recalcprod
Used to immediately re-calculate the production efficiencies of all buildings on the world. (Can be useful if you are adjusting settings or building details).
reloadbuildings .. *reloadbuildings
Reloads the Data\buildings.dat file which contains the definition of all the building types available on your world. \\removebuilding*removebuilding type,mapx,mapy
Removes a building from the map
repairbuilding
Repairs the building closest to you current position.
repairallbuildings
Repairs all buildings in the world
restorelostbuilding
rotatebuilding*rotatebuilding [ROTATION 0-31]
Rotates the nearest building to the specified angle
setbuildingstateflags*setbuildingstateflags [BUILDINGRECORD_NUM] [FLAGS]
TBD