User Tools

Site Tools


scripting:reference:system_functions:buildinginformationfunctions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:reference:system_functions:buildinginformationfunctions [2023/02/28 07:06] – [sysGetEmployeeID] mitscripting:reference:system_functions:buildinginformationfunctions [2023/08/22 10:42] (current) – [Building Information Functions] mit
Line 2: Line 2:
  
 System functions that provide information about a building and its contents, and allow you to control the building UI. System functions that provide information about a building and its contents, and allow you to control the building UI.
 +
 +Unless otherwise stated, these functions refer to the building currently being accessed by the player. (This can be overriden using SetBuildingContext).
  
 ==== sysAmountInStocks ==== ==== sysAmountInStocks ====
Line 97: Line 99:
 TBD\\ TBD\\
  
-==== sysBuildingActivateStockroom ==== +==== sysBuildingGetSoldItem ==== 
-==== sysBuildingActivateBuyItem ==== +==== sysBuildingGetMadeItem ==== 
-==== sysBuildingActivateSetPrices ==== +==== sysBuildingGetDemandedItem ==== 
-==== sysBuildingActivateSellItem ==== +==== sysBuildingGetProducedItem ==== 
-==== sysBuildingActivateEmployeeList ====+==== sysBuildingGetTotalSold ==== 
 +^ Format | sysBuildingGetTotalSold ( Item_Name_or_Num )| 
 +^ Description | Returns the total amount of the item that has been sold (since the count was reset with *buildingresetsoldtotal). If item name is omitted or set to 0, a total of all items is provided. | 
 +^ Example | ''**$totalSold = sysBuildingGetTotalSold ("Wood")**''
 + 
 +==== sysBuildingGetTotalMade ==== 
 +^ Format | sysBuildingGetTotalMade ( Item_Name_or_Num )| 
 +^ Description | Returns the total amount of the item that has been made (since the count was reset with *buildingresetmadetotal). If item name is omitted or set to 0, a total of all items is provided. | 
 +^ Example | ''**$totalMade = sysBuildingGetTotalMade (0)**''
  
 ===== Related System Values ===== ===== Related System Values =====
Line 107: Line 118:
 \\ \\
 \\ \\
-**$gBuildingNum**, **$gBuildingAccessNum**, **$gBuildingScriptParam****$gBuildingX**, **$gBuildingY****$gBuildingCode**, **$gBuildingOwnerID**, **$gBuildingNumEmployees**, **$gBuildingMaxEmployees**, **$gBuildingSalePrice**, **$gBuildingWage**, **$gBuildingWorldX**, **$gBuildingWorldY**, **$gBuildingInvestment**,  +**$gBuildingX**, **$gBuildingY** : X,Y location of the building in map coords (default 0 -> 255)\\ 
-**$gBuildingEfficiency**, **$gBuildingScore**, **$gBuildingType**, **$gBuildingDamage**, **$gBuildingTeam**+**$gBuildingCode** : Building type code - the number of the building type in the buildings editor list\\ 
 +**$gBuildingNum**, **$gBuildingAccessNum** : Unique ID number of the specific building being accessed \\ 
 +**$gBuildingWorldX**, **$gBuildingWorldY** : X,Y location of the building in world coords\\ 
 +**$gBuildingTeam** : Team the building belongs to (or 0 if none)\\ 
 +**$gBuildingCapacity** : Capacity value of the building (e.g. for homes)\\ 
 +**$gBuildingSpaceRemaining** : Remaining capacity of the building (e.g. for homes)\\ 
 +**$gBuildingTown** : Town building num of the town the building is in (or 0 if the building is not in a town)\\ 
 +**$gBuildingScriptParam**, **$gBuildingOwnerID**, **$gBuildingNumEmployees**, **$gBuildingMaxEmployees**, **$gBuildingSalePrice**, **$gBuildingWage**,  **$gBuildingInvestment**,  
 +**$gBuildingEfficiency**, **$gBuildingScore**, **$gBuildingType**, **$gBuildingDamage**,  
 + 
 +===== Collated Player Building Information ===== 
 + 
 +The following functions are somewhat different.. rather than being about a specific building, they return information about all the buildings a player currently owns. 
 + 
 +==== sysPlayerBuildingsGetTotalMade ==== 
 +^ Format | sysPlayerBuildingsGetTotalMade ( PlayerID, Item_Name_or_Num )| 
 +^ Description | Returns the total amount of the item that has been made in the player's current owned buildings. The total count can be reset using *buildingresetmadetotal [building_num] [item_num]. | 
 +^ Example | ''**$madeTotal = sysPlayerBuildingsGetTotalMade([PlayerID], "Bread")**''
 + 
 +==== sysPlayerBuildingsGetTotalSold ==== 
 +^ Format | sysPlayerBuildingsGetTotalSold ( PlayerID, Item_Name_or_Num )| 
 +^ Description | Returns the total amount of the item that has been sold from the player's current owned buildings. The total count can be reset using *buildingresetsoldtotal [building_num] [item_num] | 
 +^ Example | ''**$madeTotal = sysPlayerBuildingsGetTotalSold([PlayerID], "Bread")**''
  
scripting/reference/system_functions/buildinginformationfunctions.1677589561.txt.gz · Last modified: 2023/02/28 07:06 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki