-
Notifications
You must be signed in to change notification settings - Fork 5
SetBuildingProductionPercentMode
Change the production mode of a building. There exists two production modes: automatic infinite production with percent or only by players exact orders. Usually weapon smiths allow for this mode so that you can change the percentage of bows or swords to produce.
Use ISettlers4Api::SetBuildingProductionPercentage to change the percentages for each good the building can produce.
BOOL ISettlers4Api::SetBuildingProductionPercentMode(
DWORD building,
BOOL enable,
DWORD player
);
building
The index of the building to change the production mode. The player should own this building.
enable
if TRUE the production mode will be changed to infinite with percent mode. If FALSE this feature will be disabled and the player has to specify the amount themselves or using the ISettlers4Api::SetBuildingProduction method.
player
The player who issues the command. Use 0 (zero) to issue this event as the local player.
If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.
The corresponding network event id of the command is ID 5035.
Usually the production for a building is distributed over all buildings of the same type in the eco sector of the specified building. So this command actually changes the eco sectors production goals.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |