TownAcceptanceEffect
Town growth effect when delivering cargo.
Common return value for all commands.
Types related to commands.
void CommandCallback(Commands cmd, const CommandCost &result, TileIndex tile)
Define a callback function for the client, after the command is finished.
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
DoCommandFlag
List of flags for a command.
Commands
List of commands.
@ CMD_EXPAND_TOWN
expand a town
@ CMD_DELETE_TOWN
delete a town
@ CMD_TOWN_SET_TEXT
set the custom text of a town
@ CMD_FOUND_TOWN
found a town
@ CMD_DO_TOWN_ACTION
do a action from the town detail window (like advertises or bribe)
@ CMD_TOWN_RATING
set rating of a company in a town
@ CMD_PLACE_HOUSE
place a house
@ CMD_TOWN_GROWTH_RATE
set the town growth rate
@ CMD_RENAME_TOWN
rename a town
@ CMD_TOWN_CARGO_GOAL
set the goal of a cargo for a town
@ CMD_LOCATION
the command has implicit location argument.
@ CMD_NO_TEST
the command's output may differ between test and execute due to town rating changes etc.
@ CMD_SERVER
the command can only be initiated by the server
@ CMD_STR_CTRL
the command's string may contain control strings
@ CMD_DEITY
the command may be executed by COMPANY_DEITY
@ CMD_OFFLINE
the command cannot be executed in a multiplayer game; single-player only
Types related to companies.
Owner
Enum for all companies/owners.
uint16_t HouseID
OpenTTD ID of house types.
std::tuple< CommandCost, Money, TownID > CmdFoundTown(DoCommandFlag flags, TileIndex tile, TownSize size, bool city, TownLayout layout, bool random_location, uint32_t townnameparts, const std::string &text)
Create a new town.
CommandCost CmdRenameTown(DoCommandFlag flags, TownID town_id, const std::string &text)
Rename a town (server-only).
CommandCost CmdTownGrowthRate(DoCommandFlag flags, TownID town_id, uint16_t growth_rate)
Change the growth rate of the town.
CommandCost CmdTownRating(DoCommandFlag flags, TownID town_id, CompanyID company_id, int16_t rating)
Change the rating of a company in a town.
CommandCost CmdTownCargoGoal(DoCommandFlag flags, TownID town_id, TownAcceptanceEffect tae, uint32_t goal)
Change the cargo goal of a town.
CommandCost CmdDeleteTown(DoCommandFlag flags, TownID town_id)
Delete a town (scenario editor or worldgen only).
CommandCost CmdDoTownAction(DoCommandFlag flags, TownID town_id, uint8_t action)
Do a town action.
CommandCost CmdExpandTown(DoCommandFlag flags, TownID town_id, uint32_t grow_amount)
Expand a town (scenario editor only).
CommandCost CmdTownSetText(DoCommandFlag flags, TownID town_id, const std::string &text)
Set a custom text in the Town window.
TownSize
Supported initial town sizes.