index / api / cmd

Module api.cmd🔗

The module is available on both the GUI State and the Engine State (and the Console State as well). However,
it works in a slightly different manner depending on where it is used from.

On the engine states, commands are executed immediately and the effects are immediately noticeable. Moreover, the callback function
will be called immediately.

On the gui and console states, commands are executed in the next simulation step, and the effects are noticeable only after a few frames.
The callback function will be called the frame after the command has been executed, after which the changes are visible on the gui and engine
state.

global record Cmd sendCommand: function<T is ICommandData>(cmd : Command<T>, callback : function(T, boolean, {{Engine.Entity, Engine.Revision}}), progress : CommandProgress) makeAnimalSetStateCmd: function(animalEntity : Engine.Entity, movementType : integer, targetChangedElapsed : number, invalidTileElapsed : number, movementSpeed : number, angularSpeed : number): Command<AnimalSetStateCommandData> makeAnimalSpawnAtCmd: function(fileName : string, position : Vec2f, lookAt : Vec2f): Command<AnimalSpawnAtCommandData> makeCustomEntityDestroyCmd: function(entity : Engine.Entity): Command<CustomEntityDestroyCommandData> makeCustomEntityCreateCmd: function(modelId : integer): Command<CustomEntityCreateCommandData> makeCustomEntityUpdateStateCmd: function(entity : Engine.Entity, customState : ComponentCustomState): Command<CustomEntityUpdateStateCommandData> makeCustomEntityUpdateTransformationCmd: function(entity : Engine.Entity, transf : Mat4f): Command<CustomEntityUpdateTransformationCommandData> makeCustomVehicleCreateOrUpdateCmd: function(vehicleEntity : Engine.Entity, carrier : Carrier, vehicles : {{integer, boolean}}, movePathAircraft : Engine.Component.MovePathAircraft | nil): Command<CustomVehicleCreateCommandData> makeEntitySetColorCmd: function(entity : Engine.Entity, color : Vec3f): Command<EntitySetColorCommandData> makeEntitySetEmissionsCmd: function(entity : Engine.Entity, noisePower : number, pollutionPower : number, radius : number, pollutionRadius : number): Command<EntitySetEmissionsCommandData> makeEntitySetNameCmd: function(entity : Engine.Entity, name : string, forceSameEntity : boolean): Command<EntitySetNameCommandData> makeEntitySetPlayerCmd: function(entity : Engine.Entity, player : Engine.Entity): Command<EntitySetPlayerCommandData> makeGameAddPlayerCmd: function(name : string, color : Vec3f): Command<GameAddPlayerCommandData> makeGameSetCalendarSpeedCmd: function(millisPerDay : integer): Command<GameSetCalendarSpeedCommandData> makeGameSetDateCmd: function(date : Date): Command<GameSetDateCommandData> makeGameSetSpeedCmd: function(speedup : integer): Command<GameSetSpeedCommandData> makeGameSetTimeOfDayCmd: function(timeOfDaySec : integer): Command<GameSetTimeOfDayCommandData> makeGameSetCloudCoverageCmd: function(cloudCoverage : number): Command<GameSetCloudCoverageCommandData> makeIndustrySetDespawnTimeCmd: function(industryEntity : Engine.Entity, timeStamp : integer): Command<IndustrySetDespawnTimeCommandData> makeIndustrySetManualDevelopmentCmd: function(industryEntity : Engine.Entity, manual : boolean): Command<IndustrySetManualDevelopmentCommandData> makeCreateIndustryExtendProposalCmd: function(extendConstruction : Engine.Entity, numTrySlots : integer, numKeepSlots : integer): Command<CreateIndustryExtendProposalCommandData> makeJournalBookAssetCmd: function(player : Engine.Entity, entry : JournalEntry, position : Vec3f): Command<JournalBookAssetCommandData> makeJournalClearAllCmd: function(): Command<JournalClearAllCommandData> makeJournalLogEntryCmd: function(entity : Engine.Entity, logNamesAndValues : {{string, integer, boolean}}): Command<JournalLogEntryCommandData> makeLineCreateCmd: function(name : string, color : Vec3f, player : Engine.Entity, line : Engine.Component.Line): Command<LineCreateCommandData> makeLineDestroyCmd: function(lineEntity : Engine.Entity): Command<LineDestroyCommandData> makeLineUpdateCmd: function(lineEntity : Engine.Entity, data : Engine.Component.Line): Command<LineUpdateCommandData> makeScriptingSendEventCmd: function(src : string, id : string, name : string, param : any): Command<ScriptingSendEventCommandData> makeStockListDiscardCargoCmd: function(stockListEntity : Engine.Entity, stockIds : {StockId}, remainingTimeToDelivery : number): Command<StockListDiscardCargoCommandData> makeStockListSetStocksCargoTypeCmd: function(stockListEntity : Engine.Entity, stockIds : {StockId}, cargoType : CargoTypeId): Command<StockListSetStocksCargoTypeCommandData> makeStockListSetModifiersCmd: function(industryEntity : Engine.Entity, modifiers : Engine.Component.StockList.Modifiers): Command<StockListSetModifiersCommandData> makeTownConnectWithIndustriesCmd: function(townEntities : {Engine.Entity}, connections : {{integer, integer}}, keep : boolean): Command<TownConnectWithIndustriesCommandData> makeTownAutoDetectConnectionsCmd: function(townEntities : {Engine.Entity}): Command makeTownCreateCmd: function(towns : {TownInfo}): Command<TownCreateCommandData> makeTownDestroyCmd: function(townEntity : Engine.Entity): Command<TownDestroyCommandData> makeTownDevelopAtCmd: function(position : Vec2f, developStreets : boolean, upgradeBuildings : boolean): Command<TownDevelopAtCommandData> makeTownCustomDistributionWeightsCmd: function(townEntitiy : Engine.Entity, levelToCapacityDistributionWeights : {{number}}): Command<TownCustomDistributionWeightsCommandData> makeTownSetDevelopmentActiveCmd: function(entity : Engine.Entity, developmentActive : boolean): Command<TownSetDevelopmentActiveCommandData> makeTownSetInitialLandUseCapacitiesCmd: function(entity : Engine.Entity, landUseCapacities : {integer}): Command<TownSetInitialLandUseCapacitiesCommandData> makeTownUpdateCargoNeedsCmd: function(entity : Engine.Entity, cargoNeeds : {{CargoTypeId}}, updateTownBuildings : boolean): Command<TownUpdateCargoNeedsCommandData> makeTownUpdateSizeCmd: function(townEntity : Engine.Entity, sizeFactors : {number}, updateAllBuildings : boolean): Command<TownUpdateSizeCommandData> makeTownBuildingSetBlockedDevelopmentCmd: function(townBuildingEntity : Engine.Entity, blockedDevelopment : boolean): Command<TownBuildingSetBlockedDevelopment> makeVehicleBuyCmd: function(playerEntity : Engine.Entity, depotEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleBuyCommandData> makeVehicleReplaceCmd: function(vehicleEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleReplaceCommandData> makeVehicleReverseCmd: function(vehicleEntity : Engine.Entity): Command<VehicleReverseCommandData> makeVehicleSellCmd: function(vehicleEntities : {Engine.Entity}): Command<VehicleSellCommandData> makeVehicleSendToDepotCmd: function(vehicleEntity : Engine.Entity, sellOnArrival : boolean, jumpToDepoEntity : Engine.Entity): Command<VehicleSendToDepotCommandData> makeVehicleSetLineCmd: function(vehicleEntity : Engine.Entity, lineEntity : Engine.Entity, stopIndex : integer): Command<VehicleSetLineCommandData> makeVehicleSetManualDepartureCmd: function(vehicleEntity : Engine.Entity, manual : boolean): Command<VehicleSetManualDepartureCommandData> makeVehicleSetStoppedByUserCmd: function(vehicleEntity : Engine.Entity, stopped : boolean): Command<VehicleSetStoppedByUserCommandData> makeVehicleSetModifiersCmd: function(vehicleEntity : Engine.Entity, modifiers : Engine.Component.TransportVehicle.Modifiers): Command<VehicleSetModifiersCommandData> makeVehicleTryToDepartCmd: function(vehicleEntity : Engine.Entity): Command<VehicleTryToDepartCommandData> makeWorldBuildProposalCmd: function(proposal : Proposal, context : any, ignoreErrors : boolean, doDust : boolean, playerInitiated : boolean): Command<WorldBuildProposalCommandData> makeWorldChangeWindCmd: function(emissionGridEntity : Engine.Entity, wind : Vec2f): Command<WorldChangeWindCommandData> makeWorldReplaceTerrainCmd: function(map : GameMap, terrainConfig : BaseConfig.Terrain, seedText : string, worldEntity : Engine.Entity, keepAssets : boolean): Command<WorldReplaceTerrainCommandData> makeWorldSetBulldozableCmd: function(entity : Engine.Entity, bulldozable : boolean): Command<WorldSetBulldozableCommandData>
record Debug makeMaintenanceCostUpdateCmd: function(maintenanceCostEntity : Engine.Entity, amount : integer, reset : boolean): Command makeSimPersonSetStateCmd: function(entity : Engine.Entity, simPersonState : integer): Command<SimPersonSetStateCommandDataDEBUG> makeSimPersonSetHappiness: function(entity : Engine.Entity, happiness : number): Command makeComponentExchangeCmd: function(entity : Engine.Entity, component : Engine.Component): Command<ComponentExchangeCommandDataDEBUG> makeStockSetCargoAmountCmd: function(entity : Engine.Entity, stockId : StockId, amount : integer, cargoType : string): Command<StockSetCargoAmountCommandDataDEBUG> makeGamePerformSimulationStepsCmd: function(amount : integer): Command<GamePerformSimulationStepsCommandDataDEBUG> makeClearLogbooksCmd: function(towns : boolean): Command end
debug: Debug end
global record AnimalSetStateCommandData animalEntity: Engine.Entity movementType: integer targetChangedElapsed: number invalidTileElapsed: number movementSpeed: number angularSpeed: number end
global record AnimalSpawnAtCommandData modelId: integer position: Vec2f lookAt: Vec2f resultEntity: Engine.Entity end
global record Command<T is ICommandData>end
global record ComponentExchangeCommandDataDEBUG entity: Engine.Entity component: Engine.Component end
global record CreateIndustryExtendProposalCommandData extendConstruction: Engine.Entity numTrySlots: integer numKeepSlots: integer resultProposal: Proposal resultCollidingSubconstructions: {integer} end
global record CustomEntityCreateCommandData modelId: integer resultEntity: Engine.Entity end
global record CustomEntityDestroyCommandData entity: Engine.Entity end
global record CustomEntityUpdateStateCommandData entity: Engine.Entity customState: {<any type> : <any type>} end
global record CustomEntityUpdateTransformationCommandData entity: Engine.Entity transf: Mat4f end
global record CustomVehicleCreateCommandData vehicleEntity: Engine.Entity carrier: Carrier vehicles: {{integer, boolean}} movePathAircraft: Engine.Component.MovePathAircraft resultEntity: Engine.Entity end
global record EntitySetColorCommandData entity: Engine.Entity color: Vec3f end
global record EntitySetEmissionsCommandData entity: Engine.Entity noisePower: number pollutionPower: number radius: number end
global record EntitySetNameCommandData entity: Engine.Entity name: string end
global record EntitySetPlayerCommandData entity: Engine.Entity playerEntity: Engine.Entity end
global record GameAddPlayerCommandData name: string color: Vec3f resultEntity: Engine.Entity end
global record GamePerformSimulationStepsCommandDataDEBUG amount: integer end
global record GameSaveCommandData modDescs: {Mod.GameModDesc} configData: {<any type> : <any type>} guiSaveData: {<any type> : <any type>} fileName: string isAutosave: boolean isMapsave: boolean screenshot: GameScreenshot error: integer end
global record GameSetCalendarSpeedCommandData millisPerDay: integer end
global record GameSetCloudCoverageCommandData cloudCoverage: number end
global record GameSetDateCommandData date: Date end
global record GameSetSpeedCommandData speedup: integer end
global record GameSetTimeOfDayCommandData timeOfDaySec: integer end
global interface ICommandDataend
global record IndustrySetDespawnTimeCommandData entity: Engine.Entity timeStamp: integer end
global record IndustrySetManualDevelopmentCommandData entity: Engine.Entity manual: boolean end
global record JournalBookAssetCommandData playerEntity: Engine.Entity journalEntry: JournalEntry position: Vec3f end
global record JournalClearAllCommandDataend
global record JournalLogEntryCommandData entity: Engine.Entity logName: string time: number value: integer end
global record LineCreateCommandData line: Engine.Component.Line name: Engine.Component.Name color: Engine.Component.Color playerOwned: Engine.Component.PlayerOwned resultEntity: Engine.Entity end
global record LineDestroyCommandData lineEntity: Engine.Entity end
global record LineUpdateCommandData lineEntity: Engine.Entity line: Engine.Component.Line end
global record MaintenanceCostUpdateCommandDataDEBUG maintenanceCostEntity: Engine.Entity amount: integer resetAccumulatedCost: boolean end
global record ScriptingSendEventCommandData fileName: string id: string name: string param: any end
global record SimPersonSetStateCommandDataDEBUG entity: Engine.Entity type: integer end
global record StockListDiscardCargoCommandData stockListEntity: Engine.Entity stockIds: {StockId} remainingTimeToDelivery: number end
global record StockListSetModifiersCommandData entity: Engine.Entity modifiers: Engine.Component.StockList.Modifiers end
global record StockListSetStocksCargoTypeCommandData stockListEntity: Engine.Entity stockIds: {StockId} cargoType: CargoTypeId end
global record StockSetCargoAmountCommandDataDEBUG stockListEntity: Engine.Entity stock: StockId amount: integer cargoType: ResName end
global record TownAutoDetectConnectionsCommandData townEntities: {Engine.Entity} end
global record TownBuildingSetBlockedDevelopment townBuildingEntity: Engine.Entity blockedDevelopment: boolean end
global record TownConnectWithIndustriesCommandData townEntities: {Engine.Entity} connections: {{integer, integer}} keep: boolean end
global record TownCreateCommandData towns: {TownInfo} updateInitialLandUseCapacities: boolean end
global record TownCustomDistributionWeightsCommandData townEntity: Engine.Entity levelToCapacityDistributionWeights: {{number, number, number, number}, {number, number, number, number}, {number, number, number, number}} end
global record TownDestroyCommandData townEntity: Engine.Entity end
global record TownDevelopAtCommandData position: Vec2f developStreets: boolean upgradeBuildings: boolean end
global record TownSetDevelopmentActiveCommandData townEntity: Engine.Entity developmentActive: boolean end
global record TownSetInitialLandUseCapacitiesCommandData townEntity: Engine.Entity initialLandUseCapacities: {integer} end
global record TownUpdateCargoNeedsCommandData townEntity: Engine.Entity cargoNeeds: {{CargoTypeId}} updateTownBuildings: boolean end
global record TownUpdateSizeCommandData townEntity: Engine.Entity landUseSizeFactors: {number} updateAllBuildings: boolean end
global record VehicleBuyCommandData playerEntity: Engine.Entity depotEntity: Engine.Entity config: TransportVehicleConfig resultVehicleEntity: Engine.Entity end
global record VehicleReplaceCommandData vehicleEntity: Engine.Entity config: TransportVehicleConfig applyPurchaseCost: boolean end
global record VehicleReverseCommandData vehicleEntity: Engine.Entity end
global record VehicleSellCommandData vehicleEntities: {Engine.Entity} end
global record VehicleSendToDepotCommandData vehicleEntity: Engine.Entity sellOnArrival: boolean jumpToDepotEntity: Engine.Entity end
global record VehicleSetLineCommandData vehicleEntity: Engine.Entity lineEntity: Engine.Entity stopIndex: integer end
global record VehicleSetManualDepartureCommandData entity: Engine.Entity manual: boolean end
global record VehicleSetModifiersCommandData entity: Engine.Entity modifiers: Engine.Component.TransportVehicle.Modifiers end
global record VehicleSetStoppedByUserCommandData vehicleEntity: Engine.Entity userStopped: boolean end
global record VehicleTryToDepartCommandData vehicleEntity: Engine.Entity end
global record WorldBuildProposalCommandData proposal: Proposal context: Context withCostRep: boolean ignoreErrors: boolean resultProposalData: ProposalData resultEntities: {{Engine.Entity, Engine.Revision}} doDust: boolean end
global record WorldChangeWindCommandData emissionGridEntity: Engine.Entity wind: Vec2f end
global record WorldReplaceTerrainCommandData map: GameMap terrainConfig: BaseConfig.Terrain seedText: string worldEntity: Engine.Entity keepAssets: boolean end
global record WorldSetBulldozableCommandData entity: Engine.Entity value: boolean end

Category: main🔗

Cmd🔗

global record Cmd sendCommand: function<T is ICommandData>(cmd : Command<T>, callback : function(T, boolean, {{Engine.Entity, Engine.Revision}}), progress : CommandProgress) makeAnimalSetStateCmd: function(animalEntity : Engine.Entity, movementType : integer, targetChangedElapsed : number, invalidTileElapsed : number, movementSpeed : number, angularSpeed : number): Command<AnimalSetStateCommandData> makeAnimalSpawnAtCmd: function(fileName : string, position : Vec2f, lookAt : Vec2f): Command<AnimalSpawnAtCommandData> makeCustomEntityDestroyCmd: function(entity : Engine.Entity): Command<CustomEntityDestroyCommandData> makeCustomEntityCreateCmd: function(modelId : integer): Command<CustomEntityCreateCommandData> makeCustomEntityUpdateStateCmd: function(entity : Engine.Entity, customState : ComponentCustomState): Command<CustomEntityUpdateStateCommandData> makeCustomEntityUpdateTransformationCmd: function(entity : Engine.Entity, transf : Mat4f): Command<CustomEntityUpdateTransformationCommandData> makeCustomVehicleCreateOrUpdateCmd: function(vehicleEntity : Engine.Entity, carrier : Carrier, vehicles : {{integer, boolean}}, movePathAircraft : Engine.Component.MovePathAircraft | nil): Command<CustomVehicleCreateCommandData> makeEntitySetColorCmd: function(entity : Engine.Entity, color : Vec3f): Command<EntitySetColorCommandData> makeEntitySetEmissionsCmd: function(entity : Engine.Entity, noisePower : number, pollutionPower : number, radius : number, pollutionRadius : number): Command<EntitySetEmissionsCommandData> makeEntitySetNameCmd: function(entity : Engine.Entity, name : string, forceSameEntity : boolean): Command<EntitySetNameCommandData> makeEntitySetPlayerCmd: function(entity : Engine.Entity, player : Engine.Entity): Command<EntitySetPlayerCommandData> makeGameAddPlayerCmd: function(name : string, color : Vec3f): Command<GameAddPlayerCommandData> makeGameSetCalendarSpeedCmd: function(millisPerDay : integer): Command<GameSetCalendarSpeedCommandData> makeGameSetDateCmd: function(date : Date): Command<GameSetDateCommandData> makeGameSetSpeedCmd: function(speedup : integer): Command<GameSetSpeedCommandData> makeGameSetTimeOfDayCmd: function(timeOfDaySec : integer): Command<GameSetTimeOfDayCommandData> makeGameSetCloudCoverageCmd: function(cloudCoverage : number): Command<GameSetCloudCoverageCommandData> makeIndustrySetDespawnTimeCmd: function(industryEntity : Engine.Entity, timeStamp : integer): Command<IndustrySetDespawnTimeCommandData> makeIndustrySetManualDevelopmentCmd: function(industryEntity : Engine.Entity, manual : boolean): Command<IndustrySetManualDevelopmentCommandData> makeCreateIndustryExtendProposalCmd: function(extendConstruction : Engine.Entity, numTrySlots : integer, numKeepSlots : integer): Command<CreateIndustryExtendProposalCommandData> makeJournalBookAssetCmd: function(player : Engine.Entity, entry : JournalEntry, position : Vec3f): Command<JournalBookAssetCommandData> makeJournalClearAllCmd: function(): Command<JournalClearAllCommandData> makeJournalLogEntryCmd: function(entity : Engine.Entity, logNamesAndValues : {{string, integer, boolean}}): Command<JournalLogEntryCommandData> makeLineCreateCmd: function(name : string, color : Vec3f, player : Engine.Entity, line : Engine.Component.Line): Command<LineCreateCommandData> makeLineDestroyCmd: function(lineEntity : Engine.Entity): Command<LineDestroyCommandData> makeLineUpdateCmd: function(lineEntity : Engine.Entity, data : Engine.Component.Line): Command<LineUpdateCommandData> makeScriptingSendEventCmd: function(src : string, id : string, name : string, param : any): Command<ScriptingSendEventCommandData> makeStockListDiscardCargoCmd: function(stockListEntity : Engine.Entity, stockIds : {StockId}, remainingTimeToDelivery : number): Command<StockListDiscardCargoCommandData> makeStockListSetStocksCargoTypeCmd: function(stockListEntity : Engine.Entity, stockIds : {StockId}, cargoType : CargoTypeId): Command<StockListSetStocksCargoTypeCommandData> makeStockListSetModifiersCmd: function(industryEntity : Engine.Entity, modifiers : Engine.Component.StockList.Modifiers): Command<StockListSetModifiersCommandData> makeTownConnectWithIndustriesCmd: function(townEntities : {Engine.Entity}, connections : {{integer, integer}}, keep : boolean): Command<TownConnectWithIndustriesCommandData> makeTownAutoDetectConnectionsCmd: function(townEntities : {Engine.Entity}): Command makeTownCreateCmd: function(towns : {TownInfo}): Command<TownCreateCommandData> makeTownDestroyCmd: function(townEntity : Engine.Entity): Command<TownDestroyCommandData> makeTownDevelopAtCmd: function(position : Vec2f, developStreets : boolean, upgradeBuildings : boolean): Command<TownDevelopAtCommandData> makeTownCustomDistributionWeightsCmd: function(townEntitiy : Engine.Entity, levelToCapacityDistributionWeights : {{number}}): Command<TownCustomDistributionWeightsCommandData> makeTownSetDevelopmentActiveCmd: function(entity : Engine.Entity, developmentActive : boolean): Command<TownSetDevelopmentActiveCommandData> makeTownSetInitialLandUseCapacitiesCmd: function(entity : Engine.Entity, landUseCapacities : {integer}): Command<TownSetInitialLandUseCapacitiesCommandData> makeTownUpdateCargoNeedsCmd: function(entity : Engine.Entity, cargoNeeds : {{CargoTypeId}}, updateTownBuildings : boolean): Command<TownUpdateCargoNeedsCommandData> makeTownUpdateSizeCmd: function(townEntity : Engine.Entity, sizeFactors : {number}, updateAllBuildings : boolean): Command<TownUpdateSizeCommandData> makeTownBuildingSetBlockedDevelopmentCmd: function(townBuildingEntity : Engine.Entity, blockedDevelopment : boolean): Command<TownBuildingSetBlockedDevelopment> makeVehicleBuyCmd: function(playerEntity : Engine.Entity, depotEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleBuyCommandData> makeVehicleReplaceCmd: function(vehicleEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleReplaceCommandData> makeVehicleReverseCmd: function(vehicleEntity : Engine.Entity): Command<VehicleReverseCommandData> makeVehicleSellCmd: function(vehicleEntities : {Engine.Entity}): Command<VehicleSellCommandData> makeVehicleSendToDepotCmd: function(vehicleEntity : Engine.Entity, sellOnArrival : boolean, jumpToDepoEntity : Engine.Entity): Command<VehicleSendToDepotCommandData> makeVehicleSetLineCmd: function(vehicleEntity : Engine.Entity, lineEntity : Engine.Entity, stopIndex : integer): Command<VehicleSetLineCommandData> makeVehicleSetManualDepartureCmd: function(vehicleEntity : Engine.Entity, manual : boolean): Command<VehicleSetManualDepartureCommandData> makeVehicleSetStoppedByUserCmd: function(vehicleEntity : Engine.Entity, stopped : boolean): Command<VehicleSetStoppedByUserCommandData> makeVehicleSetModifiersCmd: function(vehicleEntity : Engine.Entity, modifiers : Engine.Component.TransportVehicle.Modifiers): Command<VehicleSetModifiersCommandData> makeVehicleTryToDepartCmd: function(vehicleEntity : Engine.Entity): Command<VehicleTryToDepartCommandData> makeWorldBuildProposalCmd: function(proposal : Proposal, context : any, ignoreErrors : boolean, doDust : boolean, playerInitiated : boolean): Command<WorldBuildProposalCommandData> makeWorldChangeWindCmd: function(emissionGridEntity : Engine.Entity, wind : Vec2f): Command<WorldChangeWindCommandData> makeWorldReplaceTerrainCmd: function(map : GameMap, terrainConfig : BaseConfig.Terrain, seedText : string, worldEntity : Engine.Entity, keepAssets : boolean): Command<WorldReplaceTerrainCommandData> makeWorldSetBulldozableCmd: function(entity : Engine.Entity, bulldozable : boolean): Command<WorldSetBulldozableCommandData>
record Debug makeMaintenanceCostUpdateCmd: function(maintenanceCostEntity : Engine.Entity, amount : integer, reset : boolean): Command makeSimPersonSetStateCmd: function(entity : Engine.Entity, simPersonState : integer): Command<SimPersonSetStateCommandDataDEBUG> makeSimPersonSetHappiness: function(entity : Engine.Entity, happiness : number): Command makeComponentExchangeCmd: function(entity : Engine.Entity, component : Engine.Component): Command<ComponentExchangeCommandDataDEBUG> makeStockSetCargoAmountCmd: function(entity : Engine.Entity, stockId : StockId, amount : integer, cargoType : string): Command<StockSetCargoAmountCommandDataDEBUG> makeGamePerformSimulationStepsCmd: function(amount : integer): Command<GamePerformSimulationStepsCommandDataDEBUG> makeClearLogbooksCmd: function(towns : boolean): Command end
debug: Debug end

contains all commmand factory methods.

Cmd.sendCommand🔗

function Cmd.sendCommand<T is ICommandData>(cmd : Command<T>, callback : function(T, boolean, {{Engine.Entity, Engine.Revision}}), progress : CommandProgress)

Sends a command object to be executed later or immediately depending on the state context. After the execution of the command, the callback function is called.
The callback function receives two parameters:
cmd the command that has been executed, depending on the context this might contain additional information.
success a boolean value to indicate whether the command was successful

Type Parameters
  • T ( is ICommandData)
Parameters
  • cmd :Command<T> — the command object to be sent
  • callback :function(T, boolean, {{Engine.Entity, Engine.Revision}}) — an optional function that is called after the execution of the command
  • progress :CommandProgress — an optional progress object to receive progress updates for long running commands

Cmd.makeAnimalSetStateCmd🔗

function Cmd.makeAnimalSetStateCmd(animalEntity : Engine.Entity, movementType : integer, targetChangedElapsed : number, invalidTileElapsed : number, movementSpeed : number, angularSpeed : number): Command<AnimalSetStateCommandData>

Makes an AnimalSetState command.
When executed, the animal with the given entity Id will be updated.

Parameters
  • animalEntity :Engine.Entity — the entity Id of the animal that should be updated
  • movementType :integer — the index of the configuration in the animals metadata movementTypes list
  • targetChangedElapsed :number — time since the current target destination was selected
  • invalidTileElapsed :number — time since the animal got into an invalid area
  • movementSpeed :number — speed that should be used
  • angularSpeed :number — angular speed that should be used
Returns
  1. Command<AnimalSetStateCommandData> — a newly created AnimalSetState command

Cmd.makeAnimalSpawnAtCmd🔗

function Cmd.makeAnimalSpawnAtCmd(fileName : string, position : Vec2f, lookAt : Vec2f): Command<AnimalSpawnAtCommandData>

Makes an AnimalSpawnAt command.
When executed, a new animal entity is spawned at the specified position.

Parameters
  • fileName :string — reference to the animal model for the animal that should be spawned
  • position :Vec2f — world coordinates of the position where the animal should be spawned
  • lookAt :Vec2f — the direction the animal is facing in
Returns
  1. Command<AnimalSpawnAtCommandData> — a newly created AnimalSpawnAt command

Cmd.makeCustomEntityDestroyCmd🔗

function Cmd.makeCustomEntityDestroyCmd(entity : Engine.Entity): Command<CustomEntityDestroyCommandData>

Makes a CustomEntityDestroy command.
When executed, the command removes the custom entity with the given entity Id.

Parameters
  • entity :Engine.Entity — the entity Id of the custom entity
Returns
  1. Command<CustomEntityDestroyCommandData> — a newly created CustomEntityDestroy command

Cmd.makeCustomEntityCreateCmd🔗

function Cmd.makeCustomEntityCreateCmd(modelId : integer): Command<CustomEntityCreateCommandData>

Makes a CustomEntityCreate command.
When executed, the command creates a new custom entity with the given model Id.

Parameters
  • modelId :integer — the model id of the custom entity
Returns
  1. Command<CustomEntityCreateCommandData> — a newly created CustomEntityCreate command

Cmd.makeCustomEntityUpdateStateCmd🔗

function Cmd.makeCustomEntityUpdateStateCmd(entity : Engine.Entity, customState : ComponentCustomState): Command<CustomEntityUpdateStateCommandData>

Makes a CustomEntityUpdateState command.
When executed, the command updates the state of the custom entity.

Parameters
  • entity :Engine.Entity — the entity Id of the custom entity
  • customState :ComponentCustomState — the new state of the custom entity
Returns
  1. Command<CustomEntityUpdateStateCommandData> — a newly created CustomEntityUpdateState command

Cmd.makeCustomEntityUpdateTransformationCmd🔗

function Cmd.makeCustomEntityUpdateTransformationCmd(entity : Engine.Entity, transf : Mat4f): Command<CustomEntityUpdateTransformationCommandData>

Makes a CustomEntityUpdateTransformation command.
When executed, the command updates the transformation of the custom entity.

Parameters
  • entity :Engine.Entity — the entity Id of the custom entity
  • transf :Mat4f — the new transformation of the custom entity
Returns
  1. Command<CustomEntityUpdateTransformationCommandData> — a newly created CustomEntityUpdateTransformation command

Cmd.makeCustomVehicleCreateOrUpdateCmd🔗

function Cmd.makeCustomVehicleCreateOrUpdateCmd(vehicleEntity : Engine.Entity, carrier : Carrier, vehicles : {{integer, boolean}}, movePathAircraft : Engine.Component.MovePathAircraft | nil): Command<CustomVehicleCreateCommandData>

Makes a CustomVehicleCreateOrUpdateCmd command.
When executed, the command updates or creates a custom vehicle entity.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the custom entity, if nil a new entity will be created
  • carrier :Carrier — the carrier for the vehicleEntity (currently must be Air)
  • vehicles :{{integer, boolean}} — a list of carriages, a pair of modelId and whether the model shall be reversed (currently only a single entry)
  • movePathAircraft :Engine.Component.MovePathAircraft | nil — optional move path for air and water vehicles (currently path0 and path2 must be empty and the state must be in flight)
Returns
  1. Command<CustomVehicleCreateCommandData> — a newly created CustomEntityUpdateTransformation command

Cmd.makeEntitySetColorCmd🔗

function Cmd.makeEntitySetColorCmd(entity : Engine.Entity, color : Vec3f): Command<EntitySetColorCommandData>

Makes an EntitySetColor command.
When executed, the entity Id is set to the given color.

Parameters
  • entity :Engine.Entity — the entity Id of the entity that should be colored
  • color :Vec3f — the rgb color
Returns
  1. Command<EntitySetColorCommandData> — a newly created EntitySetColor command

Cmd.makeEntitySetEmissionsCmd🔗

function Cmd.makeEntitySetEmissionsCmd(entity : Engine.Entity, noisePower : number, pollutionPower : number, radius : number, pollutionRadius : number): Command<EntitySetEmissionsCommandData>

Makes an EntitySetEmissions command.
When executed, the emission values of the entity are set to the given values.

Parameters
  • entity :Engine.Entity — the entity Id of the entity that should be updated
  • noisePower :number — the noise power of the entity
  • pollutionPower :number — the pollution power of the entity
  • radius :number — the radius of the noise emissions
  • pollutionRadius :number — the radius of the pollution emissions
Returns
  1. Command<EntitySetEmissionsCommandData> — a newly created EntitySetEmissions command

Cmd.makeEntitySetNameCmd🔗

function Cmd.makeEntitySetNameCmd(entity : Engine.Entity, name : string, forceSameEntity : boolean): Command<EntitySetNameCommandData>

Makes an EntitySetName command.
When executed, the entity Id is renamed with the given name.

Parameters
  • entity :Engine.Entity — the entity Id of the entity that should be renamed
  • name :string — the new name that should be set
  • forceSameEntity :boolean — (optional, default false) Unless true, things like stations that don't have a name on their own will set the stem name instead.
Returns
  1. Command<EntitySetNameCommandData> — a newly created EntitySetName command

Cmd.makeEntitySetPlayerCmd🔗

function Cmd.makeEntitySetPlayerCmd(entity : Engine.Entity, player : Engine.Entity): Command<EntitySetPlayerCommandData>

Makes an EntitySetPlayer command.
When executed, the entity is set or unset to the player

Parameters
  • entity :Engine.Entity — the entity Id of the entity
  • player :Engine.Entity — the entity Id of the player
Returns
  1. Command<EntitySetPlayerCommandData> — a newly created EntitySetPlayer command

Cmd.makeGameAddPlayerCmd🔗

function Cmd.makeGameAddPlayerCmd(name : string, color : Vec3f): Command<GameAddPlayerCommandData>

Makes a GameAddPlayer command.
When executed, a new player entity is created.

Parameters
  • name :string — the player's name
  • color :Vec3f — the player's color
Returns
  1. Command<GameAddPlayerCommandData> — a newly created GameAddPlayer command

Cmd.makeGameSetCalendarSpeedCmd🔗

function Cmd.makeGameSetCalendarSpeedCmd(millisPerDay : integer): Command<GameSetCalendarSpeedCommandData>

Makes a GameSetCalendarSpeed command.
When executed, the calendar speed is set to the given value (this affects only the speed of the calendar, and not the simulation speed).

Parameters
  • millisPerDay :integer — day length in milliseconds
Returns
  1. Command<GameSetCalendarSpeedCommandData> — a newly created GameSetCalendarSpeed command

Cmd.makeGameSetDateCmd🔗

function Cmd.makeGameSetDateCmd(date : Date): Command<GameSetDateCommandData>

Makes a GameSetDate command.
When executed, the calendar date (for vehicle availability, etc.) is set to the given date.

Parameters
  • date :Date — the new date that should be set
Returns
  1. Command<GameSetDateCommandData> — a newly created GameSetDate command

Cmd.makeGameSetSpeedCmd🔗

function Cmd.makeGameSetSpeedCmd(speedup : integer): Command<GameSetSpeedCommandData>

Makes a GameSetSpeed command.
When executed, the game (simulation) speed is set to the given value.

Parameters
  • speedup :integer — a positive number: the speed that the simulation will run at
Returns
  1. Command<GameSetSpeedCommandData> — a newly created GameSetSpeed command

Cmd.makeGameSetTimeOfDayCmd🔗

function Cmd.makeGameSetTimeOfDayCmd(timeOfDaySec : integer): Command<GameSetTimeOfDayCommandData>

Makes a GameSetTimeOfDay command.

Parameters
  • timeOfDaySec :integer — a positive number: the time of day in seconds
Returns
  1. Command<GameSetTimeOfDayCommandData> — a newly created GameSetTimeOfDay command

Cmd.makeGameSetCloudCoverageCmd🔗

function Cmd.makeGameSetCloudCoverageCmd(cloudCoverage : number): Command<GameSetCloudCoverageCommandData>

Makes a GameSetCloudCoverage command.

Parameters
  • cloudCoverage :number — the current cloud coverage
Returns
  1. Command<GameSetCloudCoverageCommandData> — a newly created GameSetCloudCoverage command

Cmd.makeIndustrySetDespawnTimeCmd🔗

function Cmd.makeIndustrySetDespawnTimeCmd(industryEntity : Engine.Entity, timeStamp : integer): Command<IndustrySetDespawnTimeCommandData>

Makes an IndustrySetDespawnTime command.
When executed, the command sets a new value to the closure time stamp of the given industry.

Parameters
  • industryEntity :Engine.Entity — the entity Id of the industry
  • timeStamp :integer — sets the despawn time of the industry
Returns
  1. Command<IndustrySetDespawnTimeCommandData> — a newly created IndustrySetDespawnTime command

Cmd.makeIndustrySetManualDevelopmentCmd🔗

function Cmd.makeIndustrySetManualDevelopmentCmd(industryEntity : Engine.Entity, manual : boolean): Command<IndustrySetManualDevelopmentCommandData>

Makes an IndustrySetManualDevelopment command.
When executed, the command sets the industry to manual mode if manual is true, or to automatic development mode if manual is set to false (default).

Parameters
  • industryEntity :Engine.Entity — the entity Id of the industry
  • manual :boolean — set to true if industries do not start to close/stop countdown and do not level up or down
Returns
  1. Command<IndustrySetManualDevelopmentCommandData> — a newly created IndustrySetManualDevelopment command

Cmd.makeCreateIndustryExtendProposalCmd🔗

function Cmd.makeCreateIndustryExtendProposalCmd(extendConstruction : Engine.Entity, numTrySlots : integer, numKeepSlots : integer): Command<CreateIndustryExtendProposalCommandData>

Makes a CreateIndustryExtendProposal command.
When executed, the command generates a new proposal to extend the given industry.

Parameters
  • extendConstruction :Engine.Entity — the entity Id of the industry that should be extended
  • numTrySlots :integer — the number of slots to try to extend
  • numKeepSlots :integer — the number of slots to keep after the extension
Returns
  1. Command<CreateIndustryExtendProposalCommandData> — a newly created CreateIndustryExtendProposal command

Cmd.makeJournalBookAssetCmd🔗

function Cmd.makeJournalBookAssetCmd(player : Engine.Entity, entry : JournalEntry, position : Vec3f): Command<JournalBookAssetCommandData>

Makes a JournalBookAsset command.
When executed, the new journal entry is added to the players journal.

Parameters
  • player :Engine.Entity — the entity Id of the player
  • entry :JournalEntry — the entry to add
  • position :Vec3f — a position for the event
Returns
  1. Command<JournalBookAssetCommandData> — a newly created JournalBookAsset command

Cmd.makeJournalClearAllCmd🔗

function Cmd.makeJournalClearAllCmd(): Command<JournalClearAllCommandData>

Makes a JournalClearAll command.
When executed, the journal and logbook is cleared

Returns
  1. Command<JournalClearAllCommandData> — a newly created JournalClearAll command

Cmd.makeJournalLogEntryCmd🔗

function Cmd.makeJournalLogEntryCmd(entity : Engine.Entity, logNamesAndValues : {{string, integer, boolean}}): Command<JournalLogEntryCommandData>

Makes a JournalLogEntry command.
When executed, the log book value is logged.

Parameters
  • entity :Engine.Entity — the entity Id of the logbook
  • logNamesAndValues :{{string, integer, boolean}} — a list of log names and values to log, where each entry contains the log name, value and whether the value is incremental
Returns
  1. Command<JournalLogEntryCommandData> — a newly created JournalLogEntry command

Cmd.makeLineCreateCmd🔗

function Cmd.makeLineCreateCmd(name : string, color : Vec3f, player : Engine.Entity, line : Engine.Component.Line): Command<LineCreateCommandData>

Makes a LineCreate command.
When executed, creates a new line with the given parameters.

Parameters
  • name :string — the name of the new line
  • color :Vec3f — the color of the new line
  • player :Engine.Entity — the entity Id of the player owning the line
  • line :Engine.Component.Line — the configuration data for the line
Returns
  1. Command<LineCreateCommandData> — a newly created LineCreate command

Cmd.makeLineDestroyCmd🔗

function Cmd.makeLineDestroyCmd(lineEntity : Engine.Entity): Command<LineDestroyCommandData>

Makes a LineDestroy command.
When executed, the line with the given entity Id is removed.

Parameters
  • lineEntity :Engine.Entity — the line that should be removed
Returns
  1. Command<LineDestroyCommandData> — a newly created LineDestroy command

Cmd.makeLineUpdateCmd🔗

function Cmd.makeLineUpdateCmd(lineEntity : Engine.Entity, data : Engine.Component.Line): Command<LineUpdateCommandData>

Makes a LineUpdate command.
When executed, the line with the given entity Id is updated to the new line configuration.

Parameters
  • lineEntity :Engine.Entity — the entity Id of the line which should be updated
  • data :Engine.Component.Line — the new line configuration
Returns
  1. Command<LineUpdateCommandData> — a newly created LineUpdate command

Cmd.makeScriptingSendEventCmd🔗

function Cmd.makeScriptingSendEventCmd(src : string, id : string, name : string, param : any): Command<ScriptingSendEventCommandData>

Makes a ScriptingSendEvent command.
When executed, a script event will be broadcasted to all scripts.

Parameters
  • src :string — the filename of the game_script that should be the pretended origin of the event
  • id :string — identifier of the element that caused the event
  • name :string — identifier of the event type
  • param :any — parameters that depend on the context of the event
Returns
  1. Command<ScriptingSendEventCommandData> — a newly created ScriptingSendEvent command

Cmd.makeStockListDiscardCargoCmd🔗

function Cmd.makeStockListDiscardCargoCmd(stockListEntity : Engine.Entity, stockIds : {StockId}, remainingTimeToDelivery : number): Command<StockListDiscardCargoCommandData>

Makes a StockListDiscardCargo command.
When executed, discards the cargo of the given stock list.

Parameters
  • stockListEntity :Engine.Entity — the entity Id of the stock list
  • stockIds :{StockId} — the list of stock ids
  • remainingTimeToDelivery :number — the time remaining to delivery
Returns
  1. Command<StockListDiscardCargoCommandData> — a newly created StockListDiscardCargo command

Cmd.makeStockListSetStocksCargoTypeCmd🔗

function Cmd.makeStockListSetStocksCargoTypeCmd(stockListEntity : Engine.Entity, stockIds : {StockId}, cargoType : CargoTypeId): Command<StockListSetStocksCargoTypeCommandData>

Makes a StockListSetStocksCargoType command.
When executed, sets or resets the cargo type of the given stocks.

Parameters
  • stockListEntity :Engine.Entity — the entity Id of the stock list
  • stockIds :{StockId} — the list of stock ids
  • cargoType :CargoTypeId — the cargo type to set, empty if the cargo type should be reset
Returns
  1. Command<StockListSetStocksCargoTypeCommandData> — a newly created StockListSetStocksCargoType command

Cmd.makeStockListSetModifiersCmd🔗

function Cmd.makeStockListSetModifiersCmd(industryEntity : Engine.Entity, modifiers : Engine.Component.StockList.Modifiers): Command<StockListSetModifiersCommandData>

Makes a StockListSetModifiers command.
Allows changing some properties of industries

Parameters
  • industryEntity :Engine.Entity — the entity Id of the industry of which the departure mode is to be changed
  • modifiers :Engine.Component.StockList.Modifiers — a struct with the changes to the industry parameters
Returns
  1. Command<StockListSetModifiersCommandData> — a newly created StockListSetModifiers command

Cmd.makeTownConnectWithIndustriesCmd🔗

function Cmd.makeTownConnectWithIndustriesCmd(townEntities : {Engine.Entity}, connections : {{integer, integer}}, keep : boolean): Command<TownConnectWithIndustriesCommandData>

Makes a TownConnectWithIndustries command.
When executed, the command generates a new street network connecting the given towns and all existing industries.

Parameters
  • townEntities :{Engine.Entity} — the entity Ids of the towns to connect together
  • connections :{{integer, integer}} — list with indices into the vector townEntities specifying which towns are to be connected
  • keep :boolean — set to true if existing street connections should be kept, otherwise the streets will be removed
Returns
  1. Command<TownConnectWithIndustriesCommandData> — a newly created TownConnectWithIndustries command

Cmd.makeTownAutoDetectConnectionsCmd🔗

function Cmd.makeTownAutoDetectConnectionsCmd(townEntities : {Engine.Entity}): Command

Makes a TownAutoDetectConnections command.
When executed, the command tries to detect if an existing connections between towns exists

Parameters
  • townEntities :{Engine.Entity} — the entity Ids of the towns to check for connections
Returns
  1. Command — a newly created TownAutoDetectConnections command

Cmd.makeTownCreateCmd🔗

function Cmd.makeTownCreateCmd(towns : {TownInfo}): Command<TownCreateCommandData>

Makes a TownCreate command.
When executed, the command initiates the generation of new towns using information contained in TownInfo.

Parameters
  • towns :{TownInfo} — a list of town creation information, one for each new town
Returns
  1. Command<TownCreateCommandData> — a newly created TownCreate command

Cmd.makeTownDestroyCmd🔗

function Cmd.makeTownDestroyCmd(townEntity : Engine.Entity): Command<TownDestroyCommandData>

Makes a TownDestroy command.
When executed, the town with the given entity Id is removed (all streets and buildings belonging to the town will be removed as well).

Parameters
  • townEntity :Engine.Entity — the entity Id of the town that should be removed
Returns
  1. Command<TownDestroyCommandData> — a newly created TownDestroy command

Cmd.makeTownDevelopAtCmd🔗

function Cmd.makeTownDevelopAtCmd(position : Vec2f, developStreets : boolean, upgradeBuildings : boolean): Command<TownDevelopAtCommandData>

Makes a TownDevelopAt command.
When executed, the command triggers development of towns at the given position.
By developing towns, new buildings or street segments are added at the given position.

Parameters
  • position :Vec2f — the position where development should be triggered
  • developStreets :boolean — develop streets
  • upgradeBuildings :boolean — upgrade buildings
Returns
  1. Command<TownDevelopAtCommandData> — a newly created TownDevelopAt command

Cmd.makeTownCustomDistributionWeightsCmd🔗

function Cmd.makeTownCustomDistributionWeightsCmd(townEntitiy : Engine.Entity, levelToCapacityDistributionWeights : {{number}}): Command<TownCustomDistributionWeightsCommandData>

Makes a TownCustomDistributionWeights command.
When executed, the command sets the level to capacities distribution weights for the town.

Parameters
  • townEntitiy :Engine.Entity — the entity Id of the town
  • levelToCapacityDistributionWeights :{{number}} — level to capacities distribution weights for each land use type
Returns
  1. Command<TownCustomDistributionWeightsCommandData> — a newly created TownCustomDistributionWeights command

Cmd.makeTownSetDevelopmentActiveCmd🔗

function Cmd.makeTownSetDevelopmentActiveCmd(entity : Engine.Entity, developmentActive : boolean): Command<TownSetDevelopmentActiveCommandData>

Makes a TownSetDevelopmentActive command.
When executed, the command enables/disables the development of a town.

Parameters
  • entity :Engine.Entity — the entity Id of the town
  • developmentActive :boolean — signals whether the town development should be enabled/disabled
Returns
  1. Command<TownSetDevelopmentActiveCommandData> — a newly created TownSetDevelopmentActive command

Cmd.makeTownSetInitialLandUseCapacitiesCmd🔗

function Cmd.makeTownSetInitialLandUseCapacitiesCmd(entity : Engine.Entity, landUseCapacities : {integer}): Command<TownSetInitialLandUseCapacitiesCommandData>

Makes a TownSetInitialLandUseCapacities command.
When executed, the town with the given entity Id is set to the given initial capacities.

Parameters
  • entity :Engine.Entity — the entity Id of the town that should be updated
  • landUseCapacities :{integer} — initial capacities for the residential, commercial and industrial. If not provided, capacities are automatically updated
Returns
  1. Command<TownSetInitialLandUseCapacitiesCommandData> — a newly created TownSetInitialLandUseCapacities command

Cmd.makeTownUpdateCargoNeedsCmd🔗

function Cmd.makeTownUpdateCargoNeedsCmd(entity : Engine.Entity, cargoNeeds : {{CargoTypeId}}, updateTownBuildings : boolean): Command<TownUpdateCargoNeedsCommandData>

Makes a TownUpdateCargoNeeds command.
When executed, the cargo needs of the town districts are updated to the provided needs.

Parameters
  • entity :Engine.Entity — the entity Id of the town that should be updated
  • cargoNeeds :{{CargoTypeId}} — a list of cargo type Ids for the needs of each of the three town districts residential, commercial and industrial
  • updateTownBuildings :boolean — whether to update all buildings immediately
Returns
  1. Command<TownUpdateCargoNeedsCommandData> — a newly created TownUpdateCargoNeeds command

Cmd.makeTownUpdateSizeCmd🔗

function Cmd.makeTownUpdateSizeCmd(townEntity : Engine.Entity, sizeFactors : {number}, updateAllBuildings : boolean): Command<TownUpdateSizeCommandData>

Makes a TownUpdateSize command.
When executed, the town with the given entity Id is set to the given initial capacities.

Parameters
  • townEntity :Engine.Entity — the entity Id of the town that should be updated
  • sizeFactors :{number} — initial capacities for the residential, commercial and industrial districts of the town
  • updateAllBuildings :boolean — whether to update all buildings immediately
Returns
  1. Command<TownUpdateSizeCommandData> — a newly created TownUpdateSize command

Cmd.makeTownBuildingSetBlockedDevelopmentCmd🔗

function Cmd.makeTownBuildingSetBlockedDevelopmentCmd(townBuildingEntity : Engine.Entity, blockedDevelopment : boolean): Command<TownBuildingSetBlockedDevelopment>

Makes a TownBuildingSetBlockedDevelopment command.
When executed, makes buildings "Historic" thatn cannot be changed

Parameters
  • townBuildingEntity :Engine.Entity — the entity Id of the town building that should be updated
  • blockedDevelopment :boolean — decides whether to prevent the town developer from changing building
Returns
  1. Command<TownBuildingSetBlockedDevelopment> — a newly created TownBuildingSetBlockedDevelopment command

Cmd.makeVehicleBuyCmd🔗

function Cmd.makeVehicleBuyCmd(playerEntity : Engine.Entity, depotEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleBuyCommandData>

Makes a VehicleBuy command.
When executed, a new vehicle is bought and placed in the given depot.

Parameters
  • playerEntity :Engine.Entity — the entity Id of the player
  • depotEntity :Engine.Entity — the entity Id of the depot in which the vehicle will appear
  • tvc :TransportVehicleConfig — data containing information about the vehicle being purchased
Returns
  1. Command<VehicleBuyCommandData> — a newly created VehicleBuy command

Cmd.makeVehicleReplaceCmd🔗

function Cmd.makeVehicleReplaceCmd(vehicleEntity : Engine.Entity, tvc : TransportVehicleConfig): Command<VehicleReplaceCommandData>

Makes a VehicleReplace command.
When executed, the vehicle with the given entity Id will be replaced by the new vehicle configuration.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle that should be replaced
  • tvc :TransportVehicleConfig — data containing information about the new vehicle being purchased
Returns
  1. Command<VehicleReplaceCommandData> — a newly created VehicleReplace command

Cmd.makeVehicleReverseCmd🔗

function Cmd.makeVehicleReverseCmd(vehicleEntity : Engine.Entity): Command<VehicleReverseCommandData>

Makes a VehicleReverse command.
When executed, the vehicle with the given entity Id will be reversed.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle that should be reversed
Returns
  1. Command<VehicleReverseCommandData> — a newly created VehicleReverse command

Cmd.makeVehicleSellCmd🔗

function Cmd.makeVehicleSellCmd(vehicleEntities : {Engine.Entity}): Command<VehicleSellCommandData>

Makes a VehicleSell command.
When executed, the vehicle with the given entity Id will be sold.

Parameters
  • vehicleEntities :{Engine.Entity} — the entity ids of the vehicles which should be sold
Returns
  1. Command<VehicleSellCommandData> — a newly created VehicleSell command

Cmd.makeVehicleSendToDepotCmd🔗

function Cmd.makeVehicleSendToDepotCmd(vehicleEntity : Engine.Entity, sellOnArrival : boolean, jumpToDepoEntity : Engine.Entity): Command<VehicleSendToDepotCommandData>

Makes a VehicleSendToDepot command.
When executed, the vehicle with the given entity Id will be sent to the nearest reachable depot and (optionally) be sold.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle that should be sent to the depot
  • sellOnArrival :boolean — if set to true, the vehicle will be sold upon arrival at the depot
  • jumpToDepoEntity :Engine.Entity — optional. If provided, then vehicle gets "teleported" to depot
Returns
  1. Command<VehicleSendToDepotCommandData> — a newly created VehicleSendToDepot command

Cmd.makeVehicleSetLineCmd🔗

function Cmd.makeVehicleSetLineCmd(vehicleEntity : Engine.Entity, lineEntity : Engine.Entity, stopIndex : integer): Command<VehicleSetLineCommandData>

Makes a VehicleSetLine command.
When executed, the vehicle with the provided entity Id is assigned to the line with given entity Id and sent to the stop with the given index.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle that should be assigned to the line
  • lineEntity :Engine.Entity — the entity Id of the line on which the vehicle should be sent
  • stopIndex :integer — the position of the stop on the line to which the vehicle should be sent to
Returns
  1. Command<VehicleSetLineCommandData> — a newly created VehicleSetLine command

Cmd.makeVehicleSetManualDepartureCmd🔗

function Cmd.makeVehicleSetManualDepartureCmd(vehicleEntity : Engine.Entity, manual : boolean): Command<VehicleSetManualDepartureCommandData>

Makes a VehicleSetManualDeparture command.
When an entity with component type TRANSPORT_VEHICLE is set to manual departure
it will not depart from the terminal under any circumstance (the callback will always return success).
If the entity is not a transport vehicle, the command callback will return False.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle of which the departure mode is to be changed
  • manual :boolean — whether the entity is managed or not
Returns
  1. Command<VehicleSetManualDepartureCommandData> — a newly created VehicleSetManualDeparture command

Cmd.makeVehicleSetStoppedByUserCmd🔗

function Cmd.makeVehicleSetStoppedByUserCmd(vehicleEntity : Engine.Entity, stopped : boolean): Command<VehicleSetStoppedByUserCommandData>

Makes a VehicleSetStoppedByUser command.
When executed, the given vehicle is stopped or started as if the user controlled it in the vehicle dialog.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle that should be stopped or started
  • stopped :boolean — stopped true if the vehicle should be stopped
Returns
  1. Command<VehicleSetStoppedByUserCommandData> — a newly created VehicleSetStoppedByUser command

Cmd.makeVehicleSetModifiersCmd🔗

function Cmd.makeVehicleSetModifiersCmd(vehicleEntity : Engine.Entity, modifiers : Engine.Component.TransportVehicle.Modifiers): Command<VehicleSetModifiersCommandData>

Makes a VehicleSetModifiers command.
Allows changing some properties of transport vehicles

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle of which the departure mode is to be changed
  • modifiers :Engine.Component.TransportVehicle.Modifiers — a struct with the changes to the transport vehicle parameters
Returns
  1. Command<VehicleSetModifiersCommandData> — a newly created VehicleSetModifiers command

Cmd.makeVehicleTryToDepartCmd🔗

function Cmd.makeVehicleTryToDepartCmd(vehicleEntity : Engine.Entity): Command<VehicleTryToDepartCommandData>

Makes a VehicleTryToDepart command.
When executed, and the vehicle with entity Id is at the terminal, the vehicle will immediately close
the door and depart as soon as the doors are closed. The vehicle will ignore any departure condition and depart immediately.
The command callback will return success if the entity has a TRANSPORT_VEHICLE component and
is currently waiting at the terminal.

Parameters
  • vehicleEntity :Engine.Entity — the entity Id of the vehicle at terminal that should depart
Returns
  1. Command<VehicleTryToDepartCommandData> — a newly created VehicleTryToDepart command

Cmd.makeWorldBuildProposalCmd(Proposal, any, boolean, boolean, boolean)🔗

function Cmd.makeWorldBuildProposalCmd(Proposal, any, boolean, boolean, boolean)(proposal : Proposal, context : any, ignoreErrors : boolean, doDust : boolean, playerInitiated : boolean): Command<WorldBuildProposalCommandData>

Makes a WorldBuildProposal command. This command is used to create new constructions and new streets via scripting.
When executed, the given build proposal is built. The command might fail resulting in the proposal not being built.

Parameters
  • proposal :Proposal — a proposal containing a preview of the changes that will be applied with this command
  • context :any — a context with extra options for the proposal
  • ignoreErrors :boolean — a flag enabling the building of the proposal even if non-critical errors are triggered
  • doDust :boolean — whether dust effect should be created
  • playerInitiated :boolean — whether the command was initiated by a player
Returns
  1. Command<WorldBuildProposalCommandData> — a newly created WorldBuildProposal command

Cmd.makeWorldBuildProposalCmd(SimpleProposal, any, boolean, boolean, boolean)🔗

function Cmd.makeWorldBuildProposalCmd(SimpleProposal, any, boolean, boolean, boolean)(SimpleProposal, any, boolean, boolean, boolean): Command<WorldBuildProposalCommandData>
Parameters
  • SimpleProposal
  • any
  • boolean
  • boolean
  • boolean
Returns
  1. Command<WorldBuildProposalCommandData>

Cmd.makeWorldChangeWindCmd🔗

function Cmd.makeWorldChangeWindCmd(emissionGridEntity : Engine.Entity, wind : Vec2f): Command<WorldChangeWindCommandData>

Makes a WorldChangeWind command.
When executed, the EmissionGrid with the given entity Id is updated to run with the new wind given.

Parameters
  • emissionGridEntity :Engine.Entity — the entity Id of the game's emission grid
  • wind :Vec2f — the new wind
Returns
  1. Command<WorldChangeWindCommandData> — a newly created WorldChangeWind command

Cmd.makeWorldReplaceTerrainCmd🔗

function Cmd.makeWorldReplaceTerrainCmd(map : GameMap, terrainConfig : BaseConfig.Terrain, seedText : string, worldEntity : Engine.Entity, keepAssets : boolean): Command<WorldReplaceTerrainCommandData>

Makes a WorldReplaceTerrain command.
When executed, the terrain is replaced. This is similar to the generation in map editor.

Parameters
  • map :GameMap — an object that specifies the data for the new terrain (heightmap, assets, water level...)
  • terrainConfig :BaseConfig.Terrain — configuration parameters for the new terrain
  • seedText :string — a seed for randomization purposes
  • worldEntity :Engine.Entity — the entity Id of the world, usually 0
  • keepAssets :boolean — if set to true, existing landscape assets are conserved
Returns
  1. Command<WorldReplaceTerrainCommandData> — a newly created WorldReplaceTerrain command

Cmd.makeWorldSetBulldozableCmd🔗

function Cmd.makeWorldSetBulldozableCmd(entity : Engine.Entity, bulldozable : boolean): Command<WorldSetBulldozableCommandData>

Makes a WorldSetBulldozable command.
Sets whether an entity can be bulldozed or not.

Parameters
  • entity :Engine.Entity — entity ID
  • bulldozable :boolean — whether bulldozeable or not
Returns
  1. Command<WorldSetBulldozableCommandData> — a newly created WorldSetBulldozable command

Cmd.Debug🔗

record Cmd.Debug makeMaintenanceCostUpdateCmd: function(maintenanceCostEntity : Engine.Entity, amount : integer, reset : boolean): Command makeSimPersonSetStateCmd: function(entity : Engine.Entity, simPersonState : integer): Command<SimPersonSetStateCommandDataDEBUG> makeSimPersonSetHappiness: function(entity : Engine.Entity, happiness : number): Command makeComponentExchangeCmd: function(entity : Engine.Entity, component : Engine.Component): Command<ComponentExchangeCommandDataDEBUG> makeStockSetCargoAmountCmd: function(entity : Engine.Entity, stockId : StockId, amount : integer, cargoType : string): Command<StockSetCargoAmountCommandDataDEBUG> makeGamePerformSimulationStepsCmd: function(amount : integer): Command<GamePerformSimulationStepsCommandDataDEBUG> makeClearLogbooksCmd: function(towns : boolean): Command end

Debug command helpers.

Cmd.Debug.makeMaintenanceCostUpdateCmd🔗

function Cmd.Debug.makeMaintenanceCostUpdateCmd(maintenanceCostEntity : Engine.Entity, amount : integer, reset : boolean): Command

Makes a MaintenanceCostUpdate command.
When executed, the maintenance cost amount is updated

Parameters
  • maintenanceCostEntity :Engine.Entity — the entity Id of the maintenance cost about to change
  • amount :integer — of the new maintenance cost
  • reset :boolean — the accumulated cost
Returns
  1. Command — a newly created MaintenanceCostUpdate command

Cmd.Debug.makeSimPersonSetStateCmd🔗

function Cmd.Debug.makeSimPersonSetStateCmd(entity : Engine.Entity, simPersonState : integer): Command<SimPersonSetStateCommandDataDEBUG>

Sets the state of a simulated person.

Parameters
  • entity :Engine.Entity — the entity Id
  • simPersonState :integer — the new state
Returns
  1. Command<SimPersonSetStateCommandDataDEBUG> — a newly created SimPersonSetState command

Cmd.Debug.makeSimPersonSetHappiness🔗

function Cmd.Debug.makeSimPersonSetHappiness(entity : Engine.Entity, happiness : number): Command

Sets the happiness value of a simulated person.

Parameters
  • entity :Engine.Entity — the entity Id
  • happiness :number — the new happiness value
Returns
  1. Command — a newly created SimPersonSetHappiness command

Cmd.Debug.makeComponentExchangeCmd🔗

function Cmd.Debug.makeComponentExchangeCmd(entity : Engine.Entity, component : Engine.Component): Command<ComponentExchangeCommandDataDEBUG>

Replaces a component on an entity for debugging purposes.

Parameters
  • entity :Engine.Entity — the entity Id
  • component :Engine.Component — the component (EmissionEmitter or ModelInstanceList)
Returns
  1. Command<ComponentExchangeCommandDataDEBUG> — a newly created ComponentExchange command

Cmd.Debug.makeStockSetCargoAmountCmd🔗

function Cmd.Debug.makeStockSetCargoAmountCmd(entity : Engine.Entity, stockId : StockId, amount : integer, cargoType : string): Command<StockSetCargoAmountCommandDataDEBUG>

Sets the cargo amount for a stock.

Parameters
  • entity :Engine.Entity — stocklist entity
  • stockId :StockId — the stock ID
  • amount :integer — the cargo amount
  • cargoType :string — optional cargo type URI
Returns
  1. Command<StockSetCargoAmountCommandDataDEBUG> — a newly created StockSetCargoAmount command

Cmd.Debug.makeGamePerformSimulationStepsCmd🔗

function Cmd.Debug.makeGamePerformSimulationStepsCmd(amount : integer): Command<GamePerformSimulationStepsCommandDataDEBUG>

Advances the simulation by a given number of steps.

Parameters
  • amount :integer — the number of steps
Returns
  1. Command<GamePerformSimulationStepsCommandDataDEBUG> — a newly created GamePerformSimulationSteps command

Cmd.Debug.makeClearLogbooksCmd🔗

function Cmd.Debug.makeClearLogbooksCmd(towns : boolean): Command

Clears either town or global logbooks.

Parameters
  • towns :boolean — whether to clear town logbooks
Returns
  1. Command — a newly created ClearLogbooks command

Cmd.debug🔗

Cmd.debug: Debug

Category: globals🔗

AnimalSetStateCommandData🔗

global record AnimalSetStateCommandData animalEntity: Engine.Entity movementType: integer targetChangedElapsed: number invalidTileElapsed: number movementSpeed: number angularSpeed: number end

Sends a command object to be executed later or immediately depending on the context.

AnimalSetStateCommandData.animalEntity🔗

AnimalSetStateCommandData.animalEntity: Engine.Entity

Entity id of the animal that should be updated.

AnimalSetStateCommandData.movementType🔗

AnimalSetStateCommandData.movementType: integer

the index of the configuration in the animals metadata movementTypes list

AnimalSetStateCommandData.targetChangedElapsed🔗

AnimalSetStateCommandData.targetChangedElapsed: number

Time since the current target destination was selected.

AnimalSetStateCommandData.invalidTileElapsed🔗

AnimalSetStateCommandData.invalidTileElapsed: number

Time since the animal got into an invalid area.

AnimalSetStateCommandData.movementSpeed🔗

AnimalSetStateCommandData.movementSpeed: number

speed that should be used.

AnimalSetStateCommandData.angularSpeed🔗

AnimalSetStateCommandData.angularSpeed: number

angularSpeed angular speed that should be used.

AnimalSpawnAtCommandData🔗

global record AnimalSpawnAtCommandData modelId: integer position: Vec2f lookAt: Vec2f resultEntity: Engine.Entity end

Command data for cmd.makeAnimalSpawnAtCmd.

AnimalSpawnAtCommandData.modelId🔗

AnimalSpawnAtCommandData.modelId: integer

reference to the animal model that should be spawned.

AnimalSpawnAtCommandData.position🔗

AnimalSpawnAtCommandData.position: Vec2f

position coordinates of the position where the animal should be spawned.

AnimalSpawnAtCommandData.lookAt🔗

AnimalSpawnAtCommandData.lookAt: Vec2f

lookAt the direction the animal is looking.

AnimalSpawnAtCommandData.resultEntity🔗

AnimalSpawnAtCommandData.resultEntity: Engine.Entity

resultEntity The entity id of the spawned animal, used as a result only.

Command🔗

global record Command<T is ICommandData>end

Command object sent via cmd.sendCommand.

Type Parameters
  • T ( is ICommandData)

ComponentExchangeCommandDataDEBUG🔗

global record ComponentExchangeCommandDataDEBUG entity: Engine.Entity component: Engine.Component end

ComponentExchangeCommandDataDEBUG.entity🔗

ComponentExchangeCommandDataDEBUG.entity: Engine.Entity

ComponentExchangeCommandDataDEBUG.component🔗

ComponentExchangeCommandDataDEBUG.component: Engine.Component

CreateIndustryExtendProposalCommandData🔗

global record CreateIndustryExtendProposalCommandData extendConstruction: Engine.Entity numTrySlots: integer numKeepSlots: integer resultProposal: Proposal resultCollidingSubconstructions: {integer} end

Command data for cmd.makeCreateIndustryExtendProposalCmd.

CreateIndustryExtendProposalCommandData.extendConstruction🔗

CreateIndustryExtendProposalCommandData.extendConstruction: Engine.Entity

Entity id of the industry that should be extended.

CreateIndustryExtendProposalCommandData.numTrySlots🔗

CreateIndustryExtendProposalCommandData.numTrySlots: integer

Number of slots to try to extend.

CreateIndustryExtendProposalCommandData.numKeepSlots🔗

CreateIndustryExtendProposalCommandData.numKeepSlots: integer

Number of slots to keep after the extension.

CreateIndustryExtendProposalCommandData.resultProposal🔗

CreateIndustryExtendProposalCommandData.resultProposal: Proposal

The resulting proposal generated by the command (result only).

CreateIndustryExtendProposalCommandData.resultCollidingSubconstructions🔗

CreateIndustryExtendProposalCommandData.resultCollidingSubconstructions: {integer}

The resulting colliding subconstructions generated by the command (result only).

CustomEntityCreateCommandData🔗

global record CustomEntityCreateCommandData modelId: integer resultEntity: Engine.Entity end

Command data for cmd.makeCustomEntityCreateCmd.

CustomEntityCreateCommandData.modelId🔗

CustomEntityCreateCommandData.modelId: integer

Model id of the custom entity.

CustomEntityCreateCommandData.resultEntity🔗

CustomEntityCreateCommandData.resultEntity: Engine.Entity

Created entity id (result only).

CustomEntityDestroyCommandData🔗

global record CustomEntityDestroyCommandData entity: Engine.Entity end

Command data for cmd.makeCustomEntityDestroyCmd.

CustomEntityDestroyCommandData.entity🔗

CustomEntityDestroyCommandData.entity: Engine.Entity

Entity id of the custom entity.

CustomEntityUpdateStateCommandData🔗

global record CustomEntityUpdateStateCommandData entity: Engine.Entity customState: {<any type> : <any type>} end

Command data for cmd.makeCustomEntityUpdateStateCmd.

CustomEntityUpdateStateCommandData.entity🔗

CustomEntityUpdateStateCommandData.entity: Engine.Entity

Entity id of the custom entity.

CustomEntityUpdateStateCommandData.customState🔗

CustomEntityUpdateStateCommandData.customState: {<any type> : <any type>}

New custom state.

CustomEntityUpdateTransformationCommandData🔗

global record CustomEntityUpdateTransformationCommandData entity: Engine.Entity transf: Mat4f end

Command data for cmd.makeCustomEntityUpdateTransformationCmd.

CustomEntityUpdateTransformationCommandData.entity🔗

CustomEntityUpdateTransformationCommandData.entity: Engine.Entity

Entity id of the custom entity.

CustomEntityUpdateTransformationCommandData.transf🔗

CustomEntityUpdateTransformationCommandData.transf: Mat4f

New transformation.

CustomVehicleCreateCommandData🔗

global record CustomVehicleCreateCommandData vehicleEntity: Engine.Entity carrier: Carrier vehicles: {{integer, boolean}} movePathAircraft: Engine.Component.MovePathAircraft resultEntity: Engine.Entity end

Command data for cmd.makeCustomVehicleCreateOrUpdateCmd.

CustomVehicleCreateCommandData.vehicleEntity🔗

CustomVehicleCreateCommandData.vehicleEntity: Engine.Entity

CustomVehicleCreateCommandData.carrier🔗

CustomVehicleCreateCommandData.carrier: Carrier

Model id of the custom entity.

CustomVehicleCreateCommandData.vehicles🔗

CustomVehicleCreateCommandData.vehicles: {{integer, boolean}}

List of carriages to add to the vehicles (model id and reversed status)

CustomVehicleCreateCommandData.movePathAircraft🔗

CustomVehicleCreateCommandData.movePathAircraft: Engine.Component.MovePathAircraft

The move path for aircraft and ships (not all members are utilized, path0 and 2 must be empty and must be in flight state)

CustomVehicleCreateCommandData.resultEntity🔗

CustomVehicleCreateCommandData.resultEntity: Engine.Entity

Created entity id (result only).

EntitySetColorCommandData🔗

global record EntitySetColorCommandData entity: Engine.Entity color: Vec3f end

Command data for cmd.makeEntitySetColorCmd.

EntitySetColorCommandData.entity🔗

EntitySetColorCommandData.entity: Engine.Entity

Entity id.

EntitySetColorCommandData.color🔗

EntitySetColorCommandData.color: Vec3f

RGB color.

EntitySetEmissionsCommandData🔗

global record EntitySetEmissionsCommandData entity: Engine.Entity noisePower: number pollutionPower: number radius: number end

Command data for cmd.makeEntitySetEmissionsCmd.

EntitySetEmissionsCommandData.entity🔗

EntitySetEmissionsCommandData.entity: Engine.Entity

Entity id of the emission emitter.

EntitySetEmissionsCommandData.noisePower🔗

EntitySetEmissionsCommandData.noisePower: number

Noise in power.

EntitySetEmissionsCommandData.pollutionPower🔗

EntitySetEmissionsCommandData.pollutionPower: number

Pollution in power.

EntitySetEmissionsCommandData.radius🔗

EntitySetEmissionsCommandData.radius: number

Emission radius in meters.

EntitySetNameCommandData🔗

global record EntitySetNameCommandData entity: Engine.Entity name: string end

Command data for cmd.makeEntitySetNameCmd.

EntitySetNameCommandData.entity🔗

EntitySetNameCommandData.entity: Engine.Entity

id of the entity that should be renamed.

EntitySetNameCommandData.name🔗

EntitySetNameCommandData.name: string

the name that should be set.

EntitySetPlayerCommandData🔗

global record EntitySetPlayerCommandData entity: Engine.Entity playerEntity: Engine.Entity end

Command data for cmd.makeEntitySetPlayerCmd.

EntitySetPlayerCommandData.entity🔗

EntitySetPlayerCommandData.entity: Engine.Entity

Entity id for which the player will be assigned.

EntitySetPlayerCommandData.playerEntity🔗

EntitySetPlayerCommandData.playerEntity: Engine.Entity

Player entity id.

GameAddPlayerCommandData🔗

global record GameAddPlayerCommandData name: string color: Vec3f resultEntity: Engine.Entity end

Command data for cmd.makeGameAddPlayerCmd.

GameAddPlayerCommandData.name🔗

GameAddPlayerCommandData.name: string

Player name.

GameAddPlayerCommandData.color🔗

GameAddPlayerCommandData.color: Vec3f

Player color.

GameAddPlayerCommandData.resultEntity🔗

GameAddPlayerCommandData.resultEntity: Engine.Entity

Created player entity id (result only).

GamePerformSimulationStepsCommandDataDEBUG🔗

global record GamePerformSimulationStepsCommandDataDEBUG amount: integer end

GamePerformSimulationStepsCommandDataDEBUG.amount🔗

GamePerformSimulationStepsCommandDataDEBUG.amount: integer

GameSaveCommandData🔗

global record GameSaveCommandData modDescs: {Mod.GameModDesc} configData: {<any type> : <any type>} guiSaveData: {<any type> : <any type>} fileName: string isAutosave: boolean isMapsave: boolean screenshot: GameScreenshot error: integer end

Command data for saving the game.

GameSaveCommandData.modDescs🔗

GameSaveCommandData.modDescs: {Mod.GameModDesc}

GameSaveCommandData.configData🔗

GameSaveCommandData.configData: {<any type> : <any type>}

GameSaveCommandData.guiSaveData🔗

GameSaveCommandData.guiSaveData: {<any type> : <any type>}

GameSaveCommandData.fileName🔗

GameSaveCommandData.fileName: string

GameSaveCommandData.isAutosave🔗

GameSaveCommandData.isAutosave: boolean

GameSaveCommandData.isMapsave🔗

GameSaveCommandData.isMapsave: boolean

GameSaveCommandData.screenshot🔗

GameSaveCommandData.screenshot: GameScreenshot

GameSaveCommandData.error🔗

GameSaveCommandData.error: integer

GameSetCalendarSpeedCommandData🔗

global record GameSetCalendarSpeedCommandData millisPerDay: integer end

Command data for cmd.makeGameSetCalendarSpeedCmd.

GameSetCalendarSpeedCommandData.millisPerDay🔗

GameSetCalendarSpeedCommandData.millisPerDay: integer

Day length in milliseconds.

GameSetCloudCoverageCommandData🔗

global record GameSetCloudCoverageCommandData cloudCoverage: number end

Command data for cmd.makeGameSetCloudCoverageCmd.

GameSetCloudCoverageCommandData.cloudCoverage🔗

GameSetCloudCoverageCommandData.cloudCoverage: number

new cloud coverage.

GameSetDateCommandData🔗

global record GameSetDateCommandData date: Date end

Command data for cmd.makeGameSetDateCmd.

GameSetDateCommandData.date🔗

GameSetDateCommandData.date: Date

New date.

GameSetSpeedCommandData🔗

global record GameSetSpeedCommandData speedup: integer end

Command data for cmd.makeGameSetSpeedCmd.

GameSetSpeedCommandData.speedup🔗

GameSetSpeedCommandData.speedup: integer

Simulation speed.

GameSetTimeOfDayCommandData🔗

global record GameSetTimeOfDayCommandData timeOfDaySec: integer end

Command data for cmd.makeGameSetTimeOfDayCmd.

GameSetTimeOfDayCommandData.timeOfDaySec🔗

GameSetTimeOfDayCommandData.timeOfDaySec: integer

Time of day in seconds.

ICommandData🔗

global interface ICommandDataend

Marker interface for command data payloads.

IndustrySetDespawnTimeCommandData🔗

global record IndustrySetDespawnTimeCommandData entity: Engine.Entity timeStamp: integer end

Command data for cmd.makeIndustrySetDespawnTimeCmd._

IndustrySetDespawnTimeCommandData.entity🔗

IndustrySetDespawnTimeCommandData.entity: Engine.Entity

of the building entity of which the despawn timeStamp should change.

IndustrySetDespawnTimeCommandData.timeStamp🔗

IndustrySetDespawnTimeCommandData.timeStamp: integer

time after which the building should be closed.

IndustrySetManualDevelopmentCommandData🔗

global record IndustrySetManualDevelopmentCommandData entity: Engine.Entity manual: boolean end

Command data for cmd.makeIndustrySetManualDevelopmentCmd.

IndustrySetManualDevelopmentCommandData.entity🔗

IndustrySetManualDevelopmentCommandData.entity: Engine.Entity

Industry entity id.

IndustrySetManualDevelopmentCommandData.manual🔗

IndustrySetManualDevelopmentCommandData.manual: boolean

manual whether the entity should manually be developed.

JournalBookAssetCommandData🔗

global record JournalBookAssetCommandData playerEntity: Engine.Entity journalEntry: JournalEntry position: Vec3f end

Command data for cmd.makeJournalBookAssetCmd.

JournalBookAssetCommandData.playerEntity🔗

JournalBookAssetCommandData.playerEntity: Engine.Entity

Player entity id.

JournalBookAssetCommandData.journalEntry🔗

JournalBookAssetCommandData.journalEntry: JournalEntry

Journal entry to add.

JournalBookAssetCommandData.position🔗

JournalBookAssetCommandData.position: Vec3f

World position of the journal entry.

JournalClearAllCommandData🔗

global record JournalClearAllCommandDataend

Command data for cmd.makeJournalClearAllCmd.

JournalLogEntryCommandData🔗

global record JournalLogEntryCommandData entity: Engine.Entity logName: string time: number value: integer end

Command data for cmd.makeJournalLogEntryCmd.

JournalLogEntryCommandData.entity🔗

JournalLogEntryCommandData.entity: Engine.Entity

Entity to log on.

JournalLogEntryCommandData.logName🔗

JournalLogEntryCommandData.logName: string

Log name.

JournalLogEntryCommandData.time🔗

JournalLogEntryCommandData.time: number

Log time.

JournalLogEntryCommandData.value🔗

JournalLogEntryCommandData.value: integer

Log value.

LineCreateCommandData🔗

global record LineCreateCommandData line: Engine.Component.Line name: Engine.Component.Name color: Engine.Component.Color playerOwned: Engine.Component.PlayerOwned resultEntity: Engine.Entity end

Command data for cmd.makeLineCreateCmd.

LineCreateCommandData.line🔗

LineCreateCommandData.line: Engine.Component.Line

Line configuration.

LineCreateCommandData.name🔗

LineCreateCommandData.name: Engine.Component.Name

new name component of the line.

LineCreateCommandData.color🔗

LineCreateCommandData.color: Engine.Component.Color

new color component of the line.

LineCreateCommandData.playerOwned🔗

LineCreateCommandData.playerOwned: Engine.Component.PlayerOwned

new player owned component of the line.

LineCreateCommandData.resultEntity🔗

LineCreateCommandData.resultEntity: Engine.Entity

Created line entity id (result only).

LineDestroyCommandData🔗

global record LineDestroyCommandData lineEntity: Engine.Entity end

Command data for cmd.makeLineDestroyCmd.

LineDestroyCommandData.lineEntity🔗

LineDestroyCommandData.lineEntity: Engine.Entity

Line entity id.

LineUpdateCommandData🔗

global record LineUpdateCommandData lineEntity: Engine.Entity line: Engine.Component.Line end

Command data for cmd.makeLineUpdateCmd.

LineUpdateCommandData.lineEntity🔗

LineUpdateCommandData.lineEntity: Engine.Entity

Line entity id.

LineUpdateCommandData.line🔗

LineUpdateCommandData.line: Engine.Component.Line

New line component.

MaintenanceCostUpdateCommandDataDEBUG🔗

global record MaintenanceCostUpdateCommandDataDEBUG maintenanceCostEntity: Engine.Entity amount: integer resetAccumulatedCost: boolean end

Command data to set new maintenance cost (debug).

MaintenanceCostUpdateCommandDataDEBUG.maintenanceCostEntity🔗

MaintenanceCostUpdateCommandDataDEBUG.maintenanceCostEntity: Engine.Entity

The entity id of the maintenance cost

MaintenanceCostUpdateCommandDataDEBUG.amount🔗

MaintenanceCostUpdateCommandDataDEBUG.amount: integer

The new maintenance cost amount

MaintenanceCostUpdateCommandDataDEBUG.resetAccumulatedCost🔗

MaintenanceCostUpdateCommandDataDEBUG.resetAccumulatedCost: boolean

Whether to clean the accumulated cost

ScriptingSendEventCommandData🔗

global record ScriptingSendEventCommandData fileName: string id: string name: string param: any end

Command data for cmd.makeScriptingSendEventCmd.

ScriptingSendEventCommandData.fileName🔗

ScriptingSendEventCommandData.fileName: string

Filename of the game script that should be the pretended origin of the event.

ScriptingSendEventCommandData.id🔗

ScriptingSendEventCommandData.id: string

Identifier of the element that caused the event.

ScriptingSendEventCommandData.name🔗

ScriptingSendEventCommandData.name: string

Identifier of the event type.

ScriptingSendEventCommandData.param🔗

ScriptingSendEventCommandData.param: any

Parameters that depend on the context of the event.

SimPersonSetStateCommandDataDEBUG🔗

global record SimPersonSetStateCommandDataDEBUG entity: Engine.Entity type: integer end

SimPersonSetStateCommandDataDEBUG.entity🔗

SimPersonSetStateCommandDataDEBUG.entity: Engine.Entity

SimPersonSetStateCommandDataDEBUG.type🔗

SimPersonSetStateCommandDataDEBUG.type: integer

StockListDiscardCargoCommandData🔗

global record StockListDiscardCargoCommandData stockListEntity: Engine.Entity stockIds: {StockId} remainingTimeToDelivery: number end

Command data for cmd.makeStockListDiscardCargoCmd.

StockListDiscardCargoCommandData.stockListEntity🔗

StockListDiscardCargoCommandData.stockListEntity: Engine.Entity

Stock list entity id.

StockListDiscardCargoCommandData.stockIds🔗

StockListDiscardCargoCommandData.stockIds: {StockId}

Stock ids to discard.

StockListDiscardCargoCommandData.remainingTimeToDelivery🔗

StockListDiscardCargoCommandData.remainingTimeToDelivery: number

Time until the cargo is delivered.

StockListSetModifiersCommandData🔗

global record StockListSetModifiersCommandData entity: Engine.Entity modifiers: Engine.Component.StockList.Modifiers end

Command data for cmd.makeStockListSetModifiersCmd.

StockListSetModifiersCommandData.entity🔗

StockListSetModifiersCommandData.entity: Engine.Entity

Id of the industry entity of which the departure mode should change.

StockListSetModifiersCommandData.modifiers🔗

StockListSetModifiersCommandData.modifiers: Engine.Component.StockList.Modifiers

a struct containing all modifiers applied to the industry.

StockListSetStocksCargoTypeCommandData🔗

global record StockListSetStocksCargoTypeCommandData stockListEntity: Engine.Entity stockIds: {StockId} cargoType: CargoTypeId end

Command data for cmd.makeStockListSetStocksCargoTypeCmd.

StockListSetStocksCargoTypeCommandData.stockListEntity🔗

StockListSetStocksCargoTypeCommandData.stockListEntity: Engine.Entity

Stock list entity id.

StockListSetStocksCargoTypeCommandData.stockIds🔗

StockListSetStocksCargoTypeCommandData.stockIds: {StockId}

a list of stock ids to set the cargo type

StockListSetStocksCargoTypeCommandData.cargoType🔗

StockListSetStocksCargoTypeCommandData.cargoType: CargoTypeId

cargoType the cargo type to set, empty to reset

StockSetCargoAmountCommandDataDEBUG🔗

global record StockSetCargoAmountCommandDataDEBUG stockListEntity: Engine.Entity stock: StockId amount: integer cargoType: ResName end

StockSetCargoAmountCommandDataDEBUG.stockListEntity🔗

StockSetCargoAmountCommandDataDEBUG.stockListEntity: Engine.Entity

StockSetCargoAmountCommandDataDEBUG.stock🔗

StockSetCargoAmountCommandDataDEBUG.stock: StockId

StockSetCargoAmountCommandDataDEBUG.amount🔗

StockSetCargoAmountCommandDataDEBUG.amount: integer

StockSetCargoAmountCommandDataDEBUG.cargoType🔗

StockSetCargoAmountCommandDataDEBUG.cargoType: ResName

TownAutoDetectConnectionsCommandData🔗

global record TownAutoDetectConnectionsCommandData townEntities: {Engine.Entity} end

Command to automatically detect connection existing between towns.

TownAutoDetectConnectionsCommandData.townEntities🔗

TownAutoDetectConnectionsCommandData.townEntities: {Engine.Entity}

Entity ids of the towns to detect connections for.

TownBuildingSetBlockedDevelopment🔗

global record TownBuildingSetBlockedDevelopment townBuildingEntity: Engine.Entity blockedDevelopment: boolean end

TownBuildingSetBlockedDevelopment.townBuildingEntity🔗

TownBuildingSetBlockedDevelopment.townBuildingEntity: Engine.Entity

Town building entity id.

TownBuildingSetBlockedDevelopment.blockedDevelopment🔗

TownBuildingSetBlockedDevelopment.blockedDevelopment: boolean

Whether to prevent the town developer from changing the town building

TownConnectWithIndustriesCommandData🔗

global record TownConnectWithIndustriesCommandData townEntities: {Engine.Entity} connections: {{integer, integer}} keep: boolean end

Command data for cmd.makeTownConnectWithIndustriesCmd.

TownConnectWithIndustriesCommandData.townEntities🔗

TownConnectWithIndustriesCommandData.townEntities: {Engine.Entity}

Town entity ids to connect.

TownConnectWithIndustriesCommandData.connections🔗

TownConnectWithIndustriesCommandData.connections: {{integer, integer}}

Connections as pairs of indices into townEntities for start and end destinations

TownConnectWithIndustriesCommandData.keep🔗

TownConnectWithIndustriesCommandData.keep: boolean

Whether to keep existing street connections.

TownCreateCommandData🔗

global record TownCreateCommandData towns: {TownInfo} updateInitialLandUseCapacities: boolean end

Command data for cmd.makeTownCreateCmd.

TownCreateCommandData.towns🔗

TownCreateCommandData.towns: {TownInfo}

Town creation information.

TownCreateCommandData.updateInitialLandUseCapacities🔗

TownCreateCommandData.updateInitialLandUseCapacities: boolean

Whether to update initial land use capacities.

TownCustomDistributionWeightsCommandData🔗

global record TownCustomDistributionWeightsCommandData townEntity: Engine.Entity levelToCapacityDistributionWeights: {{number, number, number, number}, {number, number, number, number}, {number, number, number, number}} end

Command data for cmd.makeTownCustomDistributionWeightsCmd.

TownCustomDistributionWeightsCommandData.townEntity🔗

TownCustomDistributionWeightsCommandData.townEntity: Engine.Entity

Town entity id.

TownCustomDistributionWeightsCommandData.levelToCapacityDistributionWeights🔗

TownCustomDistributionWeightsCommandData.levelToCapacityDistributionWeights: {{number, number, number, number}, {number, number, number, number}, {number, number, number, number}}

Level-to-capacity distribution weights for each land use type.

TownDestroyCommandData🔗

global record TownDestroyCommandData townEntity: Engine.Entity end

Command data for cmd.makeTownDestroyCmd.

TownDestroyCommandData.townEntity🔗

TownDestroyCommandData.townEntity: Engine.Entity

Town entity id.

TownDevelopAtCommandData🔗

global record TownDevelopAtCommandData position: Vec2f developStreets: boolean upgradeBuildings: boolean end

Command data for cmd.makeTownDevelopAtCmd.

TownDevelopAtCommandData.position🔗

TownDevelopAtCommandData.position: Vec2f

World position where development should be triggered.

TownDevelopAtCommandData.developStreets🔗

TownDevelopAtCommandData.developStreets: boolean

Whether to develop streets.

TownDevelopAtCommandData.upgradeBuildings🔗

TownDevelopAtCommandData.upgradeBuildings: boolean

Whether to upgrade buildings.

TownSetDevelopmentActiveCommandData🔗

global record TownSetDevelopmentActiveCommandData townEntity: Engine.Entity developmentActive: boolean end

Command data for cmd.makeTownSetDevelopmentActiveCmd.

TownSetDevelopmentActiveCommandData.townEntity🔗

TownSetDevelopmentActiveCommandData.townEntity: Engine.Entity

Town entity id.

TownSetDevelopmentActiveCommandData.developmentActive🔗

TownSetDevelopmentActiveCommandData.developmentActive: boolean

Whether development should be set to active or inactive.

TownSetInitialLandUseCapacitiesCommandData🔗

global record TownSetInitialLandUseCapacitiesCommandData townEntity: Engine.Entity initialLandUseCapacities: {integer} end

Command data for cmd.makeTownSetInitialLandUseCapacitiesCmd.

TownSetInitialLandUseCapacitiesCommandData.townEntity🔗

TownSetInitialLandUseCapacitiesCommandData.townEntity: Engine.Entity

Town entity id.

TownSetInitialLandUseCapacitiesCommandData.initialLandUseCapacities🔗

TownSetInitialLandUseCapacitiesCommandData.initialLandUseCapacities: {integer}

Initial capacities for the three land use types (residential, commercial and industrial).

TownUpdateCargoNeedsCommandData🔗

global record TownUpdateCargoNeedsCommandData townEntity: Engine.Entity cargoNeeds: {{CargoTypeId}} updateTownBuildings: boolean end

Command data for cmd.makeTownUpdateCargoNeedsCmd.

TownUpdateCargoNeedsCommandData.townEntity🔗

TownUpdateCargoNeedsCommandData.townEntity: Engine.Entity

Town entity id.

TownUpdateCargoNeedsCommandData.cargoNeeds🔗

TownUpdateCargoNeedsCommandData.cargoNeeds: {{CargoTypeId}}

Cargo needs per district (residential/commercial/industrial).

TownUpdateCargoNeedsCommandData.updateTownBuildings🔗

TownUpdateCargoNeedsCommandData.updateTownBuildings: boolean

Whether to update all buildings to their target capacity.

TownUpdateSizeCommandData🔗

global record TownUpdateSizeCommandData townEntity: Engine.Entity landUseSizeFactors: {number} updateAllBuildings: boolean end

Command data for cmd.makeTownUpdateSizeCmd.

TownUpdateSizeCommandData.townEntity🔗

TownUpdateSizeCommandData.townEntity: Engine.Entity

Town entity id.

TownUpdateSizeCommandData.landUseSizeFactors🔗

TownUpdateSizeCommandData.landUseSizeFactors: {number}

Size factors for residential/commercial/industrial.

TownUpdateSizeCommandData.updateAllBuildings🔗

TownUpdateSizeCommandData.updateAllBuildings: boolean

Whether to update all buildings to their target capacity.

VehicleBuyCommandData🔗

global record VehicleBuyCommandData playerEntity: Engine.Entity depotEntity: Engine.Entity config: TransportVehicleConfig resultVehicleEntity: Engine.Entity end

Command data for cmd.makeVehicleBuyCmd.

VehicleBuyCommandData.playerEntity🔗

VehicleBuyCommandData.playerEntity: Engine.Entity

Player entity id.

VehicleBuyCommandData.depotEntity🔗

VehicleBuyCommandData.depotEntity: Engine.Entity

Depot entity id.

VehicleBuyCommandData.config🔗

VehicleBuyCommandData.config: TransportVehicleConfig

config data containing information about the vehicle being purchased.

VehicleBuyCommandData.resultVehicleEntity🔗

VehicleBuyCommandData.resultVehicleEntity: Engine.Entity

the entity id of the new vehicle, used only as output when the command is successful.

VehicleReplaceCommandData🔗

global record VehicleReplaceCommandData vehicleEntity: Engine.Entity config: TransportVehicleConfig applyPurchaseCost: boolean end

Command data for cmd.makeVehicleReplaceCmd.

VehicleReplaceCommandData.vehicleEntity🔗

VehicleReplaceCommandData.vehicleEntity: Engine.Entity

Vehicle entity id.

VehicleReplaceCommandData.config🔗

VehicleReplaceCommandData.config: TransportVehicleConfig

Bew ransport vehicle configuration.

VehicleReplaceCommandData.applyPurchaseCost🔗

VehicleReplaceCommandData.applyPurchaseCost: boolean

Whether to apply the purchase cost of the new vehicle.

VehicleReverseCommandData🔗

global record VehicleReverseCommandData vehicleEntity: Engine.Entity end

Command data for cmd.makeVehicleReverseCmd.

VehicleReverseCommandData.vehicleEntity🔗

VehicleReverseCommandData.vehicleEntity: Engine.Entity

Vehicle entity id of the vehicle that should be reversed

VehicleSellCommandData🔗

global record VehicleSellCommandData vehicleEntities: {Engine.Entity} end

Command data for cmd.makeVehicleSellCmd.

VehicleSellCommandData.vehicleEntities🔗

VehicleSellCommandData.vehicleEntities: {Engine.Entity}

Vehicle entity ids.

VehicleSendToDepotCommandData🔗

global record VehicleSendToDepotCommandData vehicleEntity: Engine.Entity sellOnArrival: boolean jumpToDepotEntity: Engine.Entity end

Command data for cmd.makeVehicleSendToDepotCmd.

VehicleSendToDepotCommandData.vehicleEntity🔗

VehicleSendToDepotCommandData.vehicleEntity: Engine.Entity

Vehicle entity id.

VehicleSendToDepotCommandData.sellOnArrival🔗

VehicleSendToDepotCommandData.sellOnArrival: boolean

if set to true, the vehicle will be sold upon arrival at the depot

VehicleSendToDepotCommandData.jumpToDepotEntity🔗

VehicleSendToDepotCommandData.jumpToDepotEntity: Engine.Entity

VehicleSetLineCommandData🔗

global record VehicleSetLineCommandData vehicleEntity: Engine.Entity lineEntity: Engine.Entity stopIndex: integer end

Command data for cmd.makeVehicleSetLineCmd.

VehicleSetLineCommandData.vehicleEntity🔗

VehicleSetLineCommandData.vehicleEntity: Engine.Entity

Vehicle entity id.

VehicleSetLineCommandData.lineEntity🔗

VehicleSetLineCommandData.lineEntity: Engine.Entity

id of the line on which the vehicle should be sent

VehicleSetLineCommandData.stopIndex🔗

VehicleSetLineCommandData.stopIndex: integer

the position of the stop on the line to which the vehicle should be sent

VehicleSetManualDepartureCommandData🔗

global record VehicleSetManualDepartureCommandData entity: Engine.Entity manual: boolean end

Command data for cmd.makeVehicleSetManualDepartureCmd.

VehicleSetManualDepartureCommandData.entity🔗

VehicleSetManualDepartureCommandData.entity: Engine.Entity

Id of the vehicle entity of which the departure mode should change

VehicleSetManualDepartureCommandData.manual🔗

VehicleSetManualDepartureCommandData.manual: boolean

manual whether the entity should wait at the terminal or not

VehicleSetModifiersCommandData🔗

global record VehicleSetModifiersCommandData entity: Engine.Entity modifiers: Engine.Component.TransportVehicle.Modifiers end

Command data for cmd.makeVehicleSetModifiersCmd.

VehicleSetModifiersCommandData.entity🔗

VehicleSetModifiersCommandData.entity: Engine.Entity

Id of the vehicle entity of which the departure mode should change

VehicleSetModifiersCommandData.modifiers🔗

VehicleSetModifiersCommandData.modifiers: Engine.Component.TransportVehicle.Modifiers

a struct containing all modifiers applied to the vehicle

VehicleSetStoppedByUserCommandData🔗

global record VehicleSetStoppedByUserCommandData vehicleEntity: Engine.Entity userStopped: boolean end

Command data for cmd.makeVehicleSetStoppedByUserCmd.

VehicleSetStoppedByUserCommandData.vehicleEntity🔗

VehicleSetStoppedByUserCommandData.vehicleEntity: Engine.Entity

id of the vehicle that should be stopped or started

VehicleSetStoppedByUserCommandData.userStopped🔗

VehicleSetStoppedByUserCommandData.userStopped: boolean

true if the vehicle should be stopped

VehicleTryToDepartCommandData🔗

global record VehicleTryToDepartCommandData vehicleEntity: Engine.Entity end

Command data for cmd.makeVehicleTryToDepartCmd.

VehicleTryToDepartCommandData.vehicleEntity🔗

VehicleTryToDepartCommandData.vehicleEntity: Engine.Entity

id of the vehicle that should be stopped or started

WorldBuildProposalCommandData🔗

global record WorldBuildProposalCommandData proposal: Proposal context: Context withCostRep: boolean ignoreErrors: boolean resultProposalData: ProposalData resultEntities: {{Engine.Entity, Engine.Revision}} doDust: boolean end

Command data for cmd.makeWorldBuildProposalCmd.

WorldBuildProposalCommandData.proposal🔗

WorldBuildProposalCommandData.proposal: Proposal

The definition of the proposal

WorldBuildProposalCommandData.context🔗

WorldBuildProposalCommandData.context: Context

A context with extra options for the build

WorldBuildProposalCommandData.withCostRep🔗

WorldBuildProposalCommandData.withCostRep: boolean

tells to ingore costs if set to true

WorldBuildProposalCommandData.ignoreErrors🔗

WorldBuildProposalCommandData.ignoreErrors: boolean

tells to ingore costs if set to true

WorldBuildProposalCommandData.resultProposalData🔗

WorldBuildProposalCommandData.resultProposalData: ProposalData

The resulting data generated by the proposal

WorldBuildProposalCommandData.resultEntities🔗

WorldBuildProposalCommandData.resultEntities: {{Engine.Entity, Engine.Revision}}

only relevant when obtained in callback result, after command has been ran

WorldBuildProposalCommandData.doDust🔗

WorldBuildProposalCommandData.doDust: boolean

whether dust effect should be created

WorldChangeWindCommandData🔗

global record WorldChangeWindCommandData emissionGridEntity: Engine.Entity wind: Vec2f end

Command data for cmd.makeWorldChangeWindCmd.

WorldChangeWindCommandData.emissionGridEntity🔗

WorldChangeWindCommandData.emissionGridEntity: Engine.Entity

id of the emission grid affected (noise or pollution)

WorldChangeWindCommandData.wind🔗

WorldChangeWindCommandData.wind: Vec2f

the new wind velocity to set

WorldReplaceTerrainCommandData🔗

global record WorldReplaceTerrainCommandData map: GameMap terrainConfig: BaseConfig.Terrain seedText: string worldEntity: Engine.Entity keepAssets: boolean end

Command data for cmd.makeWorldReplaceTerrainCmd.

WorldReplaceTerrainCommandData.map🔗

WorldReplaceTerrainCommandData.map: GameMap

WorldReplaceTerrainCommandData.terrainConfig🔗

WorldReplaceTerrainCommandData.terrainConfig: BaseConfig.Terrain

WorldReplaceTerrainCommandData.seedText🔗

WorldReplaceTerrainCommandData.seedText: string

a seed for randomization purposes

WorldReplaceTerrainCommandData.worldEntity🔗

WorldReplaceTerrainCommandData.worldEntity: Engine.Entity

id of the world, usually 0

WorldReplaceTerrainCommandData.keepAssets🔗

WorldReplaceTerrainCommandData.keepAssets: boolean

if set to true, existing landscape assets are conserved

WorldSetBulldozableCommandData🔗

global record WorldSetBulldozableCommandData entity: Engine.Entity value: boolean end

Command data for cmd.makeWorldSetBulldozableCmd.

WorldSetBulldozableCommandData.entity🔗

WorldSetBulldozableCommandData.entity: Engine.Entity

Id of the entity

WorldSetBulldozableCommandData.value🔗

WorldSetBulldozableCommandData.value: boolean

true if entity is bulldozable

Transport Fever 3 Wiki
Gameplay ReferenceComing soon
●
Modding Manual
  • api
  • api.cmd
  • api.engine
  • api.engine.system
  • api.engine.util
  • api.gui
  • api.res
  • api.type
  • api.type.mod
  • api.type.modhub
  • api.type.transformator
  • app
  • main
  • content
    • base
      • difficulty_util
      • model_metadata_util
      • post_run_util
    • climates
      • gen
        • map_gen_util_serialized
    • game_mechanics
      • achievements
        • sound
          • achievement_sfx
      • celebrations
        • celebration_react_util
        • gui
          • sound
            • celebration_sfx
      • company
        • company
        • company_metadata
        • company_progression_util
        • company_react_util
        • company_static_util
        • company_util
        • explorations
          • exploration_plane
        • prospection_metadata
        • sound
          • company_sfx
      • emission
        • emission_config_metadata
        • emission_metadata
        • emissions
      • finance
        • account
        • finances_react_util
        • finances_util
        • loan
        • loan_util
        • sound
          • finance_sfx
      • fun_elements
        • blimp_util
        • custom_entity_util
        • fun_elements
        • rocket_util
        • ufo_util
      • game_time
        • game_time
      • industries
        • industries
      • notifications
        • gui
          • notification_colors
          • sound
            • notification_sfx
        • notification_legacy_util
        • notification_util
        • notifications
        • types
          • notification_react_util
          • notification_types
      • subventions
        • specific_subvention
        • subvention
        • subvention_legacy_util
        • subvention_util
        • subventions_gui
      • towns
        • district_colors
        • sound
          • town_sfx
        • town_cargo
        • town_growth_metadata
        • town_marketing_metadata
        • town_react_util
        • town_util
        • town_util_parallel
        • towns
    • gui
      • construction
        • construction_colors
        • construction_desc_react_util
        • construction_menu
        • construction_react_util
        • sound
          • construction_sfx
        • track_description_metadata
        • track_modifier_metadata
      • context_helper
        • context_helper
      • entity_window
        • animal
          • animal_eow
        • empty_construction
          • empty_construction_eow
        • entity_window_hud
        • entity_window_util
        • eow_extension_util
        • fun_elements
          • fun_elements_eow
        • gameplay_colors
        • industry
          • industry_eow
        • industry_react_util
        • line
          • line_eow
        • maintenance_station
          • maintenance_station_eow
        • perk
          • perk_eow
        • sim_person
          • sim_person_eow
        • station_group
          • station_group_eow
        • town
          • town_eow
        • town_building
          • town_building_eow
        • vehicle
          • vehicle_eow
        • view_manager
        • view_manager_util
        • warehouse
          • warehouse_eow
      • game_bar
        • game_bar
        • game_bar_widgets
      • guidesystem
        • sound
          • guidesystem_sfx
      • hud
        • hud_gui_config
        • hud_react_util
      • layers
        • layer_cargo
        • layer_cargo_flow
        • layer_colors
        • layer_noise
        • layer_pollution
        • layer_public_transport
        • layer_react_util
        • layer_traffic
        • layers_button_ridge
      • line_vehicle_mgmt
        • cargofilter_window
        • feedback_list_util
        • line
        • line_react_util
        • line_util
        • manager_hud_util
        • manager_tooltips_util
        • manager_window
        • sound
          • lvm_sfx
        • vehicle_list_react_util
        • vehicle_react_util
        • vehicle_store
        • vehicle_store_table
        • vehicle_store_util
        • vehicle_store_window
        • vehicle_util
      • main
        • button_react_util
        • callout_react_util
        • cargo_react_util
        • cargo_util
        • collapsible_checkbox_list
        • content_card
        • credits_react_util
        • default_colors
        • disable_features
        • engine_react_util
        • free_cam_options
        • game_context
        • game_react_globals
        • game_tooltips
        • game_windows
        • gui_react_util
        • gui_res_modding
        • hud_icon_toolbox
        • industry_util
        • input_action_colors
        • main_mod_button_area
        • menu_category_util
        • mod_entry_point
        • particle_colors
        • particle_react_util
        • popover_react_util
        • radial_menu_extension
        • script_param_util
        • selection_colors
        • selector
        • selector_react_util
        • styleutil
        • tile_list_react_util
        • tool_react_util
        • town_hud_react_util
      • map_editor
        • map_editor
      • menu
        • dialog_react_util
        • difficulty_react_util
        • graphics_presets_util
        • main_menu
        • map_preview_colors
        • menu_icon_react_util
        • menu_util
        • mod_colors
        • mod_manager_react_util
        • mod_util
        • new_game_react_util
        • paradox_react_util
        • releasenotes_util
        • savegame_react_util
        • sound
          • main_menu_sfx
      • sound
        • gui_comp_sfx
      • statistics
        • statistics
        • statistics_react_util
    • industries
      • industry_productivity_util
      • industry_workers
    • infrastructure
      • traffic_light
        • traffic_light
    • landmarks
      • hq
        • headquarter_util_serialized
      • landmark
      • landmark_util
      • landmark_util_serialized
    • mission
      • arrival_tracker
      • builder_util
      • calendar
      • guide_system
        • guide_system_react
        • guides
          • guide_event
          • guide_generic
          • guide_state
          • guide_timer
          • guide_ui_event
      • mission_boot_util
      • mission_colors
      • mission_framework
        • mission_end_window_util
        • mission_framework_react
        • mission_framework_react_util
        • mission_framework_util
        • mission_framework_util_entity
        • mission_framework_util_line
        • mission_interface
      • mission_pathfinding_util
      • mission_react_util
      • mission_task_util
      • mission_types
      • modifier
      • name_util
      • tasks
        • assign_vehicle
          • mission_task_assign_vehicle
          • mission_task_visit_stations_ordered
        • auto_builder
          • mission_task_electrify
          • mission_task_track_builder
          • prepare_track_building_util
        • build_construction
          • mission_task_build_construction
          • mission_task_build_construction_util
          • mission_task_build_construction_variant
        • build_path
          • mission_task_build_path
        • bulldoze
          • mission_task_auto_bulldoze
          • mission_task_bulldoze
        • buy_vehicle
          • mission_task_buy_vehicle
          • mission_task_clone_vehicle
        • click_and_collect_custom_entity
          • mission_task_collect_entity
          • mission_task_spawn_entity
        • click_entity
          • mission_task_click_entity
        • connect_nodes
          • mission_task_connect_nodes
        • create_line
          • mission_task_create_line
          • mission_task_create_line_for_towns
          • mission_task_stop_config
        • cutscene
          • mission_task_cutscene
        • dialogue
          • mission_task_dialogue
        • finish
          • mission_task_finish
        • guide
          • mission_task_guide
          • mission_task_guide_collect_entity
        • join
          • mission_task_join
        • mission_dialogue_data
        • non_bulldozable
          • mission_task_non_bulldozable
        • observe_entity
          • mission_task_observe_entity
        • page
          • mission_task_page
        • spawn_sims
          • mission_task_spawn_sims
          • sampling_util
        • subsidies
          • mission_task_guide_subsidies
          • mission_task_subsidies
        • task_decorator
        • town_rating
          • mission_task_town_rating
          • mission_task_town_rating_observer
        • town_size
          • mission_task_town_size
        • transfer_ownership
          • mission_task_transfer_ownership
          • transfer_ownership_util
        • transport_cargo
          • mission_task_empty_stocks
          • mission_task_industry_boosted
          • mission_task_transport_cargo
          • mission_task_transport_cargo_faster
          • mission_task_transport_cargo_observer
          • mission_task_transport_passengers
        • utility
          • mission_task_cargo_needs
          • mission_task_check_entities
          • mission_task_check_landmark_level
          • mission_task_clouds
          • mission_task_highlight
          • mission_task_industry_activity
          • mission_task_landmark_requirements
          • mission_task_play_sound
          • mission_task_protected_entities
          • mission_task_relay_update
          • mission_task_send_command
          • mission_task_send_event
          • mission_task_store_any
          • mission_task_substitute_constructions
          • mission_task_time_of_day
          • mission_task_town_development
          • mission_town_util
        • vehicle_util
          • mission_task_replace_vehicles
          • mission_task_sell_vehicles
          • mission_task_start_vehicles
          • mission_task_vehicle_modifier
          • mission_task_vehicle_position
          • mission_vehicle_util
        • wait
          • mission_task_wait
          • mission_task_wait_event
          • mission_task_wait_for
          • mission_task_wait_ui_event
        • waypoints
          • mission_task_waypoints
      • tutorial
        • tasks
          • mission_task_tutorial_init
        • tutorial_story_util
    • scripts
      • app_util
      • audio_util
      • builtin
      • construction
        • asset_util
        • collider_util_serialized
        • construction_config_metadata
        • construction_specialization_metadata
        • construction_util_serialized
        • lane_util_serialized
        • modules_util_serialized
        • param_util
        • street_util_serialized
      • entity_util
      • gamescript
      • journal
      • lang_util
      • log
      • mat4
      • math_util
      • metadata_util
      • polygon_util
      • random_util
      • react
      • soundset
      • string_util
      • table_util
      • tex_util
      • transformator_util
      • util
        • config_util
        • listutil
        • romberg_util
        • town_growth_function
      • vec2
      • vec3
      • vec4
    • stations
      • station_metadata
    • vehicle
      • vehicle_modifier

Generated 19-08-2026

Transport Fever 3 ● Urban Games © 2026