276 KiB
Module api.engine🔗
Contains API for reading the game engine state.
This module is available as read-only access to the entire engine state (in particular to the entire entity component system). It can be accessed from both the GUI State and the Engine State.
[Expand All] [Collapse All]
global record Engine type Entity = integer
record Revision num: {integer, integer, integer}
end
record Component record Account new: function(): Account
balance: integer
loan: integer
end
record Aircraft new: function(): Aircraft
reservedTakeOffRunway: boolean
reservedLandingRunway: boolean
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record Animal new: function(): Animal
worldPosition: Vec3f
lookingAt: Vec2f
targetCoord: Vec2f
movementSpeed: number
angularSpeed: number
lastUpdateElapsed: number
targetChangedElapsed: number
invalidTileElapsed: number
movementType: integer
roll: number
scaling: number
flock: {Vec3f}
end
record AssetGroup new: function(): AssetGroup
end
record AssetGroupAutoRemove new: function(): AssetGroupAutoRemove
end
record AudioEmitter new: function(): AudioEmitter
emitter: integer
end
record BaseEdge new: function(): BaseEdge
clone: function(BaseEdge): BaseEdge
type: BaseEdgeType
typeIndex: integer
objects: {{Engine.Entity, EdgeObjectType}}
laneConfigs: {LaneConfig}
laneConfigs_native: Vector<LaneConfig>
roadDevelopmentLocked: boolean
node0: Engine.Entity
node1: Engine.Entity
position0: Vec3f
position1: Vec3f
tangent0: Vec3f
tangent1: Vec3f
laneConfig: {LaneConfig}
edgeDecorations: {{integer, boolean}}
distance: number
roadType: RoadType
roadTemplate: ResName
roadStyle: ResName
end
record BaseEdgeStreet new: function(): BaseEdgeStreet
precedenceNode0: PrecedencePreference
precedenceNode1: PrecedencePreference
end
record BaseNode new: function(): BaseNode
clone: function(BaseNode): BaseNode
position: Vec3f
end
record TrafficLightState new: function(): TrafficLightState
clone: function(TrafficLightState): TrafficLightState
lockedLanes: {integer}
duration: number
minDuration: number
canSkip: boolean
end
record TrafficLightConfig new: function(): TrafficLightConfig
clone: function(TrafficLightConfig): TrafficLightConfig
states: {TrafficLightState}
trafficLightType: integer
end
record BaseNodeConfig new: function(): BaseNodeConfig
laneConnections: {LaneConnection}
crosswalks: {Entity}
trafficLightPreference: TrafficLightPreference
trafficLightConfig: TrafficLightConfig
doubleSlipSwitch: boolean
userModifiedLaneConnections: boolean
userModifiedTrafficLightStates: boolean
end
record BaseNodeTrafficLight new: function(): BaseNodeTrafficLight
trafficLightData: TrafficLightData
state: integer
time: number
stateTimes: {integer}
end
record BaseParallelStrip new: function(): BaseParallelStrip
record BaseEdgeRange new: function(): BaseEdgeRange
edge: Engine.Entity
bounds: {number, number}
end
rangeGroups: {{BaseEdgeRange}}
rangeGroups_native: Vector<Vector<BaseEdgeRange>>
end
record BoundingVolume new: function(): BoundingVolume
bbox: Box3f
end
record Bridge new: function(): Bridge
record Interval new: function(): Interval
splines: {{Vec3f}}
railingModels: {{integer, Mat4f}}
end
intervals: {Interval}
end
record BuildCost new: function(): BuildCost
buildCost: integer
bulldozeCost: integer
noCostAtAll: boolean
end
record BulldozerInfo new: function(): BulldozerInfo
locked: boolean
end
record Carriage new: function(): Carriage
reversed: boolean
end
record CarriageList new: function(): CarriageList
carriages: {Engine.Entity}
end
record ColliderList new: function(): ColliderList
colliders: {{Collider, Mat4f}}
end
record Color new: function(): Color
color: Vec3f
end
record Construction new: function(): Construction
record ConstructionParams new: function(): ConstructionParams
seed: integer
modules: {integer : <any type>}
end
fileName: ResName
params: ConstructionParams
params_native: NativeLuaTable
transf: Mat4f
timeBuilt: integer
frozenNodes: {Engine.Entity}
frozenEdges: {Engine.Entity}
depots: {Engine.Entity}
stations: {Engine.Entity}
industries: {Engine.Entity}
townBuildings: {Engine.Entity}
subconstructions: {Engine.Entity}
persistentMetadata: ConstructionInstanceMetadata
slots: {Slot}
slotConfig: {string : SlotConfig}
dependentSlots: {integer, {integer}}
tag2modelInstance: {string, {{Engine.Entity, integer}}}
entityAndIndex2labelTexts: {{Engine.Entity, integer}, {string}}
tag2segments: {string, {Engine.Entity}}
end
record CustomState new: function(): CustomState
state: {<any type> : <any type>}
end
record EmissionEmitter new: function(): EmissionEmitter
position: Vec3f
radius: number
noisePower: number
pollutionPower: number
end
record EmissionGrid new: function(): EmissionGrid
record Type Noise: Type
Pollution: Type
end
X0: integer
Y0: integer
width: integer
height: integer
gridPointSize: Vec2f
concentrationBuffer: Gridf
averageConcentration: Gridf
type: Type
wind: Vec2f
end
record Field new: function(): Field
end
record GameScript<T> new: function(): GameScript<T>
gameScript: ResName
addedToExistingSavegame: boolean
state: T
state_native: NativeLuaTable
eventSubscriptions: any
end
record GameSpeed new: function(): GameSpeed
speedup: integer
millisPerDay: integer
end
record GameTime new: function(): GameTime
gameTime: integer
gameTime0: integer
dates: {{integer, Date}}
timeOfDaySec: integer
tickCount: integer
updateCount: integer
end
record Industry new: function(): Industry
stockList: Engine.Entity
level: integer
closureTimeStamp: integer
upgradeProgress: number
manualDevelopment: boolean
construction: Engine.Entity
maxLevel: integer
end
record Landmark new: function(): Landmark
transportNetworkEntity: Engine.Entity
active: boolean
end
record LandVehicle new: function(): LandVehicle
record DynState new: function(): DynState
brakingTimer: number
turnLeft: boolean
turnRight: boolean
end
isTram: boolean
dyn: DynState
end
record Line new: function(): Line
record LoadMode LOAD_IF_AVAILABLE: LoadMode
FULL_LOAD_ANY: LoadMode
FULL_LOAD_ALL: LoadMode
LEGACY_UNLOAD_ONLY: LoadMode
end
record StopConfig new: function(StopConfig): StopConfig
load: {boolean}
maxLoad: {number}
forceUnload: boolean
destroyForConfigChange: boolean
destroyForRefresh: boolean
end
record Stop new: function(): Stop
stationGroup: Engine.Entity
station: integer
terminal: integer
alternativeTerminals: {StationTerminal}
loadMode: LoadMode
minWaitingTime: number
maxWaitingTime: number
maxAdditionalWaitingTime: number
waypoints: {Waypoint}
stopConfig: StopConfig
end
stops: {Stop}
vehicleInfo: LineVehicleInfo
customFilters: boolean
reservationPriority: number
end
record LogBook new: function(): LogBook
record Log new: function(): Log
times: {integer}
values: {integer}
times_native: Vector<integer>
values_native: Vector<integer>
end
refEntity2name2log: {Engine.Entity : {string : Log}}
name2log: {string : Log}
name2log_native: Map<string, Log>
end
record LotList new: function(): LotList
record Lot new: function(): Lot
vertices: {Vec2f}
texCoords: {Vec2f}
triangles: {integer}
texKey: ResName
solid: boolean
end
lots: {Lot}
end
record MaintenanceCost new: function(): MaintenanceCost
maintenanceCost: integer
accumulatedCost: {{Carrier, Carrier} : integer}
end
record ModelInstanceList new: function(): ModelInstanceList
fatInstances: {ModelInstance}
thinInstances: {ThinModelInstance}
fatInstances_native: Vector<ModelInstance>
thinInstances_native: Vector<ThinModelInstance>
dynamic: boolean
end
record ModelPerson new: function(): ModelPerson
path: ExtPath
pathPos: PathPos
stopped: boolean
topSpeed: number
speed: number
brakeDecel: number
offset: number
position: Vec3f
movementType: integer
dist: number
dist0: number
stateTime: integer
startWaitTime: number
endWaitTime: number
end
record ModelPersonIdle new: function(): ModelPersonIdle
arrivalTime: integer
end
record MovePath new: function(): MovePath
record DynState new: function(): DynState
pathPos: PathPos
speed: number
brakeDecel: number
accel: number
timeUntilAccel: number
timeStanding: number
timeToIgnore: number
approachingStation: boolean
end
path: Path
endParam: number
endPos: number
state: VehicleState
blocked: integer
allowEarlyArrival: boolean
reverse: boolean
servedFrom: integer
servedTo: integer
occupiedBackIndex: integer
occupiedFrontIndex: integer
dyn: DynState
dyn0: DynState
end
record MovePathAircraft new: function(): MovePathAircraft
record AircraftState new: function(): AircraftState
record DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
flightState: FlightState
cruiseAlt: number
waitingDistance: number
waitingPriority: integer
gear: boolean
gearTime: integer
dyn: DynState
dyn0: DynState
end
record ShipState new: function(): ShipState
record DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
waitingDist: number
clearToLand: boolean
startPathPosData: PathPosData
targetPathPosData: PathPosData
dyn: DynState
dyn0: DynState
end
record PathState PATH0: PathState
PATH1: PathState
PATH2: PathState
end
path0: Path
path1: {{EdgeGeometry, boolean}}
path2: Path
pathPos: PathPos
pathPos0: PathPos
state: VehicleState
pathState: PathState
speed: number
speed0: number
brakeDecel: number
aircraftState: AircraftState
shipState: ShipState
end
record Name new: function(): Name
name: string
end
record Parcel new: function(): Parcel
record CollisionType Environment: CollisionType
Parcel: CollisionType
end
record Face new: function(): Face
points: {Vec3f}
collision: {CollisionType : boolean}
end
streetSegment: Engine.Entity
left: boolean
curveParam: number
offset: number
faces: {Face}
end
record PersonCapacity new: function(): PersonCapacity
type: LandUseType
capacity: integer
personNodes: {NodeId}
vehicleNodes: {NodeId}
end
record Player new: function(): Player
headquarters: Engine.Entity
end
record PlayerOwned new: function(): PlayerOwned
player: Engine.Entity
end
record RailroadCrossing new: function(): RailroadCrossing
record State OPEN: State
CLOSED: State
WAITING: State
end
nodes: {Engine.Entity}
edges: {Engine.Entity}
typeIndex: integer
state: State
stateTime: integer
end
record RunwayList new: function(): RunwayList
runways: {Runway}
end
record Scaffold new: function(): Scaffold
record Type NEW: Type
UPGRADE: Type
DOWNGRADE: Type
end
type: Type
oldModelId: integer
oldTransf: Mat4f
oldBuildingFace: {{Vec2f}}
oldFloorLevel: {{number}}
oldHeight: number
buildingFace: {{Vec2f}}
floorLevel: {{number}}
height: number
constructionStartTime: integer
constructionEndTime: integer
cranePosition: Vec2f
craneAngle: number
craneTerrainHeight: number
craneAngleSpan: {number}
end
record ShapeList new: function(): ShapeList
shapes: {Shape}
end
record Ship new: function(): Ship
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record SignalList new: function(): SignalList
signals: {Signal}
end
record SimCargo record PickupPoint new: function(): PickupPoint
vehicle: Engine.Entity
line: Engine.Entity
position: Vec3f
carrier: Carrier
end
new: function(): SimCargo
cargoType: CargoTypeId
targetOrPickupEntity: Engine.Entity
sourceEntity: Engine.Entity
pickupPoints: {PickupPoint}
speed: number
startTime: integer
pickupTime: integer
deliveryExtensionDuration: integer
end
record SimEntityAtBuilding new: function(): SimEntityAtBuilding
waitingTime: number
end
record SimEntityAtStock new: function(): SimEntityAtStock
stock: {Engine.Entity, StockId}
arrivalTime: integer
end
record SimEntityAtTerminal new: function(): SimEntityAtTerminal
line: Engine.Entity
lineStop0: integer
lineStop1: integer
arrivalTime: number
vehicle: Engine.Entity
end
record SimEntityAtVehicle new: function(): SimEntityAtVehicle
line: Engine.Entity
lineStop0: integer
lineStop1: integer
vehicle: Engine.Entity
roundTripCounter: integer
end
record SimEntityIdle new: function(): SimEntityIdle
end
record SimEntityNeedsPath new: function(): SimEntityNeedsPath
input: PathFactoryInput
output: PathFactoryOutput
end
record SimEntityMoving new: function(): SimEntityMoving
line: Engine.Entity
lineStop0: integer
lineStop1: integer
partialPath: boolean
expectedArrivalTime: number
end
record SimPersonAtTerminal new: function(): SimPersonAtTerminal
edgeId: EdgeId
place: integer
end
record SimPersonAtVehicle new: function(): SimPersonAtVehicle
vehicle: Engine.Entity
part: integer
place: integer
expectedArrivalTime: number
end
record SimPerson new: function(): SimPerson
cargoType: CargoTypeId
destinations: {Engine.Entity}
moveModes: {MoveMode}
travelTimes: {number}
targetOrAtEntity: Engine.Entity
lastNonResType: LandUseType
lastMoveMode: MoveMode
walkSpeed: number
modelIdPerson: integer
colorConfigPerson: integer
modelIdCar: integer
colorConfigCar: integer
lastDestinationUpdate: integer
landUse2ReachableWalkDrive: {integer, integer}
landUse2ReachableLines: {integer, integer}
pickupTime: integer
happiness: number
end
type Station = Station
record StationGroup new: function(): StationGroup
stations: {Engine.Entity}
end
record StockList record Stock new: function(): Stock
type: StockListType
cargoType: CargoTypeId
cargoTypes: CargoTypeSet
mixedTypes: boolean
capacity: integer
loadSpeedModifier: number
loadIndicatorModelInstanceIndices: {integer}
tag: integer
end
record StockData new: function(): StockData
consumeFrequency: number
end
record Rule new: function(): Rule
input: {{integer}}
output: {CargoTypeId : integer}
capacity: integer
consumptionFactor: number
booster: boolean
boostFactor: number
priority: integer
slot: integer
end
record RuleData new: function(): RuleData
record ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
applyHistory: {ApplyInfo}
lastApplyDecayFactor: number
end
record CargoData new: function(): CargoData
produceFrequency: integer
end
record Modifiers new: function(): Modifiers
productivity: number
end
new: function(): StockList
stocks: {Stock}
rules: {Rule}
stockDatas: {StockData}
ruleDatas: {RuleData}
cargoData: {CargoTypeId : CargoData}
thrownAwayCargo: integer
modifiers: Modifiers
end
record Subconstruction new: function(): Subconstruction
tag: integer
slotIds: {integer}
metadata: SubconstructionInstanceMetadata
end
record Terrain new: function(): Terrain
size: Vec2i
baseLevels: integer
baseResolution: Vec3f
highLevels: integer
offsetZ: number
waterLevel: number
dataMaps: {string, HeightmapNew}
end
record TerrainAlignmentList new: function(): TerrainAlignmentList
terrainAlignments: {TerrainAlignment}
end
record TerrainTile new: function(): TerrainTile
terrainEntity: Engine.Entity
position: Vec2i
end
record TerrainTileBrush new: function(): TerrainTileBrush
materialIndexBrush: {integer}
forceAboveBit: {boolean}
end
record TerrainTileHeightmap new: function(): TerrainTileHeightmap
vertices: {integer}
end
record TickEpoch new: function(): TickEpoch
time: integer
commandIndex: integer
subIndex: integer
end
record Town new: function(): Town
initialLandUseCapacities: {integer}
capacityScalingFactor: number
levelToCapacityDistributionWeights: {{number}}
sizeFactors: {number}
cargoNeeds: {{{CargoTypeId, number}}}
developmentActive: boolean
noise: number
pollution: number
end
record TownBuilding new: function(): TownBuilding
personCapacity: Engine.Entity
stockList: Engine.Entity
construction: Engine.Entity
level: integer
parcels: {Engine.Entity}
depth: integer
height: number
town: Engine.Entity
timeBuilt: integer
blockedDevelopment: boolean
end
record TownConnection new: function(): TownConnection
entity0: Engine.Entity
entity1: Engine.Entity
position0: Vec2f
position1: Vec2f
time: number
currentTime: number
lastUpgradeYear: integer
valid: boolean
end
record TpNetLink new: function(): TpNetLink
from: EdgePos
to: EdgePos
end
record Train new: function(): Train
end
record TransportNetwork new: function(): TransportNetwork
nodes: {Node}
edges: {Edge}
turnaroundEdges: {integer}
end
record TransportNetworkNodes new: function(): TransportNetworkNodes
end
record TransportVehicle record Modifiers new: function(): Modifiers
topSpeedScale: number
noiseScale: number
pollutionScale: number
comfortScale: number
end
record LoadSpeedModifiers vehicleOverlength: number
stockCompatibility: number
vehicleCompatibility: number
vehicleIncompatibility: number
getTotalPenalty: function(LoadSpeedModifiers): number
end
record Config new: function(): Config
transportModes: {TransportMode : boolean}
allCaps: {CargoTypeId}
capacities: {CargoTypeId}
loadSpeeds: {number}
reversible: boolean
end
record LoadState new: function(): LoadState
None: LoadState
Arrived: LoadState
Unloading: LoadState
Loading: LoadState
WaitForScheduledDeparture: LoadState
Departing: LoadState
end
record PendingIncomeParams new: function(): PendingIncomeParams
record EntityRev0 entity: Engine.Entity
rev0: integer
end
amount: integer
carrier: Carrier
vehicleEntity: Engine.Entity
lineEntity: Engine.Entity
end
new: function(): TransportVehicle
carrier: Carrier
transportVehicleConfig: TransportVehicleConfig
config: Config
state: TransportVehicleState
userStopped: boolean
depot: Engine.Entity
sellOnArrival: boolean
line: Engine.Entity
stopIndex: integer
arrivalStationTerminal: StationTerminal
arrivalStationTerminalLocked: boolean
lineStopDepartures: {integer}
lastLineStopDeparture: integer
sectionTimes: {number}
lineStop2cargo2available: {{CargoTypeId}}
loadState: LoadState
timeUntilNextScheduledDeparture: number
loadSpeedModifiers: {CargoTypeId : LoadSpeedModifiers}
timeUntilCloseDoors: number
timeUntilDeparture: number
timeUntilNextLoad: {CargoTypeId : number}
timeUntilNextUnload: {CargoTypeId : number}
lastStationStockIndex: integer
doorsTime: integer
daysInDepot: integer
daysAtTerminal: integer
doorsOpen: boolean
noPath: boolean
autoDeparture: boolean
maintenanceStation: Engine.Entity
modifiers: Modifiers
unloadPendingIncome: PendingIncomeParams
closestTown: Engine.Entity
visitedStops: {integer}
end
record VehicleDepot new: function(): VehicleDepot
carrier: Carrier
transportModes: {TransportMode : boolean}
inNodes: {NodeId}
outNodes: {NodeId}
state: integer
doors: number
stateTime: integer
catchmentArea: CatchmentArea
maintenancePool: integer
maxPoolUsage: number
averagePoolUsage: number
poolUsageTicks: integer
filterTags: {string}
end
record VehicleOrder new: function(): VehicleOrder
equals: function(VehicleOrder, VehicleOrder): boolean
entity: Engine.Entity
strongBrakeEntity: boolean
waitingForSpace: boolean
waitingForTrafficLight: boolean
end
record Warehouse new: function(): Warehouse
stockList: Engine.Entity
construction: Engine.Entity
end
record WaterMesh new: function(): WaterMesh
record Contour new: function(): Contour
vertices: {Vec2f}
normals: {Vec2f}
end
waterLevel: number
vertices: {Vec2f}
depths: {number}
indices: {integer}
contours: {Contour}
pos: Vec2i
end
record World new: function(): World
cloudCoverage: number
end
end
record ComponentType AIRCRAFT: ComponentType
ANIMAL: ComponentType
ASSET_GROUP: ComponentType
BASE_EDGE: ComponentType
BASE_EDGE_STREET: ComponentType
BASE_NODE: ComponentType
BASE_PARALLEL_STRIP: ComponentType
CUSTOM_STATE: ComponentType
EMISSION_EMITTER: ComponentType
FIELD: ComponentType
GAME_TIME: ComponentType
GAME_SPEED: ComponentType
MODEL_INSTANCE_LIST: ComponentType
NAME: ComponentType
LINE: ComponentType
LOG_BOOK: ComponentType
MODEL_PERSON: ComponentType
MOVE_PATH: ComponentType
MOVE_PATH_AIRCRAFT: ComponentType
STATION: ComponentType
STATION_GROUP: ComponentType
SIM_PERSON: ComponentType
SIM_PERSON_AT_TERMINAL: ComponentType
SIM_PERSON_AT_VEHICLE: ComponentType
SIM_CARGO: ComponentType
SIM_ENTITY_AT_BUILDING: ComponentType
SIM_ENTITY_AT_VEHICLE: ComponentType
SIM_ENTITY_AT_TERMINAL: ComponentType
SIM_ENTITY_IDLE: ComponentType
SIM_ENTITY_MOVING: ComponentType
SIGNAL_LIST: ComponentType
TOWN: ComponentType
INDUSTRY: ComponentType
STOCK_LIST: ComponentType
TOWN_BUILDING: ComponentType
TRANSPORT_VEHICLE: ComponentType
TRAIN: ComponentType
CARRIAGE: ComponentType
CARRIAGE_LIST: ComponentType
VEHICLE_DEPOT: ComponentType
COLOR: ComponentType
BOUNDING_VOLUME: ComponentType
CONSTRUCTION: ComponentType
SUBCONSTRUCTION: ComponentType
PERSON_CAPACITY: ComponentType
PLAYER_OWNED: ComponentType
ACCOUNT: ComponentType
GAME_SCRIPT: ComponentType
WAREHOUSE: ComponentType
TRANSPORT_NETWORK: ComponentType
MAINTENANCE_COST: ComponentType
RAILROAD_CROSSING: ComponentType
PLAYER: ComponentType
WORLD: ComponentType
BRIDGE: ComponentType
BASE_NODE_CONFIG: ComponentType
LAND_VEHICLE: ComponentType
BASE_NODE_TRAFFIC_LIGHT: ComponentType
EDGE_OBJECT: ComponentType
EMISSION_GRID: ComponentType
TERRAIN: ComponentType
end
getComponent: function<T>(entity : Entity, type : ComponentType): T
record EntityFilters requireOwnedByPlayer: Engine.Entity
filterFn: function(Engine.Entity): boolean
end
forEachEntityWithComponent: function(fn : function(Entity), componentType : ComponentType)
forEachEntity: function(callback : function(Entity))
getEntitiesWithComponent: function(componentType : ComponentType, filters : EntityFilters): {Engine.Entity}
getRevision: function(entity : Entity): Revision
entityExists: function(entity : Entity): boolean
record UtilTerrain isValidCoordinate: function(position : Vec2f): boolean
getHeightAt: function(position : Vec2f): number
getBaseHeightAt: function(position : Vec2f): number
isOnWater: function(position : Vec2f): boolean
getHeightmapEntity: function(position : Vec2i): Engine.Entity
getBoundingBox: function(): Box2f
makeMapFromGame: function(withHeightmap : boolean, withTowns : boolean, withIndustries : boolean, withAssets : boolean): GameMap
getTerrainEntityRevisions: function(): {Engine.Entity : Engine.Revision}
getBaseResolution: function(): Vec3f
getHighResolution: function(): Vec3f
ceilTerrainFragmentInTiles: function(percentage : number): integer
end
record MapGen createTowns: function(string, {GameMap.Town}): TownResult
createIndustries: function(string, {GameMap.Industry}): IndustryResult
getDefaultTownConnections: function({GameMap.Town}): {{integer, integer}}
getMinMaxValidTerrainHeight: function(): {number, number}
getMinMaxValidNumTowns: function(): {integer, integer}
getMinMaxValidNumIndustries: function(): {integer, integer}
end
record Config getConfigDict: function(): {string : string}
getModParams: function(): {string : {<any type> : <any type>}}
end
system: System
terrain: UtilTerrain
mapgen: MapGen
util: EngineUtil
config: Config
end
Category: main🔗
Engine🔗
[Expand All] [Collapse All]
global record Engine type Entity = integer
record Revision num: {integer, integer, integer}
end
record Component record Account new: function(): Account
balance: integer
loan: integer
end
record Aircraft new: function(): Aircraft
reservedTakeOffRunway: boolean
reservedLandingRunway: boolean
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record Animal new: function(): Animal
worldPosition: Vec3f
lookingAt: Vec2f
targetCoord: Vec2f
movementSpeed: number
angularSpeed: number
lastUpdateElapsed: number
targetChangedElapsed: number
invalidTileElapsed: number
movementType: integer
roll: number
scaling: number
flock: {Vec3f}
end
record AssetGroup new: function(): AssetGroup
end
record AssetGroupAutoRemove new: function(): AssetGroupAutoRemove
end
record AudioEmitter new: function(): AudioEmitter
emitter: integer
end
record BaseEdge new: function(): BaseEdge
clone: function(BaseEdge): BaseEdge
type: BaseEdgeType
typeIndex: integer
objects: {{Engine.Entity, EdgeObjectType}}
laneConfigs: {LaneConfig}
laneConfigs_native: Vector<LaneConfig>
roadDevelopmentLocked: boolean
node0: Engine.Entity
node1: Engine.Entity
position0: Vec3f
position1: Vec3f
tangent0: Vec3f
tangent1: Vec3f
laneConfig: {LaneConfig}
edgeDecorations: {{integer, boolean}}
distance: number
roadType: RoadType
roadTemplate: ResName
roadStyle: ResName
end
record BaseEdgeStreet new: function(): BaseEdgeStreet
precedenceNode0: PrecedencePreference
precedenceNode1: PrecedencePreference
end
record BaseNode new: function(): BaseNode
clone: function(BaseNode): BaseNode
position: Vec3f
end
record TrafficLightState new: function(): TrafficLightState
clone: function(TrafficLightState): TrafficLightState
lockedLanes: {integer}
duration: number
minDuration: number
canSkip: boolean
end
record TrafficLightConfig new: function(): TrafficLightConfig
clone: function(TrafficLightConfig): TrafficLightConfig
states: {TrafficLightState}
trafficLightType: integer
end
record BaseNodeConfig new: function(): BaseNodeConfig
laneConnections: {LaneConnection}
crosswalks: {Entity}
trafficLightPreference: TrafficLightPreference
trafficLightConfig: TrafficLightConfig
doubleSlipSwitch: boolean
userModifiedLaneConnections: boolean
userModifiedTrafficLightStates: boolean
end
record BaseNodeTrafficLight new: function(): BaseNodeTrafficLight
trafficLightData: TrafficLightData
state: integer
time: number
stateTimes: {integer}
end
record BaseParallelStrip new: function(): BaseParallelStrip
record BaseEdgeRange new: function(): BaseEdgeRange
edge: Engine.Entity
bounds: {number, number}
end
rangeGroups: {{BaseEdgeRange}}
rangeGroups_native: Vector<Vector<BaseEdgeRange>>
end
record BoundingVolume new: function(): BoundingVolume
bbox: Box3f
end
record Bridge new: function(): Bridge
record Interval new: function(): Interval
splines: {{Vec3f}}
railingModels: {{integer, Mat4f}}
end
intervals: {Interval}
end
record BuildCost new: function(): BuildCost
buildCost: integer
bulldozeCost: integer
noCostAtAll: boolean
end
record BulldozerInfo new: function(): BulldozerInfo
locked: boolean
end
record Carriage new: function(): Carriage
reversed: boolean
end
record CarriageList new: function(): CarriageList
carriages: {Engine.Entity}
end
record ColliderList new: function(): ColliderList
colliders: {{Collider, Mat4f}}
end
record Color new: function(): Color
color: Vec3f
end
record Construction new: function(): Construction
record ConstructionParams new: function(): ConstructionParams
seed: integer
modules: {integer : <any type>}
end
fileName: ResName
params: ConstructionParams
params_native: NativeLuaTable
transf: Mat4f
timeBuilt: integer
frozenNodes: {Engine.Entity}
frozenEdges: {Engine.Entity}
depots: {Engine.Entity}
stations: {Engine.Entity}
industries: {Engine.Entity}
townBuildings: {Engine.Entity}
subconstructions: {Engine.Entity}
persistentMetadata: ConstructionInstanceMetadata
slots: {Slot}
slotConfig: {string : SlotConfig}
dependentSlots: {integer, {integer}}
tag2modelInstance: {string, {{Engine.Entity, integer}}}
entityAndIndex2labelTexts: {{Engine.Entity, integer}, {string}}
tag2segments: {string, {Engine.Entity}}
end
record CustomState new: function(): CustomState
state: {<any type> : <any type>}
end
record EmissionEmitter new: function(): EmissionEmitter
position: Vec3f
radius: number
noisePower: number
pollutionPower: number
end
record EmissionGrid new: function(): EmissionGrid
record Type Noise: Type
Pollution: Type
end
X0: integer
Y0: integer
width: integer
height: integer
gridPointSize: Vec2f
concentrationBuffer: Gridf
averageConcentration: Gridf
type: Type
wind: Vec2f
end
record Field new: function(): Field
end
record GameScript<T> new: function(): GameScript<T>
gameScript: ResName
addedToExistingSavegame: boolean
state: T
state_native: NativeLuaTable
eventSubscriptions: any
end
record GameSpeed new: function(): GameSpeed
speedup: integer
millisPerDay: integer
end
record GameTime new: function(): GameTime
gameTime: integer
gameTime0: integer
dates: {{integer, Date}}
timeOfDaySec: integer
tickCount: integer
updateCount: integer
end
record Industry new: function(): Industry
stockList: Engine.Entity
level: integer
closureTimeStamp: integer
upgradeProgress: number
manualDevelopment: boolean
construction: Engine.Entity
maxLevel: integer
end
record Landmark new: function(): Landmark
transportNetworkEntity: Engine.Entity
active: boolean
end
record LandVehicle new: function(): LandVehicle
record DynState new: function(): DynState
brakingTimer: number
turnLeft: boolean
turnRight: boolean
end
isTram: boolean
dyn: DynState
end
record Line new: function(): Line
record LoadMode LOAD_IF_AVAILABLE: LoadMode
FULL_LOAD_ANY: LoadMode
FULL_LOAD_ALL: LoadMode
LEGACY_UNLOAD_ONLY: LoadMode
end
record StopConfig new: function(StopConfig): StopConfig
load: {boolean}
maxLoad: {number}
forceUnload: boolean
destroyForConfigChange: boolean
destroyForRefresh: boolean
end
record Stop new: function(): Stop
stationGroup: Engine.Entity
station: integer
terminal: integer
alternativeTerminals: {StationTerminal}
loadMode: LoadMode
minWaitingTime: number
maxWaitingTime: number
maxAdditionalWaitingTime: number
waypoints: {Waypoint}
stopConfig: StopConfig
end
stops: {Stop}
vehicleInfo: LineVehicleInfo
customFilters: boolean
reservationPriority: number
end
record LogBook new: function(): LogBook
record Log new: function(): Log
times: {integer}
values: {integer}
times_native: Vector<integer>
values_native: Vector<integer>
end
refEntity2name2log: {Engine.Entity : {string : Log}}
name2log: {string : Log}
name2log_native: Map<string, Log>
end
record LotList new: function(): LotList
record Lot new: function(): Lot
vertices: {Vec2f}
texCoords: {Vec2f}
triangles: {integer}
texKey: ResName
solid: boolean
end
lots: {Lot}
end
record MaintenanceCost new: function(): MaintenanceCost
maintenanceCost: integer
accumulatedCost: {{Carrier, Carrier} : integer}
end
record ModelInstanceList new: function(): ModelInstanceList
fatInstances: {ModelInstance}
thinInstances: {ThinModelInstance}
fatInstances_native: Vector<ModelInstance>
thinInstances_native: Vector<ThinModelInstance>
dynamic: boolean
end
record ModelPerson new: function(): ModelPerson
path: ExtPath
pathPos: PathPos
stopped: boolean
topSpeed: number
speed: number
brakeDecel: number
offset: number
position: Vec3f
movementType: integer
dist: number
dist0: number
stateTime: integer
startWaitTime: number
endWaitTime: number
end
record ModelPersonIdle new: function(): ModelPersonIdle
arrivalTime: integer
end
record MovePath new: function(): MovePath
record DynState new: function(): DynState
pathPos: PathPos
speed: number
brakeDecel: number
accel: number
timeUntilAccel: number
timeStanding: number
timeToIgnore: number
approachingStation: boolean
end
path: Path
endParam: number
endPos: number
state: VehicleState
blocked: integer
allowEarlyArrival: boolean
reverse: boolean
servedFrom: integer
servedTo: integer
occupiedBackIndex: integer
occupiedFrontIndex: integer
dyn: DynState
dyn0: DynState
end
record MovePathAircraft new: function(): MovePathAircraft
record AircraftState new: function(): AircraftState
record DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
flightState: FlightState
cruiseAlt: number
waitingDistance: number
waitingPriority: integer
gear: boolean
gearTime: integer
dyn: DynState
dyn0: DynState
end
record ShipState new: function(): ShipState
record DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
waitingDist: number
clearToLand: boolean
startPathPosData: PathPosData
targetPathPosData: PathPosData
dyn: DynState
dyn0: DynState
end
record PathState PATH0: PathState
PATH1: PathState
PATH2: PathState
end
path0: Path
path1: {{EdgeGeometry, boolean}}
path2: Path
pathPos: PathPos
pathPos0: PathPos
state: VehicleState
pathState: PathState
speed: number
speed0: number
brakeDecel: number
aircraftState: AircraftState
shipState: ShipState
end
record Name new: function(): Name
name: string
end
record Parcel new: function(): Parcel
record CollisionType Environment: CollisionType
Parcel: CollisionType
end
record Face new: function(): Face
points: {Vec3f}
collision: {CollisionType : boolean}
end
streetSegment: Engine.Entity
left: boolean
curveParam: number
offset: number
faces: {Face}
end
record PersonCapacity new: function(): PersonCapacity
type: LandUseType
capacity: integer
personNodes: {NodeId}
vehicleNodes: {NodeId}
end
record Player new: function(): Player
headquarters: Engine.Entity
end
record PlayerOwned new: function(): PlayerOwned
player: Engine.Entity
end
record RailroadCrossing new: function(): RailroadCrossing
record State OPEN: State
CLOSED: State
WAITING: State
end
nodes: {Engine.Entity}
edges: {Engine.Entity}
typeIndex: integer
state: State
stateTime: integer
end
record RunwayList new: function(): RunwayList
runways: {Runway}
end
record Scaffold new: function(): Scaffold
record Type NEW: Type
UPGRADE: Type
DOWNGRADE: Type
end
type: Type
oldModelId: integer
oldTransf: Mat4f
oldBuildingFace: {{Vec2f}}
oldFloorLevel: {{number}}
oldHeight: number
buildingFace: {{Vec2f}}
floorLevel: {{number}}
height: number
constructionStartTime: integer
constructionEndTime: integer
cranePosition: Vec2f
craneAngle: number
craneTerrainHeight: number
craneAngleSpan: {number}
end
record ShapeList new: function(): ShapeList
shapes: {Shape}
end
record Ship new: function(): Ship
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record SignalList new: function(): SignalList
signals: {Signal}
end
record SimCargo record PickupPoint new: function(): PickupPoint
vehicle: Engine.Entity
line: Engine.Entity
position: Vec3f
carrier: Carrier
end
new: function(): SimCargo
cargoType: CargoTypeId
targetOrPickupEntity: Engine.Entity
sourceEntity: Engine.Entity
pickupPoints: {PickupPoint}
speed: number
startTime: integer
pickupTime: integer
deliveryExtensionDuration: integer
end
record SimEntityAtBuilding new: function(): SimEntityAtBuilding
waitingTime: number
end
record SimEntityAtStock new: function(): SimEntityAtStock
stock: {Engine.Entity, StockId}
arrivalTime: integer
end
record SimEntityAtTerminal new: function(): SimEntityAtTerminal
line: Engine.Entity
lineStop0: integer
lineStop1: integer
arrivalTime: number
vehicle: Engine.Entity
end
record SimEntityAtVehicle new: function(): SimEntityAtVehicle
line: Engine.Entity
lineStop0: integer
lineStop1: integer
vehicle: Engine.Entity
roundTripCounter: integer
end
record SimEntityIdle new: function(): SimEntityIdle
end
record SimEntityNeedsPath new: function(): SimEntityNeedsPath
input: PathFactoryInput
output: PathFactoryOutput
end
record SimEntityMoving new: function(): SimEntityMoving
line: Engine.Entity
lineStop0: integer
lineStop1: integer
partialPath: boolean
expectedArrivalTime: number
end
record SimPersonAtTerminal new: function(): SimPersonAtTerminal
edgeId: EdgeId
place: integer
end
record SimPersonAtVehicle new: function(): SimPersonAtVehicle
vehicle: Engine.Entity
part: integer
place: integer
expectedArrivalTime: number
end
record SimPerson new: function(): SimPerson
cargoType: CargoTypeId
destinations: {Engine.Entity}
moveModes: {MoveMode}
travelTimes: {number}
targetOrAtEntity: Engine.Entity
lastNonResType: LandUseType
lastMoveMode: MoveMode
walkSpeed: number
modelIdPerson: integer
colorConfigPerson: integer
modelIdCar: integer
colorConfigCar: integer
lastDestinationUpdate: integer
landUse2ReachableWalkDrive: {integer, integer}
landUse2ReachableLines: {integer, integer}
pickupTime: integer
happiness: number
end
type Station = Station
record StationGroup new: function(): StationGroup
stations: {Engine.Entity}
end
record StockList record Stock new: function(): Stock
type: StockListType
cargoType: CargoTypeId
cargoTypes: CargoTypeSet
mixedTypes: boolean
capacity: integer
loadSpeedModifier: number
loadIndicatorModelInstanceIndices: {integer}
tag: integer
end
record StockData new: function(): StockData
consumeFrequency: number
end
record Rule new: function(): Rule
input: {{integer}}
output: {CargoTypeId : integer}
capacity: integer
consumptionFactor: number
booster: boolean
boostFactor: number
priority: integer
slot: integer
end
record RuleData new: function(): RuleData
record ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
applyHistory: {ApplyInfo}
lastApplyDecayFactor: number
end
record CargoData new: function(): CargoData
produceFrequency: integer
end
record Modifiers new: function(): Modifiers
productivity: number
end
new: function(): StockList
stocks: {Stock}
rules: {Rule}
stockDatas: {StockData}
ruleDatas: {RuleData}
cargoData: {CargoTypeId : CargoData}
thrownAwayCargo: integer
modifiers: Modifiers
end
record Subconstruction new: function(): Subconstruction
tag: integer
slotIds: {integer}
metadata: SubconstructionInstanceMetadata
end
record Terrain new: function(): Terrain
size: Vec2i
baseLevels: integer
baseResolution: Vec3f
highLevels: integer
offsetZ: number
waterLevel: number
dataMaps: {string, HeightmapNew}
end
record TerrainAlignmentList new: function(): TerrainAlignmentList
terrainAlignments: {TerrainAlignment}
end
record TerrainTile new: function(): TerrainTile
terrainEntity: Engine.Entity
position: Vec2i
end
record TerrainTileBrush new: function(): TerrainTileBrush
materialIndexBrush: {integer}
forceAboveBit: {boolean}
end
record TerrainTileHeightmap new: function(): TerrainTileHeightmap
vertices: {integer}
end
record TickEpoch new: function(): TickEpoch
time: integer
commandIndex: integer
subIndex: integer
end
record Town new: function(): Town
initialLandUseCapacities: {integer}
capacityScalingFactor: number
levelToCapacityDistributionWeights: {{number}}
sizeFactors: {number}
cargoNeeds: {{{CargoTypeId, number}}}
developmentActive: boolean
noise: number
pollution: number
end
record TownBuilding new: function(): TownBuilding
personCapacity: Engine.Entity
stockList: Engine.Entity
construction: Engine.Entity
level: integer
parcels: {Engine.Entity}
depth: integer
height: number
town: Engine.Entity
timeBuilt: integer
blockedDevelopment: boolean
end
record TownConnection new: function(): TownConnection
entity0: Engine.Entity
entity1: Engine.Entity
position0: Vec2f
position1: Vec2f
time: number
currentTime: number
lastUpgradeYear: integer
valid: boolean
end
record TpNetLink new: function(): TpNetLink
from: EdgePos
to: EdgePos
end
record Train new: function(): Train
end
record TransportNetwork new: function(): TransportNetwork
nodes: {Node}
edges: {Edge}
turnaroundEdges: {integer}
end
record TransportNetworkNodes new: function(): TransportNetworkNodes
end
record TransportVehicle record Modifiers new: function(): Modifiers
topSpeedScale: number
noiseScale: number
pollutionScale: number
comfortScale: number
end
record LoadSpeedModifiers vehicleOverlength: number
stockCompatibility: number
vehicleCompatibility: number
vehicleIncompatibility: number
getTotalPenalty: function(LoadSpeedModifiers): number
end
record Config new: function(): Config
transportModes: {TransportMode : boolean}
allCaps: {CargoTypeId}
capacities: {CargoTypeId}
loadSpeeds: {number}
reversible: boolean
end
record LoadState new: function(): LoadState
None: LoadState
Arrived: LoadState
Unloading: LoadState
Loading: LoadState
WaitForScheduledDeparture: LoadState
Departing: LoadState
end
record PendingIncomeParams new: function(): PendingIncomeParams
record EntityRev0 entity: Engine.Entity
rev0: integer
end
amount: integer
carrier: Carrier
vehicleEntity: Engine.Entity
lineEntity: Engine.Entity
end
new: function(): TransportVehicle
carrier: Carrier
transportVehicleConfig: TransportVehicleConfig
config: Config
state: TransportVehicleState
userStopped: boolean
depot: Engine.Entity
sellOnArrival: boolean
line: Engine.Entity
stopIndex: integer
arrivalStationTerminal: StationTerminal
arrivalStationTerminalLocked: boolean
lineStopDepartures: {integer}
lastLineStopDeparture: integer
sectionTimes: {number}
lineStop2cargo2available: {{CargoTypeId}}
loadState: LoadState
timeUntilNextScheduledDeparture: number
loadSpeedModifiers: {CargoTypeId : LoadSpeedModifiers}
timeUntilCloseDoors: number
timeUntilDeparture: number
timeUntilNextLoad: {CargoTypeId : number}
timeUntilNextUnload: {CargoTypeId : number}
lastStationStockIndex: integer
doorsTime: integer
daysInDepot: integer
daysAtTerminal: integer
doorsOpen: boolean
noPath: boolean
autoDeparture: boolean
maintenanceStation: Engine.Entity
modifiers: Modifiers
unloadPendingIncome: PendingIncomeParams
closestTown: Engine.Entity
visitedStops: {integer}
end
record VehicleDepot new: function(): VehicleDepot
carrier: Carrier
transportModes: {TransportMode : boolean}
inNodes: {NodeId}
outNodes: {NodeId}
state: integer
doors: number
stateTime: integer
catchmentArea: CatchmentArea
maintenancePool: integer
maxPoolUsage: number
averagePoolUsage: number
poolUsageTicks: integer
filterTags: {string}
end
record VehicleOrder new: function(): VehicleOrder
equals: function(VehicleOrder, VehicleOrder): boolean
entity: Engine.Entity
strongBrakeEntity: boolean
waitingForSpace: boolean
waitingForTrafficLight: boolean
end
record Warehouse new: function(): Warehouse
stockList: Engine.Entity
construction: Engine.Entity
end
record WaterMesh new: function(): WaterMesh
record Contour new: function(): Contour
vertices: {Vec2f}
normals: {Vec2f}
end
waterLevel: number
vertices: {Vec2f}
depths: {number}
indices: {integer}
contours: {Contour}
pos: Vec2i
end
record World new: function(): World
cloudCoverage: number
end
end
record ComponentType AIRCRAFT: ComponentType
ANIMAL: ComponentType
ASSET_GROUP: ComponentType
BASE_EDGE: ComponentType
BASE_EDGE_STREET: ComponentType
BASE_NODE: ComponentType
BASE_PARALLEL_STRIP: ComponentType
CUSTOM_STATE: ComponentType
EMISSION_EMITTER: ComponentType
FIELD: ComponentType
GAME_TIME: ComponentType
GAME_SPEED: ComponentType
MODEL_INSTANCE_LIST: ComponentType
NAME: ComponentType
LINE: ComponentType
LOG_BOOK: ComponentType
MODEL_PERSON: ComponentType
MOVE_PATH: ComponentType
MOVE_PATH_AIRCRAFT: ComponentType
STATION: ComponentType
STATION_GROUP: ComponentType
SIM_PERSON: ComponentType
SIM_PERSON_AT_TERMINAL: ComponentType
SIM_PERSON_AT_VEHICLE: ComponentType
SIM_CARGO: ComponentType
SIM_ENTITY_AT_BUILDING: ComponentType
SIM_ENTITY_AT_VEHICLE: ComponentType
SIM_ENTITY_AT_TERMINAL: ComponentType
SIM_ENTITY_IDLE: ComponentType
SIM_ENTITY_MOVING: ComponentType
SIGNAL_LIST: ComponentType
TOWN: ComponentType
INDUSTRY: ComponentType
STOCK_LIST: ComponentType
TOWN_BUILDING: ComponentType
TRANSPORT_VEHICLE: ComponentType
TRAIN: ComponentType
CARRIAGE: ComponentType
CARRIAGE_LIST: ComponentType
VEHICLE_DEPOT: ComponentType
COLOR: ComponentType
BOUNDING_VOLUME: ComponentType
CONSTRUCTION: ComponentType
SUBCONSTRUCTION: ComponentType
PERSON_CAPACITY: ComponentType
PLAYER_OWNED: ComponentType
ACCOUNT: ComponentType
GAME_SCRIPT: ComponentType
WAREHOUSE: ComponentType
TRANSPORT_NETWORK: ComponentType
MAINTENANCE_COST: ComponentType
RAILROAD_CROSSING: ComponentType
PLAYER: ComponentType
WORLD: ComponentType
BRIDGE: ComponentType
BASE_NODE_CONFIG: ComponentType
LAND_VEHICLE: ComponentType
BASE_NODE_TRAFFIC_LIGHT: ComponentType
EDGE_OBJECT: ComponentType
EMISSION_GRID: ComponentType
TERRAIN: ComponentType
end
getComponent: function<T>(entity : Entity, type : ComponentType): T
record EntityFilters requireOwnedByPlayer: Engine.Entity
filterFn: function(Engine.Entity): boolean
end
forEachEntityWithComponent: function(fn : function(Entity), componentType : ComponentType)
forEachEntity: function(callback : function(Entity))
getEntitiesWithComponent: function(componentType : ComponentType, filters : EntityFilters): {Engine.Entity}
getRevision: function(entity : Entity): Revision
entityExists: function(entity : Entity): boolean
record UtilTerrain isValidCoordinate: function(position : Vec2f): boolean
getHeightAt: function(position : Vec2f): number
getBaseHeightAt: function(position : Vec2f): number
isOnWater: function(position : Vec2f): boolean
getHeightmapEntity: function(position : Vec2i): Engine.Entity
getBoundingBox: function(): Box2f
makeMapFromGame: function(withHeightmap : boolean, withTowns : boolean, withIndustries : boolean, withAssets : boolean): GameMap
getTerrainEntityRevisions: function(): {Engine.Entity : Engine.Revision}
getBaseResolution: function(): Vec3f
getHighResolution: function(): Vec3f
ceilTerrainFragmentInTiles: function(percentage : number): integer
end
record MapGen createTowns: function(string, {GameMap.Town}): TownResult
createIndustries: function(string, {GameMap.Industry}): IndustryResult
getDefaultTownConnections: function({GameMap.Town}): {{integer, integer}}
getMinMaxValidTerrainHeight: function(): {number, number}
getMinMaxValidNumTowns: function(): {integer, integer}
getMinMaxValidNumIndustries: function(): {integer, integer}
end
record Config getConfigDict: function(): {string : string}
getModParams: function(): {string : {<any type> : <any type>}}
end
system: System
terrain: UtilTerrain
mapgen: MapGen
util: EngineUtil
config: Config
end
Main Engine interface
Engine.Entity🔗
type Engine.Entity = integer
Engine.Revision🔗
record Engine.Revision num: {integer, integer, integer}
end
Keeps track of modifications to entities.
Engine.Revision.num🔗
Engine.Revision.num: {integer, integer, integer}
Engine.Component🔗
[Expand All] [Collapse All]
record Engine.Component record Account new: function(): Account
balance: integer
loan: integer
end
record Aircraft new: function(): Aircraft
reservedTakeOffRunway: boolean
reservedLandingRunway: boolean
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record Animal new: function(): Animal
worldPosition: Vec3f
lookingAt: Vec2f
targetCoord: Vec2f
movementSpeed: number
angularSpeed: number
lastUpdateElapsed: number
targetChangedElapsed: number
invalidTileElapsed: number
movementType: integer
roll: number
scaling: number
flock: {Vec3f}
end
record AssetGroup new: function(): AssetGroup
end
record AssetGroupAutoRemove new: function(): AssetGroupAutoRemove
end
record AudioEmitter new: function(): AudioEmitter
emitter: integer
end
record BaseEdge new: function(): BaseEdge
clone: function(BaseEdge): BaseEdge
type: BaseEdgeType
typeIndex: integer
objects: {{Engine.Entity, EdgeObjectType}}
laneConfigs: {LaneConfig}
laneConfigs_native: Vector<LaneConfig>
roadDevelopmentLocked: boolean
node0: Engine.Entity
node1: Engine.Entity
position0: Vec3f
position1: Vec3f
tangent0: Vec3f
tangent1: Vec3f
laneConfig: {LaneConfig}
edgeDecorations: {{integer, boolean}}
distance: number
roadType: RoadType
roadTemplate: ResName
roadStyle: ResName
end
record BaseEdgeStreet new: function(): BaseEdgeStreet
precedenceNode0: PrecedencePreference
precedenceNode1: PrecedencePreference
end
record BaseNode new: function(): BaseNode
clone: function(BaseNode): BaseNode
position: Vec3f
end
record TrafficLightState new: function(): TrafficLightState
clone: function(TrafficLightState): TrafficLightState
lockedLanes: {integer}
duration: number
minDuration: number
canSkip: boolean
end
record TrafficLightConfig new: function(): TrafficLightConfig
clone: function(TrafficLightConfig): TrafficLightConfig
states: {TrafficLightState}
trafficLightType: integer
end
record BaseNodeConfig new: function(): BaseNodeConfig
laneConnections: {LaneConnection}
crosswalks: {Entity}
trafficLightPreference: TrafficLightPreference
trafficLightConfig: TrafficLightConfig
doubleSlipSwitch: boolean
userModifiedLaneConnections: boolean
userModifiedTrafficLightStates: boolean
end
record BaseNodeTrafficLight new: function(): BaseNodeTrafficLight
trafficLightData: TrafficLightData
state: integer
time: number
stateTimes: {integer}
end
record BaseParallelStrip new: function(): BaseParallelStrip
record BaseEdgeRange new: function(): BaseEdgeRange
edge: Engine.Entity
bounds: {number, number}
end
rangeGroups: {{BaseEdgeRange}}
rangeGroups_native: Vector<Vector<BaseEdgeRange>>
end
record BoundingVolume new: function(): BoundingVolume
bbox: Box3f
end
record Bridge new: function(): Bridge
record Interval new: function(): Interval
splines: {{Vec3f}}
railingModels: {{integer, Mat4f}}
end
intervals: {Interval}
end
record BuildCost new: function(): BuildCost
buildCost: integer
bulldozeCost: integer
noCostAtAll: boolean
end
record BulldozerInfo new: function(): BulldozerInfo
locked: boolean
end
record Carriage new: function(): Carriage
reversed: boolean
end
record CarriageList new: function(): CarriageList
carriages: {Engine.Entity}
end
record ColliderList new: function(): ColliderList
colliders: {{Collider, Mat4f}}
end
record Color new: function(): Color
color: Vec3f
end
record Construction new: function(): Construction
record ConstructionParams new: function(): ConstructionParams
seed: integer
modules: {integer : <any type>}
end
fileName: ResName
params: ConstructionParams
params_native: NativeLuaTable
transf: Mat4f
timeBuilt: integer
frozenNodes: {Engine.Entity}
frozenEdges: {Engine.Entity}
depots: {Engine.Entity}
stations: {Engine.Entity}
industries: {Engine.Entity}
townBuildings: {Engine.Entity}
subconstructions: {Engine.Entity}
persistentMetadata: ConstructionInstanceMetadata
slots: {Slot}
slotConfig: {string : SlotConfig}
dependentSlots: {integer, {integer}}
tag2modelInstance: {string, {{Engine.Entity, integer}}}
entityAndIndex2labelTexts: {{Engine.Entity, integer}, {string}}
tag2segments: {string, {Engine.Entity}}
end
record CustomState new: function(): CustomState
state: {<any type> : <any type>}
end
record EmissionEmitter new: function(): EmissionEmitter
position: Vec3f
radius: number
noisePower: number
pollutionPower: number
end
record EmissionGrid new: function(): EmissionGrid
record Type Noise: Type
Pollution: Type
end
X0: integer
Y0: integer
width: integer
height: integer
gridPointSize: Vec2f
concentrationBuffer: Gridf
averageConcentration: Gridf
type: Type
wind: Vec2f
end
record Field new: function(): Field
end
record GameScript<T> new: function(): GameScript<T>
gameScript: ResName
addedToExistingSavegame: boolean
state: T
state_native: NativeLuaTable
eventSubscriptions: any
end
record GameSpeed new: function(): GameSpeed
speedup: integer
millisPerDay: integer
end
record GameTime new: function(): GameTime
gameTime: integer
gameTime0: integer
dates: {{integer, Date}}
timeOfDaySec: integer
tickCount: integer
updateCount: integer
end
record Industry new: function(): Industry
stockList: Engine.Entity
level: integer
closureTimeStamp: integer
upgradeProgress: number
manualDevelopment: boolean
construction: Engine.Entity
maxLevel: integer
end
record Landmark new: function(): Landmark
transportNetworkEntity: Engine.Entity
active: boolean
end
record LandVehicle new: function(): LandVehicle
record DynState new: function(): DynState
brakingTimer: number
turnLeft: boolean
turnRight: boolean
end
isTram: boolean
dyn: DynState
end
record Line new: function(): Line
record LoadMode LOAD_IF_AVAILABLE: LoadMode
FULL_LOAD_ANY: LoadMode
FULL_LOAD_ALL: LoadMode
LEGACY_UNLOAD_ONLY: LoadMode
end
record StopConfig new: function(StopConfig): StopConfig
load: {boolean}
maxLoad: {number}
forceUnload: boolean
destroyForConfigChange: boolean
destroyForRefresh: boolean
end
record Stop new: function(): Stop
stationGroup: Engine.Entity
station: integer
terminal: integer
alternativeTerminals: {StationTerminal}
loadMode: LoadMode
minWaitingTime: number
maxWaitingTime: number
maxAdditionalWaitingTime: number
waypoints: {Waypoint}
stopConfig: StopConfig
end
stops: {Stop}
vehicleInfo: LineVehicleInfo
customFilters: boolean
reservationPriority: number
end
record LogBook new: function(): LogBook
record Log new: function(): Log
times: {integer}
values: {integer}
times_native: Vector<integer>
values_native: Vector<integer>
end
refEntity2name2log: {Engine.Entity : {string : Log}}
name2log: {string : Log}
name2log_native: Map<string, Log>
end
record LotList new: function(): LotList
record Lot new: function(): Lot
vertices: {Vec2f}
texCoords: {Vec2f}
triangles: {integer}
texKey: ResName
solid: boolean
end
lots: {Lot}
end
record MaintenanceCost new: function(): MaintenanceCost
maintenanceCost: integer
accumulatedCost: {{Carrier, Carrier} : integer}
end
record ModelInstanceList new: function(): ModelInstanceList
fatInstances: {ModelInstance}
thinInstances: {ThinModelInstance}
fatInstances_native: Vector<ModelInstance>
thinInstances_native: Vector<ThinModelInstance>
dynamic: boolean
end
record ModelPerson new: function(): ModelPerson
path: ExtPath
pathPos: PathPos
stopped: boolean
topSpeed: number
speed: number
brakeDecel: number
offset: number
position: Vec3f
movementType: integer
dist: number
dist0: number
stateTime: integer
startWaitTime: number
endWaitTime: number
end
record ModelPersonIdle new: function(): ModelPersonIdle
arrivalTime: integer
end
record MovePath new: function(): MovePath
record DynState new: function(): DynState
pathPos: PathPos
speed: number
brakeDecel: number
accel: number
timeUntilAccel: number
timeStanding: number
timeToIgnore: number
approachingStation: boolean
end
path: Path
endParam: number
endPos: number
state: VehicleState
blocked: integer
allowEarlyArrival: boolean
reverse: boolean
servedFrom: integer
servedTo: integer
occupiedBackIndex: integer
occupiedFrontIndex: integer
dyn: DynState
dyn0: DynState
end
record MovePathAircraft new: function(): MovePathAircraft
record AircraftState new: function(): AircraftState
record DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
flightState: FlightState
cruiseAlt: number
waitingDistance: number
waitingPriority: integer
gear: boolean
gearTime: integer
dyn: DynState
dyn0: DynState
end
record ShipState new: function(): ShipState
record DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
waitingDist: number
clearToLand: boolean
startPathPosData: PathPosData
targetPathPosData: PathPosData
dyn: DynState
dyn0: DynState
end
record PathState PATH0: PathState
PATH1: PathState
PATH2: PathState
end
path0: Path
path1: {{EdgeGeometry, boolean}}
path2: Path
pathPos: PathPos
pathPos0: PathPos
state: VehicleState
pathState: PathState
speed: number
speed0: number
brakeDecel: number
aircraftState: AircraftState
shipState: ShipState
end
record Name new: function(): Name
name: string
end
record Parcel new: function(): Parcel
record CollisionType Environment: CollisionType
Parcel: CollisionType
end
record Face new: function(): Face
points: {Vec3f}
collision: {CollisionType : boolean}
end
streetSegment: Engine.Entity
left: boolean
curveParam: number
offset: number
faces: {Face}
end
record PersonCapacity new: function(): PersonCapacity
type: LandUseType
capacity: integer
personNodes: {NodeId}
vehicleNodes: {NodeId}
end
record Player new: function(): Player
headquarters: Engine.Entity
end
record PlayerOwned new: function(): PlayerOwned
player: Engine.Entity
end
record RailroadCrossing new: function(): RailroadCrossing
record State OPEN: State
CLOSED: State
WAITING: State
end
nodes: {Engine.Entity}
edges: {Engine.Entity}
typeIndex: integer
state: State
stateTime: integer
end
record RunwayList new: function(): RunwayList
runways: {Runway}
end
record Scaffold new: function(): Scaffold
record Type NEW: Type
UPGRADE: Type
DOWNGRADE: Type
end
type: Type
oldModelId: integer
oldTransf: Mat4f
oldBuildingFace: {{Vec2f}}
oldFloorLevel: {{number}}
oldHeight: number
buildingFace: {{Vec2f}}
floorLevel: {{number}}
height: number
constructionStartTime: integer
constructionEndTime: integer
cranePosition: Vec2f
craneAngle: number
craneTerrainHeight: number
craneAngleSpan: {number}
end
record ShapeList new: function(): ShapeList
shapes: {Shape}
end
record Ship new: function(): Ship
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
record SignalList new: function(): SignalList
signals: {Signal}
end
record SimCargo record PickupPoint new: function(): PickupPoint
vehicle: Engine.Entity
line: Engine.Entity
position: Vec3f
carrier: Carrier
end
new: function(): SimCargo
cargoType: CargoTypeId
targetOrPickupEntity: Engine.Entity
sourceEntity: Engine.Entity
pickupPoints: {PickupPoint}
speed: number
startTime: integer
pickupTime: integer
deliveryExtensionDuration: integer
end
record SimEntityAtBuilding new: function(): SimEntityAtBuilding
waitingTime: number
end
record SimEntityAtStock new: function(): SimEntityAtStock
stock: {Engine.Entity, StockId}
arrivalTime: integer
end
record SimEntityAtTerminal new: function(): SimEntityAtTerminal
line: Engine.Entity
lineStop0: integer
lineStop1: integer
arrivalTime: number
vehicle: Engine.Entity
end
record SimEntityAtVehicle new: function(): SimEntityAtVehicle
line: Engine.Entity
lineStop0: integer
lineStop1: integer
vehicle: Engine.Entity
roundTripCounter: integer
end
record SimEntityIdle new: function(): SimEntityIdle
end
record SimEntityNeedsPath new: function(): SimEntityNeedsPath
input: PathFactoryInput
output: PathFactoryOutput
end
record SimEntityMoving new: function(): SimEntityMoving
line: Engine.Entity
lineStop0: integer
lineStop1: integer
partialPath: boolean
expectedArrivalTime: number
end
record SimPersonAtTerminal new: function(): SimPersonAtTerminal
edgeId: EdgeId
place: integer
end
record SimPersonAtVehicle new: function(): SimPersonAtVehicle
vehicle: Engine.Entity
part: integer
place: integer
expectedArrivalTime: number
end
record SimPerson new: function(): SimPerson
cargoType: CargoTypeId
destinations: {Engine.Entity}
moveModes: {MoveMode}
travelTimes: {number}
targetOrAtEntity: Engine.Entity
lastNonResType: LandUseType
lastMoveMode: MoveMode
walkSpeed: number
modelIdPerson: integer
colorConfigPerson: integer
modelIdCar: integer
colorConfigCar: integer
lastDestinationUpdate: integer
landUse2ReachableWalkDrive: {integer, integer}
landUse2ReachableLines: {integer, integer}
pickupTime: integer
happiness: number
end
type Station = Station
record StationGroup new: function(): StationGroup
stations: {Engine.Entity}
end
record StockList record Stock new: function(): Stock
type: StockListType
cargoType: CargoTypeId
cargoTypes: CargoTypeSet
mixedTypes: boolean
capacity: integer
loadSpeedModifier: number
loadIndicatorModelInstanceIndices: {integer}
tag: integer
end
record StockData new: function(): StockData
consumeFrequency: number
end
record Rule new: function(): Rule
input: {{integer}}
output: {CargoTypeId : integer}
capacity: integer
consumptionFactor: number
booster: boolean
boostFactor: number
priority: integer
slot: integer
end
record RuleData new: function(): RuleData
record ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
applyHistory: {ApplyInfo}
lastApplyDecayFactor: number
end
record CargoData new: function(): CargoData
produceFrequency: integer
end
record Modifiers new: function(): Modifiers
productivity: number
end
new: function(): StockList
stocks: {Stock}
rules: {Rule}
stockDatas: {StockData}
ruleDatas: {RuleData}
cargoData: {CargoTypeId : CargoData}
thrownAwayCargo: integer
modifiers: Modifiers
end
record Subconstruction new: function(): Subconstruction
tag: integer
slotIds: {integer}
metadata: SubconstructionInstanceMetadata
end
record Terrain new: function(): Terrain
size: Vec2i
baseLevels: integer
baseResolution: Vec3f
highLevels: integer
offsetZ: number
waterLevel: number
dataMaps: {string, HeightmapNew}
end
record TerrainAlignmentList new: function(): TerrainAlignmentList
terrainAlignments: {TerrainAlignment}
end
record TerrainTile new: function(): TerrainTile
terrainEntity: Engine.Entity
position: Vec2i
end
record TerrainTileBrush new: function(): TerrainTileBrush
materialIndexBrush: {integer}
forceAboveBit: {boolean}
end
record TerrainTileHeightmap new: function(): TerrainTileHeightmap
vertices: {integer}
end
record TickEpoch new: function(): TickEpoch
time: integer
commandIndex: integer
subIndex: integer
end
record Town new: function(): Town
initialLandUseCapacities: {integer}
capacityScalingFactor: number
levelToCapacityDistributionWeights: {{number}}
sizeFactors: {number}
cargoNeeds: {{{CargoTypeId, number}}}
developmentActive: boolean
noise: number
pollution: number
end
record TownBuilding new: function(): TownBuilding
personCapacity: Engine.Entity
stockList: Engine.Entity
construction: Engine.Entity
level: integer
parcels: {Engine.Entity}
depth: integer
height: number
town: Engine.Entity
timeBuilt: integer
blockedDevelopment: boolean
end
record TownConnection new: function(): TownConnection
entity0: Engine.Entity
entity1: Engine.Entity
position0: Vec2f
position1: Vec2f
time: number
currentTime: number
lastUpgradeYear: integer
valid: boolean
end
record TpNetLink new: function(): TpNetLink
from: EdgePos
to: EdgePos
end
record Train new: function(): Train
end
record TransportNetwork new: function(): TransportNetwork
nodes: {Node}
edges: {Edge}
turnaroundEdges: {integer}
end
record TransportNetworkNodes new: function(): TransportNetworkNodes
end
record TransportVehicle record Modifiers new: function(): Modifiers
topSpeedScale: number
noiseScale: number
pollutionScale: number
comfortScale: number
end
record LoadSpeedModifiers vehicleOverlength: number
stockCompatibility: number
vehicleCompatibility: number
vehicleIncompatibility: number
getTotalPenalty: function(LoadSpeedModifiers): number
end
record Config new: function(): Config
transportModes: {TransportMode : boolean}
allCaps: {CargoTypeId}
capacities: {CargoTypeId}
loadSpeeds: {number}
reversible: boolean
end
record LoadState new: function(): LoadState
None: LoadState
Arrived: LoadState
Unloading: LoadState
Loading: LoadState
WaitForScheduledDeparture: LoadState
Departing: LoadState
end
record PendingIncomeParams new: function(): PendingIncomeParams
record EntityRev0 entity: Engine.Entity
rev0: integer
end
amount: integer
carrier: Carrier
vehicleEntity: Engine.Entity
lineEntity: Engine.Entity
end
new: function(): TransportVehicle
carrier: Carrier
transportVehicleConfig: TransportVehicleConfig
config: Config
state: TransportVehicleState
userStopped: boolean
depot: Engine.Entity
sellOnArrival: boolean
line: Engine.Entity
stopIndex: integer
arrivalStationTerminal: StationTerminal
arrivalStationTerminalLocked: boolean
lineStopDepartures: {integer}
lastLineStopDeparture: integer
sectionTimes: {number}
lineStop2cargo2available: {{CargoTypeId}}
loadState: LoadState
timeUntilNextScheduledDeparture: number
loadSpeedModifiers: {CargoTypeId : LoadSpeedModifiers}
timeUntilCloseDoors: number
timeUntilDeparture: number
timeUntilNextLoad: {CargoTypeId : number}
timeUntilNextUnload: {CargoTypeId : number}
lastStationStockIndex: integer
doorsTime: integer
daysInDepot: integer
daysAtTerminal: integer
doorsOpen: boolean
noPath: boolean
autoDeparture: boolean
maintenanceStation: Engine.Entity
modifiers: Modifiers
unloadPendingIncome: PendingIncomeParams
closestTown: Engine.Entity
visitedStops: {integer}
end
record VehicleDepot new: function(): VehicleDepot
carrier: Carrier
transportModes: {TransportMode : boolean}
inNodes: {NodeId}
outNodes: {NodeId}
state: integer
doors: number
stateTime: integer
catchmentArea: CatchmentArea
maintenancePool: integer
maxPoolUsage: number
averagePoolUsage: number
poolUsageTicks: integer
filterTags: {string}
end
record VehicleOrder new: function(): VehicleOrder
equals: function(VehicleOrder, VehicleOrder): boolean
entity: Engine.Entity
strongBrakeEntity: boolean
waitingForSpace: boolean
waitingForTrafficLight: boolean
end
record Warehouse new: function(): Warehouse
stockList: Engine.Entity
construction: Engine.Entity
end
record WaterMesh new: function(): WaterMesh
record Contour new: function(): Contour
vertices: {Vec2f}
normals: {Vec2f}
end
waterLevel: number
vertices: {Vec2f}
depths: {number}
indices: {integer}
contours: {Contour}
pos: Vec2i
end
record World new: function(): World
cloudCoverage: number
end
end
Engine.Component.Account🔗
record Engine.Component.Account new: function(): Account
balance: integer
loan: integer
end
Contains financial data. Usually attached to the player Entity
Engine.Component.Account.new🔗
function Engine.Component.Account.new(): Account
Returns
Account
Engine.Component.Account.balance🔗
Engine.Component.Account.balance: integer
Current balance
Engine.Component.Account.loan🔗
Engine.Component.Account.loan: integer
Current loan
Engine.Component.Aircraft🔗
record Engine.Component.Aircraft new: function(): Aircraft
reservedTakeOffRunway: boolean
reservedLandingRunway: boolean
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
Data attached to aircraft
Engine.Component.Aircraft.new🔗
function Engine.Component.Aircraft.new(): Aircraft
Returns
Aircraft
Engine.Component.Aircraft.reservedTakeOffRunway🔗
Engine.Component.Aircraft.reservedTakeOffRunway: boolean
Has the runway been reserved for takeoff
Engine.Component.Aircraft.reservedLandingRunway🔗
Engine.Component.Aircraft.reservedLandingRunway: boolean
Has the runway been reserved for landing
Engine.Component.Aircraft.pathIndex🔗
Engine.Component.Aircraft.pathIndex: integer
Edge index on the path
Engine.Component.Aircraft.reservedFrom🔗
Engine.Component.Aircraft.reservedFrom: integer
Edge index on the path from which the reservation starts
Engine.Component.Aircraft.reservedTo🔗
Engine.Component.Aircraft.reservedTo: integer
Edge index on the path on which the reservation stops
Engine.Component.Animal🔗
record Engine.Component.Animal new: function(): Animal
worldPosition: Vec3f
lookingAt: Vec2f
targetCoord: Vec2f
movementSpeed: number
angularSpeed: number
lastUpdateElapsed: number
targetChangedElapsed: number
invalidTileElapsed: number
movementType: integer
roll: number
scaling: number
flock: {Vec3f}
end
Data attached to animals. Contains information about position and movement
Engine.Component.Animal.new🔗
function Engine.Component.Animal.new(): Animal
Returns
Animal
Engine.Component.Animal.worldPosition🔗
Engine.Component.Animal.worldPosition: Vec3f
Current location in the game world
Engine.Component.Animal.lookingAt🔗
Engine.Component.Animal.lookingAt: Vec2f
Direction in which the animal is oriented
Engine.Component.Animal.targetCoord🔗
Engine.Component.Animal.targetCoord: Vec2f
Destination where the animal is heading
Engine.Component.Animal.movementSpeed🔗
Engine.Component.Animal.movementSpeed: number
The forward speed
Engine.Component.Animal.angularSpeed🔗
Engine.Component.Animal.angularSpeed: number
The turn speed
Engine.Component.Animal.lastUpdateElapsed🔗
Engine.Component.Animal.lastUpdateElapsed: number
Time since the last update of the animal
Engine.Component.Animal.targetChangedElapsed🔗
Engine.Component.Animal.targetChangedElapsed: number
Time since the last reorientation of the animal
Engine.Component.Animal.invalidTileElapsed🔗
Engine.Component.Animal.invalidTileElapsed: number
Time since the animal is in an invalid location
Engine.Component.Animal.movementType🔗
Engine.Component.Animal.movementType: integer
Index of the current movement type
Engine.Component.Animal.roll🔗
Engine.Component.Animal.roll: number
Current roll value
Engine.Component.Animal.scaling🔗
Engine.Component.Animal.scaling: number
Scale of the animal
Engine.Component.Animal.flock🔗
Engine.Component.Animal.flock: {Vec3f}
Offset for each of the flock animals relative to the worldPosition
Engine.Component.AssetGroup🔗
record Engine.Component.AssetGroup new: function(): AssetGroup
end
Data attached to assets, in particular trees.
Assets are grouped together when built together in order to speed up rendering performance.
Usually comes together with a ModelInstanceList
Engine.Component.AssetGroup.new🔗
function Engine.Component.AssetGroup.new(): AssetGroup
Returns
AssetGroup
Engine.Component.AssetGroupAutoRemove🔗
record Engine.Component.AssetGroupAutoRemove new: function(): AssetGroupAutoRemove
end
Data attached to assets entities to enable automatic removal when it collides with newly built objects
Engine.Component.AssetGroupAutoRemove.new🔗
function Engine.Component.AssetGroupAutoRemove.new(): AssetGroupAutoRemove
Returns
AssetGroupAutoRemove
Engine.Component.AudioEmitter🔗
record Engine.Component.AudioEmitter new: function(): AudioEmitter
emitter: integer
end
An entity with an AudioEmitter emits a sound source
Engine.Component.AudioEmitter.new🔗
function Engine.Component.AudioEmitter.new(): AudioEmitter
Returns
AudioEmitter
Engine.Component.AudioEmitter.emitter🔗
Engine.Component.AudioEmitter.emitter: integer
Audio emitter reference
Engine.Component.BaseEdge🔗
record Engine.Component.BaseEdge new: function(): BaseEdge
clone: function(BaseEdge): BaseEdge
type: BaseEdgeType
typeIndex: integer
objects: {{Engine.Entity, EdgeObjectType}}
laneConfigs: {LaneConfig}
laneConfigs_native: Vector<LaneConfig>
roadDevelopmentLocked: boolean
node0: Engine.Entity
node1: Engine.Entity
position0: Vec3f
position1: Vec3f
tangent0: Vec3f
tangent1: Vec3f
laneConfig: {LaneConfig}
edgeDecorations: {{integer, boolean}}
distance: number
roadType: RoadType
roadTemplate: ResName
roadStyle: ResName
end
Type attached to streets and tracks, specifying the street type and other details.
A BaseEdge usually also has a BaseEdgeStreet and a TransportNetwork
Engine.Component.BaseEdge.new🔗
function Engine.Component.BaseEdge.new(): BaseEdge
Returns
BaseEdge
Engine.Component.BaseEdge.clone🔗
function Engine.Component.BaseEdge.clone(BaseEdge): BaseEdge
Parameters
BaseEdge
Returns
BaseEdge
Engine.Component.BaseEdge.type🔗
Engine.Component.BaseEdge.type: BaseEdgeType
Engine.Component.BaseEdge.typeIndex🔗
Engine.Component.BaseEdge.typeIndex: integer
Engine.Component.BaseEdge.objects🔗
Engine.Component.BaseEdge.objects: {{Engine.Entity, EdgeObjectType}}
Engine.Component.BaseEdge.laneConfigs🔗
Engine.Component.BaseEdge.laneConfigs: {LaneConfig}
Engine.Component.BaseEdge.laneConfigs_native🔗
Engine.Component.BaseEdge.laneConfigs_native: Vector<LaneConfig>
Engine.Component.BaseEdge.roadDevelopmentLocked🔗
Engine.Component.BaseEdge.roadDevelopmentLocked: boolean
prevent towns from updating or extending this road
Engine.Component.BaseEdge.node0🔗
Engine.Component.BaseEdge.node0: Engine.Entity
Engine.Component.BaseEdge.node1🔗
Engine.Component.BaseEdge.node1: Engine.Entity
Engine.Component.BaseEdge.position0🔗
Engine.Component.BaseEdge.position0: Vec3f
Engine.Component.BaseEdge.position1🔗
Engine.Component.BaseEdge.position1: Vec3f
Engine.Component.BaseEdge.tangent0🔗
Engine.Component.BaseEdge.tangent0: Vec3f
Engine.Component.BaseEdge.tangent1🔗
Engine.Component.BaseEdge.tangent1: Vec3f
Engine.Component.BaseEdge.laneConfig🔗
Engine.Component.BaseEdge.laneConfig: {LaneConfig}
Engine.Component.BaseEdge.edgeDecorations🔗
Engine.Component.BaseEdge.edgeDecorations: {{integer, boolean}}
Engine.Component.BaseEdge.distance🔗
Engine.Component.BaseEdge.distance: number
Engine.Component.BaseEdge.roadType🔗
Engine.Component.BaseEdge.roadType: RoadType
Type of road (STREET or TRACK)
Engine.Component.BaseEdge.roadTemplate🔗
Engine.Component.BaseEdge.roadTemplate: ResName
Road template resource name
Engine.Component.BaseEdge.roadStyle🔗
Engine.Component.BaseEdge.roadStyle: ResName
Road style resource name
Engine.Component.BaseEdgeStreet🔗
record Engine.Component.BaseEdgeStreet new: function(): BaseEdgeStreet
precedenceNode0: PrecedencePreference
precedenceNode1: PrecedencePreference
end
Contains details about a base edge when it is a street
Engine.Component.BaseEdgeStreet.new🔗
function Engine.Component.BaseEdgeStreet.new(): BaseEdgeStreet
Returns
BaseEdgeStreet
Engine.Component.BaseEdgeStreet.precedenceNode0🔗
Engine.Component.BaseEdgeStreet.precedenceNode0: PrecedencePreference
Precedence preference at first node
Engine.Component.BaseEdgeStreet.precedenceNode1🔗
Engine.Component.BaseEdgeStreet.precedenceNode1: PrecedencePreference
Precedence preference at second node
Engine.Component.BaseNode🔗
record Engine.Component.BaseNode new: function(): BaseNode
clone: function(BaseNode): BaseNode
position: Vec3f
end
A node in a street graph, e.g. a railroad crossing, a switch, or street crossing
Engine.Component.BaseNode.new🔗
function Engine.Component.BaseNode.new(): BaseNode
Returns
BaseNode
Engine.Component.BaseNode.clone🔗
function Engine.Component.BaseNode.clone(BaseNode): BaseNode
Parameters
BaseNode
Returns
BaseNode
Engine.Component.BaseNode.position🔗
Engine.Component.BaseNode.position: Vec3f
Position of the node in world coordinates
Engine.Component.TrafficLightState🔗
record Engine.Component.TrafficLightState new: function(): TrafficLightState
clone: function(TrafficLightState): TrafficLightState
lockedLanes: {integer}
duration: number
minDuration: number
canSkip: boolean
end
A signle state (= phase) of the traffic light
Engine.Component.TrafficLightState.new🔗
function Engine.Component.TrafficLightState.new(): TrafficLightState
Returns
TrafficLightState
Engine.Component.TrafficLightState.clone🔗
function Engine.Component.TrafficLightState.clone(TrafficLightState): TrafficLightState
Parameters
TrafficLightState
Returns
TrafficLightState
Engine.Component.TrafficLightState.lockedLanes🔗
Engine.Component.TrafficLightState.lockedLanes: {integer}
Engine.Component.TrafficLightState.duration🔗
Engine.Component.TrafficLightState.duration: number
Engine.Component.TrafficLightState.minDuration🔗
Engine.Component.TrafficLightState.minDuration: number
Engine.Component.TrafficLightState.canSkip🔗
Engine.Component.TrafficLightState.canSkip: boolean
Engine.Component.TrafficLightConfig🔗
record Engine.Component.TrafficLightConfig new: function(): TrafficLightConfig
clone: function(TrafficLightConfig): TrafficLightConfig
states: {TrafficLightState}
trafficLightType: integer
end
Traffic light configuration for the node, including phases (states)
Engine.Component.TrafficLightConfig.new🔗
function Engine.Component.TrafficLightConfig.new(): TrafficLightConfig
Returns
TrafficLightConfig
Engine.Component.TrafficLightConfig.clone🔗
function Engine.Component.TrafficLightConfig.clone(TrafficLightConfig): TrafficLightConfig
Parameters
TrafficLightConfig
Returns
TrafficLightConfig
Engine.Component.TrafficLightConfig.states🔗
Engine.Component.TrafficLightConfig.states: {TrafficLightState}
Engine.Component.TrafficLightConfig.trafficLightType🔗
Engine.Component.TrafficLightConfig.trafficLightType: integer
Engine.Component.BaseNodeConfig🔗
record Engine.Component.BaseNodeConfig new: function(): BaseNodeConfig
laneConnections: {LaneConnection}
crosswalks: {Entity}
trafficLightPreference: TrafficLightPreference
trafficLightConfig: TrafficLightConfig
doubleSlipSwitch: boolean
userModifiedLaneConnections: boolean
userModifiedTrafficLightStates: boolean
end
A custom configuration for the lanes
Engine.Component.BaseNodeConfig.new🔗
function Engine.Component.BaseNodeConfig.new(): BaseNodeConfig
Returns
BaseNodeConfig
Engine.Component.BaseNodeConfig.laneConnections🔗
Engine.Component.BaseNodeConfig.laneConnections: {LaneConnection}
Engine.Component.BaseNodeConfig.crosswalks🔗
Engine.Component.BaseNodeConfig.crosswalks: {Entity}
Engine.Component.BaseNodeConfig.trafficLightPreference🔗
Engine.Component.BaseNodeConfig.trafficLightPreference: TrafficLightPreference
Engine.Component.BaseNodeConfig.trafficLightConfig🔗
Engine.Component.BaseNodeConfig.trafficLightConfig: TrafficLightConfig
Engine.Component.BaseNodeConfig.doubleSlipSwitch🔗
Engine.Component.BaseNodeConfig.doubleSlipSwitch: boolean
Engine.Component.BaseNodeConfig.userModifiedLaneConnections🔗
Engine.Component.BaseNodeConfig.userModifiedLaneConnections: boolean
Engine.Component.BaseNodeConfig.userModifiedTrafficLightStates🔗
Engine.Component.BaseNodeConfig.userModifiedTrafficLightStates: boolean
Engine.Component.BaseNodeTrafficLight🔗
record Engine.Component.BaseNodeTrafficLight new: function(): BaseNodeTrafficLight
trafficLightData: TrafficLightData
state: integer
time: number
stateTimes: {integer}
end
Additional traffic light data for a base node
Engine.Component.BaseNodeTrafficLight.new🔗
function Engine.Component.BaseNodeTrafficLight.new(): BaseNodeTrafficLight
Returns
BaseNodeTrafficLight
Engine.Component.BaseNodeTrafficLight.trafficLightData🔗
Engine.Component.BaseNodeTrafficLight.trafficLightData: TrafficLightData
Engine.Component.BaseNodeTrafficLight.state🔗
Engine.Component.BaseNodeTrafficLight.state: integer
Engine.Component.BaseNodeTrafficLight.time🔗
Engine.Component.BaseNodeTrafficLight.time: number
Engine.Component.BaseNodeTrafficLight.stateTimes🔗
Engine.Component.BaseNodeTrafficLight.stateTimes: {integer}
Engine.Component.BaseParallelStrip🔗
[Expand All] [Collapse All]
record Engine.Component.BaseParallelStrip new: function(): BaseParallelStrip
record BaseEdgeRange new: function(): BaseEdgeRange
edge: Engine.Entity
bounds: {number, number}
end
rangeGroups: {{BaseEdgeRange}}
rangeGroups_native: Vector<Vector<BaseEdgeRange>>
end
Stores groups of ranges (a range is reflected as a BaseEdgeRange)
Engine.Component.BaseParallelStrip.new🔗
function Engine.Component.BaseParallelStrip.new(): BaseParallelStrip
Returns
BaseParallelStrip
Engine.Component.BaseParallelStrip.BaseEdgeRange🔗
record Engine.Component.BaseParallelStrip.BaseEdgeRange new: function(): BaseEdgeRange
edge: Engine.Entity
bounds: {number, number}
end
Stores a fraction of a base edge (BaseEdge)
Engine.Component.BaseParallelStrip.BaseEdgeRange.new🔗
function Engine.Component.BaseParallelStrip.BaseEdgeRange.new(): BaseEdgeRange
Returns
BaseEdgeRange
Engine.Component.BaseParallelStrip.BaseEdgeRange.edge🔗
Engine.Component.BaseParallelStrip.BaseEdgeRange.edge: Engine.Entity
Engine.Component.BaseParallelStrip.BaseEdgeRange.bounds🔗
Engine.Component.BaseParallelStrip.BaseEdgeRange.bounds: {number, number}
Engine.Component.BaseParallelStrip.rangeGroups🔗
Engine.Component.BaseParallelStrip.rangeGroups: {{BaseEdgeRange}}
Engine.Component.BaseParallelStrip.rangeGroups_native🔗
Engine.Component.BaseParallelStrip.rangeGroups_native: Vector<Vector<BaseEdgeRange>>
Engine.Component.BoundingVolume🔗
record Engine.Component.BoundingVolume new: function(): BoundingVolume
bbox: Box3f
end
Contains the bounding box of an entity
Engine.Component.BoundingVolume.new🔗
function Engine.Component.BoundingVolume.new(): BoundingVolume
Returns
BoundingVolume
Engine.Component.BoundingVolume.bbox🔗
Engine.Component.BoundingVolume.bbox: Box3f
The axis aligned bounding box
Engine.Component.Bridge🔗
[Expand All] [Collapse All]
record Engine.Component.Bridge new: function(): Bridge
record Interval new: function(): Interval
splines: {{Vec3f}}
railingModels: {{integer, Mat4f}}
end
intervals: {Interval}
end
Contains the full information and the entire spline of a bridge, if this was configured to do so
Engine.Component.Bridge.new🔗
function Engine.Component.Bridge.new(): Bridge
Returns
Bridge
Engine.Component.Bridge.Interval🔗
record Engine.Component.Bridge.Interval new: function(): Interval
splines: {{Vec3f}}
railingModels: {{integer, Mat4f}}
end
A subsection of a bridge
Engine.Component.Bridge.Interval.new🔗
function Engine.Component.Bridge.Interval.new(): Interval
Returns
Interval
Engine.Component.Bridge.Interval.splines🔗
Engine.Component.Bridge.Interval.splines: {{Vec3f}}
Engine.Component.Bridge.Interval.railingModels🔗
Engine.Component.Bridge.Interval.railingModels: {{integer, Mat4f}}
Engine.Component.Bridge.intervals🔗
Engine.Component.Bridge.intervals: {Interval}
Engine.Component.BuildCost🔗
record Engine.Component.BuildCost new: function(): BuildCost
buildCost: integer
bulldozeCost: integer
noCostAtAll: boolean
end
Stores the costs of an entity (e.g. Constructions or Edges)
Engine.Component.BuildCost.new🔗
function Engine.Component.BuildCost.new(): BuildCost
Returns
BuildCost
Engine.Component.BuildCost.buildCost🔗
Engine.Component.BuildCost.buildCost: integer
Engine.Component.BuildCost.bulldozeCost🔗
Engine.Component.BuildCost.bulldozeCost: integer
Engine.Component.BuildCost.noCostAtAll🔗
Engine.Component.BuildCost.noCostAtAll: boolean
Engine.Component.BulldozerInfo🔗
record Engine.Component.BulldozerInfo new: function(): BulldozerInfo
locked: boolean
end
Allows to set certain entities to be not bulldozable
Engine.Component.BulldozerInfo.new🔗
function Engine.Component.BulldozerInfo.new(): BulldozerInfo
Returns
BulldozerInfo
Engine.Component.BulldozerInfo.locked🔗
Engine.Component.BulldozerInfo.locked: boolean
Engine.Component.Carriage🔗
record Engine.Component.Carriage new: function(): Carriage
reversed: boolean
end
Represents a single waggon of a train (a single carriage or engine).
Engine.Component.Carriage.new🔗
function Engine.Component.Carriage.new(): Carriage
Returns
Carriage
Engine.Component.Carriage.reversed🔗
Engine.Component.Carriage.reversed: boolean
true if the train travels reversed
Engine.Component.CarriageList🔗
record Engine.Component.CarriageList new: function(): CarriageList
carriages: {Engine.Entity}
end
Represents a list of engines and carriages (usually of a train)
Engine.Component.CarriageList.new🔗
function Engine.Component.CarriageList.new(): CarriageList
Returns
CarriageList
Engine.Component.CarriageList.carriages🔗
Engine.Component.CarriageList.carriages: {Engine.Entity}
all waggons and engines
Engine.Component.ColliderList🔗
record Engine.Component.ColliderList new: function(): ColliderList
colliders: {{Collider, Mat4f}}
end
A list of colliders of different shapes, with an extra transformation
Engine.Component.ColliderList.new🔗
function Engine.Component.ColliderList.new(): ColliderList
Returns
ColliderList
Engine.Component.ColliderList.colliders🔗
Engine.Component.ColliderList.colliders: {{Collider, Mat4f}}
a list of colliders and transformation that belong to the entity
Engine.Component.Color🔗
record Engine.Component.Color new: function(): Color
color: Vec3f
end
Specifies the color of an entity
Engine.Component.Color.new🔗
function Engine.Component.Color.new(): Color
Returns
Color
Engine.Component.Color.color🔗
Engine.Component.Color.color: Vec3f
the RGB color of the entity
Engine.Component.Construction🔗
[Expand All] [Collapse All]
record Engine.Component.Construction new: function(): Construction
record ConstructionParams new: function(): ConstructionParams
seed: integer
modules: {integer : <any type>}
end
fileName: ResName
params: ConstructionParams
params_native: NativeLuaTable
transf: Mat4f
timeBuilt: integer
frozenNodes: {Engine.Entity}
frozenEdges: {Engine.Entity}
depots: {Engine.Entity}
stations: {Engine.Entity}
industries: {Engine.Entity}
townBuildings: {Engine.Entity}
subconstructions: {Engine.Entity}
persistentMetadata: ConstructionInstanceMetadata
slots: {Slot}
slotConfig: {string : SlotConfig}
dependentSlots: {integer, {integer}}
tag2modelInstance: {string, {{Engine.Entity, integer}}}
entityAndIndex2labelTexts: {{Engine.Entity, integer}, {string}}
tag2segments: {string, {Engine.Entity}}
end
A construction: usually contains stations, depots, town buildings or industries.
Engine.Component.Construction.new🔗
function Engine.Component.Construction.new(): Construction
Returns
Construction
Engine.Component.Construction.ConstructionParams🔗
record Engine.Component.Construction.ConstructionParams new: function(): ConstructionParams
seed: integer
modules: {integer : <any type>}
end
Engine.Component.Construction.ConstructionParams.new🔗
function Engine.Component.Construction.ConstructionParams.new(): ConstructionParams
Returns
ConstructionParams
Engine.Component.Construction.ConstructionParams.seed🔗
Engine.Component.Construction.ConstructionParams.seed: integer
Engine.Component.Construction.ConstructionParams.modules🔗
Engine.Component.Construction.ConstructionParams.modules: {integer : <any type>}
Engine.Component.Construction.fileName🔗
Engine.Component.Construction.fileName: ResName
the name of the construction (or the id in case of dynamic constructions)
Engine.Component.Construction.params🔗
Engine.Component.Construction.params: ConstructionParams
the parameters, passed to the updateFn.
Engine.Component.Construction.params_native🔗
Engine.Component.Construction.params_native: NativeLuaTable
Engine.Component.Construction.transf🔗
Engine.Component.Construction.transf: Mat4f
the world transformation of the construction
Engine.Component.Construction.timeBuilt🔗
Engine.Component.Construction.timeBuilt: integer
the in-game time when the construction was first placed
Engine.Component.Construction.frozenNodes🔗
Engine.Component.Construction.frozenNodes: {Engine.Entity}
nodes that belong to the construction and cannot be moved
Engine.Component.Construction.frozenEdges🔗
Engine.Component.Construction.frozenEdges: {Engine.Entity}
edges that belong to the construction and cannot be moved
Engine.Component.Construction.depots🔗
Engine.Component.Construction.depots: {Engine.Entity}
depots that belong to the construction
Engine.Component.Construction.stations🔗
Engine.Component.Construction.stations: {Engine.Entity}
stations that belong to the construction
Engine.Component.Construction.industries🔗
Engine.Component.Construction.industries: {Engine.Entity}
industries that belong to the construction
Engine.Component.Construction.townBuildings🔗
Engine.Component.Construction.townBuildings: {Engine.Entity}
town building that belong to the construction
Engine.Component.Construction.subconstructions🔗
Engine.Component.Construction.subconstructions: {Engine.Entity}
all subconstructions generated by the construction
Engine.Component.Construction.persistentMetadata🔗
Engine.Component.Construction.persistentMetadata: ConstructionInstanceMetadata
all metadata that is persisted in the component
Engine.Component.Construction.slots🔗
Engine.Component.Construction.slots: {Slot}
all slots of the modular construction
Engine.Component.Construction.slotConfig🔗
Engine.Component.Construction.slotConfig: {string : SlotConfig}
configuration by slot type
Engine.Component.Construction.dependentSlots🔗
Engine.Component.Construction.dependentSlots: {integer, {integer}}
Engine.Component.Construction.tag2modelInstance🔗
Engine.Component.Construction.tag2modelInstance: {string, {{Engine.Entity, integer}}}
Engine.Component.Construction.entityAndIndex2labelTexts🔗
Engine.Component.Construction.entityAndIndex2labelTexts: {{Engine.Entity, integer}, {string}}
Engine.Component.Construction.tag2segments🔗
Engine.Component.Construction.tag2segments: {string, {Engine.Entity}}
Engine.Component.CustomState🔗
record Engine.Component.CustomState new: function(): CustomState
state: {<any type> : <any type>}
end
The internal state of a custom entity state
Engine.Component.CustomState.new🔗
function Engine.Component.CustomState.new(): CustomState
Returns
CustomState
Engine.Component.CustomState.state🔗
Engine.Component.CustomState.state: {<any type> : <any type>}
the internal state as a generic table
Engine.Component.EmissionEmitter🔗
record Engine.Component.EmissionEmitter new: function(): EmissionEmitter
position: Vec3f
radius: number
noisePower: number
pollutionPower: number
end
An emission emitter, which emits pollution and/or noise
Engine.Component.EmissionEmitter.new🔗
function Engine.Component.EmissionEmitter.new(): EmissionEmitter
Returns
EmissionEmitter
Engine.Component.EmissionEmitter.position🔗
Engine.Component.EmissionEmitter.position: Vec3f
the position of the emission emitter
Engine.Component.EmissionEmitter.radius🔗
Engine.Component.EmissionEmitter.radius: number
the radius in which the emitter is applied (usually 0)
Engine.Component.EmissionEmitter.noisePower🔗
Engine.Component.EmissionEmitter.noisePower: number
the noise power of the emission emitter
Engine.Component.EmissionEmitter.pollutionPower🔗
Engine.Component.EmissionEmitter.pollutionPower: number
the pollution power of the emission emitter
Engine.Component.EmissionGrid🔗
[Expand All] [Collapse All]
record Engine.Component.EmissionGrid new: function(): EmissionGrid
record Type Noise: Type
Pollution: Type
end
X0: integer
Y0: integer
width: integer
height: integer
gridPointSize: Vec2f
concentrationBuffer: Gridf
averageConcentration: Gridf
type: Type
wind: Vec2f
end
The grid containing the emission data
Engine.Component.EmissionGrid.new🔗
function Engine.Component.EmissionGrid.new(): EmissionGrid
Returns
EmissionGrid
Engine.Component.EmissionGrid.Type🔗
record Engine.Component.EmissionGrid.Type Noise: Type
Pollution: Type
end
The emission grid type
Engine.Component.EmissionGrid.Type.Noise🔗
Engine.Component.EmissionGrid.Type.Noise: Type
Engine.Component.EmissionGrid.Type.Pollution🔗
Engine.Component.EmissionGrid.Type.Pollution: Type
Engine.Component.EmissionGrid.X0🔗
Engine.Component.EmissionGrid.X0: integer
the bottom left corner x coordinate
Engine.Component.EmissionGrid.Y0🔗
Engine.Component.EmissionGrid.Y0: integer
the bottom left corner y coordinate
Engine.Component.EmissionGrid.width🔗
Engine.Component.EmissionGrid.width: integer
Engine.Component.EmissionGrid.height🔗
Engine.Component.EmissionGrid.height: integer
Engine.Component.EmissionGrid.gridPointSize🔗
Engine.Component.EmissionGrid.gridPointSize: Vec2f
the resolution of the grid
Engine.Component.EmissionGrid.concentrationBuffer🔗
Engine.Component.EmissionGrid.concentrationBuffer: Gridf
Engine.Component.EmissionGrid.averageConcentration🔗
Engine.Component.EmissionGrid.averageConcentration: Gridf
Engine.Component.EmissionGrid.type🔗
Engine.Component.EmissionGrid.type: Type
enum type for noise (0) or pollution (1)
Engine.Component.EmissionGrid.wind🔗
Engine.Component.EmissionGrid.wind: Vec2f
global wind direction
Engine.Component.Field🔗
record Engine.Component.Field new: function(): Field
end
Contains data representing a farm field on the terrain
Engine.Component.Field.new🔗
function Engine.Component.Field.new(): Field
Returns
Field
Engine.Component.GameScript🔗
record Engine.Component.GameScript<T> new: function(): GameScript<T>
gameScript: ResName
addedToExistingSavegame: boolean
state: T
state_native: NativeLuaTable
eventSubscriptions: any
end
The internal state of a single gamescript
Type Parameters
T
Engine.Component.GameScript.new🔗
function Engine.Component.GameScript.new(): GameScript<T>
Returns
GameScript<T>
Engine.Component.GameScript.gameScript🔗
Engine.Component.GameScript.gameScript: ResName
the gamescript for this entity
Engine.Component.GameScript.addedToExistingSavegame🔗
Engine.Component.GameScript.addedToExistingSavegame: boolean
Engine.Component.GameScript.state🔗
Engine.Component.GameScript.state: T
the internal state as a generic table
Engine.Component.GameScript.state_native🔗
Engine.Component.GameScript.state_native: NativeLuaTable
Engine.Component.GameScript.eventSubscriptions🔗
Engine.Component.GameScript.eventSubscriptions: any
the event subscriptions for this gamescript
Engine.Component.GameSpeed🔗
record Engine.Component.GameSpeed new: function(): GameSpeed
speedup: integer
millisPerDay: integer
end
Information about the current game simulation and calendar speed.
Engine.Component.GameSpeed.new🔗
function Engine.Component.GameSpeed.new(): GameSpeed
Returns
GameSpeed
Engine.Component.GameSpeed.speedup🔗
Engine.Component.GameSpeed.speedup: integer
multiplier for game simulation speed (non-negative, 0 = paused)
Engine.Component.GameSpeed.millisPerDay🔗
Engine.Component.GameSpeed.millisPerDay: integer
length of an in-game calendar day in milliseconds (affected by speedup, 0 = paused)
Engine.Component.GameTime🔗
record Engine.Component.GameTime new: function(): GameTime
gameTime: integer
gameTime0: integer
dates: {{integer, Date}}
timeOfDaySec: integer
tickCount: integer
updateCount: integer
end
Information about the current ingame time.
Engine.Component.GameTime.new🔗
function Engine.Component.GameTime.new(): GameTime
Returns
GameTime
Engine.Component.GameTime.gameTime🔗
Engine.Component.GameTime.gameTime: integer
the current ingame time
Engine.Component.GameTime.gameTime0🔗
Engine.Component.GameTime.gameTime0: integer
the ingame time when the last update occured
Engine.Component.GameTime.dates🔗
Engine.Component.GameTime.dates: {{integer, Date}}
Engine.Component.GameTime.timeOfDaySec🔗
Engine.Component.GameTime.timeOfDaySec: integer
Engine.Component.GameTime.tickCount🔗
Engine.Component.GameTime.tickCount: integer
number of simulation ticks, ticks also when the game is paused (once per frame)
Engine.Component.GameTime.updateCount🔗
Engine.Component.GameTime.updateCount: integer
number of simulation updates, does not tick when the simulation is paused
Engine.Component.Industry🔗
record Engine.Component.Industry new: function(): Industry
stockList: Engine.Entity
level: integer
closureTimeStamp: integer
upgradeProgress: number
manualDevelopment: boolean
construction: Engine.Entity
maxLevel: integer
end
Contains information about industries.
Engine.Component.Industry.new🔗
function Engine.Component.Industry.new(): Industry
Returns
Industry
Engine.Component.Industry.stockList🔗
Engine.Component.Industry.stockList: Engine.Entity
stock list entity
Engine.Component.Industry.level🔗
Engine.Component.Industry.level: integer
the current level of the construction
Engine.Component.Industry.closureTimeStamp🔗
Engine.Component.Industry.closureTimeStamp: integer
time after which the building will be closed
Engine.Component.Industry.upgradeProgress🔗
Engine.Component.Industry.upgradeProgress: number
the progress towards upgrade/downgrade
Engine.Component.Industry.manualDevelopment🔗
Engine.Component.Industry.manualDevelopment: boolean
set to true if industries do not start to close/stop countdown and do not level up or down
Engine.Component.Industry.construction🔗
Engine.Component.Industry.construction: Engine.Entity
the construction entity
Engine.Component.Industry.maxLevel🔗
Engine.Component.Industry.maxLevel: integer
the maximum level of the construction
Engine.Component.Landmark🔗
record Engine.Component.Landmark new: function(): Landmark
transportNetworkEntity: Engine.Entity
active: boolean
end
Information about landmarks used for path finding.
Engine.Component.Landmark.new🔗
function Engine.Component.Landmark.new(): Landmark
Returns
Landmark
Engine.Component.Landmark.transportNetworkEntity🔗
Engine.Component.Landmark.transportNetworkEntity: Engine.Entity
the entity for the landmark
Engine.Component.Landmark.active🔗
Engine.Component.Landmark.active: boolean
whether the landmark is currently active
Engine.Component.LandVehicle🔗
[Expand All] [Collapse All]
record Engine.Component.LandVehicle new: function(): LandVehicle
record DynState new: function(): DynState
brakingTimer: number
turnLeft: boolean
turnRight: boolean
end
isTram: boolean
dyn: DynState
end
Represents a vehicle travelling on roads (either bus or truck)
Engine.Component.LandVehicle.new🔗
function Engine.Component.LandVehicle.new(): LandVehicle
Returns
LandVehicle
Engine.Component.LandVehicle.DynState🔗
record Engine.Component.LandVehicle.DynState new: function(): DynState
brakingTimer: number
turnLeft: boolean
turnRight: boolean
end
The fast-changing component of a LandVehicle.
Engine.Component.LandVehicle.DynState.new🔗
function Engine.Component.LandVehicle.DynState.new(): DynState
Returns
DynState
Engine.Component.LandVehicle.DynState.brakingTimer🔗
Engine.Component.LandVehicle.DynState.brakingTimer: number
time in seconds that counts down. When positive, braking lights are on
Engine.Component.LandVehicle.DynState.turnLeft🔗
Engine.Component.LandVehicle.DynState.turnLeft: boolean
true if the vehicle is turning left
Engine.Component.LandVehicle.DynState.turnRight🔗
Engine.Component.LandVehicle.DynState.turnRight: boolean
true if the vehicle is turning right
Engine.Component.LandVehicle.isTram🔗
Engine.Component.LandVehicle.isTram: boolean
Engine.Component.LandVehicle.dyn🔗
Engine.Component.LandVehicle.dyn: DynState
the fast-changing component of the LandVehicle
Engine.Component.Line🔗
[Expand All] [Collapse All]
record Engine.Component.Line new: function(): Line
record LoadMode LOAD_IF_AVAILABLE: LoadMode
FULL_LOAD_ANY: LoadMode
FULL_LOAD_ALL: LoadMode
LEGACY_UNLOAD_ONLY: LoadMode
end
record StopConfig new: function(StopConfig): StopConfig
load: {boolean}
maxLoad: {number}
forceUnload: boolean
destroyForConfigChange: boolean
destroyForRefresh: boolean
end
record Stop new: function(): Stop
stationGroup: Engine.Entity
station: integer
terminal: integer
alternativeTerminals: {StationTerminal}
loadMode: LoadMode
minWaitingTime: number
maxWaitingTime: number
maxAdditionalWaitingTime: number
waypoints: {Waypoint}
stopConfig: StopConfig
end
stops: {Stop}
vehicleInfo: LineVehicleInfo
customFilters: boolean
reservationPriority: number
end
An line with stops and configurations
Engine.Component.Line.new()🔗
function Engine.Component.Line.new()(): Line
Returns
Line
Engine.Component.Line.new(Line)🔗
function Engine.Component.Line.new(Line)(Line): Line
Parameters
Line
Returns
Line
Engine.Component.Line.LoadMode🔗
record Engine.Component.Line.LoadMode LOAD_IF_AVAILABLE: LoadMode
FULL_LOAD_ANY: LoadMode
FULL_LOAD_ALL: LoadMode
LEGACY_UNLOAD_ONLY: LoadMode
end
Type of loading/waiting for the line.
Engine.Component.Line.LoadMode.LOAD_IF_AVAILABLE🔗
Engine.Component.Line.LoadMode.LOAD_IF_AVAILABLE: LoadMode
Engine.Component.Line.LoadMode.FULL_LOAD_ANY🔗
Engine.Component.Line.LoadMode.FULL_LOAD_ANY: LoadMode
Engine.Component.Line.LoadMode.FULL_LOAD_ALL🔗
Engine.Component.Line.LoadMode.FULL_LOAD_ALL: LoadMode
Engine.Component.Line.LoadMode.LEGACY_UNLOAD_ONLY🔗
Engine.Component.Line.LoadMode.LEGACY_UNLOAD_ONLY: LoadMode
Engine.Component.Line.StopConfig🔗
record Engine.Component.Line.StopConfig new: function(StopConfig): StopConfig
load: {boolean}
maxLoad: {number}
forceUnload: boolean
destroyForConfigChange: boolean
destroyForRefresh: boolean
end
Configuration details for a line stop
Engine.Component.Line.StopConfig.new🔗
function Engine.Component.Line.StopConfig.new(StopConfig): StopConfig
Parameters
StopConfig
Returns
StopConfig
Engine.Component.Line.StopConfig.load🔗
Engine.Component.Line.StopConfig.load: {boolean}
for each cargo type, if it should be loaded
Engine.Component.Line.StopConfig.maxLoad🔗
Engine.Component.Line.StopConfig.maxLoad: {number}
for each cargo type, its max allowed fraction of total capacity (from 0 to 1)
Engine.Component.Line.StopConfig.forceUnload🔗
Engine.Component.Line.StopConfig.forceUnload: boolean
whether to unload cargo at compatible input-stocks, even if there is no space in that stock (cargo will be destroyed)
Engine.Component.Line.StopConfig.destroyForConfigChange🔗
Engine.Component.Line.StopConfig.destroyForConfigChange: boolean
whether to destroy cargo to allow changing the load config of a vehicle (even without compatible input-stock).
This only happens in case a different cargo type is available to be loaded up at this stock.
Engine.Component.Line.StopConfig.destroyForRefresh🔗
Engine.Component.Line.StopConfig.destroyForRefresh: boolean
whether to destroy cargo that was originally picked up by the vehicle at this output-stock (even without compatible input-stock).
This only happens in case the cargo did a full round trip and new cargo of the same type is available to be loaded up at this stock.
Engine.Component.Line.Stop🔗
record Engine.Component.Line.Stop new: function(): Stop
stationGroup: Engine.Entity
station: integer
terminal: integer
alternativeTerminals: {StationTerminal}
loadMode: LoadMode
minWaitingTime: number
maxWaitingTime: number
maxAdditionalWaitingTime: number
waypoints: {Waypoint}
stopConfig: StopConfig
end
Configuration for a line stop
Engine.Component.Line.Stop.new🔗
function Engine.Component.Line.Stop.new(): Stop
Returns
Stop
Engine.Component.Line.Stop.stationGroup🔗
Engine.Component.Line.Stop.stationGroup: Engine.Entity
the station group entity to which the line stop belongs
Engine.Component.Line.Stop.station🔗
Engine.Component.Line.Stop.station: integer
the station (within the station group)
Engine.Component.Line.Stop.terminal🔗
Engine.Component.Line.Stop.terminal: integer
the terminal (within the station) for the stop
Engine.Component.Line.Stop.alternativeTerminals🔗
Engine.Component.Line.Stop.alternativeTerminals: {StationTerminal}
Alternative terminals for the stop
Engine.Component.Line.Stop.loadMode🔗
Engine.Component.Line.Stop.loadMode: LoadMode
the configuration of what to load and not to load
Engine.Component.Line.Stop.minWaitingTime🔗
Engine.Component.Line.Stop.minWaitingTime: number
minimum waiting time at this stop
Engine.Component.Line.Stop.maxWaitingTime🔗
Engine.Component.Line.Stop.maxWaitingTime: number
maximum waiting time at this stop
Engine.Component.Line.Stop.maxAdditionalWaitingTime🔗
Engine.Component.Line.Stop.maxAdditionalWaitingTime: number
maximum additional waiting time (after unloading/loading) at this stop
Engine.Component.Line.Stop.waypoints🔗
Engine.Component.Line.Stop.waypoints: {Waypoint}
all waypoints after the stop
Engine.Component.Line.Stop.stopConfig🔗
Engine.Component.Line.Stop.stopConfig: StopConfig
configuration how much of what cargo type to load and unload
Engine.Component.Line.stops🔗
Engine.Component.Line.stops: {Stop}
all line stops in order
Engine.Component.Line.vehicleInfo🔗
Engine.Component.Line.vehicleInfo: LineVehicleInfo
information about vehicles of the line
Engine.Component.Line.customFilters🔗
Engine.Component.Line.customFilters: boolean
Engine.Component.Line.reservationPriority🔗
Engine.Component.Line.reservationPriority: number
Engine.Component.LogBook🔗
[Expand All] [Collapse All]
record Engine.Component.LogBook new: function(): LogBook
record Log new: function(): Log
times: {integer}
values: {integer}
times_native: Vector<integer>
values_native: Vector<integer>
end
refEntity2name2log: {Engine.Entity : {string : Log}}
name2log: {string : Log}
name2log_native: Map<string, Log>
end
A LogBook contains information about the evolution of a variable (e.g. amounts of money) over time.
Be caucious when working with this component, as it can grow quite large over time and lua performance might not be ideal.
Prefer the native utilities in api.engine.util.logbook whenever possible.
Engine.Component.LogBook.new🔗
function Engine.Component.LogBook.new(): LogBook
Returns
LogBook
Engine.Component.LogBook.Log🔗
record Engine.Component.LogBook.Log new: function(): Log
times: {integer}
values: {integer}
times_native: Vector<integer>
values_native: Vector<integer>
end
A Log is an entry into a LogBook and keeps track of the evolution of data in time.
Engine.Component.LogBook.Log.new🔗
function Engine.Component.LogBook.Log.new(): Log
Returns
Log
Engine.Component.LogBook.Log.times🔗
Engine.Component.LogBook.Log.times: {integer}
Engine.Component.LogBook.Log.values🔗
Engine.Component.LogBook.Log.values: {integer}
Engine.Component.LogBook.Log.times_native🔗
Engine.Component.LogBook.Log.times_native: Vector<integer>
Engine.Component.LogBook.Log.values_native🔗
Engine.Component.LogBook.Log.values_native: Vector<integer>
Engine.Component.LogBook.refEntity2name2log🔗
Engine.Component.LogBook.refEntity2name2log: {Engine.Entity : {string : Log}}
Engine.Component.LogBook.name2log🔗
Engine.Component.LogBook.name2log: {string : Log}
A map from a key to a Log
Engine.Component.LogBook.name2log_native🔗
Engine.Component.LogBook.name2log_native: Map<string, Log>
Engine.Component.LotList🔗
[Expand All] [Collapse All]
record Engine.Component.LotList new: function(): LotList
record Lot new: function(): Lot
vertices: {Vec2f}
texCoords: {Vec2f}
triangles: {integer}
texKey: ResName
solid: boolean
end
lots: {Lot}
end
Information about ground textures that are paining the terrain
Engine.Component.LotList.new🔗
function Engine.Component.LotList.new(): LotList
Returns
LotList
Engine.Component.LotList.Lot🔗
record Engine.Component.LotList.Lot new: function(): Lot
vertices: {Vec2f}
texCoords: {Vec2f}
triangles: {integer}
texKey: ResName
solid: boolean
end
Actual information of a LotList
Engine.Component.LotList.Lot.new🔗
function Engine.Component.LotList.Lot.new(): Lot
Returns
Lot
Engine.Component.LotList.Lot.vertices🔗
Engine.Component.LotList.Lot.vertices: {Vec2f}
list vertices of the lot
Engine.Component.LotList.Lot.texCoords🔗
Engine.Component.LotList.Lot.texCoords: {Vec2f}
list of texture coordinates for the lot (same length as vertices)
Engine.Component.LotList.Lot.triangles🔗
Engine.Component.LotList.Lot.triangles: {integer}
alternative to vertices, a list of triangles can be specified instead (must be a multiple of 3)
Engine.Component.LotList.Lot.texKey🔗
Engine.Component.LotList.Lot.texKey: ResName
the ground texture key to use
Engine.Component.LotList.Lot.solid🔗
Engine.Component.LotList.Lot.solid: boolean
Engine.Component.LotList.lots🔗
Engine.Component.LotList.lots: {Lot}
a list of lots for the entity
Engine.Component.MaintenanceCost🔗
record Engine.Component.MaintenanceCost new: function(): MaintenanceCost
maintenanceCost: integer
accumulatedCost: {{Carrier, Carrier} : integer}
end
Contains the maintenance cost of objects
Engine.Component.MaintenanceCost.new🔗
function Engine.Component.MaintenanceCost.new(): MaintenanceCost
Returns
MaintenanceCost
Engine.Component.MaintenanceCost.maintenanceCost🔗
Engine.Component.MaintenanceCost.maintenanceCost: integer
the maintenance cost of an object
Engine.Component.MaintenanceCost.accumulatedCost🔗
Engine.Component.MaintenanceCost.accumulatedCost: {{Carrier, Carrier} : integer}
Engine.Component.ModelInstanceList🔗
record Engine.Component.ModelInstanceList new: function(): ModelInstanceList
fatInstances: {ModelInstance}
thinInstances: {ThinModelInstance}
fatInstances_native: Vector<ModelInstance>
thinInstances_native: Vector<ThinModelInstance>
dynamic: boolean
end
Contains all models rendered by the entity
Engine.Component.ModelInstanceList.new🔗
function Engine.Component.ModelInstanceList.new(): ModelInstanceList
Returns
ModelInstanceList
Engine.Component.ModelInstanceList.fatInstances🔗
Engine.Component.ModelInstanceList.fatInstances: {ModelInstance}
A list of models with a full transform attached
Engine.Component.ModelInstanceList.thinInstances🔗
Engine.Component.ModelInstanceList.thinInstances: {ThinModelInstance}
A list of models with very simple data attached
Engine.Component.ModelInstanceList.fatInstances_native🔗
Engine.Component.ModelInstanceList.fatInstances_native: Vector<ModelInstance>
native variant for more performant access
Engine.Component.ModelInstanceList.thinInstances_native🔗
Engine.Component.ModelInstanceList.thinInstances_native: Vector<ThinModelInstance>
native variant for more performant access
Engine.Component.ModelInstanceList.dynamic🔗
Engine.Component.ModelInstanceList.dynamic: boolean
Engine.Component.ModelPerson🔗
record Engine.Component.ModelPerson new: function(): ModelPerson
path: ExtPath
pathPos: PathPos
stopped: boolean
topSpeed: number
speed: number
brakeDecel: number
offset: number
position: Vec3f
movementType: integer
dist: number
dist0: number
stateTime: integer
startWaitTime: number
endWaitTime: number
end
Additional data for persons walking in the world
Engine.Component.ModelPerson.new🔗
function Engine.Component.ModelPerson.new(): ModelPerson
Returns
ModelPerson
Engine.Component.ModelPerson.path🔗
Engine.Component.ModelPerson.path: ExtPath
the current path of the person
Engine.Component.ModelPerson.pathPos🔗
Engine.Component.ModelPerson.pathPos: PathPos
the current position on the path
Engine.Component.ModelPerson.stopped🔗
Engine.Component.ModelPerson.stopped: boolean
whether a person is currently not walking
Engine.Component.ModelPerson.topSpeed🔗
Engine.Component.ModelPerson.topSpeed: number
the maximal speed of a person
Engine.Component.ModelPerson.speed🔗
Engine.Component.ModelPerson.speed: number
the current speed of a person
Engine.Component.ModelPerson.brakeDecel🔗
Engine.Component.ModelPerson.brakeDecel: number
the current deceleration speed of persons
Engine.Component.ModelPerson.offset🔗
Engine.Component.ModelPerson.offset: number
an offset perpendicular to the path
Engine.Component.ModelPerson.position🔗
Engine.Component.ModelPerson.position: Vec3f
the position in the world
Engine.Component.ModelPerson.movementType🔗
Engine.Component.ModelPerson.movementType: integer
the animation used to move the person
Engine.Component.ModelPerson.dist🔗
Engine.Component.ModelPerson.dist: number
distance from the target
Engine.Component.ModelPerson.dist0🔗
Engine.Component.ModelPerson.dist0: number
distance from the target (last frame)
Engine.Component.ModelPerson.stateTime🔗
Engine.Component.ModelPerson.stateTime: integer
the animation timer
Engine.Component.ModelPerson.startWaitTime🔗
Engine.Component.ModelPerson.startWaitTime: number
waiting beside a car (before getting in, after coming out) start
Engine.Component.ModelPerson.endWaitTime🔗
Engine.Component.ModelPerson.endWaitTime: number
waiting in front of a car (before getting in, after coming out) end
Engine.Component.ModelPersonIdle🔗
record Engine.Component.ModelPersonIdle new: function(): ModelPersonIdle
arrivalTime: integer
end
Additional data for idle person
Engine.Component.ModelPersonIdle.new🔗
function Engine.Component.ModelPersonIdle.new(): ModelPersonIdle
Returns
ModelPersonIdle
Engine.Component.ModelPersonIdle.arrivalTime🔗
Engine.Component.ModelPersonIdle.arrivalTime: integer
the time since the person stopped
Engine.Component.MovePath🔗
[Expand All] [Collapse All]
record Engine.Component.MovePath new: function(): MovePath
record DynState new: function(): DynState
pathPos: PathPos
speed: number
brakeDecel: number
accel: number
timeUntilAccel: number
timeStanding: number
timeToIgnore: number
approachingStation: boolean
end
path: Path
endParam: number
endPos: number
state: VehicleState
blocked: integer
allowEarlyArrival: boolean
reverse: boolean
servedFrom: integer
servedTo: integer
occupiedBackIndex: integer
occupiedFrontIndex: integer
dyn: DynState
dyn0: DynState
end
Represents a path a vehicle is currently following
Engine.Component.MovePath.new🔗
function Engine.Component.MovePath.new(): MovePath
Returns
MovePath
Engine.Component.MovePath.DynState🔗
record Engine.Component.MovePath.DynState new: function(): DynState
pathPos: PathPos
speed: number
brakeDecel: number
accel: number
timeUntilAccel: number
timeStanding: number
timeToIgnore: number
approachingStation: boolean
end
The fast-changing component of the position on a path.
Engine.Component.MovePath.DynState.new🔗
function Engine.Component.MovePath.DynState.new(): DynState
Returns
DynState
Engine.Component.MovePath.DynState.pathPos🔗
Engine.Component.MovePath.DynState.pathPos: PathPos
the position on the path
Engine.Component.MovePath.DynState.speed🔗
Engine.Component.MovePath.DynState.speed: number
Engine.Component.MovePath.DynState.brakeDecel🔗
Engine.Component.MovePath.DynState.brakeDecel: number
Engine.Component.MovePath.DynState.accel🔗
Engine.Component.MovePath.DynState.accel: number
Engine.Component.MovePath.DynState.timeUntilAccel🔗
Engine.Component.MovePath.DynState.timeUntilAccel: number
Engine.Component.MovePath.DynState.timeStanding🔗
Engine.Component.MovePath.DynState.timeStanding: number
Engine.Component.MovePath.DynState.timeToIgnore🔗
Engine.Component.MovePath.DynState.timeToIgnore: number
Engine.Component.MovePath.DynState.approachingStation🔗
Engine.Component.MovePath.DynState.approachingStation: boolean
Engine.Component.MovePath.path🔗
Engine.Component.MovePath.path: Path
a series of edges the vehicle is following
Engine.Component.MovePath.endParam🔗
Engine.Component.MovePath.endParam: number
Engine.Component.MovePath.endPos🔗
Engine.Component.MovePath.endPos: number
Engine.Component.MovePath.state🔗
Engine.Component.MovePath.state: VehicleState
Engine.Component.MovePath.blocked🔗
Engine.Component.MovePath.blocked: integer
Engine.Component.MovePath.allowEarlyArrival🔗
Engine.Component.MovePath.allowEarlyArrival: boolean
Engine.Component.MovePath.reverse🔗
Engine.Component.MovePath.reverse: boolean
Engine.Component.MovePath.servedFrom🔗
Engine.Component.MovePath.servedFrom: integer
Engine.Component.MovePath.servedTo🔗
Engine.Component.MovePath.servedTo: integer
Engine.Component.MovePath.occupiedBackIndex🔗
Engine.Component.MovePath.occupiedBackIndex: integer
Engine.Component.MovePath.occupiedFrontIndex🔗
Engine.Component.MovePath.occupiedFrontIndex: integer
Engine.Component.MovePath.dyn🔗
Engine.Component.MovePath.dyn: DynState
the fast-changing component of the position on the path
Engine.Component.MovePath.dyn0🔗
Engine.Component.MovePath.dyn0: DynState
the dyn state at the beginning of the simulation frame (optional)
Engine.Component.MovePathAircraft🔗
[Expand All] [Collapse All]
record Engine.Component.MovePathAircraft new: function(): MovePathAircraft
record AircraftState new: function(): AircraftState
record DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
flightState: FlightState
cruiseAlt: number
waitingDistance: number
waitingPriority: integer
gear: boolean
gearTime: integer
dyn: DynState
dyn0: DynState
end
record ShipState new: function(): ShipState
record DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
waitingDist: number
clearToLand: boolean
startPathPosData: PathPosData
targetPathPosData: PathPosData
dyn: DynState
dyn0: DynState
end
record PathState PATH0: PathState
PATH1: PathState
PATH2: PathState
end
path0: Path
path1: {{EdgeGeometry, boolean}}
path2: Path
pathPos: PathPos
pathPos0: PathPos
state: VehicleState
pathState: PathState
speed: number
speed0: number
brakeDecel: number
aircraftState: AircraftState
shipState: ShipState
end
Engine.Component.MovePathAircraft.new🔗
function Engine.Component.MovePathAircraft.new(): MovePathAircraft
Returns
MovePathAircraft
Engine.Component.MovePathAircraft.AircraftState🔗
[Expand All] [Collapse All]
record Engine.Component.MovePathAircraft.AircraftState new: function(): AircraftState
record DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
flightState: FlightState
cruiseAlt: number
waitingDistance: number
waitingPriority: integer
gear: boolean
gearTime: integer
dyn: DynState
dyn0: DynState
end
Additional data for aircraft path
Engine.Component.MovePathAircraft.AircraftState.new🔗
function Engine.Component.MovePathAircraft.AircraftState.new(): AircraftState
Returns
AircraftState
Engine.Component.MovePathAircraft.AircraftState.DynState🔗
record Engine.Component.MovePathAircraft.AircraftState.DynState new: function(): DynState
velocity: Vec2f
lastAccel: Vec2f
pitch: number
pitchV: number
roll: number
rollV: number
thrust: number
thrustV: number
elevator: number
aileronLeft: number
propPhase: number
flaps: number
alt: number
end
Engine.Component.MovePathAircraft.AircraftState.DynState.new🔗
function Engine.Component.MovePathAircraft.AircraftState.DynState.new(): DynState
Returns
DynState
Engine.Component.MovePathAircraft.AircraftState.DynState.velocity🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.velocity: Vec2f
Engine.Component.MovePathAircraft.AircraftState.DynState.lastAccel🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.lastAccel: Vec2f
Engine.Component.MovePathAircraft.AircraftState.DynState.pitch🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.pitch: number
Engine.Component.MovePathAircraft.AircraftState.DynState.pitchV🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.pitchV: number
Engine.Component.MovePathAircraft.AircraftState.DynState.roll🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.roll: number
Engine.Component.MovePathAircraft.AircraftState.DynState.rollV🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.rollV: number
Engine.Component.MovePathAircraft.AircraftState.DynState.thrust🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.thrust: number
Engine.Component.MovePathAircraft.AircraftState.DynState.thrustV🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.thrustV: number
Engine.Component.MovePathAircraft.AircraftState.DynState.elevator🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.elevator: number
Engine.Component.MovePathAircraft.AircraftState.DynState.aileronLeft🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.aileronLeft: number
Engine.Component.MovePathAircraft.AircraftState.DynState.propPhase🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.propPhase: number
Engine.Component.MovePathAircraft.AircraftState.DynState.flaps🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.flaps: number
Engine.Component.MovePathAircraft.AircraftState.DynState.alt🔗
Engine.Component.MovePathAircraft.AircraftState.DynState.alt: number
Engine.Component.MovePathAircraft.AircraftState.flightState🔗
Engine.Component.MovePathAircraft.AircraftState.flightState: FlightState
current flight state of the aircraft
Engine.Component.MovePathAircraft.AircraftState.cruiseAlt🔗
Engine.Component.MovePathAircraft.AircraftState.cruiseAlt: number
Engine.Component.MovePathAircraft.AircraftState.waitingDistance🔗
Engine.Component.MovePathAircraft.AircraftState.waitingDistance: number
Engine.Component.MovePathAircraft.AircraftState.waitingPriority🔗
Engine.Component.MovePathAircraft.AircraftState.waitingPriority: integer
Engine.Component.MovePathAircraft.AircraftState.gear🔗
Engine.Component.MovePathAircraft.AircraftState.gear: boolean
Engine.Component.MovePathAircraft.AircraftState.gearTime🔗
Engine.Component.MovePathAircraft.AircraftState.gearTime: integer
Engine.Component.MovePathAircraft.AircraftState.dyn🔗
Engine.Component.MovePathAircraft.AircraftState.dyn: DynState
Engine.Component.MovePathAircraft.AircraftState.dyn0🔗
Engine.Component.MovePathAircraft.AircraftState.dyn0: DynState
Engine.Component.MovePathAircraft.ShipState🔗
[Expand All] [Collapse All]
record Engine.Component.MovePathAircraft.ShipState new: function(): ShipState
record DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
waitingDist: number
clearToLand: boolean
startPathPosData: PathPosData
targetPathPosData: PathPosData
dyn: DynState
dyn0: DynState
end
Engine.Component.MovePathAircraft.ShipState.new🔗
function Engine.Component.MovePathAircraft.ShipState.new(): ShipState
Returns
ShipState
Engine.Component.MovePathAircraft.ShipState.DynState🔗
record Engine.Component.MovePathAircraft.ShipState.DynState new: function(): DynState
lastAccel: number
tractiveEffort: number
tractiveEffortV: number
roll: number
rollV: number
powerOutput: number
approachingStation: boolean
paddlePhase: number
actualPos: PathPosData
end
Engine.Component.MovePathAircraft.ShipState.DynState.new🔗
function Engine.Component.MovePathAircraft.ShipState.DynState.new(): DynState
Returns
DynState
Engine.Component.MovePathAircraft.ShipState.DynState.lastAccel🔗
Engine.Component.MovePathAircraft.ShipState.DynState.lastAccel: number
Engine.Component.MovePathAircraft.ShipState.DynState.tractiveEffort🔗
Engine.Component.MovePathAircraft.ShipState.DynState.tractiveEffort: number
Engine.Component.MovePathAircraft.ShipState.DynState.tractiveEffortV🔗
Engine.Component.MovePathAircraft.ShipState.DynState.tractiveEffortV: number
Engine.Component.MovePathAircraft.ShipState.DynState.roll🔗
Engine.Component.MovePathAircraft.ShipState.DynState.roll: number
Engine.Component.MovePathAircraft.ShipState.DynState.rollV🔗
Engine.Component.MovePathAircraft.ShipState.DynState.rollV: number
Engine.Component.MovePathAircraft.ShipState.DynState.powerOutput🔗
Engine.Component.MovePathAircraft.ShipState.DynState.powerOutput: number
Engine.Component.MovePathAircraft.ShipState.DynState.approachingStation🔗
Engine.Component.MovePathAircraft.ShipState.DynState.approachingStation: boolean
Engine.Component.MovePathAircraft.ShipState.DynState.paddlePhase🔗
Engine.Component.MovePathAircraft.ShipState.DynState.paddlePhase: number
Engine.Component.MovePathAircraft.ShipState.DynState.actualPos🔗
Engine.Component.MovePathAircraft.ShipState.DynState.actualPos: PathPosData
Engine.Component.MovePathAircraft.ShipState.waitingDist🔗
Engine.Component.MovePathAircraft.ShipState.waitingDist: number
Engine.Component.MovePathAircraft.ShipState.clearToLand🔗
Engine.Component.MovePathAircraft.ShipState.clearToLand: boolean
Engine.Component.MovePathAircraft.ShipState.startPathPosData🔗
Engine.Component.MovePathAircraft.ShipState.startPathPosData: PathPosData
Engine.Component.MovePathAircraft.ShipState.targetPathPosData🔗
Engine.Component.MovePathAircraft.ShipState.targetPathPosData: PathPosData
Engine.Component.MovePathAircraft.ShipState.dyn🔗
Engine.Component.MovePathAircraft.ShipState.dyn: DynState
Engine.Component.MovePathAircraft.ShipState.dyn0🔗
Engine.Component.MovePathAircraft.ShipState.dyn0: DynState
Engine.Component.MovePathAircraft.PathState🔗
record Engine.Component.MovePathAircraft.PathState PATH0: PathState
PATH1: PathState
PATH2: PathState
end
Engine.Component.MovePathAircraft.PathState.PATH0🔗
Engine.Component.MovePathAircraft.PathState.PATH0: PathState
Engine.Component.MovePathAircraft.PathState.PATH1🔗
Engine.Component.MovePathAircraft.PathState.PATH1: PathState
Engine.Component.MovePathAircraft.PathState.PATH2🔗
Engine.Component.MovePathAircraft.PathState.PATH2: PathState
Engine.Component.MovePathAircraft.path0🔗
Engine.Component.MovePathAircraft.path0: Path
Engine.Component.MovePathAircraft.path1🔗
Engine.Component.MovePathAircraft.path1: {{EdgeGeometry, boolean}}
Engine.Component.MovePathAircraft.path2🔗
Engine.Component.MovePathAircraft.path2: Path
Engine.Component.MovePathAircraft.pathPos🔗
Engine.Component.MovePathAircraft.pathPos: PathPos
Engine.Component.MovePathAircraft.pathPos0🔗
Engine.Component.MovePathAircraft.pathPos0: PathPos
Engine.Component.MovePathAircraft.state🔗
Engine.Component.MovePathAircraft.state: VehicleState
Engine.Component.MovePathAircraft.pathState🔗
Engine.Component.MovePathAircraft.pathState: PathState
Engine.Component.MovePathAircraft.speed🔗
Engine.Component.MovePathAircraft.speed: number
Engine.Component.MovePathAircraft.speed0🔗
Engine.Component.MovePathAircraft.speed0: number
Engine.Component.MovePathAircraft.brakeDecel🔗
Engine.Component.MovePathAircraft.brakeDecel: number
Engine.Component.MovePathAircraft.aircraftState🔗
Engine.Component.MovePathAircraft.aircraftState: AircraftState
Engine.Component.MovePathAircraft.shipState🔗
Engine.Component.MovePathAircraft.shipState: ShipState
Engine.Component.Name🔗
record Engine.Component.Name new: function(): Name
name: string
end
Specifies the name of an entity
Engine.Component.Name.new🔗
function Engine.Component.Name.new(): Name
Returns
Name
Engine.Component.Name.name🔗
Engine.Component.Name.name: string
the name of the entity
Engine.Component.Parcel🔗
[Expand All] [Collapse All]
record Engine.Component.Parcel new: function(): Parcel
record CollisionType Environment: CollisionType
Parcel: CollisionType
end
record Face new: function(): Face
points: {Vec3f}
collision: {CollisionType : boolean}
end
streetSegment: Engine.Entity
left: boolean
curveParam: number
offset: number
faces: {Face}
end
A parcel is a region of space near a road where a town building can be built.
Engine.Component.Parcel.new🔗
function Engine.Component.Parcel.new(): Parcel
Returns
Parcel
Engine.Component.Parcel.CollisionType🔗
record Engine.Component.Parcel.CollisionType Environment: CollisionType
Parcel: CollisionType
end
Engine.Component.Parcel.CollisionType.Environment🔗
Engine.Component.Parcel.CollisionType.Environment: CollisionType
Engine.Component.Parcel.CollisionType.Parcel🔗
Engine.Component.Parcel.CollisionType.Parcel: CollisionType
Engine.Component.Parcel.Face🔗
record Engine.Component.Parcel.Face new: function(): Face
points: {Vec3f}
collision: {CollisionType : boolean}
end
Engine.Component.Parcel.Face.new🔗
function Engine.Component.Parcel.Face.new(): Face
Returns
Face
Engine.Component.Parcel.Face.points🔗
Engine.Component.Parcel.Face.points: {Vec3f}
Engine.Component.Parcel.Face.collision🔗
Engine.Component.Parcel.Face.collision: {CollisionType : boolean}
Engine.Component.Parcel.streetSegment🔗
Engine.Component.Parcel.streetSegment: Engine.Entity
the street edge to which the parcel belongs
Engine.Component.Parcel.left🔗
Engine.Component.Parcel.left: boolean
Engine.Component.Parcel.curveParam🔗
Engine.Component.Parcel.curveParam: number
Engine.Component.Parcel.offset🔗
Engine.Component.Parcel.offset: number
Engine.Component.Parcel.faces🔗
Engine.Component.Parcel.faces: {Face}
Engine.Component.PersonCapacity🔗
record Engine.Component.PersonCapacity new: function(): PersonCapacity
type: LandUseType
capacity: integer
personNodes: {NodeId}
vehicleNodes: {NodeId}
end
Contains information about a workplace of household.
Engine.Component.PersonCapacity.new🔗
function Engine.Component.PersonCapacity.new(): PersonCapacity
Returns
PersonCapacity
Engine.Component.PersonCapacity.type🔗
Engine.Component.PersonCapacity.type: LandUseType
the type of capacity (1 = residential, 2 = commercial, 3 = industrial)
Engine.Component.PersonCapacity.capacity🔗
Engine.Component.PersonCapacity.capacity: integer
total capacity (tenants or workers) of the Entity
Engine.Component.PersonCapacity.personNodes🔗
Engine.Component.PersonCapacity.personNodes: {NodeId}
Engine.Component.PersonCapacity.vehicleNodes🔗
Engine.Component.PersonCapacity.vehicleNodes: {NodeId}
Engine.Component.Player🔗
record Engine.Component.Player new: function(): Player
headquarters: Engine.Entity
end
Represent a player
Engine.Component.Player.new🔗
function Engine.Component.Player.new(): Player
Returns
Player
Engine.Component.Player.headquarters🔗
Engine.Component.Player.headquarters: Engine.Entity
the current headquarters construction
Engine.Component.PlayerOwned🔗
record Engine.Component.PlayerOwned new: function(): PlayerOwned
player: Engine.Entity
end
An entity with player owner is property of the owner and can be bulldozed only by him.
Engine.Component.PlayerOwned.new🔗
function Engine.Component.PlayerOwned.new(): PlayerOwned
Returns
PlayerOwned
Engine.Component.PlayerOwned.player🔗
Engine.Component.PlayerOwned.player: Engine.Entity
the owner of the entity
Engine.Component.RailroadCrossing🔗
[Expand All] [Collapse All]
record Engine.Component.RailroadCrossing new: function(): RailroadCrossing
record State OPEN: State
CLOSED: State
WAITING: State
end
nodes: {Engine.Entity}
edges: {Engine.Entity}
typeIndex: integer
state: State
stateTime: integer
end
A railroad crossing
Engine.Component.RailroadCrossing.new🔗
function Engine.Component.RailroadCrossing.new(): RailroadCrossing
Returns
RailroadCrossing
Engine.Component.RailroadCrossing.State🔗
record Engine.Component.RailroadCrossing.State OPEN: State
CLOSED: State
WAITING: State
end
Animation state of a railroad crossing
Engine.Component.RailroadCrossing.State.OPEN🔗
Engine.Component.RailroadCrossing.State.OPEN: State
Engine.Component.RailroadCrossing.State.CLOSED🔗
Engine.Component.RailroadCrossing.State.CLOSED: State
Engine.Component.RailroadCrossing.State.WAITING🔗
Engine.Component.RailroadCrossing.State.WAITING: State
Engine.Component.RailroadCrossing.nodes🔗
Engine.Component.RailroadCrossing.nodes: {Engine.Entity}
nodes belonging to the railroad crossing
Engine.Component.RailroadCrossing.edges🔗
Engine.Component.RailroadCrossing.edges: {Engine.Entity}
edges belonging to the railroad crossing
Engine.Component.RailroadCrossing.typeIndex🔗
Engine.Component.RailroadCrossing.typeIndex: integer
the type of crossing, as an index in api.res.railroadCrossingTypeRep.
Engine.Component.RailroadCrossing.state🔗
Engine.Component.RailroadCrossing.state: State
the current animation
Engine.Component.RailroadCrossing.stateTime🔗
Engine.Component.RailroadCrossing.stateTime: integer
the animation timer
Engine.Component.RunwayList🔗
record Engine.Component.RunwayList new: function(): RunwayList
runways: {Runway}
end
All runways for the entity transport network.
Engine.Component.RunwayList.new🔗
function Engine.Component.RunwayList.new(): RunwayList
Returns
RunwayList
Engine.Component.RunwayList.runways🔗
Engine.Component.RunwayList.runways: {Runway}
Engine.Component.Scaffold🔗
[Expand All] [Collapse All]
record Engine.Component.Scaffold new: function(): Scaffold
record Type NEW: Type
UPGRADE: Type
DOWNGRADE: Type
end
type: Type
oldModelId: integer
oldTransf: Mat4f
oldBuildingFace: {{Vec2f}}
oldFloorLevel: {{number}}
oldHeight: number
buildingFace: {{Vec2f}}
floorLevel: {{number}}
height: number
constructionStartTime: integer
constructionEndTime: integer
cranePosition: Vec2f
craneAngle: number
craneTerrainHeight: number
craneAngleSpan: {number}
end
Engine.Component.Scaffold.new🔗
function Engine.Component.Scaffold.new(): Scaffold
Returns
Scaffold
Engine.Component.Scaffold.Type🔗
record Engine.Component.Scaffold.Type NEW: Type
UPGRADE: Type
DOWNGRADE: Type
end
Engine.Component.Scaffold.Type.NEW🔗
Engine.Component.Scaffold.Type.NEW: Type
Engine.Component.Scaffold.Type.UPGRADE🔗
Engine.Component.Scaffold.Type.UPGRADE: Type
Engine.Component.Scaffold.Type.DOWNGRADE🔗
Engine.Component.Scaffold.Type.DOWNGRADE: Type
Engine.Component.Scaffold.type🔗
Engine.Component.Scaffold.type: Type
Engine.Component.Scaffold.oldModelId🔗
Engine.Component.Scaffold.oldModelId: integer
Engine.Component.Scaffold.oldTransf🔗
Engine.Component.Scaffold.oldTransf: Mat4f
Engine.Component.Scaffold.oldBuildingFace🔗
Engine.Component.Scaffold.oldBuildingFace: {{Vec2f}}
Engine.Component.Scaffold.oldFloorLevel🔗
Engine.Component.Scaffold.oldFloorLevel: {{number}}
Engine.Component.Scaffold.oldHeight🔗
Engine.Component.Scaffold.oldHeight: number
Engine.Component.Scaffold.buildingFace🔗
Engine.Component.Scaffold.buildingFace: {{Vec2f}}
Engine.Component.Scaffold.floorLevel🔗
Engine.Component.Scaffold.floorLevel: {{number}}
Engine.Component.Scaffold.height🔗
Engine.Component.Scaffold.height: number
Engine.Component.Scaffold.constructionStartTime🔗
Engine.Component.Scaffold.constructionStartTime: integer
Engine.Component.Scaffold.constructionEndTime🔗
Engine.Component.Scaffold.constructionEndTime: integer
Engine.Component.Scaffold.cranePosition🔗
Engine.Component.Scaffold.cranePosition: Vec2f
Engine.Component.Scaffold.craneAngle🔗
Engine.Component.Scaffold.craneAngle: number
Engine.Component.Scaffold.craneTerrainHeight🔗
Engine.Component.Scaffold.craneTerrainHeight: number
Engine.Component.Scaffold.craneAngleSpan🔗
Engine.Component.Scaffold.craneAngleSpan: {number}
Engine.Component.ShapeList🔗
record Engine.Component.ShapeList new: function(): ShapeList
shapes: {Shape}
end
Contains a list procedurally generated shapes.
Engine.Component.ShapeList.new🔗
function Engine.Component.ShapeList.new(): ShapeList
Returns
ShapeList
Engine.Component.ShapeList.shapes🔗
Engine.Component.ShapeList.shapes: {Shape}
a list of shapes
Engine.Component.Ship🔗
record Engine.Component.Ship new: function(): Ship
pathIndex: integer
reservedFrom: integer
reservedTo: integer
end
Contains information about pathing and extra data of ships.
Engine.Component.Ship.new🔗
function Engine.Component.Ship.new(): Ship
Returns
Ship
Engine.Component.Ship.pathIndex🔗
Engine.Component.Ship.pathIndex: integer
the current position on the path
Engine.Component.Ship.reservedFrom🔗
Engine.Component.Ship.reservedFrom: integer
the starting edge reserved by the ship
Engine.Component.Ship.reservedTo🔗
Engine.Component.Ship.reservedTo: integer
the ending edge reserved by the ship
Engine.Component.SignalList🔗
record Engine.Component.SignalList new: function(): SignalList
signals: {Signal}
end
Contains a list of signals for the entity.
Engine.Component.SignalList.new🔗
function Engine.Component.SignalList.new(): SignalList
Returns
SignalList
Engine.Component.SignalList.signals🔗
Engine.Component.SignalList.signals: {Signal}
a list of signals
Engine.Component.SimCargo🔗
[Expand All] [Collapse All]
record Engine.Component.SimCargo record PickupPoint new: function(): PickupPoint
vehicle: Engine.Entity
line: Engine.Entity
position: Vec3f
carrier: Carrier
end
new: function(): SimCargo
cargoType: CargoTypeId
targetOrPickupEntity: Engine.Entity
sourceEntity: Engine.Entity
pickupPoints: {PickupPoint}
speed: number
startTime: integer
pickupTime: integer
deliveryExtensionDuration: integer
end
Additional data for cargo.
Engine.Component.SimCargo.PickupPoint🔗
record Engine.Component.SimCargo.PickupPoint new: function(): PickupPoint
vehicle: Engine.Entity
line: Engine.Entity
position: Vec3f
carrier: Carrier
end
Historic transport data for cargo items.
Engine.Component.SimCargo.PickupPoint.new🔗
function Engine.Component.SimCargo.PickupPoint.new(): PickupPoint
Returns
PickupPoint
Engine.Component.SimCargo.PickupPoint.vehicle🔗
Engine.Component.SimCargo.PickupPoint.vehicle: Engine.Entity
the vehicle the cargo item was transported with
Engine.Component.SimCargo.PickupPoint.line🔗
Engine.Component.SimCargo.PickupPoint.line: Engine.Entity
the line the cargo item was transported on
Engine.Component.SimCargo.PickupPoint.position🔗
Engine.Component.SimCargo.PickupPoint.position: Vec3f
the position of the cargo item on the vehicle
Engine.Component.SimCargo.PickupPoint.carrier🔗
Engine.Component.SimCargo.PickupPoint.carrier: Carrier
the transport method used to transport the cargo item
Engine.Component.SimCargo.new🔗
function Engine.Component.SimCargo.new(): SimCargo
Returns
SimCargo
Engine.Component.SimCargo.cargoType🔗
Engine.Component.SimCargo.cargoType: CargoTypeId
The cargo type of the cargo (never 0)
Engine.Component.SimCargo.targetOrPickupEntity🔗
Engine.Component.SimCargo.targetOrPickupEntity: Engine.Entity
the entity of the target where the cargo item heads to
Engine.Component.SimCargo.sourceEntity🔗
Engine.Component.SimCargo.sourceEntity: Engine.Entity
the entity of the source where the cargo item came from
Engine.Component.SimCargo.pickupPoints🔗
Engine.Component.SimCargo.pickupPoints: {PickupPoint}
Engine.Component.SimCargo.speed🔗
Engine.Component.SimCargo.speed: number
Engine.Component.SimCargo.startTime🔗
Engine.Component.SimCargo.startTime: integer
the timestamp when the cargo item was produced
Engine.Component.SimCargo.pickupTime🔗
Engine.Component.SimCargo.pickupTime: integer
the timestamp when the cargo item was picked up
Engine.Component.SimCargo.deliveryExtensionDuration🔗
Engine.Component.SimCargo.deliveryExtensionDuration: integer
the duration of extra time to deliver the cargo
Engine.Component.SimEntityAtBuilding🔗
record Engine.Component.SimEntityAtBuilding new: function(): SimEntityAtBuilding
waitingTime: number
end
Additional data for entities waiting at buildings.
Engine.Component.SimEntityAtBuilding.new🔗
function Engine.Component.SimEntityAtBuilding.new(): SimEntityAtBuilding
Returns
SimEntityAtBuilding
Engine.Component.SimEntityAtBuilding.waitingTime🔗
Engine.Component.SimEntityAtBuilding.waitingTime: number
How long the entity has been waiting
Engine.Component.SimEntityAtStock🔗
record Engine.Component.SimEntityAtStock new: function(): SimEntityAtStock
stock: {Engine.Entity, StockId}
arrivalTime: integer
end
Additional data for entities waiting at industries.
Engine.Component.SimEntityAtStock.new🔗
function Engine.Component.SimEntityAtStock.new(): SimEntityAtStock
Returns
SimEntityAtStock
Engine.Component.SimEntityAtStock.stock🔗
Engine.Component.SimEntityAtStock.stock: {Engine.Entity, StockId}
The industry the entity is waiting at
Engine.Component.SimEntityAtStock.arrivalTime🔗
Engine.Component.SimEntityAtStock.arrivalTime: integer
the timestamp when the item arrived at the industry
Engine.Component.SimEntityAtTerminal🔗
record Engine.Component.SimEntityAtTerminal new: function(): SimEntityAtTerminal
line: Engine.Entity
lineStop0: integer
lineStop1: integer
arrivalTime: number
vehicle: Engine.Entity
end
Additional data for entities waiting at terminals.
Engine.Component.SimEntityAtTerminal.new🔗
function Engine.Component.SimEntityAtTerminal.new(): SimEntityAtTerminal
Returns
SimEntityAtTerminal
Engine.Component.SimEntityAtTerminal.line🔗
Engine.Component.SimEntityAtTerminal.line: Engine.Entity
The line the entity is waiting for
Engine.Component.SimEntityAtTerminal.lineStop0🔗
Engine.Component.SimEntityAtTerminal.lineStop0: integer
The stop the entity is waiting at
Engine.Component.SimEntityAtTerminal.lineStop1🔗
Engine.Component.SimEntityAtTerminal.lineStop1: integer
The stop the entity will get off the vehicle
Engine.Component.SimEntityAtTerminal.arrivalTime🔗
Engine.Component.SimEntityAtTerminal.arrivalTime: number
the timestamp when the item arrived at the station terminal
Engine.Component.SimEntityAtTerminal.vehicle🔗
Engine.Component.SimEntityAtTerminal.vehicle: Engine.Entity
the vehicle the entity is currently waiting for
Engine.Component.SimEntityAtVehicle🔗
record Engine.Component.SimEntityAtVehicle new: function(): SimEntityAtVehicle
line: Engine.Entity
lineStop0: integer
lineStop1: integer
vehicle: Engine.Entity
roundTripCounter: integer
end
Additional data for entities travelling on a vehicle.
Engine.Component.SimEntityAtVehicle.new🔗
function Engine.Component.SimEntityAtVehicle.new(): SimEntityAtVehicle
Returns
SimEntityAtVehicle
Engine.Component.SimEntityAtVehicle.line🔗
Engine.Component.SimEntityAtVehicle.line: Engine.Entity
The line the entity is currently using
Engine.Component.SimEntityAtVehicle.lineStop0🔗
Engine.Component.SimEntityAtVehicle.lineStop0: integer
The stop the entity waited at
Engine.Component.SimEntityAtVehicle.lineStop1🔗
Engine.Component.SimEntityAtVehicle.lineStop1: integer
The stop the entity will get off the vehicle
Engine.Component.SimEntityAtVehicle.vehicle🔗
Engine.Component.SimEntityAtVehicle.vehicle: Engine.Entity
the vehicle the entity is currently in
Engine.Component.SimEntityAtVehicle.roundTripCounter🔗
Engine.Component.SimEntityAtVehicle.roundTripCounter: integer
how often the entity reached the stock again where it was by the vehicle loaded
Engine.Component.SimEntityIdle🔗
record Engine.Component.SimEntityIdle new: function(): SimEntityIdle
end
Additional data for entities that are idle.
Engine.Component.SimEntityIdle.new🔗
function Engine.Component.SimEntityIdle.new(): SimEntityIdle
Returns
SimEntityIdle
Engine.Component.SimEntityNeedsPath🔗
record Engine.Component.SimEntityNeedsPath new: function(): SimEntityNeedsPath
input: PathFactoryInput
output: PathFactoryOutput
end
Additional data for entities that need path calculation.
Engine.Component.SimEntityNeedsPath.new🔗
function Engine.Component.SimEntityNeedsPath.new(): SimEntityNeedsPath
Returns
SimEntityNeedsPath
Engine.Component.SimEntityNeedsPath.input🔗
Engine.Component.SimEntityNeedsPath.input: PathFactoryInput
Engine.Component.SimEntityNeedsPath.output🔗
Engine.Component.SimEntityNeedsPath.output: PathFactoryOutput
Engine.Component.SimEntityMoving🔗
record Engine.Component.SimEntityMoving new: function(): SimEntityMoving
line: Engine.Entity
lineStop0: integer
lineStop1: integer
partialPath: boolean
expectedArrivalTime: number
end
Additional data for entities that are moving.
Engine.Component.SimEntityMoving.new🔗
function Engine.Component.SimEntityMoving.new(): SimEntityMoving
Returns
SimEntityMoving
Engine.Component.SimEntityMoving.line🔗
Engine.Component.SimEntityMoving.line: Engine.Entity
The line the entity is currently using
Engine.Component.SimEntityMoving.lineStop0🔗
Engine.Component.SimEntityMoving.lineStop0: integer
The stop the entity waited at
Engine.Component.SimEntityMoving.lineStop1🔗
Engine.Component.SimEntityMoving.lineStop1: integer
Engine.Component.SimEntityMoving.partialPath🔗
Engine.Component.SimEntityMoving.partialPath: boolean
true if the path complete until the destination
Engine.Component.SimEntityMoving.expectedArrivalTime🔗
Engine.Component.SimEntityMoving.expectedArrivalTime: number
Engine.Component.SimPersonAtTerminal🔗
record Engine.Component.SimPersonAtTerminal new: function(): SimPersonAtTerminal
edgeId: EdgeId
place: integer
end
Additional data for a person waiting at the terminal
Engine.Component.SimPersonAtTerminal.new🔗
function Engine.Component.SimPersonAtTerminal.new(): SimPersonAtTerminal
Returns
SimPersonAtTerminal
Engine.Component.SimPersonAtTerminal.edgeId🔗
Engine.Component.SimPersonAtTerminal.edgeId: EdgeId
the edge of the transport network the entity is waiting at
Engine.Component.SimPersonAtTerminal.place🔗
Engine.Component.SimPersonAtTerminal.place: integer
the place on the edge
Engine.Component.SimPersonAtVehicle🔗
record Engine.Component.SimPersonAtVehicle new: function(): SimPersonAtVehicle
vehicle: Engine.Entity
part: integer
place: integer
expectedArrivalTime: number
end
Additional data for a person travelling on a vehicle
Engine.Component.SimPersonAtVehicle.new🔗
function Engine.Component.SimPersonAtVehicle.new(): SimPersonAtVehicle
Returns
SimPersonAtVehicle
Engine.Component.SimPersonAtVehicle.vehicle🔗
Engine.Component.SimPersonAtVehicle.vehicle: Engine.Entity
the vehicle the entity is using
Engine.Component.SimPersonAtVehicle.part🔗
Engine.Component.SimPersonAtVehicle.part: integer
the vehicle part (carriage) the entity is using
Engine.Component.SimPersonAtVehicle.place🔗
Engine.Component.SimPersonAtVehicle.place: integer
the place (seat) in the vehicle
Engine.Component.SimPersonAtVehicle.expectedArrivalTime🔗
Engine.Component.SimPersonAtVehicle.expectedArrivalTime: number
Engine.Component.SimPerson🔗
record Engine.Component.SimPerson new: function(): SimPerson
cargoType: CargoTypeId
destinations: {Engine.Entity}
moveModes: {MoveMode}
travelTimes: {number}
targetOrAtEntity: Engine.Entity
lastNonResType: LandUseType
lastMoveMode: MoveMode
walkSpeed: number
modelIdPerson: integer
colorConfigPerson: integer
modelIdCar: integer
colorConfigCar: integer
lastDestinationUpdate: integer
landUse2ReachableWalkDrive: {integer, integer}
landUse2ReachableLines: {integer, integer}
pickupTime: integer
happiness: number
end
Additional data for persons.
Engine.Component.SimPerson.new🔗
function Engine.Component.SimPerson.new(): SimPerson
Returns
SimPerson
Engine.Component.SimPerson.cargoType🔗
Engine.Component.SimPerson.cargoType: CargoTypeId
the cargo type of the person (always 0)
Engine.Component.SimPerson.destinations🔗
Engine.Component.SimPerson.destinations: {Engine.Entity}
the destinations for residence, shopping and work
Engine.Component.SimPerson.moveModes🔗
Engine.Component.SimPerson.moveModes: {MoveMode}
Engine.Component.SimPerson.travelTimes🔗
Engine.Component.SimPerson.travelTimes: {number}
Engine.Component.SimPerson.targetOrAtEntity🔗
Engine.Component.SimPerson.targetOrAtEntity: Engine.Entity
the entity where the person is or where the person heads to
Engine.Component.SimPerson.lastNonResType🔗
Engine.Component.SimPerson.lastNonResType: LandUseType
Engine.Component.SimPerson.lastMoveMode🔗
Engine.Component.SimPerson.lastMoveMode: MoveMode
the last used move mode
Engine.Component.SimPerson.walkSpeed🔗
Engine.Component.SimPerson.walkSpeed: number
Engine.Component.SimPerson.modelIdPerson🔗
Engine.Component.SimPerson.modelIdPerson: integer
the model that is used for the person
Engine.Component.SimPerson.colorConfigPerson🔗
Engine.Component.SimPerson.colorConfigPerson: integer
the color config for the clothes of the person
Engine.Component.SimPerson.modelIdCar🔗
Engine.Component.SimPerson.modelIdCar: integer
the model that is used as a car
Engine.Component.SimPerson.colorConfigCar🔗
Engine.Component.SimPerson.colorConfigCar: integer
the color config for the car
Engine.Component.SimPerson.lastDestinationUpdate🔗
Engine.Component.SimPerson.lastDestinationUpdate: integer
the timestamp of the latest destination recalculation
Engine.Component.SimPerson.landUse2ReachableWalkDrive🔗
Engine.Component.SimPerson.landUse2ReachableWalkDrive: {integer, integer}
Engine.Component.SimPerson.landUse2ReachableLines🔗
Engine.Component.SimPerson.landUse2ReachableLines: {integer, integer}
Engine.Component.SimPerson.pickupTime🔗
Engine.Component.SimPerson.pickupTime: integer
Engine.Component.SimPerson.happiness🔗
Engine.Component.SimPerson.happiness: number
Engine.Component.Station🔗
type Engine.Component.Station = Station
Defines a station, i.e. a group of terminals (places where a vehicle stops and loads cargo)
Engine.Component.StationGroup🔗
record Engine.Component.StationGroup new: function(): StationGroup
stations: {Engine.Entity}
end
Defines a group of stations, can group together stations with very different transport modes
Engine.Component.StationGroup.new🔗
function Engine.Component.StationGroup.new(): StationGroup
Returns
StationGroup
Engine.Component.StationGroup.stations🔗
Engine.Component.StationGroup.stations: {Engine.Entity}
A list of stations that are grouped together
Engine.Component.StockList🔗
[Expand All] [Collapse All]
record Engine.Component.StockList record Stock new: function(): Stock
type: StockListType
cargoType: CargoTypeId
cargoTypes: CargoTypeSet
mixedTypes: boolean
capacity: integer
loadSpeedModifier: number
loadIndicatorModelInstanceIndices: {integer}
tag: integer
end
record StockData new: function(): StockData
consumeFrequency: number
end
record Rule new: function(): Rule
input: {{integer}}
output: {CargoTypeId : integer}
capacity: integer
consumptionFactor: number
booster: boolean
boostFactor: number
priority: integer
slot: integer
end
record RuleData new: function(): RuleData
record ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
applyHistory: {ApplyInfo}
lastApplyDecayFactor: number
end
record CargoData new: function(): CargoData
produceFrequency: integer
end
record Modifiers new: function(): Modifiers
productivity: number
end
new: function(): StockList
stocks: {Stock}
rules: {Rule}
stockDatas: {StockData}
ruleDatas: {RuleData}
cargoData: {CargoTypeId : CargoData}
thrownAwayCargo: integer
modifiers: Modifiers
end
Stock list data.
Engine.Component.StockList.Stock🔗
record Engine.Component.StockList.Stock new: function(): Stock
type: StockListType
cargoType: CargoTypeId
cargoTypes: CargoTypeSet
mixedTypes: boolean
capacity: integer
loadSpeedModifier: number
loadIndicatorModelInstanceIndices: {integer}
tag: integer
end
Stock data for a single stock in a StockList.
Engine.Component.StockList.Stock.new🔗
function Engine.Component.StockList.Stock.new(): Stock
Returns
Stock
Engine.Component.StockList.Stock.type🔗
Engine.Component.StockList.Stock.type: StockListType
Engine.Component.StockList.Stock.cargoType🔗
Engine.Component.StockList.Stock.cargoType: CargoTypeId
Engine.Component.StockList.Stock.cargoTypes🔗
Engine.Component.StockList.Stock.cargoTypes: CargoTypeSet
Engine.Component.StockList.Stock.mixedTypes🔗
Engine.Component.StockList.Stock.mixedTypes: boolean
Engine.Component.StockList.Stock.capacity🔗
Engine.Component.StockList.Stock.capacity: integer
Engine.Component.StockList.Stock.loadSpeedModifier🔗
Engine.Component.StockList.Stock.loadSpeedModifier: number
Engine.Component.StockList.Stock.loadIndicatorModelInstanceIndices🔗
Engine.Component.StockList.Stock.loadIndicatorModelInstanceIndices: {integer}
Engine.Component.StockList.Stock.tag🔗
Engine.Component.StockList.Stock.tag: integer
Engine.Component.StockList.StockData🔗
record Engine.Component.StockList.StockData new: function(): StockData
consumeFrequency: number
end
StockData for a StockList.
Engine.Component.StockList.StockData.new🔗
function Engine.Component.StockList.StockData.new(): StockData
Returns
StockData
Engine.Component.StockList.StockData.consumeFrequency🔗
Engine.Component.StockList.StockData.consumeFrequency: number
Engine.Component.StockList.Rule🔗
record Engine.Component.StockList.Rule new: function(): Rule
input: {{integer}}
output: {CargoTypeId : integer}
capacity: integer
consumptionFactor: number
booster: boolean
boostFactor: number
priority: integer
slot: integer
end
Rule data for a StockList.
Engine.Component.StockList.Rule.new🔗
function Engine.Component.StockList.Rule.new(): Rule
Returns
Rule
Engine.Component.StockList.Rule.input🔗
Engine.Component.StockList.Rule.input: {{integer}}
Engine.Component.StockList.Rule.output🔗
Engine.Component.StockList.Rule.output: {CargoTypeId : integer}
Engine.Component.StockList.Rule.capacity🔗
Engine.Component.StockList.Rule.capacity: integer
Engine.Component.StockList.Rule.consumptionFactor🔗
Engine.Component.StockList.Rule.consumptionFactor: number
Engine.Component.StockList.Rule.booster🔗
Engine.Component.StockList.Rule.booster: boolean
Engine.Component.StockList.Rule.boostFactor🔗
Engine.Component.StockList.Rule.boostFactor: number
Engine.Component.StockList.Rule.priority🔗
Engine.Component.StockList.Rule.priority: integer
Engine.Component.StockList.Rule.slot🔗
Engine.Component.StockList.Rule.slot: integer
Engine.Component.StockList.RuleData🔗
[Expand All] [Collapse All]
record Engine.Component.StockList.RuleData new: function(): RuleData
record ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
applyHistory: {ApplyInfo}
lastApplyDecayFactor: number
end
RuleData data for a StockList.
Engine.Component.StockList.RuleData.new🔗
function Engine.Component.StockList.RuleData.new(): RuleData
Returns
RuleData
Engine.Component.StockList.RuleData.ApplyInfo🔗
record Engine.Component.StockList.RuleData.ApplyInfo new: function(): ApplyInfo
time: integer
interval: integer
consumedCargo: {StockId}
producedCargo: {{CargoTypeId, integer}}
end
ApplyInfo data for a StockList.
Engine.Component.StockList.RuleData.ApplyInfo.new🔗
function Engine.Component.StockList.RuleData.ApplyInfo.new(): ApplyInfo
Returns
ApplyInfo
Engine.Component.StockList.RuleData.ApplyInfo.time🔗
Engine.Component.StockList.RuleData.ApplyInfo.time: integer
Engine.Component.StockList.RuleData.ApplyInfo.interval🔗
Engine.Component.StockList.RuleData.ApplyInfo.interval: integer
Engine.Component.StockList.RuleData.ApplyInfo.consumedCargo🔗
Engine.Component.StockList.RuleData.ApplyInfo.consumedCargo: {StockId}
Engine.Component.StockList.RuleData.ApplyInfo.producedCargo🔗
Engine.Component.StockList.RuleData.ApplyInfo.producedCargo: {{CargoTypeId, integer}}
Engine.Component.StockList.RuleData.applyHistory🔗
Engine.Component.StockList.RuleData.applyHistory: {ApplyInfo}
Engine.Component.StockList.RuleData.lastApplyDecayFactor🔗
Engine.Component.StockList.RuleData.lastApplyDecayFactor: number
Engine.Component.StockList.CargoData🔗
record Engine.Component.StockList.CargoData new: function(): CargoData
produceFrequency: integer
end
CargoData for a StockList.
Engine.Component.StockList.CargoData.new🔗
function Engine.Component.StockList.CargoData.new(): CargoData
Returns
CargoData
Engine.Component.StockList.CargoData.produceFrequency🔗
Engine.Component.StockList.CargoData.produceFrequency: integer
Engine.Component.StockList.Modifiers🔗
record Engine.Component.StockList.Modifiers new: function(): Modifiers
productivity: number
end
Modifiers for the stocklist
Engine.Component.StockList.Modifiers.new()🔗
function Engine.Component.StockList.Modifiers.new()(): Modifiers
Returns
Modifiers
Engine.Component.StockList.Modifiers.new(Modifiers)🔗
function Engine.Component.StockList.Modifiers.new(Modifiers)(Modifiers): Modifiers
Parameters
Modifiers
Returns
Modifiers
Engine.Component.StockList.Modifiers.productivity🔗
Engine.Component.StockList.Modifiers.productivity: number
the productivity of the stocklist
Engine.Component.StockList.new🔗
function Engine.Component.StockList.new(): StockList
Returns
StockList
Engine.Component.StockList.stocks🔗
Engine.Component.StockList.stocks: {Stock}
Engine.Component.StockList.rules🔗
Engine.Component.StockList.rules: {Rule}
Engine.Component.StockList.stockDatas🔗
Engine.Component.StockList.stockDatas: {StockData}
Engine.Component.StockList.ruleDatas🔗
Engine.Component.StockList.ruleDatas: {RuleData}
Engine.Component.StockList.cargoData🔗
Engine.Component.StockList.cargoData: {CargoTypeId : CargoData}
Engine.Component.StockList.thrownAwayCargo🔗
Engine.Component.StockList.thrownAwayCargo: integer
Engine.Component.StockList.modifiers🔗
Engine.Component.StockList.modifiers: Modifiers
Engine.Component.Subconstruction🔗
record Engine.Component.Subconstruction new: function(): Subconstruction
tag: integer
slotIds: {integer}
metadata: SubconstructionInstanceMetadata
end
Subconstruction data.
Engine.Component.Subconstruction.new🔗
function Engine.Component.Subconstruction.new(): Subconstruction
Returns
Subconstruction
Engine.Component.Subconstruction.tag🔗
Engine.Component.Subconstruction.tag: integer
Engine.Component.Subconstruction.slotIds🔗
Engine.Component.Subconstruction.slotIds: {integer}
Slots that are assigned to this subconstruction, for selection/bulldoze purposes
Engine.Component.Subconstruction.metadata🔗
Engine.Component.Subconstruction.metadata: SubconstructionInstanceMetadata
Engine.Component.Terrain🔗
record Engine.Component.Terrain new: function(): Terrain
size: Vec2i
baseLevels: integer
baseResolution: Vec3f
highLevels: integer
offsetZ: number
waterLevel: number
dataMaps: {string, HeightmapNew}
end
Contains information about the map.
Engine.Component.Terrain.new🔗
function Engine.Component.Terrain.new(): Terrain
Returns
Terrain
Engine.Component.Terrain.size🔗
Engine.Component.Terrain.size: Vec2i
the number of tiles of the terrain
Engine.Component.Terrain.baseLevels🔗
Engine.Component.Terrain.baseLevels: integer
number of base levels
Engine.Component.Terrain.baseResolution🔗
Engine.Component.Terrain.baseResolution: Vec3f
resolution for all three dimensions
Engine.Component.Terrain.highLevels🔗
Engine.Component.Terrain.highLevels: integer
Engine.Component.Terrain.offsetZ🔗
Engine.Component.Terrain.offsetZ: number
Engine.Component.Terrain.waterLevel🔗
Engine.Component.Terrain.waterLevel: number
level for the surface of the navigatable water
Engine.Component.Terrain.dataMaps🔗
Engine.Component.Terrain.dataMaps: {string, HeightmapNew}
Engine.Component.TerrainAlignmentList🔗
record Engine.Component.TerrainAlignmentList new: function(): TerrainAlignmentList
terrainAlignments: {TerrainAlignment}
end
Contains information about how terrain needs to be aligned.
Engine.Component.TerrainAlignmentList.new🔗
function Engine.Component.TerrainAlignmentList.new(): TerrainAlignmentList
Returns
TerrainAlignmentList
Engine.Component.TerrainAlignmentList.terrainAlignments🔗
Engine.Component.TerrainAlignmentList.terrainAlignments: {TerrainAlignment}
Engine.Component.TerrainTile🔗
record Engine.Component.TerrainTile new: function(): TerrainTile
terrainEntity: Engine.Entity
position: Vec2i
end
Contains information about a single tile of the map.
A tile is a 256m x 256m chunk of the map.
Engine.Component.TerrainTile.new🔗
function Engine.Component.TerrainTile.new(): TerrainTile
Returns
TerrainTile
Engine.Component.TerrainTile.terrainEntity🔗
Engine.Component.TerrainTile.terrainEntity: Engine.Entity
a reference to the entity with terrain information
Engine.Component.TerrainTile.position🔗
Engine.Component.TerrainTile.position: Vec2i
the position of the tile in the tile grid
Engine.Component.TerrainTileBrush🔗
record Engine.Component.TerrainTileBrush new: function(): TerrainTileBrush
materialIndexBrush: {integer}
forceAboveBit: {boolean}
end
Contains information about the brush layer of a tile of the map.
Engine.Component.TerrainTileBrush.new🔗
function Engine.Component.TerrainTileBrush.new(): TerrainTileBrush
Returns
TerrainTileBrush
Engine.Component.TerrainTileBrush.materialIndexBrush🔗
Engine.Component.TerrainTileBrush.materialIndexBrush: {integer}
contains the material id of the brush layer
Engine.Component.TerrainTileBrush.forceAboveBit🔗
Engine.Component.TerrainTileBrush.forceAboveBit: {boolean}
Engine.Component.TerrainTileHeightmap🔗
record Engine.Component.TerrainTileHeightmap new: function(): TerrainTileHeightmap
vertices: {integer}
end
Contains information about the geometry of the tile.
Engine.Component.TerrainTileHeightmap.new🔗
function Engine.Component.TerrainTileHeightmap.new(): TerrainTileHeightmap
Returns
TerrainTileHeightmap
Engine.Component.TerrainTileHeightmap.vertices🔗
Engine.Component.TerrainTileHeightmap.vertices: {integer}
contains the heightmap information for the tile. Each value is for a position in the heightmap grid of the tile with a 4m resolution
Engine.Component.TickEpoch🔗
record Engine.Component.TickEpoch new: function(): TickEpoch
time: integer
commandIndex: integer
subIndex: integer
end
Tracks information about the last time an entity was modified or added.
Engine.Component.TickEpoch.new🔗
function Engine.Component.TickEpoch.new(): TickEpoch
Returns
TickEpoch
Engine.Component.TickEpoch.time🔗
Engine.Component.TickEpoch.time: integer
a unique index incrementing each simulation update step
Engine.Component.TickEpoch.commandIndex🔗
Engine.Component.TickEpoch.commandIndex: integer
a unique index counting commands within a frame
Engine.Component.TickEpoch.subIndex🔗
Engine.Component.TickEpoch.subIndex: integer
a unique increasing index within a command
Engine.Component.Town🔗
record Engine.Component.Town new: function(): Town
initialLandUseCapacities: {integer}
capacityScalingFactor: number
levelToCapacityDistributionWeights: {{number}}
sizeFactors: {number}
cargoNeeds: {{{CargoTypeId, number}}}
developmentActive: boolean
noise: number
pollution: number
end
Contains information about a single town.
Engine.Component.Town.new🔗
function Engine.Component.Town.new(): Town
Returns
Town
Engine.Component.Town.initialLandUseCapacities🔗
Engine.Component.Town.initialLandUseCapacities: {integer}
initial capacities for the residential, commercial and industrial district of the town
Engine.Component.Town.capacityScalingFactor🔗
Engine.Component.Town.capacityScalingFactor: number
Engine.Component.Town.levelToCapacityDistributionWeights🔗
Engine.Component.Town.levelToCapacityDistributionWeights: {{number}}
Engine.Component.Town.sizeFactors🔗
Engine.Component.Town.sizeFactors: {number}
a base size of the town
Engine.Component.Town.cargoNeeds🔗
Engine.Component.Town.cargoNeeds: {{{CargoTypeId, number}}}
list of cargo type ids for the needs of each of the three town districts residential, commercial and industrial
Engine.Component.Town.developmentActive🔗
Engine.Component.Town.developmentActive: boolean
turns off growth of the town
Engine.Component.Town.noise🔗
Engine.Component.Town.noise: number
the accumulated noise in decibels, it's prefered to use api.engine.util.getTownEmissionDB
Engine.Component.Town.pollution🔗
Engine.Component.Town.pollution: number
the accumulated noise in decibels, it's prefered to use api.engine.util.getTownEmissionDB
Engine.Component.TownBuilding🔗
record Engine.Component.TownBuilding new: function(): TownBuilding
personCapacity: Engine.Entity
stockList: Engine.Entity
construction: Engine.Entity
level: integer
parcels: {Engine.Entity}
depth: integer
height: number
town: Engine.Entity
timeBuilt: integer
blockedDevelopment: boolean
end
Contains information about a town building.
Engine.Component.TownBuilding.new🔗
function Engine.Component.TownBuilding.new(): TownBuilding
Returns
TownBuilding
Engine.Component.TownBuilding.personCapacity🔗
Engine.Component.TownBuilding.personCapacity: Engine.Entity
Engine.Component.TownBuilding.stockList🔗
Engine.Component.TownBuilding.stockList: Engine.Entity
Engine.Component.TownBuilding.construction🔗
Engine.Component.TownBuilding.construction: Engine.Entity
Engine.Component.TownBuilding.level🔗
Engine.Component.TownBuilding.level: integer
level of the building (1-4)
Engine.Component.TownBuilding.parcels🔗
Engine.Component.TownBuilding.parcels: {Engine.Entity}
parcels occupied by the building
Engine.Component.TownBuilding.depth🔗
Engine.Component.TownBuilding.depth: integer
the depth in number of parcels (1-4)
Engine.Component.TownBuilding.height🔗
Engine.Component.TownBuilding.height: number
the height in meters of the building
Engine.Component.TownBuilding.town🔗
Engine.Component.TownBuilding.town: Engine.Entity
the town entity
Engine.Component.TownBuilding.timeBuilt🔗
Engine.Component.TownBuilding.timeBuilt: integer
the timestamp when the building was built
Engine.Component.TownBuilding.blockedDevelopment🔗
Engine.Component.TownBuilding.blockedDevelopment: boolean
block town developer from changing this building
Engine.Component.TownConnection🔗
record Engine.Component.TownConnection new: function(): TownConnection
entity0: Engine.Entity
entity1: Engine.Entity
position0: Vec2f
position1: Vec2f
time: number
currentTime: number
lastUpgradeYear: integer
valid: boolean
end
Defines a connection between towns.
Engine.Component.TownConnection.new🔗
function Engine.Component.TownConnection.new(): TownConnection
Returns
TownConnection
Engine.Component.TownConnection.entity0🔗
Engine.Component.TownConnection.entity0: Engine.Entity
first town
Engine.Component.TownConnection.entity1🔗
Engine.Component.TownConnection.entity1: Engine.Entity
second town
Engine.Component.TownConnection.position0🔗
Engine.Component.TownConnection.position0: Vec2f
position of the first town
Engine.Component.TownConnection.position1🔗
Engine.Component.TownConnection.position1: Vec2f
position of the second town
Engine.Component.TownConnection.time🔗
Engine.Component.TownConnection.time: number
approximate time taken to travel the connection
Engine.Component.TownConnection.currentTime🔗
Engine.Component.TownConnection.currentTime: number
Engine.Component.TownConnection.lastUpgradeYear🔗
Engine.Component.TownConnection.lastUpgradeYear: integer
Engine.Component.TownConnection.valid🔗
Engine.Component.TownConnection.valid: boolean
Engine.Component.TpNetLink🔗
record Engine.Component.TpNetLink new: function(): TpNetLink
from: EdgePos
to: EdgePos
end
Represents a link between transport networks.
A link is an automatic pedestrian connection.
Engine.Component.TpNetLink.new🔗
function Engine.Component.TpNetLink.new(): TpNetLink
Returns
TpNetLink
Engine.Component.TpNetLink.from🔗
Engine.Component.TpNetLink.from: EdgePos
link starting edge position
Engine.Component.TpNetLink.to🔗
Engine.Component.TpNetLink.to: EdgePos
link end edge position
Engine.Component.Train🔗
record Engine.Component.Train new: function(): Train
end
Represents an entire train
Engine.Component.Train.new🔗
function Engine.Component.Train.new(): Train
Returns
Train
Engine.Component.TransportNetwork🔗
record Engine.Component.TransportNetwork new: function(): TransportNetwork
nodes: {Node}
edges: {Edge}
turnaroundEdges: {integer}
end
Contains the graph of edges and nodes onto which vehicles and person move.
Engine.Component.TransportNetwork.new🔗
function Engine.Component.TransportNetwork.new(): TransportNetwork
Returns
TransportNetwork
Engine.Component.TransportNetwork.nodes🔗
Engine.Component.TransportNetwork.nodes: {Node}
The list of nodes of the transport network
Engine.Component.TransportNetwork.edges🔗
Engine.Component.TransportNetwork.edges: {Edge}
The list of edges of the transport network
Engine.Component.TransportNetwork.turnaroundEdges🔗
Engine.Component.TransportNetwork.turnaroundEdges: {integer}
for each edge, the index of the first edge on the opposite lane
Engine.Component.TransportNetworkNodes🔗
record Engine.Component.TransportNetworkNodes new: function(): TransportNetworkNodes
end
Data for TransportNetworkNodes marker component.
Engine.Component.TransportNetworkNodes.new🔗
function Engine.Component.TransportNetworkNodes.new(): TransportNetworkNodes
Returns
TransportNetworkNodes
Engine.Component.TransportVehicle🔗
[Expand All] [Collapse All]
record Engine.Component.TransportVehicle record Modifiers new: function(): Modifiers
topSpeedScale: number
noiseScale: number
pollutionScale: number
comfortScale: number
end
record LoadSpeedModifiers vehicleOverlength: number
stockCompatibility: number
vehicleCompatibility: number
vehicleIncompatibility: number
getTotalPenalty: function(LoadSpeedModifiers): number
end
record Config new: function(): Config
transportModes: {TransportMode : boolean}
allCaps: {CargoTypeId}
capacities: {CargoTypeId}
loadSpeeds: {number}
reversible: boolean
end
record LoadState new: function(): LoadState
None: LoadState
Arrived: LoadState
Unloading: LoadState
Loading: LoadState
WaitForScheduledDeparture: LoadState
Departing: LoadState
end
record PendingIncomeParams new: function(): PendingIncomeParams
record EntityRev0 entity: Engine.Entity
rev0: integer
end
amount: integer
carrier: Carrier
vehicleEntity: Engine.Entity
lineEntity: Engine.Entity
end
new: function(): TransportVehicle
carrier: Carrier
transportVehicleConfig: TransportVehicleConfig
config: Config
state: TransportVehicleState
userStopped: boolean
depot: Engine.Entity
sellOnArrival: boolean
line: Engine.Entity
stopIndex: integer
arrivalStationTerminal: StationTerminal
arrivalStationTerminalLocked: boolean
lineStopDepartures: {integer}
lastLineStopDeparture: integer
sectionTimes: {number}
lineStop2cargo2available: {{CargoTypeId}}
loadState: LoadState
timeUntilNextScheduledDeparture: number
loadSpeedModifiers: {CargoTypeId : LoadSpeedModifiers}
timeUntilCloseDoors: number
timeUntilDeparture: number
timeUntilNextLoad: {CargoTypeId : number}
timeUntilNextUnload: {CargoTypeId : number}
lastStationStockIndex: integer
doorsTime: integer
daysInDepot: integer
daysAtTerminal: integer
doorsOpen: boolean
noPath: boolean
autoDeparture: boolean
maintenanceStation: Engine.Entity
modifiers: Modifiers
unloadPendingIncome: PendingIncomeParams
closestTown: Engine.Entity
visitedStops: {integer}
end
Represents a single transport vehicle
Engine.Component.TransportVehicle.Modifiers🔗
record Engine.Component.TransportVehicle.Modifiers new: function(): Modifiers
topSpeedScale: number
noiseScale: number
pollutionScale: number
comfortScale: number
end
Contains modifiers for the entire transport vehicle
Engine.Component.TransportVehicle.Modifiers.new()🔗
function Engine.Component.TransportVehicle.Modifiers.new()(): Modifiers
Returns
Modifiers
Engine.Component.TransportVehicle.Modifiers.new(Modifiers)🔗
function Engine.Component.TransportVehicle.Modifiers.new(Modifiers)(Modifiers): Modifiers
Parameters
Modifiers
Returns
Modifiers
Engine.Component.TransportVehicle.Modifiers.topSpeedScale🔗
Engine.Component.TransportVehicle.Modifiers.topSpeedScale: number
allows scaling the transport vehicle top speed
Engine.Component.TransportVehicle.Modifiers.noiseScale🔗
Engine.Component.TransportVehicle.Modifiers.noiseScale: number
allows scaling the transport vehicle noise
Engine.Component.TransportVehicle.Modifiers.pollutionScale🔗
Engine.Component.TransportVehicle.Modifiers.pollutionScale: number
allows scaling the transport vehicle pollution
Engine.Component.TransportVehicle.Modifiers.comfortScale🔗
Engine.Component.TransportVehicle.Modifiers.comfortScale: number
allows scaling the transport vehicle comfort
Engine.Component.TransportVehicle.LoadSpeedModifiers🔗
record Engine.Component.TransportVehicle.LoadSpeedModifiers vehicleOverlength: number
stockCompatibility: number
vehicleCompatibility: number
vehicleIncompatibility: number
getTotalPenalty: function(LoadSpeedModifiers): number
end
Contains current effective modifiers for the transport vehicle load speed.
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleOverlength🔗
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleOverlength: number
the modifier poriton because of overlength with the terminal
Engine.Component.TransportVehicle.LoadSpeedModifiers.stockCompatibility🔗
Engine.Component.TransportVehicle.LoadSpeedModifiers.stockCompatibility: number
the compatibility with the stock
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleCompatibility🔗
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleCompatibility: number
the compatibility with the terminal
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleIncompatibility🔗
Engine.Component.TransportVehicle.LoadSpeedModifiers.vehicleIncompatibility: number
the incompatibility with the terminal
Engine.Component.TransportVehicle.LoadSpeedModifiers.getTotalPenalty🔗
function Engine.Component.TransportVehicle.LoadSpeedModifiers.getTotalPenalty(LoadSpeedModifiers): number
computed total penalty from all modifiers
Parameters
LoadSpeedModifiers
Returns
number
Engine.Component.TransportVehicle.Config🔗
record Engine.Component.TransportVehicle.Config new: function(): Config
transportModes: {TransportMode : boolean}
allCaps: {CargoTypeId}
capacities: {CargoTypeId}
loadSpeeds: {number}
reversible: boolean
end
Contains additional data for the transport vehicle
Engine.Component.TransportVehicle.Config.new🔗
function Engine.Component.TransportVehicle.Config.new(): Config
Returns
Config
Engine.Component.TransportVehicle.Config.transportModes🔗
Engine.Component.TransportVehicle.Config.transportModes: {TransportMode : boolean}
Engine.Component.TransportVehicle.Config.allCaps🔗
Engine.Component.TransportVehicle.Config.allCaps: {CargoTypeId}
Engine.Component.TransportVehicle.Config.capacities🔗
Engine.Component.TransportVehicle.Config.capacities: {CargoTypeId}
all cargo capacities of the vehicle
Engine.Component.TransportVehicle.Config.loadSpeeds🔗
Engine.Component.TransportVehicle.Config.loadSpeeds: {number}
Engine.Component.TransportVehicle.Config.reversible🔗
Engine.Component.TransportVehicle.Config.reversible: boolean
Engine.Component.TransportVehicle.LoadState🔗
record Engine.Component.TransportVehicle.LoadState new: function(): LoadState
None: LoadState
Arrived: LoadState
Unloading: LoadState
Loading: LoadState
WaitForScheduledDeparture: LoadState
Departing: LoadState
end
Contains additional data for the transport vehicle
Engine.Component.TransportVehicle.LoadState.new🔗
function Engine.Component.TransportVehicle.LoadState.new(): LoadState
Returns
LoadState
Engine.Component.TransportVehicle.LoadState.None🔗
Engine.Component.TransportVehicle.LoadState.None: LoadState
Engine.Component.TransportVehicle.LoadState.Arrived🔗
Engine.Component.TransportVehicle.LoadState.Arrived: LoadState
Engine.Component.TransportVehicle.LoadState.Unloading🔗
Engine.Component.TransportVehicle.LoadState.Unloading: LoadState
Engine.Component.TransportVehicle.LoadState.Loading🔗
Engine.Component.TransportVehicle.LoadState.Loading: LoadState
Engine.Component.TransportVehicle.LoadState.WaitForScheduledDeparture🔗
Engine.Component.TransportVehicle.LoadState.WaitForScheduledDeparture: LoadState
Engine.Component.TransportVehicle.LoadState.Departing🔗
Engine.Component.TransportVehicle.LoadState.Departing: LoadState
Engine.Component.TransportVehicle.PendingIncomeParams🔗
[Expand All] [Collapse All]
record Engine.Component.TransportVehicle.PendingIncomeParams new: function(): PendingIncomeParams
record EntityRev0 entity: Engine.Entity
rev0: integer
end
amount: integer
carrier: Carrier
vehicleEntity: Engine.Entity
lineEntity: Engine.Entity
end
Contains information about pending split income for the transport vehicle
Engine.Component.TransportVehicle.PendingIncomeParams.new🔗
function Engine.Component.TransportVehicle.PendingIncomeParams.new(): PendingIncomeParams
Returns
PendingIncomeParams
Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0🔗
record Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0 entity: Engine.Entity
rev0: integer
end
Contains information about entity and revision for the pending income
Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0.entity🔗
Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0.entity: Engine.Entity
the entity id
Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0.rev0🔗
Engine.Component.TransportVehicle.PendingIncomeParams.EntityRev0.rev0: integer
the revision 0 of the entity
Engine.Component.TransportVehicle.PendingIncomeParams.amount🔗
Engine.Component.TransportVehicle.PendingIncomeParams.amount: integer
total income pending to be unloaded
Engine.Component.TransportVehicle.PendingIncomeParams.carrier🔗
Engine.Component.TransportVehicle.PendingIncomeParams.carrier: Carrier
the carrier for which the income is pending
Engine.Component.TransportVehicle.PendingIncomeParams.vehicleEntity🔗
Engine.Component.TransportVehicle.PendingIncomeParams.vehicleEntity: Engine.Entity
accounted vehicle entity id
Engine.Component.TransportVehicle.PendingIncomeParams.lineEntity🔗
Engine.Component.TransportVehicle.PendingIncomeParams.lineEntity: Engine.Entity
accounted line entity id
Engine.Component.TransportVehicle.new🔗
function Engine.Component.TransportVehicle.new(): TransportVehicle
Returns
TransportVehicle
Engine.Component.TransportVehicle.carrier🔗
Engine.Component.TransportVehicle.carrier: Carrier
the type of transport vehicle
Engine.Component.TransportVehicle.transportVehicleConfig🔗
Engine.Component.TransportVehicle.transportVehicleConfig: TransportVehicleConfig
the configuration of vehicle models in this vehicle
Engine.Component.TransportVehicle.config🔗
Engine.Component.TransportVehicle.config: Config
various configuration properties for the vehicle
Engine.Component.TransportVehicle.state🔗
Engine.Component.TransportVehicle.state: TransportVehicleState
current state of the vehicle
Engine.Component.TransportVehicle.userStopped🔗
Engine.Component.TransportVehicle.userStopped: boolean
whether or not the user stopped the vehicle
Engine.Component.TransportVehicle.depot🔗
Engine.Component.TransportVehicle.depot: Engine.Entity
if in depot, the Entity Id of the depot
Engine.Component.TransportVehicle.sellOnArrival🔗
Engine.Component.TransportVehicle.sellOnArrival: boolean
whether or not the vehicle will be sold on arrival
Engine.Component.TransportVehicle.line🔗
Engine.Component.TransportVehicle.line: Engine.Entity
the entity of the line (if assigned to one)
Engine.Component.TransportVehicle.stopIndex🔗
Engine.Component.TransportVehicle.stopIndex: integer
the stop index of the line (if assigned to one)
Engine.Component.TransportVehicle.arrivalStationTerminal🔗
Engine.Component.TransportVehicle.arrivalStationTerminal: StationTerminal
The terminal to which the vehicle currently tries to go
Engine.Component.TransportVehicle.arrivalStationTerminalLocked🔗
Engine.Component.TransportVehicle.arrivalStationTerminalLocked: boolean
If the arrivalStationTerminal is the final decision
Engine.Component.TransportVehicle.lineStopDepartures🔗
Engine.Component.TransportVehicle.lineStopDepartures: {integer}
timestamps of the last departures at each line stop
Engine.Component.TransportVehicle.lastLineStopDeparture🔗
Engine.Component.TransportVehicle.lastLineStopDeparture: integer
timestamp of the last departure at any line
Engine.Component.TransportVehicle.sectionTimes🔗
Engine.Component.TransportVehicle.sectionTimes: {number}
time taken for each section between line stops
Engine.Component.TransportVehicle.lineStop2cargo2available🔗
Engine.Component.TransportVehicle.lineStop2cargo2available: {{CargoTypeId}}
available capacity per cargo type for each line stop
Engine.Component.TransportVehicle.loadState🔗
Engine.Component.TransportVehicle.loadState: LoadState
current loading state of the vehicle
Engine.Component.TransportVehicle.timeUntilNextScheduledDeparture🔗
Engine.Component.TransportVehicle.timeUntilNextScheduledDeparture: number
how much time is left until the vehicle will start loading cargo
Engine.Component.TransportVehicle.loadSpeedModifiers🔗
Engine.Component.TransportVehicle.loadSpeedModifiers: {CargoTypeId : LoadSpeedModifiers}
current effective load speed modifiers per cargo type
Engine.Component.TransportVehicle.timeUntilCloseDoors🔗
Engine.Component.TransportVehicle.timeUntilCloseDoors: number
how much time is left until the vehicle starts closing the doors
Engine.Component.TransportVehicle.timeUntilDeparture🔗
Engine.Component.TransportVehicle.timeUntilDeparture: number
how much time is left until the vehicle leaves the terminal
Engine.Component.TransportVehicle.timeUntilNextLoad🔗
Engine.Component.TransportVehicle.timeUntilNextLoad: {CargoTypeId : number}
time until the next load per cargo type
Engine.Component.TransportVehicle.timeUntilNextUnload🔗
Engine.Component.TransportVehicle.timeUntilNextUnload: {CargoTypeId : number}
time until the next unload per cargo type
Engine.Component.TransportVehicle.lastStationStockIndex🔗
Engine.Component.TransportVehicle.lastStationStockIndex: integer
index of the last station/stock where cargo was loaded/unloaded if multiple compatible stocks are in reach of the current
terminal of the currently loading/unloading cargo type.
Engine.Component.TransportVehicle.doorsTime🔗
Engine.Component.TransportVehicle.doorsTime: integer
time at which the door have been closed/open
Engine.Component.TransportVehicle.daysInDepot🔗
Engine.Component.TransportVehicle.daysInDepot: integer
amount of days waiting in depot
Engine.Component.TransportVehicle.daysAtTerminal🔗
Engine.Component.TransportVehicle.daysAtTerminal: integer
amount of days waiting at terminal
Engine.Component.TransportVehicle.doorsOpen🔗
Engine.Component.TransportVehicle.doorsOpen: boolean
whether doors should be open or closed
Engine.Component.TransportVehicle.noPath🔗
Engine.Component.TransportVehicle.noPath: boolean
whether or not the vehicle has a path
Engine.Component.TransportVehicle.autoDeparture🔗
Engine.Component.TransportVehicle.autoDeparture: boolean
whether the vehicle departure is managed by the game or not
Engine.Component.TransportVehicle.maintenanceStation🔗
Engine.Component.TransportVehicle.maintenanceStation: Engine.Entity
the maintenance station maintaining the vehicle
Engine.Component.TransportVehicle.modifiers🔗
Engine.Component.TransportVehicle.modifiers: Modifiers
modifiers applied to the transport vehicle
Engine.Component.TransportVehicle.unloadPendingIncome🔗
Engine.Component.TransportVehicle.unloadPendingIncome: PendingIncomeParams
list of pending income
Engine.Component.TransportVehicle.closestTown🔗
Engine.Component.TransportVehicle.closestTown: Engine.Entity
the closest town to the vehicle
Engine.Component.TransportVehicle.visitedStops🔗
Engine.Component.TransportVehicle.visitedStops: {integer}
The last stops on the line the transport vehicle stopped at
The length is limited to the number of stops on the line
Engine.Component.VehicleDepot🔗
record Engine.Component.VehicleDepot new: function(): VehicleDepot
carrier: Carrier
transportModes: {TransportMode : boolean}
inNodes: {NodeId}
outNodes: {NodeId}
state: integer
doors: number
stateTime: integer
catchmentArea: CatchmentArea
maintenancePool: integer
maxPoolUsage: number
averagePoolUsage: number
poolUsageTicks: integer
filterTags: {string}
end
Defines a vehicle depot
Engine.Component.VehicleDepot.new🔗
function Engine.Component.VehicleDepot.new(): VehicleDepot
Returns
VehicleDepot
Engine.Component.VehicleDepot.carrier🔗
Engine.Component.VehicleDepot.carrier: Carrier
The transport method for the depot, affects available vehicles
Engine.Component.VehicleDepot.transportModes🔗
Engine.Component.VehicleDepot.transportModes: {TransportMode : boolean}
Engine.Component.VehicleDepot.inNodes🔗
Engine.Component.VehicleDepot.inNodes: {NodeId}
the nodes that are entry points for the depot
Engine.Component.VehicleDepot.outNodes🔗
Engine.Component.VehicleDepot.outNodes: {NodeId}
the nodes that are exit points for the depot
Engine.Component.VehicleDepot.state🔗
Engine.Component.VehicleDepot.state: integer
Engine.Component.VehicleDepot.doors🔗
Engine.Component.VehicleDepot.doors: number
Engine.Component.VehicleDepot.stateTime🔗
Engine.Component.VehicleDepot.stateTime: integer
Engine.Component.VehicleDepot.catchmentArea🔗
Engine.Component.VehicleDepot.catchmentArea: CatchmentArea
the area around the station where vehicles are maintained
Engine.Component.VehicleDepot.maintenancePool🔗
Engine.Component.VehicleDepot.maintenancePool: integer
number of vehicles that can be maintained
Engine.Component.VehicleDepot.maxPoolUsage🔗
Engine.Component.VehicleDepot.maxPoolUsage: number
maximum number of vehicles that were recently maintained at the same time
Engine.Component.VehicleDepot.averagePoolUsage🔗
Engine.Component.VehicleDepot.averagePoolUsage: number
average accumulated number of vehicles that were recently maintained at the same time
Engine.Component.VehicleDepot.poolUsageTicks🔗
Engine.Component.VehicleDepot.poolUsageTicks: integer
number of ticks for recently maintained vehicles statistics
Engine.Component.VehicleDepot.filterTags🔗
Engine.Component.VehicleDepot.filterTags: {string}
vehicle filter tags
Engine.Component.VehicleOrder🔗
record Engine.Component.VehicleOrder new: function(): VehicleOrder
equals: function(VehicleOrder, VehicleOrder): boolean
entity: Engine.Entity
strongBrakeEntity: boolean
waitingForSpace: boolean
waitingForTrafficLight: boolean
end
Contains information about precedence and breaking.
Engine.Component.VehicleOrder.new🔗
function Engine.Component.VehicleOrder.new(): VehicleOrder
Returns
VehicleOrder
Engine.Component.VehicleOrder.equals🔗
function Engine.Component.VehicleOrder.equals(VehicleOrder, VehicleOrder): boolean
Parameters
VehicleOrderVehicleOrder
Returns
boolean
Engine.Component.VehicleOrder.entity🔗
Engine.Component.VehicleOrder.entity: Engine.Entity
the vehicle entity of the vehicle before this vehicle
Engine.Component.VehicleOrder.strongBrakeEntity🔗
Engine.Component.VehicleOrder.strongBrakeEntity: boolean
Engine.Component.VehicleOrder.waitingForSpace🔗
Engine.Component.VehicleOrder.waitingForSpace: boolean
Engine.Component.VehicleOrder.waitingForTrafficLight🔗
Engine.Component.VehicleOrder.waitingForTrafficLight: boolean
Engine.Component.Warehouse🔗
record Engine.Component.Warehouse new: function(): Warehouse
stockList: Engine.Entity
construction: Engine.Entity
end
Contains information about warehouses.
Engine.Component.Warehouse.new🔗
function Engine.Component.Warehouse.new(): Warehouse
Returns
Warehouse
Engine.Component.Warehouse.stockList🔗
Engine.Component.Warehouse.stockList: Engine.Entity
contains coresponding stock list
Engine.Component.Warehouse.construction🔗
Engine.Component.Warehouse.construction: Engine.Entity
containing the warehouse
Engine.Component.WaterMesh🔗
[Expand All] [Collapse All]
record Engine.Component.WaterMesh new: function(): WaterMesh
record Contour new: function(): Contour
vertices: {Vec2f}
normals: {Vec2f}
end
waterLevel: number
vertices: {Vec2f}
depths: {number}
indices: {integer}
contours: {Contour}
pos: Vec2i
end
Contains the geometry information for a single tile of water.
Engine.Component.WaterMesh.new🔗
function Engine.Component.WaterMesh.new(): WaterMesh
Returns
WaterMesh
Engine.Component.WaterMesh.Contour🔗
record Engine.Component.WaterMesh.Contour new: function(): Contour
vertices: {Vec2f}
normals: {Vec2f}
end
Represents the boundary of a water mesh.
Engine.Component.WaterMesh.Contour.new🔗
function Engine.Component.WaterMesh.Contour.new(): Contour
Returns
Contour
Engine.Component.WaterMesh.Contour.vertices🔗
Engine.Component.WaterMesh.Contour.vertices: {Vec2f}
The list of vertices of the contour
Engine.Component.WaterMesh.Contour.normals🔗
Engine.Component.WaterMesh.Contour.normals: {Vec2f}
The list of normals at the vertex
Engine.Component.WaterMesh.waterLevel🔗
Engine.Component.WaterMesh.waterLevel: number
level for the surface of the navigatable water
Engine.Component.WaterMesh.vertices🔗
Engine.Component.WaterMesh.vertices: {Vec2f}
the list of vertices of the mesh
Engine.Component.WaterMesh.depths🔗
Engine.Component.WaterMesh.depths: {number}
the water depth at the vertex position
Engine.Component.WaterMesh.indices🔗
Engine.Component.WaterMesh.indices: {integer}
Engine.Component.WaterMesh.contours🔗
Engine.Component.WaterMesh.contours: {Contour}
a list with boundaries of the water mesh
Engine.Component.WaterMesh.pos🔗
Engine.Component.WaterMesh.pos: Vec2i
coordinate of the tile
Engine.Component.World🔗
record Engine.Component.World new: function(): World
cloudCoverage: number
end
The World Component
Engine.Component.World.new🔗
function Engine.Component.World.new(): World
Returns
World
Engine.Component.World.cloudCoverage🔗
Engine.Component.World.cloudCoverage: number
Engine.ComponentType🔗
record Engine.ComponentType AIRCRAFT: ComponentType
ANIMAL: ComponentType
ASSET_GROUP: ComponentType
BASE_EDGE: ComponentType
BASE_EDGE_STREET: ComponentType
BASE_NODE: ComponentType
BASE_PARALLEL_STRIP: ComponentType
CUSTOM_STATE: ComponentType
EMISSION_EMITTER: ComponentType
FIELD: ComponentType
GAME_TIME: ComponentType
GAME_SPEED: ComponentType
MODEL_INSTANCE_LIST: ComponentType
NAME: ComponentType
LINE: ComponentType
LOG_BOOK: ComponentType
MODEL_PERSON: ComponentType
MOVE_PATH: ComponentType
MOVE_PATH_AIRCRAFT: ComponentType
STATION: ComponentType
STATION_GROUP: ComponentType
SIM_PERSON: ComponentType
SIM_PERSON_AT_TERMINAL: ComponentType
SIM_PERSON_AT_VEHICLE: ComponentType
SIM_CARGO: ComponentType
SIM_ENTITY_AT_BUILDING: ComponentType
SIM_ENTITY_AT_VEHICLE: ComponentType
SIM_ENTITY_AT_TERMINAL: ComponentType
SIM_ENTITY_IDLE: ComponentType
SIM_ENTITY_MOVING: ComponentType
SIGNAL_LIST: ComponentType
TOWN: ComponentType
INDUSTRY: ComponentType
STOCK_LIST: ComponentType
TOWN_BUILDING: ComponentType
TRANSPORT_VEHICLE: ComponentType
TRAIN: ComponentType
CARRIAGE: ComponentType
CARRIAGE_LIST: ComponentType
VEHICLE_DEPOT: ComponentType
COLOR: ComponentType
BOUNDING_VOLUME: ComponentType
CONSTRUCTION: ComponentType
SUBCONSTRUCTION: ComponentType
PERSON_CAPACITY: ComponentType
PLAYER_OWNED: ComponentType
ACCOUNT: ComponentType
GAME_SCRIPT: ComponentType
WAREHOUSE: ComponentType
TRANSPORT_NETWORK: ComponentType
MAINTENANCE_COST: ComponentType
RAILROAD_CROSSING: ComponentType
PLAYER: ComponentType
WORLD: ComponentType
BRIDGE: ComponentType
BASE_NODE_CONFIG: ComponentType
LAND_VEHICLE: ComponentType
BASE_NODE_TRAFFIC_LIGHT: ComponentType
EDGE_OBJECT: ComponentType
EMISSION_GRID: ComponentType
TERRAIN: ComponentType
end
Represents a single component that can be attached to an entity.
Engine.ComponentType.AIRCRAFT🔗
Engine.ComponentType.AIRCRAFT: ComponentType
Engine.ComponentType.ANIMAL🔗
Engine.ComponentType.ANIMAL: ComponentType
Engine.ComponentType.ASSET_GROUP��”—
Engine.ComponentType.ASSET_GROUP: ComponentType
Engine.ComponentType.BASE_EDGE🔗
Engine.ComponentType.BASE_EDGE: ComponentType
Engine.ComponentType.BASE_EDGE_STREET🔗
Engine.ComponentType.BASE_EDGE_STREET: ComponentType
Engine.ComponentType.BASE_NODE🔗
Engine.ComponentType.BASE_NODE: ComponentType
Engine.ComponentType.BASE_PARALLEL_STRIP🔗
Engine.ComponentType.BASE_PARALLEL_STRIP: ComponentType
Engine.ComponentType.CUSTOM_STATE🔗
Engine.ComponentType.CUSTOM_STATE: ComponentType
Engine.ComponentType.EMISSION_EMITTER🔗
Engine.ComponentType.EMISSION_EMITTER: ComponentType
Engine.ComponentType.FIELD🔗
Engine.ComponentType.FIELD: ComponentType
Engine.ComponentType.GAME_TIME🔗
Engine.ComponentType.GAME_TIME: ComponentType
Engine.ComponentType.GAME_SPEED🔗
Engine.ComponentType.GAME_SPEED: ComponentType
Engine.ComponentType.MODEL_INSTANCE_LIST🔗
Engine.ComponentType.MODEL_INSTANCE_LIST: ComponentType
Engine.ComponentType.NAME🔗
Engine.ComponentType.NAME: ComponentType
Engine.ComponentType.LINE🔗
Engine.ComponentType.LINE: ComponentType
Engine.ComponentType.LOG_BOOK🔗
Engine.ComponentType.LOG_BOOK: ComponentType
Engine.ComponentType.MODEL_PERSON🔗
Engine.ComponentType.MODEL_PERSON: ComponentType
Engine.ComponentType.MOVE_PATH🔗
Engine.ComponentType.MOVE_PATH: ComponentType
Engine.ComponentType.MOVE_PATH_AIRCRAFT🔗
Engine.ComponentType.MOVE_PATH_AIRCRAFT: ComponentType
Engine.ComponentType.STATION🔗
Engine.ComponentType.STATION: ComponentType
Engine.ComponentType.STATION_GROUP🔗
Engine.ComponentType.STATION_GROUP: ComponentType
Engine.ComponentType.SIM_PERSON🔗
Engine.ComponentType.SIM_PERSON: ComponentType
Engine.ComponentType.SIM_PERSON_AT_TERMINAL🔗
Engine.ComponentType.SIM_PERSON_AT_TERMINAL: ComponentType
Engine.ComponentType.SIM_PERSON_AT_VEHICLE🔗
Engine.ComponentType.SIM_PERSON_AT_VEHICLE: ComponentType
Engine.ComponentType.SIM_CARGO🔗
Engine.ComponentType.SIM_CARGO: ComponentType
Engine.ComponentType.SIM_ENTITY_AT_BUILDING🔗
Engine.ComponentType.SIM_ENTITY_AT_BUILDING: ComponentType
Engine.ComponentType.SIM_ENTITY_AT_VEHICLE🔗
Engine.ComponentType.SIM_ENTITY_AT_VEHICLE: ComponentType
Engine.ComponentType.SIM_ENTITY_AT_TERMINAL🔗
Engine.ComponentType.SIM_ENTITY_AT_TERMINAL: ComponentType
Engine.ComponentType.SIM_ENTITY_IDLE🔗
Engine.ComponentType.SIM_ENTITY_IDLE: ComponentType
Engine.ComponentType.SIM_ENTITY_MOVING🔗
Engine.ComponentType.SIM_ENTITY_MOVING: ComponentType
Engine.ComponentType.SIGNAL_LIST🔗
Engine.ComponentType.SIGNAL_LIST: ComponentType
Engine.ComponentType.TOWN🔗
Engine.ComponentType.TOWN: ComponentType
Engine.ComponentType.INDUSTRY🔗
Engine.ComponentType.INDUSTRY: ComponentType
Engine.ComponentType.STOCK_LIST🔗
Engine.ComponentType.STOCK_LIST: ComponentType
Engine.ComponentType.TOWN_BUILDING🔗
Engine.ComponentType.TOWN_BUILDING: ComponentType
Engine.ComponentType.TRANSPORT_VEHICLE🔗
Engine.ComponentType.TRANSPORT_VEHICLE: ComponentType
Engine.ComponentType.TRAIN🔗
Engine.ComponentType.TRAIN: ComponentType
Engine.ComponentType.CARRIAGE🔗
Engine.ComponentType.CARRIAGE: ComponentType
Engine.ComponentType.CARRIAGE_LIST🔗
Engine.ComponentType.CARRIAGE_LIST: ComponentType
Engine.ComponentType.VEHICLE_DEPOT🔗
Engine.ComponentType.VEHICLE_DEPOT: ComponentType
Engine.ComponentType.COLOR🔗
Engine.ComponentType.COLOR: ComponentType
Engine.ComponentType.BOUNDING_VOLUME🔗
Engine.ComponentType.BOUNDING_VOLUME: ComponentType
Engine.ComponentType.CONSTRUCTION🔗
Engine.ComponentType.CONSTRUCTION: ComponentType
Engine.ComponentType.SUBCONSTRUCTION🔗
Engine.ComponentType.SUBCONSTRUCTION: ComponentType
Engine.ComponentType.PERSON_CAPACITY🔗
Engine.ComponentType.PERSON_CAPACITY: ComponentType
Engine.ComponentType.PLAYER_OWNED🔗
Engine.ComponentType.PLAYER_OWNED: ComponentType
Engine.ComponentType.ACCOUNT🔗
Engine.ComponentType.ACCOUNT: ComponentType
Engine.ComponentType.GAME_SCRIPT🔗
Engine.ComponentType.GAME_SCRIPT: ComponentType
Engine.ComponentType.WAREHOUSE🔗
Engine.ComponentType.WAREHOUSE: ComponentType
Engine.ComponentType.TRANSPORT_NETWORK🔗
Engine.ComponentType.TRANSPORT_NETWORK: ComponentType
Engine.ComponentType.MAINTENANCE_COST🔗
Engine.ComponentType.MAINTENANCE_COST: ComponentType
Engine.ComponentType.RAILROAD_CROSSING🔗
Engine.ComponentType.RAILROAD_CROSSING: ComponentType
Engine.ComponentType.PLAYER🔗
Engine.ComponentType.PLAYER: ComponentType
Engine.ComponentType.WORLD🔗
Engine.ComponentType.WORLD: ComponentType
Engine.ComponentType.BRIDGE🔗
Engine.ComponentType.BRIDGE: ComponentType
Engine.ComponentType.BASE_NODE_CONFIG🔗
Engine.ComponentType.BASE_NODE_CONFIG: ComponentType
Engine.ComponentType.LAND_VEHICLE🔗
Engine.ComponentType.LAND_VEHICLE: ComponentType
Engine.ComponentType.BASE_NODE_TRAFFIC_LIGHT🔗
Engine.ComponentType.BASE_NODE_TRAFFIC_LIGHT: ComponentType
Engine.ComponentType.EDGE_OBJECT🔗
Engine.ComponentType.EDGE_OBJECT: ComponentType
Engine.ComponentType.EMISSION_GRID🔗
Engine.ComponentType.EMISSION_GRID: ComponentType
Engine.ComponentType.TERRAIN🔗
Engine.ComponentType.TERRAIN: ComponentType
Engine.getComponent🔗
function Engine.getComponent<T>(entity : Entity, type : ComponentType): T
Obtains a component from an entity, if available.
Type Parameters
T
Parameters
entity:Entity— the entity (must be a valid, existing entity)type:ComponentType— the component type to obtain
Returns
T— the component if the entity has one, or nil otherwise
Engine.EntityFilters🔗
record Engine.EntityFilters requireOwnedByPlayer: Engine.Entity
filterFn: function(Engine.Entity): boolean
end
Optional filter configuration for getEntitiesWithComponent.
Engine.EntityFilters.requireOwnedByPlayer🔗
Engine.EntityFilters.requireOwnedByPlayer: Engine.Entity
Only include entities owned by the given player entity.
Engine.EntityFilters.filterFn🔗
function Engine.EntityFilters.filterFn(Engine.Entity): boolean
Custom filter: Most flexible - but very slow.
Parameters
Engine.Entity
Returns
boolean
Engine.forEachEntityWithComponent🔗
function Engine.forEachEntityWithComponent(fn : function(Entity), componentType : ComponentType)
Loop over each entity with a given component.
Parameters
fn:function(Entity)— the callback called for each entity with the given componentcomponentType:ComponentType— the component used to filter the entities
Engine.forEachEntity🔗
function Engine.forEachEntity(callback : function(Entity))
Loop over each entity in the engine.
Parameters
callback:function(Entity)— the callback called for each entity
Engine.getEntitiesWithComponent🔗
function Engine.getEntitiesWithComponent(componentType : ComponentType, filters : EntityFilters): {Engine.Entity}
Get each entity with a given component.
Parameters
componentType:ComponentType— the component used to filter the entitiesfilters:EntityFilters— optional table with filter configuration (requireOwnedByPlayerandfilterFn)
Returns
{Engine.Entity}
Engine.getRevision🔗
function Engine.getRevision(entity : Entity): Revision
Returns the revision of the entity.
Parameters
entity:Entity— the entity
Returns
Revision— the entity revision
Engine.entityExists🔗
function Engine.entityExists(entity : Entity): boolean
Checks whether an entity exists.
Parameters
entity:Entity— the entity
Returns
boolean— true if the entity exists
Engine.UtilTerrain🔗
record Engine.UtilTerrain isValidCoordinate: function(position : Vec2f): boolean
getHeightAt: function(position : Vec2f): number
getBaseHeightAt: function(position : Vec2f): number
isOnWater: function(position : Vec2f): boolean
getHeightmapEntity: function(position : Vec2i): Engine.Entity
getBoundingBox: function(): Box2f
makeMapFromGame: function(withHeightmap : boolean, withTowns : boolean, withIndustries : boolean, withAssets : boolean): GameMap
getTerrainEntityRevisions: function(): {Engine.Entity : Engine.Revision}
getBaseResolution: function(): Vec3f
getHighResolution: function(): Vec3f
ceilTerrainFragmentInTiles: function(percentage : number): integer
end
Engine.UtilTerrain.isValidCoordinate🔗
function Engine.UtilTerrain.isValidCoordinate(position : Vec2f): boolean
Check if coordinate is within bounds of world.
Parameters
position:Vec2f— world position with x and y coordinate from center of the map
Returns
boolean— true if valid coordinate, false if non valid coordinate
Engine.UtilTerrain.getHeightAt🔗
function Engine.UtilTerrain.getHeightAt(position : Vec2f): number
Fetches height at the world position. When the coordinates are outside the map, the value of the nearest position on the map is returned.
Parameters
position:Vec2f— world position with x and y coordinate from center of the map
Returns
number— the height at the position
Engine.UtilTerrain.getBaseHeightAt🔗
function Engine.UtilTerrain.getBaseHeightAt(position : Vec2f): number
Fetches base height at the world position. Differently than getHeightAt, this does not include terrain alignments (non-permanent modifications)
and has a lower resolution of 4 meters. When the coordinates are outside the map, the value of the nearest position on the map is returned.
Parameters
position:Vec2f— world position with x and y coordinate from center of the map
Returns
number— the height at the position
Engine.UtilTerrain.isOnWater🔗
function Engine.UtilTerrain.isOnWater(position : Vec2f): boolean
Returns whether the given world position is on water, i.e. below the water level.
Parameters
position:Vec2f— world position with x and y coordinate from center of the map
Returns
boolean— true if the position is on water, false otherwise
Engine.UtilTerrain.getHeightmapEntity🔗
function Engine.UtilTerrain.getHeightmapEntity(position : Vec2i): Engine.Entity
Fetches the entity at the given tile position.
Parameters
position:Vec2i— tile position
Returns
Engine.Entity— the heightmap entity at the position
Engine.UtilTerrain.getBoundingBox🔗
function Engine.UtilTerrain.getBoundingBox(): Box2f
Returns the bounding box of the terrain.
Returns
Box2f— bounding box of the terrain
Engine.UtilTerrain.makeMapFromGame🔗
function Engine.UtilTerrain.makeMapFromGame(withHeightmap : boolean, withTowns : boolean, withIndustries : boolean, withAssets : boolean): GameMap
Creates a map data structure from the current game state.
Parameters
withHeightmap:boolean— include heightmap datawithTowns:boolean— include town datawithIndustries:boolean— include industry datawithAssets:boolean— include asset data
Returns
GameMap— the generated map
Engine.UtilTerrain.getTerrainEntityRevisions🔗
function Engine.UtilTerrain.getTerrainEntityRevisions(): {Engine.Entity : Engine.Revision}
Gets the entity revision numbers for all terrain entities.
Returns
{Engine.Entity : Engine.Revision}— map of entity to revision number
Engine.UtilTerrain.getBaseResolution🔗
function Engine.UtilTerrain.getBaseResolution(): Vec3f
Gets the base resolution of the terrain.
Returns
Vec3f— the base resolution
Engine.UtilTerrain.getHighResolution🔗
function Engine.UtilTerrain.getHighResolution(): Vec3f
Gets the high resolution of the terrain.
Returns
Vec3f— the high resolution
Engine.UtilTerrain.ceilTerrainFragmentInTiles🔗
function Engine.UtilTerrain.ceilTerrainFragmentInTiles(percentage : number): integer
Calculates the ceiling of terrain fragment size in tiles based on percentage.
Parameters
percentage:number— the percentage value
Returns
integer— the calculated terrain fragment size in tiles
Engine.MapGen🔗
record Engine.MapGen createTowns: function(string, {GameMap.Town}): TownResult
createIndustries: function(string, {GameMap.Industry}): IndustryResult
getDefaultTownConnections: function({GameMap.Town}): {{integer, integer}}
getMinMaxValidTerrainHeight: function(): {number, number}
getMinMaxValidNumTowns: function(): {integer, integer}
getMinMaxValidNumIndustries: function(): {integer, integer}
end
Engine.MapGen.createTowns🔗
function Engine.MapGen.createTowns(string, {GameMap.Town}): TownResult
Create a town proposal from a town list.
Parameters
string{GameMap.Town}
Returns
TownResult
Engine.MapGen.createIndustries🔗
function Engine.MapGen.createIndustries(string, {GameMap.Industry}): IndustryResult
Create an industry proposal from an industry list.
Parameters
string{GameMap.Industry}
Returns
IndustryResult
Engine.MapGen.getDefaultTownConnections🔗
function Engine.MapGen.getDefaultTownConnections({GameMap.Town}): {{integer, integer}}
Create default town connections.
Parameters
{GameMap.Town}
Returns
{{integer, integer}}
Engine.MapGen.getMinMaxValidTerrainHeight🔗
function Engine.MapGen.getMinMaxValidTerrainHeight(): {number, number}
Returns the absolute limits of terrain height ranges.
Returns
{number, number}
Engine.MapGen.getMinMaxValidNumTowns🔗
function Engine.MapGen.getMinMaxValidNumTowns(): {integer, integer}
Returns the absolute limits of number of towns.
Returns
{integer, integer}
Engine.MapGen.getMinMaxValidNumIndustries🔗
function Engine.MapGen.getMinMaxValidNumIndustries(): {integer, integer}
Returns the absolute limits of number of industries.
Returns
{integer, integer}
Engine.Config🔗
record Engine.Config getConfigDict: function(): {string : string}
getModParams: function(): {string : {<any type> : <any type>}}
end
Engine.Config.getConfigDict🔗
function Engine.Config.getConfigDict(): {string : string}
Returns the config dict for the game.
Returns
{string : string}
Engine.Config.getModParams🔗
function Engine.Config.getModParams(): {string : {<any type> : <any type>}}
Returns the mod params for the game.
Returns
{string : {<any type> : <any type>}}
Engine.system🔗
Engine.system: System
Engine.terrain🔗
Engine.terrain: UtilTerrain
Engine.mapgen🔗
Engine.mapgen: MapGen
Engine.util🔗
Engine.util: EngineUtil
Engine.config🔗
Engine.config: Config