TownAcceptanceEffect
Town growth effect when delivering cargo.
Common return value for all commands.
Container for an encoded string, created by GetEncodedString.
Types related to commands.
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
@ CMDT_OTHER_MANAGEMENT
Renaming stuff, changing company colours, placing signs, etc.
void CommandCallback(Commands cmd, const CommandCost &result, TileIndex tile)
Define a callback function for the client, after the command is finished.
@ Deity
the command may be executed by COMPANY_DEITY
@ Offline
the command cannot be executed in a multiplayer game; single-player only
@ Server
the command can only be initiated by the server
@ StrCtrl
the command's string may contain control strings
@ Location
the command has implicit location argument.
@ NoTest
the command's output may differ between test and execute due to town rating changes etc.
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
Types related to companies.
uint16_t HouseID
OpenTTD ID of house types.
TownAction
Town actions of a company.
std::tuple< CommandCost, Money, TownID > CmdFoundTown(DoCommandFlags flags, TileIndex tile, TownSize size, bool city, TownLayout layout, bool random_location, uint32_t townnameparts, const std::string &text)
Create a new town.
CommandCost CmdPlaceHouse(DoCommandFlags flags, TileIndex tile, HouseID house, bool house_protected)
Place an individual house.
CommandCost CmdDoTownAction(DoCommandFlags flags, TownID town_id, TownAction action)
Do a town action.
CommandCost CmdExpandTown(DoCommandFlags flags, TownID town_id, uint32_t grow_amount)
Expand a town (scenario editor only).
CommandCost CmdTownSetText(DoCommandFlags flags, TownID town_id, const EncodedString &text)
Set a custom text in the Town window.
CommandCost CmdTownGrowthRate(DoCommandFlags flags, TownID town_id, uint16_t growth_rate)
Change the growth rate of the town.
CommandCost CmdDeleteTown(DoCommandFlags flags, TownID town_id)
Delete a town (scenario editor or worldgen only).
CommandCost CmdRenameTown(DoCommandFlags flags, TownID town_id, const std::string &text)
Rename a town (server-only).
CommandCost CmdTownCargoGoal(DoCommandFlags flags, TownID town_id, TownAcceptanceEffect tae, uint32_t goal)
Change the cargo goal of a town.
CommandCost CmdTownRating(DoCommandFlags flags, TownID town_id, CompanyID company_id, int16_t rating)
Change the rating of a company in a town.
TownSize
Supported initial town sizes.