Module api.type🔗
Contains game command objects and related utilities.
global record Type
ScriptParam: ScriptParam LangKey: LangKey ModDesc: Mod.ModDesc ModId: Mod.ModId KeyCombo: KeyCombo KeyComboDef: KeyComboDef AppConfig: AppConfig enum: Enum Vec5f: Vec5f Vec4f: Vec4f Vec3f: Vec3f Vec2f: Vec2f Mat4f: Mat4f Vec2i: Vec2i Box3: Box3f Box2: Box2f Clock: Clock CommandProgress: CommandProgress LoaderHelper: LoaderHelper Connection: Connection ComponentType: Engine.ComponentType Date: Date JournalEntry: JournalEntry EdgeId: EdgeId EdgePos: EdgePos NodeId: NodeId Waypoint: Waypoint SignalId: SignalId StationTerminal: StationTerminal ScriptRef: ScriptRef ModuleDesc: ModuleDesc ConstructionDesc: ConstructionDesc GameScriptDesc: GameScriptDesc DynamicConstructionTemplate: DynamicConstructionTemplate Line: Engine.Component.Line EmissionGrid: Engine.Component.EmissionGrid MovePathAircraft: Engine.Component.MovePathAircraft TransportVehicle: Engine.Component.TransportVehicle LoadConfig: LoadConfig BaseConfig: BaseConfig CargoTypeSet: CargoTypeSet TransportVehiclePart: TransportVehiclePart TransportVehicleConfig: TransportVehicleConfig Context: Context Proposal: Proposal SimpleProposal: SimpleProposal ProposalData: ProposalData StreetProposal: Proposal.StreetProposal SimpleStreetProposal: SimpleStreetProposal CatchmentArea: CatchmentArea LayerConfig: LayerConfig NodeViewerData: NodeViewerData ParticleParamFloat: ParticleParamFloat ParticleParamVec2f: ParticleParamVec2f ParticleParamCurveFloat: ParticleParamCurveFloat ParticleParamCurveVec2f: ParticleParamCurveVec2f ParticleParamCurveVec3f: ParticleParamCurveVec3f Path: Path PathPos: PathPos AnimationState: Transformator.AnimationState HeighmapGenerationMode: HeighmapGenerationMode TownIndustryGenerationMode: TownIndustryGenerationMode ImportExportHeightmapMode: ImportExportHeightmapMode StreetGenerationMode: StreetGenerationMode Map: GameMap StartGameParams: StartGameParams SaveGameInfo: SaveGameInfo SavegameId: SaveGameId SaveGameDetails: SaveGameData.SaveGameDetails SaveGameData: SaveGameData ChartConfig: ChartConfig FinanceData: FinanceData Failure: Failure NodeAndEntity: Proposal.NodeAndEntity SegmentAndEntity: Proposal.SegmentAndEntity BaseNodeLaneConnectionAndEntity: Proposal.BaseNodeLaneConnectionAndEntity EdgeGeometry: EdgeGeometry MetadataMap: ModelMetadata Collider: Collider mod: Mod modhub: Modhub TrackType: TrackType GenericGameRes: GenericGameRes BridgeType: BridgeType Industry: Engine.Component.Industry StockList: Engine.Component.StockList LineIssue: LineIssue TrafficLightConfig: Engine.Component.TrafficLightConfig TrafficLightState: Engine.Component.TrafficLightState endglobal record AchievementDesc
id: string name: string description: string icon: string lockedIcon: string grade: string hidden: boolean campaign: string alwaysEarnable: boolean score: integer playerStatTarget: PlayerStatProgress endglobal record AchievementRep
getNumAchievements: function(achievementRep : AchievementRep): integer get: function(achievementRep : AchievementRep, index : integer): AchievementDesc endglobal record AircraftInfo
weight: number topSpeed: number landingDistance: number maxThrust: number idleThrust: number mainGear: Vec2f bodyAngle: number forwardOffset: number backwardOffset: number taxiHoldOffset: number hasFlaps: boolean isHelicopter: boolean endglobal record AnyAxis
endglobal record AnyKey
endglobal record AppConfig
new: function(AppConfig): AppConfig equals: function(AppConfig, AppConfig): boolean distanceSpeedUnit: DistanceSpeedUnit mainMenuState: {<any type> : <any type>} enableKeyboardMouse: boolean keyCmdDefinitions: {string : {KeyComboDef}} moneyPrefix: string cameraTool: boolean showReleaseNotes: boolean hasShownInitialDeluxeThankYou: boolean updateMessageID: integer debugMode: boolean guideSystemActive: boolean experimentalTerrainGeneratorEditor: boolean experimentalMapFeatures: boolean screenMode: integer enableSeamlessStreetBuilder: boolean showIntelHDwarning: boolean showLicenseAgreement: boolean musicEnabled: boolean menuMusicEnabled: boolean voiceOverEnabled: boolean masterVolume: number soundVolume: number musicVolume: number voiceOverVolume: number audioEffectSettings: AudioEffectSettings experimentalTunnelAndBridgeMinHeight: boolean resolutionScale: number cssEffectsVelocity: number endglobal record Async<T>
isCompleted: function(Async<T>): boolean get: function(Async<T>): T abort: function(Async<T>) getProgressMonitor: function(Async<T>): App.ProgressMonitor endglobal record AutoGroundTex
new: function(): AutoGroundTex category: string gridSize: integer countFrom: integer countTo: integer groundTex: string individual: boolean individualCategory: string endglobal record BaseConfig
record AdvancedOptions
trafficSpeedSensitivityScale: number vehicleMaintenanceEmissionsEffect: number vehicleMaintenancePerformanceEffect: number vehicleMaintenanceRunningCostsEffect: number missionVehicleMaintenanceDisableRepair: boolean missionDisableTunnelBuilding: boolean missionEmissionsScriptFactor: number simPersonHappinessDecayAtVehicle: number simPersonHappinessDecayAtTerminal: number subventionMode: integer subventionRisk: integer subventionFinancialRewardMultiplier: number landmarkResources: number isReforestationActive: boolean endrecord Animal
new: function(): Animal populationDensityMultiplier: number useLocalSpawning: boolean localTileSize: number notifyAnimalDespawn: boolean endrecord Locations
new: function(): Locationsrecord IndustryParamList
new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number endtown: TownParamList industry: IndustryParamList makeInitialStreets: boolean endrecord TownParamList
new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number endrecord Terrain
lodErrorMultiplier: number endrecord Economy
new: function(): EconomycargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment endrecord IndustryDevelopment
spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number endrecord Settings
new: function(): SettingsgeometryQualityOptions: {GeometryQualityOption} endrecord GeometryQualityOption
new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number endanimal: Animal locations: Locations settings: Settings particles: Particles water: Water emission: Emissions scaffold: {string : {string : {string}}} costs: {string : number} advancedOptions: AdvancedOptions economy: Economy terrain: Terrain environment: ResName economyId: ResName nameId: ResName climate: ResName trackCatenaryYearFrom: integer busLaneYearFrom: integer terrainToolMinStrength: number terrainToolMaxStrength: number enforceMainConnections: boolean townDevelopInterval: number chargeMaintenanceInterval: number simulateCargoWeight: boolean simPersonDestinationRecomputationProbability: number townMajorStreetAngleRange: number townConnectionMaxBridgeLength: number maxVehicleCloneAmount: number trainAccelerationFactor: number trainBrakeDeceleration: number terrainToolMinSize: number terrainToolMaxSize: number terrainToolScale: number terrainToolMaxSizeEditor: number terrainPainterMinSize: number terrainPainterMaxSize: number terrainPainterMaxSizeEditor: number terrainPainterScale: number assetBrushMinSize: number assetBrushMaxSize: number assetBrushScale: number treeCostYearMultipliers: {integer : number} townInitialMajorStreetAngleRange: number townCapacityScalingFactor: number sandboxMode: boolean noCosts: boolean constructionScript: ScriptRef endrecord Emissions
noiseLowerBoundDB: number noiseUpperBoundDB: number pollutionLowerBoundDB: number pollutionUpperBoundDB: number townNoiseResidentialAffected: boolean townNoiseCommercialAffected: boolean townNoiseIndustrialAffected: boolean endglobal record BridgeType
description: ModelMetadata.Description availability: ModelMetadata.Availability menuCategory: ModelMetadata.MenuCategory cost: number speedLimit: number new: function(): BridgeType costFactors: Vec3f maintenanceCost: integer carriers: {Carrier} padding: number height: number sidewalkHeight: number pillarWidth: number pillarLen: number pillarMinDist: number pillarMaxDist: number pillarTargetDist: number abutmentLen: number abutmentWidth: number materialsToReplace: {<any type> : <any type>} assetsToReplace: {<any type> : <any type>} pillarGroundTexture: string pillarGroundTextureOffset: number updateScript: ScriptRef isAutoSelectable: boolean portals: {<any type> : <any type>} endglobal record BuilderAudioSet
attrs: SoundAttributes dragStart: SoundClip drag: {SoundClip} dragBridge: {SoundClip} dragTunnel: {SoundClip} dragEnd: SoundClip dragOffset: number build: {SoundClip} noMoney: {SoundClip} bulldoze: {SoundClip} terraform: {SoundClip} endglobal record CampaignDesc
new: function(): CampaignDesc name: string description: string icon: string map: string order: number voiceOver: string requiresCompleted: string unlockingProgression: boolean endglobal record CargoCategory
tier: integer landUses: {LandUseType} requiredIndustryTags: {string} townConsumptionFactor: number endglobal type CargoClassId = integerglobal record CargoClass
new: function(): CargoClass tag: string name: string description: string icon: string color: Vec3f order: integer endglobal type CargoTypeId = integerglobal record CargoType
new: function(): CargoType name: string icon: string color: Vec3f scriptRef: ScriptRef weight: number cargoClasses: {string} order: integer category: string categoryList: ModelMetadata.CategoryList timeToDeliverInSeconds: integer loadSpeedFactor: number endglobal record CargoTypeSet
new: function(): CargoTypeSet cargoClassesIncluded: {string} cargoClassesExcluded: {string} cargoTypesIncluded: {ResName} cargoTypesExcluded: {ResName} endglobal record CarriageInfo
owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: Engine.Entity end: number endglobal record Carrier
ROAD: Carrier RAIL: Carrier TRAM: Carrier OTHER: Carrier AIR: Carrier WATER: Carrier metamethod __index: function(Carrier, string): Carrier endglobal record ChartConfig
new: function(): ChartConfig interval: integer count: integer minCount: integer yStepScale: number endglobal record ChartResult
equals: function(ChartResult, ChartResult): boolean xRange: {number} yRange: {number} series: {{{number}}} xMarkers: {number} yMarkers: {number} numPotentialGroups: integer endglobal record ClimateDesc
new: function(): ClimateDesc id: string desc: ModelMetadata.Description category: string order: integer visible: boolean mapColoring: PreviewColoring economy: string environment: string defaultNames: string endglobal record Collider
transf: Mat4f type: Type box: Box cylinder: Cylinder pointCloud: PointCloud endglobal record CommandProgress
new: function(): CommandProgress get: function(CommandProgress): number endglobal record CompanyValue
totalScore: integer railVehicles: integer trams: integer roadVehicles: integer aircrafts: integer ships: integer trackTotalLength: integer trackElectricLength: integer bridgeTotalLength: integer tunnelTotalLength: integer roadTotalLength: integer suppliedTowns: integer connectedIndustries: integer numberOfLines: integer totalStations: integer railStations: integer tramStations: integer roadStations: integer aircraftStations: integer shipStations: integer topSpeed: number topLength: number oldestTransportVehicle: integer balance: integer totalAssets: integer debt: integer endglobal record ComponentCustomState
new: function(): ComponentCustomState state: {<any type> : <any type>} endglobal record ConsoleGen
Gen9pro: ConsoleGen Gen9standard: ConsoleGen Gen9base: ConsoleGen PC: ConsoleGen endglobal record ConstructionDesc
new: function(ConstructionDesc): ConstructionDesc updateScript: ScriptRef configureLayerScript: ScriptRef configureHudIconsScript: ScriptRef hudIconScript: ScriptRef entityWindowScript: ScriptRef fileName: string availability: ModelMetadata.Availability soundConfig: ModelMetadata.SoundConfig description: ModelMetadata.Description categoryList: ModelMetadata.CategoryList params: {ScriptParam} categories: {string} order: number menuCategory: ModelMetadata.MenuCategory constructionTemplates: {ConstructionTemplate} constructionTemplates_native: Vector<ConstructionTemplate> placementTag: string metadata: ConstructionDescMetadata snapping: SnapConfig undergroundView: boolean heightAdjustable: boolean isIndustry: boolean edgeObject: EdgeObject townBuildingParams: TownBuildingParams endrecord EdgeObject
minDistToCrossing: number snapToStreet: boolean snapToTrack: boolean catchmentCargo: boolean catchmentPassengers: boolean catchmentAreaRadius: number endglobal type ConstructionId = integerglobal record ConstructionInstanceMetadata
costScaleFactor: number endglobal record ConstructionResult
subconstructions: {Proposal.Subconstruction} metadata: ConstructionInstanceMetadata cost: number maintenanceCost: number maintenanceCarrier: string streetTerminal: Proposal.StreetTerminal params: {<any type> : <any type>} endglobal record ConstructionScriptParam
key: string name: string group: string tooltip: string values: {string} numbers: {number} tooltips: {string} postConstructionModifiable: boolean hideLabel: boolean images: {string} defaultIndex: Index uiType: Type location: Location displayMode: DisplayMode tags: {string} yearFrom: integer yearTo: integer checkEnabledScript: ScriptRef stepValueScript: ScriptRef formatValueScript: ScriptRef endglobal record ConstructionTemplate
availability: ModelMetadata.Availability desc: ModelMetadata.Description data: ConstructionTemplateData menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName configureHudIconsScript: ScriptRef endglobal record ConstructionTemplateData
initialModules: {ResName : integer} params: {ScriptParam} endglobal record ConstructionType
STREET_STATION: ConstructionType RAIL_STATION: ConstructionType AIRPORT: ConstructionType HARBOR: ConstructionType STREET_STATION_CARGO: ConstructionType RAIL_STATION_CARGO: ConstructionType HARBOR_CARGO: ConstructionType STREET_DEPOT: ConstructionType RAIL_DEPOT: ConstructionType WATER_DEPOT: ConstructionType INDUSTRY: ConstructionType WAREHOUSE: ConstructionType ASSET_DEFAULT: ConstructionType ASSET_TRACK: ConstructionType TOWN_BUILDING: ConstructionType STREET_CONSTRUCTION: ConstructionType NONE: ConstructionType AIRPORT_CARGO: ConstructionType TRACK_CONSTRUCTION: ConstructionType WATER_WAYPOINT: ConstructionType endglobal record Context
new: function(): Context checkTerrainAlignment: boolean cleanupStreetGraph: boolean gatherBuildings: boolean gatherFields: boolean player: Engine.Entity refundableEntities: {{Engine.Entity, integer}, {Engine.Revision, integer}} extendProposalRedoPillars: boolean endglobal record Date
new: function(year : integer, month : integer, day : integer): Date now: function(): Date fromYear: function(integer : integer): Date fromString: function(str : string): Date getEndOfMonth: function(current : Date): Date getDayOfWeek: function(current : Date): integer addOffsetDays: function(date : Date, numDays : integer): Date year: integer month: integer day: integer endglobal record DateFormat
LONG: DateFormat SHORT: DateFormat MEDIUM: DateFormat FULL: DateFormat FILENAME: DateFormat YEAR: DateFormat endglobal record Easing
Linear: integer EaseOutSqrt: integer EaseInSine: integer EaseOutSine: integer EaseInOutSine: integer EaseInQuad: integer EaseOutQuad: integer EaseInOutQuad: integer EaseInCubic: integer EaseOutCubic: integer EaseInOutCubic: integer EaseInQuart: integer EaseOutQuart: integer EaseInOutQuart: integer EaseInQuint: integer EaseOutQuint: integer EaseInOutQuint: integer EaseInExpo: integer EaseOutExpo: integer EaseInOutExpo: integer EaseInCirc: integer EaseOutCirc: integer EaseInOutCirc: integer EaseInBack: integer EaseOutBack: integer EaseInOutBack: integer EaseInElastic: integer EaseOutElastic: integer EaseInOutElastic: integer EaseInBounce: integer EaseOutBounce: integer EaseInOutBounce: integer endglobal record EconomyDesc
new: function(): EconomyDesc desc: ModelMetadata.Description order: integer visible: boolean category: string industryWeightsSum2Population: number placementParams: {string : PlacementParams} cargoCategories: {string : CargoCategory} townLevels2CargoInfos: {integer : {TownCargoLevelInfo}} cargoRequiredIndustries: {<any type> : <any type>} companyRankRequiredIndustries: {<any type> : <any type>} defaultIndustryDensity: number defaultPopulationDensity: number defaultIndustryProductivity: number endrecord TownCargoLevelInfo
new: function(): TownCargoLevelInfo minTier: integer maxTier: integer landUseType: LandUseType endglobal record Edge
conns: {NodeId} geometry: EdgeGeometry transportModes: {TransportMode : boolean} speedLimit: number curveSpeedLimit: number curSpeed: number linkable: integer pedestrianWalkPenalty: number precedence: boolean noiseModifier: number pollutionModifier: number needsReservation: boolean forwardOnly: boolean endglobal record EdgeDecoration
new: function(): EdgeDecoration availability: ModelMetadata.Availability desc: ModelMetadata.Description cost: ModelMetadata.Cost maintenance: number categoryList: ModelMetadata.CategoryList requiredTags: {string} incompatibleTags: {string} repModel: string length: number stretch: boolean verticalAlignment: integer snapMode: integer offset: number skipSameInParallelStrip: boolean order: integer modifiers: Modifiers menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName endglobal record EdgeGeometry
new: function(): EdgeGeometry type: Type arc: Arc straight: Straight cubicSpline: CubicSpline cubicOffsetSpline: CubicOffsetSpline tangent: Vec2f height: Vec2f length: number width: number locate: function(geom : EdgeGeometry, pos : Vec3f, maxSteps : integer, tol : number): {number, boolean} calcPos: function(geom : EdgeGeometry, param : number): {Vec3f, Vec3f, Vec3f} endrecord CubicOffsetSpline
new: function(): CubicOffsetSpline pos: {Vec2f} tangent: {Vec2f} offset: number endglobal record EdgeObjectType
STOP_LEFT: EdgeObjectType STOP_RIGHT: EdgeObjectType SIGNAL: EdgeObjectType endglobal record EdgePos
new: function(): EdgePos equals: function(EdgePos, EdgePos): boolean edgeId: EdgeId param: number endglobal record Enum
LogLevel: LogLevel SaveGameType: SaveGameType DateFormat: DateFormat EdgeObjectType: EdgeObjectType TransportVehicleState: TransportVehicleState Carrier: Carrier SignalType: SignalType VehicleEngineType: VehicleEngineType LineProblem: LineProblem LineStationProblem: LineStationProblem VehicleProblem: VehicleProblem VehicleIconType: VehicleIconType TownProblem: TownProblem StockListType: StockListType ConstructionType: ConstructionType TransportMode: TransportMode TramTrackType: TramTrackType LandUseType: LandUseType InputMode: InputMode GamepadType: GamepadType Platform: Platform Vendor: Vendor ConsoleGen: ConsoleGen TrafficLightPreference: TrafficLightPreference BaseEdgeType: BaseEdgeType MoveMode: MoveMode RoadType: RoadType ScriptParamType: ScriptParamType ScriptParamLocation: ScriptParamLocation ScriptParamDisplayMode: ScriptParamDisplayMode DistanceSpeedUnit: DistanceSpeedUnit HudEffectMode: HudEffectMode FontScaleClass: FontScaleClass MoneyMode: MoneyMode PowerUnit: PowerUnit WeightUnit: WeightUnit ForceUnit: ForceUnit Gender: Gender UgcAccessLimitedReason: UgcAccessLimitedReason FlightState: FlightState Easing: Easing PdxErrorCodes: PdxErrorCodes PdxLegalDocumentType: PdxLegalDocumentType PdxThirdPartyLinkState: PdxThirdPartyLinkState PdxThirdPartyAutoLoginPromptState: PdxThirdPartyAutoLoginPromptState endglobal record Environment
new: function(): Environment atmosphere: AthmostphereParams name: string isToolEnvironment: boolean endrecord AthmostphereParams
new: function(): AthmostphereParams cloudCoverage: number cloudBase: number cloudTop: number cloudScattering: number dayOfYear: number sunRotation: number endglobal record ExtPath
edges: {ExtPathEdge} endglobal type FilePath = stringglobal record Failure
reason: Reason pos: Vec3f endrecord Reason
Unkown: Reason NoPath: Reason NoElectric: Reason NoTram: Reason NoTramButTramTrack: Reason NoTramTrackButRail: Reason NoRail: Reason NoRoad: Reason NoSmallAircraft: Reason NoSmallShip: Reason endglobal record FinanceData
equals: function(FinanceData, FinanceData): boolean transport: {JournalEntry.Carrier : {integer : {integer}}} investment: {integer : {integer}} other: {JournalEntry.Other, {integer}} loan: {integer} interest: {integer} loanBorrowing: {integer} loanRepayment: {integer} total: {integer} balance: {integer} header: {string} unfoldKey: function(FinanceData, integer): {JournalEntry.Type, JournalEntry.Maintenance, JournalEntry.Construction} foreach_carrier: function(FinanceData, function(JournalEntry.Carrier, {integer : {integer}})) foreach_transport: function(FinanceData, function(integer, {integer}), JournalEntry.Carrier) foreach_investment: function(FinanceData, function(integer, {integer})) foreach_other: function(FinanceData, function(JournalEntry.Other, {integer})) endglobal record FlightState
Taxi0: FlightState TakeOff: FlightState Flight: FlightState Approach: FlightState Landing: FlightState Taxi1: FlightState endglobal record GameMap
record Town
new: function(): Town pos: Vec2f name: string sizeFactors: {number} landUse2CargoNeeds: {LandUseType : {{string, number}}} existing: Engine.Entity endnew: function(): GameMap setHeightMap: function(GameMap, integer, number) heightmap: {number} numTilesX: integer numTilesY: integer levels: integer offsetZ: number waterLevel: number climateId: string resolution: Vec3f towns: {GameMap.Town} industries: {GameMap.Industry} townConnections: {{integer, integer}} trees: GameMap.MapTree assets: GameMap.MapAsset endrecord Industry
new: function(): Industry pos: Vec2f angle: number onWater: boolean fileName: string tag: string existing: Engine.Entity endglobal record GameMetadata
date: integer balance: integer population: integer startYear: integer numVehicleModels: integer terrainDimensions: Vec2i companyValue: CompanyValue transportationStats: TransportationStats scriptMetadata: SavegameScriptMetadata gameModDescs: {Mod.GameModDesc} achievementsEarnable: boolean screenshot: GameScreenshot endglobal record GameScreenshot
width: integer height: integer image: {integer} image_native: Vector<integer> endglobal record GameScriptDesc
new: function(): GameScriptDesc postUpdateScript: ScriptRef handleEventScript: ScriptRef guiUpdateScript: ScriptRef guiHandleEventScript: ScriptRef updateScript: ScriptRef endglobal record GamepadType
None: GamepadType XBox: GamepadType PlayStation5: GamepadType PlayStation4: GamepadType endglobal record GenericGameRes
new: function(): GenericGameRes type: string data: {<any type> : <any type>} setData: function(GenericGameRes, {<any type> : <any type>}) endglobal GlobalType: Typeglobal record GenericGameResT<T>
new: function(): GenericGameResT<T> type: string data: T setData: function(GenericGameResT<T>, T) endglobal record GridCollisionSystem
getCollisionDataAt: function(GridCollisionSystem, Vec2f): integer endglobal record GridVec2f
new: function(): GridVec2f width: integer height: integer x0: integer y0: integer at: function(grid : GridVec2f, pos : Vec2i): Vec2f endglobal record Gridf
new: function(): Gridf width: integer height: integer at: function(pos : Vec2i): number endglobal record GroundTexture
new: function(): GroundTexture matIndexMap: {<any type> : <any type>} indices: {<any type> : <any type>} priority: integer texSize: number endglobal record HeighmapGenerationMode
new: function(): HeighmapGenerationMode terrainGenerator: string generateTowns: boolean generateIndustries: boolean generateAssets: boolean keepHeightmap: boolean endglobal record HeightmapNew
getSize: function(): Vec2i at: function(x : integer, y : integer): number endglobal record HudEffectMode
Always: HudEffectMode CockpitOnly: HudEffectMode Never: HudEffectMode endglobal type Index = integerglobal record ImportExportHeightmapMode
new: function(): ImportExportHeightmapMode fileName: string import: boolean generateAssets: boolean minH: number maxH: number endglobal record IndustryInfo
fileName: string bbox: Box2f streetPoint: Vec2i transf: Mat4f onWater: boolean endglobal record InputActionDesc
uiName: string type: integer defaultBindings: {KeyComboDef} modifierOnly: boolean uiCategory: string uiOrder: integer duplicateOf: string duplicatedKeybindings: boolean endglobal record InputActionRep
getAll: function(InputActionRep): {string} get: function(InputActionRep, string): InputActionDesc endglobal record KeyCombo
new: function(KeyComboDef): KeyCombo toString: function(KeyCombo): string isModifierOnly: function(KeyCombo): boolean relevantFor: function(KeyCombo, InputMode): boolean endglobal record KeyComboDef
new: function(): KeyComboDef setKeyScancode: function(KeyComboDef, integer) addModifierKey: function(KeyComboDef, integer) condition: integer endglobal record LandUseType
RESIDENTIAL: LandUseType COMMERCIAL: LandUseType INDUSTRIAL: LandUseType endglobal record LandVehicleMoveInfo
availPower: number traction: number tractiveEffort: number vehicleAvailPower: {number} endglobal record LaneConfig
speed: number width: number height: number forward: boolean transportModes: {TransportMode : boolean} offset: number endglobal record LaneConnection
segment0: Engine.Entity lane0: integer segment1: Engine.Entity lane1: integer withRoad: boolean withTram: boolean endglobal record LangKey
new: function(): LangKey equals: function(LangKey, LangKey): boolean code: string mod: Mod.ModId endglobal record LayerConfig
new: function(): LayerConfigrecord EmissionColorMap
new: function(): EmissionColorMaprecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} endcolors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType endrecord VisualizationType
DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType endrecord TerrainColorMap
new: function(): TerrainColorMapcolors: Colors endrecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean endrecord TerrainContours
new: function(): TerrainContourscontours: {Contour} endrecord Contour
new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number endrecord ColorPassFn
new: function(): ColorPassFnrecord BaseColor
new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean endrecord BaseMappedColor
new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean endrecord CargoColor
new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean endrecord DestinationColor
new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer endrecord EmissionEmitterColor
new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number endrecord EmissionImpactColor
new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number endrecord FallbackColor
new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor endrecord IndustryColor
new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean endrecord LandUseColor
new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor endrecord LineVehicleColor
new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} endrecord MaintainedTransportVehicleColor
new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity endrecord SpeedLimitsColor
new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean endterrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor endrecord TrafficColor
new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean endrecord BuildingRenderableConfig
new: function(): BuildingRenderableConfig isVisible: boolean includeTownBuildings: boolean includeTownBuildingModels: boolean includeTownBuildingMainModel: boolean includeIndustries: boolean includeWarehouses: boolean includeStations: boolean includeEdges: boolean endrecord CatchmentAreaDisplaySettings
new: function(): CatchmentAreaDisplaySettings personBaseColor: Vec3f cargoBaseColor: Vec3f inactiveColor: Vec3f unreachableColor: Vec3f deleteColor: Vec3f maintenanceColor: Vec3f noiseColor: Vec3f pollutionColor: Vec3f borderAlpha: number borderAlphaPassive: number godrayAlpha: number godrayAlphaPassive: number innerAlpha: number buildingAlpha: number borderWidth: number endrecord CatchmentAreaRenderableConfig
new: function(): CatchmentAreaRenderableConfig isVisible: boolean displaySettings: CatchmentAreaDisplaySettings cargo: boolean person: boolean maintenance: boolean noise: boolean pollution: boolean addGodrays: boolean entity: Engine.Entity carriers: {Carrier} endrecord CargoEdgesRenderables
new: function(): CargoEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} showPlayerTransport: boolean showPrivateTransport: boolean playerTransportColor: {Vec4f, Vec4f} privateTransportColor: {Vec4f, Vec4f} numTransportLevels: integer signConfig: SignConfig endrecord SatisfactionEdgesRenderables
new: function(): SatisfactionEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} colors: {Vec4f} thresholds: {number} signConfig: SignConfig endrecord SpeedLimitsEdgesRenderables
new: function(): SpeedLimitsEdgesRenderables speedColor: {Vec4f, Vec4f, Vec4f} undergroundSpeedColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer tunnelOutlineColor: Vec4f tunnelOutlineSize: number signConfig: SignConfig hideNonPlayerOwned: boolean hideNonLocked: boolean endrecord TrafficEdgesRenderables
new: function(): TrafficEdgesRenderables trafficColor: {Vec4f, Vec4f, Vec4f} undergroundTrafficColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer discrete: boolean tunnelOutlineColor: Vec4f tunnelOutlineSize: number endrecord VoronoiRenderableConfig
new: function(): VoronoiRenderableConfig showTowns: boolean townsOfInterest: {Engine.Entity} showMapBorder: boolean lineWidth: number colors: {Vec4f} sectionsPerColor: integer fadingMinHeight: number fadingDeltaHeight: number endrecord WindRenderableConfig
new: function(): WindRenderableConfig isVisible: boolean emissionType: Engine.Component.EmissionGrid.Type endcolorMap: any contours: TerrainContours colorPassFn: ColorPassFn colorPassFnForBuildingRenderableOnly: boolean buildingRenderableConfig: BuildingRenderableConfig catchmentAreaRenderableConfig: CatchmentAreaRenderableConfig edgeRenderableConfig: any voronoiRenderableConfig: VoronoiRenderableConfig windRenderableConfig: WindRenderableConfig plotsRenderableConfig: PlotsRenderableConfig cargoFlowRenderableConfig: CargoFlowRenderableConfig undergroundMode: boolean showOneWay: boolean endrecord CargoFlowRenderableConfig
new: function(): CargoFlowRenderableConfigflowData: {FlowData} endrecord FlowData
new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} endglobal record LineCargoInfo
realSectionTimes: {{number, integer}} sectionTimes: {number} frequency: number driveRealSectionTimes: {{number, integer}} driveSectionTimes: {number} numVehicles: integer totalCapacity: integer availableCapacities: {integer} comfortFactor: number priceFactor: number endglobal record LineIssue
type: Type stopIndex: integer cargoType: CargoTypeId endrecord Type
NowhereToLoad: Type NowhereToUnload: Type NoVehicleToLoadCargo: Type VehicleUseless: Type LineCargoConfig: Type None: Type endglobal record LineOrEdges
line: Engine.Entity lineStop0: integer lineStop1: integer lineTerminal1: {Engine.Entity, integer} edges: {EdgePos} endglobal record LineProblem
NOTHING: integer ZERO_OR_ONE_STATION: integer DOUBLE_STATIONS: integer INCOMPATIBLE_STATIONS: integer NO_PATH: integer BAD_ALTERNATIVE_TERMINAL: integer endglobal record LineStationProblem
StopUseless: integer PassengerStopUseless: integer CargoStopUseless: integer AllPassengerStopUseless: integer CargoTypeUnloadUseless: integer CargoTypeLoadUseless: integer endglobal record LoadConfig
new: function(): LoadConfig loadConfigIndex: integer cargoTypeId: CargoTypeId endglobal record LogLevel
Raw: LogLevel Error: LogLevel Warning: LogLevel Message: LogLevel Verbose: LogLevel endglobal record Map<K, V>
find: function(Map<K, V>, K): V insert: function(Map<K, V>, K, V) size: function(Map<K, V>): integer asTable: function(Map<K, V>): {K : V} next: function(K): K endglobal record Mat4f
new: function(): Mat4f clone: function(Mat4f): Mat4f cols: function(matrix : Mat4f, colIndex : integer): Vec4f getTransl: function(Mat4f): Vec3f setTransl: function(v : Mat4f, Vec3f): Mat4f transformPosition: function(v : Mat4f, Vec3f): Vec3f transformDirection: function(v : Mat4f, Vec3f): Vec3f rotZ: function(angle : number): Mat4f rotY: function(angle : number): Mat4f rotX: function(angle : number): Mat4f rotZTransl: function(angle : number, transl : Vec3f): Mat4f rotZYTransl: function(angles : Vec2f, transl : Vec3f): Mat4f scale: function(scale : Vec3f): Mat4f scaleRotZTransl: function(scale : Vec3f, angle : number, transl : Vec3f): Mat4f scaleTransl: function(scale : Vec3f, transl : Vec3f): Mat4f transl: function(transl : Vec3f): Mat4f metamethod __index: function(Mat4f, integer): number endglobal record MemoryStatistics
vidMemUsage: integer trackedVidMemUsage: integer vidMemMax: integer peakVidMem: integer ramUsage: integer trackedRamUsage: integer ramMax: integer peakRam: integer peakTotalMem: integer largestFreeBlock: integer endglobal record MetaConstructionDesc
new: function(MetaConstructionDesc): MetaConstructionDesc availability: ModelMetadata.Availability description: ModelMetadata.Description soundConfig: ModelMetadata.SoundConfig categoryList: ModelMetadata.CategoryList params: {ConstructionScriptParam} menuCategory: ModelMetadata.MenuCategory undergroundView: boolean heightAdjustable: boolean isIndustry: boolean heightModView: boolean configureLayerScript: ScriptRef configureHudIconsScript: ScriptRef metadata: ConstructionDescMetadata relativePath: string createTemplateScript: ScriptRef order: integer endglobal record MissionDesc
record Medal
id: string name: string nameLocked: string iconLocked: string iconCompleted: string endname: string description: string campaign: string characters: {Character} order: integer image: string imagePreview: string imageSuccess: string imageFailure: string loadscreen: string loadscreenDescription: string loadscreenVoiceOver: string savegame: string languageScript: string playlistOverride: string medals: {Medal} starsDescription: string stars: {Star} voiceOver: string location: string year: string musicTracks: {{ResName, boolean}} endrecord Star
id: string name: string description: string iconLocked: string iconCompleted: string endglobal record ModRep
getInstalledMods: function(ModRep): {Mod.ModId} exists: function(ModRep, Mod.ModId): boolean getModDesc: function(ModRep, Mod.ModId): Mod.ModDesc getModSize: function(ModRep, Mod.ModId): Mod.ModSize getGameModDesc: function(ModRep, Mod.ModId): Mod.GameModDesc getModSource: function(ModRep, Mod.ModId): string wouldForceActivateAchievements: function(ModRep, {Mod.ModId}): boolean couldAchievementsBeEarned: function(ModRep, {Mod.ModId}): boolean endglobal record Model
metadata: {<any type> : <any type>} boundingInfo: BoundingInfo collider: {<any type> : <any type>} modelPath: ResName endglobal record ModelInstance
modelId: integer transf0: Mat4f transf: Mat4f transformator: integer endglobal record ModelMetadata
record Animal
config: Config movementTypes: {MovementType} idForAchievement: string endrecord MovementType
description: string endrecord Description
name: string description: string iconSmall: string iconSmallCblend: string icon: string icon20: string icon3d: string icon20cblend: string lockedIcon: string previewIcon: string attributes: {string : {number, number}} attributes_native: Map<string, {number, number}> cargoTypeSet: CargoTypeSet endrecord Category
categories: {string} endrecord CategoryList
categories: {string} endrecord MenuCategory
categories: {CategoryWithOrder} endrecord CategoryWithOrder
new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} endrecord Availability
yearFrom: integer yearTo: integer notifyWhenAvailable: boolean notificationGroup: string notificationSortKey: integer endrecord Maintenance
lifespan: integer runningCosts: number runningCostScale: number maintenanceScale: number topSpeedMaintenanceFactorPenaltyPerLevel: number endrecord TransportVehicle
line: Engine.Entity carrier: Carrier compartments: {Compartment} loadSpeed: number reversible: boolean arrivalDelay: integer departureDelay: integer groupFileName: ResName transportModes: {TransportMode} engineTransportModes: {TransportMode} filterTags: {string} comfortFactor: number priceFactor: number maintenanceFactor: number noCblendMask: boolean endrecord CargoEntry
cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string endrecord LandVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number engines: {VehicleEngine} friction: number endrecord WaterVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number availPower: number maxRpm: number area: number endrecord AirVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number maxThrust: number isHelicopter: boolean endendrecord Tree
reputationFactor: number endglobal record Modifiers
new: function(): Modifiers equals: function(Modifiers, Modifiers): boolean noiseModifier: number pollutionModifier: number maxSpeedModifier: number endglobal record ModuleDesc
new: function(): ModuleDesc fileName: ResName type: string autoRemovable: boolean availability: ModelMetadata.Availability description: ModelMetadata.Description category: ModelMetadata.Category cost: ModelMetadata.Cost menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName metadata: {<any type> : <any type>} metadata_native: Map<string, number> relativePath: string updateScript: ScriptRef getModelsScript: ScriptRef endglobal record MultipleUnit
new: function(): MultipleUnit vehicles: {MultipleUnit.Vehicle} name: string desc: string filterTags: {string} availabilityNotificationGroup: string availabilityNotificationSortKey: integer groupFileName: string endglobal record NameDesc
name: string personNamesScript: string townNamesScript: string streetNamesScript: string endglobal type NativeLuaValue = string | number | boolean | nil | NativeLuaTableglobal record NativeLuaTable
find: function(NativeLuaTable, NativeLuaValue): NativeLuaValue findPath: function(NativeLuaTable, {NativeLuaValue}): NativeLuaValue insert: function(NativeLuaTable, NativeLuaValue, any) insert_native: function(NativeLuaTable, NativeLuaValue, NativeLuaValue) remove: function(NativeLuaTable, NativeLuaValue) size: function(NativeLuaTable): integer asTable: function(NativeLuaTable): {<any type> : <any type>} clone: function(NativeLuaTable): NativeLuaTable next: function(NativeLuaTable, NativeLuaValue): NativeLuaValue endglobal record Node
endglobal record NodeViewerData
new: function(): NodeViewerData clone: function(NodeViewerData): NodeViewerData edgeIdx: integer colors: {Vec4f} order: integer width: number endglobal record ParsedSavegameName
type: SaveGameType groupName: string ingameTimestamp: string fileTimestamp: string endglobal record ParticleParamCurveFloat
new: function(): ParticleParamCurveFloat curve: {CurvePoint} endglobal record ParticleParamCurveVec2f
new: function(): ParticleParamCurveVec2f curve: {CurvePoint} endglobal record ParticleParamCurveVec3f
new: function(): ParticleParamCurveVec3f curve: {CurvePoint} endglobal record Path
new: function(): Path edges: {{EdgeId, boolean}} endOffset: integer terminalDecisionOffset: integer earlyArrivalIndices: integer endglobal record PathFactoryInput
fromEdgesWalk: {EdgePos} fromEdgesDrive: {EdgePos} fromLineOrEdges: LineOrEdges moveMode2costFactor: {number, number, number} toEntityWalk: Engine.Entity toEdgesDrive: {EdgePos} fromEdgesWalkForDrive: {EdgePos} toEdgesWalkForDrive: {EdgePos} cargoType: CargoTypeId endglobal record PathFactoryOutput
line0: LineSection line1: LineSection path: ExtPath cost: number moveMode: MoveMode endglobal record PdxAccountInfo
email: string endglobal record PdxErrorCodes
AccountAlreadyExists: PdxErrorCodes BadEmailAddressFormat: PdxErrorCodes BadPasswordLength: PdxErrorCodes BadDateFormat: PdxErrorCodes UnderAgeAccount: PdxErrorCodes MissingAccountInfo: PdxErrorCodes ProfileDoesNotExist: PdxErrorCodes ProfileAlreadyTaken: PdxErrorCodes ProfileAlreadyExists: PdxErrorCodes ProfileNameTooLong: PdxErrorCodes ProfileNameTooShort: PdxErrorCodes ProfileNameInvalid: PdxErrorCodes endglobal record PdxLegalDocumentType
UserAgreement: PdxLegalDocumentType PrivacyPolicy: PdxLegalDocumentType endglobal record PdxLoginResult
endglobal record PdxThirdPartyAutoLoginPromptState
NotShown: PdxThirdPartyAutoLoginPromptState Accepted: PdxThirdPartyAutoLoginPromptState Rejected: PdxThirdPartyAutoLoginPromptState endglobal record PdxThirdPartyLinkState
NeitherAccountHasLink: PdxThirdPartyLinkState ParadoxAccountHasLink: PdxThirdPartyLinkState ThirdPartyAccountHasLink: PdxThirdPartyLinkState BothAccountsHaveLinks: PdxThirdPartyLinkState BothAccountsAreLinked: PdxThirdPartyLinkState endglobal record PlacementParams
requiredIndustryTags: {string} tags: {string} distanceWeights: {string : number} allowedOnLand: boolean allowedOnWater: boolean buildOrder: integer initWeight: integer tier: integer weights: {string : number} endglobal record Platform
Windows: Platform Linux: Platform Mac: Platform XBoxSeries: Platform PS5: Platform PS: Platform XBox: Platform Desktop: Platform Console: Platform endglobal record PlayerStatDesc
id: string endglobal record PlayerStatRep
get: function(playerStatRep : PlayerStatRep, statId : string): PlayerStatDesc endglobal record PlaylistDesc
name: string tracks: {PlaylistTrack} order: integer hidden: boolean allFilter: boolean endglobal record PrecedencePreference
YES: PrecedencePreference NO: PrecedencePreference AUTO: PrecedencePreference endglobal record PreviewColoring
endglobal record Proposal
record EdgeObject
resultEntity: Engine.Entity category: integer modelInstance: ModelInstance playerEntity: Engine.Entity left: boolean endrecord NodeAndEntity
new: function(): NodeAndEntity entity: Engine.Entity comp: Engine.Component.BaseNode endrecord SegmentAndEntity
new: function(): SegmentAndEntity entity: Engine.Entity comp: Engine.Component.BaseEdge type: integer streetEdge: Engine.Component.BaseEdgeStreet emissionEmitter: Engine.Component.EmissionEmitter playerOwned: Engine.Component.PlayerOwned endrecord BaseNodeLaneConnectionAndEntity
new: function(): BaseNodeLaneConnectionAndEntity comp: Engine.Component.BaseNodeConfig entity: Engine.Entity endrecord StreetProposal
addedNodes: {NodeAndEntity} addedNodes_native: Vector<NodeAndEntity> addedSegments: {SegmentAndEntity} addedSegments_native: Vector<SegmentAndEntity> removedSegments: {SegmentAndEntity} removedNodes: {NodeAndEntity} edgeObjectsToAdd: {EdgeObject} new2oldEdgeObjects: {Engine.Entity : {Engine.Entity}} old2newEdgeObjects: {Engine.Entity : {Engine.Entity}} nodeConfigsToAdd: {BaseNodeLaneConnectionAndEntity} nodeConfigsToRemove: {Engine.Entity} endrecord Subconstruction
models: {TransformedModel} models_native: Vector<TransformedModel> metadata: SubconstructionInstanceMetadata station: Station colliders: {Collider} endrecord Construction
subconstructions: {Subconstruction} subconstructions_native: Vector<Subconstruction> fileName: string frozenNodes: {Engine.Entity} frozenEdges: {Engine.Entity} depots: {Engine.Entity} stations: {Engine.Entity} industries: {Engine.Entity} townBuildings: {Engine.Entity} persistentMetadata: ConstructionInstanceMetadata params: {<any type> : <any type>} endrecord StreetTerminal
cargo: boolean passengers: boolean capacity: integer wantSymmetric: boolean cargoUnload: boolean cargoLoad: boolean endnew: function(): Proposal clone: function(Proposal): Proposal proposal: StreetProposal toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> old2new: {Engine.Entity : integer} toAdd: {ConstructionEntity} toAdd_native: Vector<ConstructionEntity> terrain: Terrain endrecord ConstructionEntity
fileName: ResName hasCargoPlatform: boolean desc: ConstructionDesc construction: Construction transf: Mat4f playerEntity: Engine.Entity endglobal record ProposalData
record ConstructionData
boundingVolume: Engine.Component.BoundingVolume subconstructionDatas: {SubconstructionData} subconstructionDatas_native: Vector<SubconstructionData> endrecord CollisionInfo
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} endcollisionInfo: CollisionInfo old2new: {Engine.Entity : integer} toAddData: {ConstructionData} toAddData_native: Vector<ConstructionData> parallelProposal: ParallelStripProposal terrainPreviewHeightModLocations: {Vec3f} terrainPreviewHeightModCutFill: {Vec2f} errorState: ErrorState entity2tn: {Engine.Entity : Engine.Component.TransportNetwork} tpNetLinkProposal: TpNetLinkProposal costs: integer endrecord ParallelStripProposal
toAdd: {Engine.Component.BaseParallelStrip} toAdd_native: Vector<Engine.Component.BaseParallelStrip> toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> endglobal type ResName = stringglobal record RailroadCrossingType
description: ModelMetadata.Description availability: ModelMetadata.Availability menuCategory: ModelMetadata.MenuCategory cost: number speedLimit: number new: function(): RailroadCrossingType soundFileName: string config: {RailroadCrossingType.ConfigEntry} trafficDelay: number crossingMaterial: string categoryList: ModelMetadata.CategoryList isAutoSelectable: boolean endglobal record SaveGameData
new: function(SaveGameData): SaveGameData errorMsg: string info: SaveGameDetails endrecord SaveGameDetails
new: function(SaveGameDetails): SaveGameDetails metadata: GameMetadata mods: {Mod.ModId} configDict: {{string, string}} modParams: {string : {string : integer}} campaign: string mission: string endglobal record SaveGameId
new: function(): SaveGameId path: string saveGameName: string saveGameNamespace: string endglobal record SaveGameInfo
new: function(): SaveGameInfo equals: function(SaveGameInfo, SaveGameInfo): boolean size: integer timestamp: integer path: string modId: ModId saveName: string endglobal record SaveGameType
Manual: SaveGameType Autosave: SaveGameType Crash: SaveGameType Exit: SaveGameType endglobal record SavegameScriptMetadata
endglobal record ScriptParam
new: function(): ScriptParam key: string name: string group: string tooltip: string values: {string} numbers: {number} tooltips: {string} postConstructionModifiable: boolean hideLabel: boolean images: {string} defaultIndex: Index uiType: ScriptParamType location: ScriptParamLocation displayMode: ScriptParamDisplayMode tags: {string} yearFrom: integer yearTo: integer checkEnabledScript: ScriptRef stepValueScript: ScriptRef formatValueScript: ScriptRef endglobal record ScriptParamDisplayMode
Default: ScriptParamDisplayMode Compact: ScriptParamDisplayMode Horizontal: ScriptParamDisplayMode Vertical: ScriptParamDisplayMode Sparse: ScriptParamDisplayMode endglobal record ScriptParamType
Button: ScriptParamType Slider: ScriptParamType ComboBox: ScriptParamType IconButton: ScriptParamType CheckBox: ScriptParamType endglobal record ScriptRef
new: function(): ScriptRef fileName: string params: {<any type> : <any type>} endglobal record Set<T>
contains: function(Set<T>, T): boolean insert: function(Set<T>, T): boolean size: function(Set<T>): integer asTable: function(Set<T>): {T : boolean} endglobal record SignalType
PATH_SIGNAL: SignalType WAYPOINT: SignalType ONE_WAY_PATH_SIGNAL: SignalType endglobal record SimpleProposal
new: function(): SimpleProposalconstructionsToAdd: {ConstructionEntity} constructionsToRemove: {Engine.Entity} old2new: {Engine.Entity : integer} streetProposal: SimpleStreetProposal endrecord ConstructionEntity
new: function(): ConstructionEntity fileName: string params: {<any type> : <any type>} transf: Mat4f name: string playerEntity: Engine.Entity autoFillSlots: boolean endglobal record SimpleStreetProposal
new: function(): SimpleStreetProposal nodesToAdd: {Proposal.NodeAndEntity} edgesToAdd: {Proposal.SegmentAndEntity} nodesToRemove: {Engine.Entity} edgesToRemove: {Engine.Entity} edgeObjectsToAdd: {EdgeObject} edgeObjectsToRemove: {Engine.Entity} nodeConfigsToAdd: {Proposal.BaseNodeLaneConnectionAndEntity} nodeConfigsToRemove: {Engine.Entity} node2rcType: {Engine.Entity : integer} endrecord EdgeObject
new: function(): EdgeObject edgeEntity: Engine.Entity param: number oneWay: boolean left: boolean model: ResName playerEntity: Engine.Entity name: string endglobal record Slot
autoFill: boolean id: integer type: string transf: Mat4f spacing: Vec4f height: number shape: integer alignToTerrain: boolean replaceable: boolean endglobal record SoundAttributes
gain: number refDist: number rolloffFact: number hasVelocity: boolean endglobal record SoundSet
tracks: {SoundClip} events: {string : SoundClipList} updateScript: ScriptRef attrs: SoundAttributes endglobal record StartGameParams
new: function(): StartGameParams numTiles: Vec2i climateGenerator: string terrainGenerator: string economy: string mods: {string} modParams: {string : {string : integer}} seed: string startDate: Date startTimeOfDaySeconds: integer startCloudCoverage: number isMapEditor: boolean generateTowns: boolean generateIndustries: boolean generateAssets: boolean locationsConfig: BaseConfig.Locations endglobal record Station
new: function(): Station tag: integer terminals: {Terminal} catchmentAreas: {CatchmentArea} pool: Pool endglobal type StockId = integerglobal record StationTerminal
new: function(): StationTerminal station: integer terminal: integer endglobal record StockListType
InputStock: StockListType OutputStock: StockListType StorageStock: StockListType endglobal record StopState
empty: boolean noPath: boolean noPathFromAlternative: boolean noPathToAlternative: boolean duplicateStop: boolean incompatibleStop: boolean noPathLocation: boolean endglobal record StreetStyle
categoryList: ModelMetadata.CategoryList trackStraightModel: {string, string, string, string} endglobal record StreetTemplate
new: function(string): StreetTemplate roadType: RoadType description: ModelMetadata.Description availability: ModelMetadata.Availability simBuildable: boolean initiallyLocked: boolean country: boolean laneConfigs: {LaneConfig} transportModesStreet: {TransportMode} modifiers: Modifiers cost: integer maintenanceCost: integer fillGroundTex: ResName sidewalkFillGroundTex: ResName borderGroundTex: ResName streetStyle: ResName defaultEdgeDecorations: {{ResName, boolean}} defaultWithCrosswalk: boolean embankmentSlopeLow: number embankmentSlopeHigh: number maxSlope: number maxSlopeShape: number priority: integer busAndTramRight: boolean pedestrianWalkPenalty: number speedCoeffs: {number} minCurveRadius: number minCurveRadiusBuild: number trackDistance: number maxSlopeBuild: number slopeBuildSteps: number menuCategory: ModelMetadata.MenuCategory emissions: Emissions catenaryAdd: ResName catenaryRemove: ResName builderAudioRes: ResName endglobal record SubconstructionInstanceMetadata
endglobal record TargetDataEntry
entity: Engine.Entity freeCapacity: integer capacity: integer edgeWalk: {integer, integer} edgeDrive: {integer, integer} isIndustry: boolean endglobal record Terminal
vehicleNodeId: NodeId personNodes: {NodeId} personEdges: {EdgeId} vehicleEdges: {EdgePos} tag: integer cargoLoad: boolean passengersLoad: boolean cargoUnload: boolean passengersUnload: boolean transportModes: {TransportMode : boolean}cargoTransferSpeeds: {TerminalCargoTransferSpeed} comfortFactor: number capacity: integer terminalAssignmentWeight: number endrecord TerminalCargoTransferSpeed
cargoTypeSet: CargoTypeSet loadSpeedModifier: number length: number endglobal record TerrainAlignment
triangles: {{Vec3f, Vec3f, Vec3f}} weights: {{number, number, number}} type: TerrainAlignmentType bbox: Box2f endglobal record TerrainAlignmentType
EQUAL: TerrainAlignmentType LESS: TerrainAlignmentType GREATER: TerrainAlignmentType endglobal record TerrainGeneratorDesc
new: function(): TerrainGeneratorDesc desc: ModelMetadata.Description order: integer editorOnly: boolean visible: boolean climate: string nodeTree: string params: {ScriptParam} endglobal record TerrainMaterialType
new: function(): TerrainMaterialType name: string desc: string icon: ResName previewIcon: ResName categories: {string} detailColorTexture: string detailMetalGlossAoHTexture: string detailNormalTexture: string overlayTexture: string detailSize: number overlaySize: number overlayStrength: number hScale: number order: integer menuCategory: ModelMetadata.MenuCategory priority: integer grass: ResName categoryList: ModelMetadata.CategoryList endglobal record TownIndustryGenerationMode
new: function(): TownIndustryGenerationMode numTownsToAdd: integer addIndustries: boolean showExistingTowns: boolean showExistingIndustries: boolean keepExistingTowns: boolean keepExistingIndustries: boolean endglobal record TownInfo
name: string position: Vec2f initialLandUseCapacities: {integer} landUse2CargoNeedsCategories: {LandUseType : {string}} majorStreetAngle: number initialMajorStreetAngle: number capacityScalingFactor: number endglobal record TpNetData
getNodeData: function(TpNetData, NodeId): NodeData getEdgeData: function(TpNetData, EdgeId): EdgeData endglobal record TrafficLightData
state2lockedLanes: {{integer}} state2redLightModelIndices: {{integer}} state2duration: {number} animatedModels: {integer} endglobal record TrafficLightPreference
YES: TrafficLightPreference NO: TrafficLightPreference AUTO: TrafficLightPreference endglobal record TrafficLightType
availability: ModelMetadata.Availability description: ModelMetadata.Description cost: number categoryList: ModelMetadata.CategoryList menuCategory: ModelMetadata.MenuCategory tryOpposite: boolean modelScript: ScriptRef relativePath: string endglobal record TransportMode
PERSON: TransportMode CARGO: TransportMode CAR: TransportMode BUS: TransportMode TRUCK: TransportMode TRAM: TransportMode ELECTRIC_TRAM: TransportMode TRAIN: TransportMode ELECTRIC_TRAIN: TransportMode AIRCRAFT: TransportMode SHIP: TransportMode SMALL_AIRCRAFT: TransportMode SMALL_SHIP: TransportMode HELICOPTER: TransportMode TRAM_TRACK: TransportMode ELECTRIC_TRAM_TRACK: TransportMode endglobal record TransportVehicleConfig
new: function(): TransportVehicleConfig vehicles: {TransportVehiclePart} vehicleGroups: {integer} muFileNames: {string} endglobal record TransportVehiclePart
new: function(): TransportVehiclePart part: VehiclePart purchaseTime: integer maintenanceChange: number maintenanceState: number autoLoadConfig: {boolean} endglobal record TransportVehicleState
IN_DEPOT: TransportVehicleState EN_ROUTE: TransportVehicleState AT_TERMINAL: TransportVehicleState GOING_TO_DEPOT: TransportVehicleState endglobal record UgcAccessLimitedReason
None: UgcAccessLimitedReason NotSignedIn: UgcAccessLimitedReason Restricted: UgcAccessLimitedReason Error: UgcAccessLimitedReason endglobal record UserProfile
getModRep: function(UserProfile): ModRep getLanguageRep: function(UserProfile): LanguageRep getUserName: function(UserProfile): string changeLanguage: function(UserProfile, LangKey) getLanguage: function(UserProfile): LangKey subscribeMod: function(UserProfile, string) unsubscribeMod: function(UserProfile, string) getUnlockedAchievementIds: function(UserProfile): {string : boolean} getAchievementRep: function(UserProfile): AchievementRep getPlayerStatProgress: function(UserProfile, string): number getPlayerStatsProgress: function(UserProfile): {string : number} getLastMission: function(UserProfile, string): {string, SaveGameId} getLastSavegameForMission: function(UserProfile, string, string): SaveGameId getLastGame: function(UserProfile): SaveGameId | MissionCampaign isMissionCompleted: function(UserProfile, string, string): boolean isCurrentMissionCompleted: function(UserProfile): boolean noteEditorsNoteShown: function(UserProfile) isEditorsNoteShown: function(UserProfile) noteMedalState: function(UserProfile, string, boolean) getMedalsState: function(UserProfile, string, string): {string : boolean} noteStarState: function(UserProfile, string, boolean) getStarsState: function(UserProfile, string, string): {string : boolean} hasUgcAccess: function(UserProfile): boolean checkUgcRestrictions: function(UserProfile): boolean hasAgeGroupForUgc: function(UserProfile): boolean getUgcAccessLimitedReason: function(UserProfile): UgcAccessLimitedReason openUrl: function(UserProfile, string) endglobal record Vec2f
new: function(): Vec2f equals: function(Vec2f, Vec2f): boolean clone: function(Vec2f): Vec2f x: number y: number scale: function(s : Vec2f, number): Vec2f normalize: function(Vec2f): Vec2f length: function(Vec2f): number distance: function(a : Vec2f, b : Vec2f): number distance2: function(a : Vec2f, b : Vec2f): number lerp: function(a : Vec2f, b : Vec2f, t : number): Vec2f angle: function(a : Vec2f, b : Vec2f): number rotate: function(angle : Vec2f, number): Vec2f metamethod __add: function(Vec2f, Vec2f): Vec2f endglobal record Vec2i
new: function(): Vec2i equals: function(Vec2i, Vec2i): boolean x: integer y: integer metamethod __add: function(Vec2i, Vec2i): Vec2i endglobal record Vec3f
new: function(): Vec3f equals: function(Vec3f, Vec3f): boolean clone: function(Vec3f): Vec3f x: number y: number z: number scale: function(s : Vec3f, number): Vec3f normalize: function(Vec3f): Vec3f length: function(Vec3f): number distance: function(a : Vec3f, b : Vec3f): number distance2: function(a : Vec3f, b : Vec3f): number distance2_2: function(a : Vec3f, b : Vec3f): number distance_2: function(a : Vec3f, b : Vec3f): number lerp: function(a : Vec3f, b : Vec3f, t : number): Vec3f angle: function(a : Vec3f, b : Vec3f): number dot: function(a : Vec3f, b : Vec3f): number metamethod __add: function(Vec3f, Vec3f): Vec3f endglobal record Vec4f
new: function(): Vec4f equals: function(Vec4f, Vec4f): boolean x: number y: number z: number w: number lerp: function(a : Vec4f, b : Vec4f, t : number): Vec4f metamethod __add: function(Vec4f, Vec4f): Vec4f endglobal record Vec5f
new: function(): Vec5f equals: function(Vec5f, Vec5f): boolean x: number y: number z: number w: number q: number lerp: function(a : Vec5f, b : Vec5f, t : number): Vec5f metamethod __add: function(Vec5f, Vec5f): Vec5f endglobal record Vector<T>
new: function(): Vector<T> at: function(Vector<T>, integer): T pushBack: function(Vector<T>, T) size: function(Vector<T>): integer asTable: function(Vector<T>): {T} clone: function(Vector<T>): Vector<T> endglobal record VehicleData
bounds: VehicleExtent length: number topSpeed: number brakeDeceleration: number carriages: {CarriageData} endglobal record VehicleEngineType
HORSE: VehicleEngineType STEAM: VehicleEngineType ELECTRIC: VehicleEngineType DIESEL: VehicleEngineType endglobal record VehicleIconType
Bus: VehicleIconType Truck: VehicleIconType TrainSteam: VehicleIconType TrainElectric: VehicleIconType TrainDiesel: VehicleIconType Tram: VehicleIconType Aircraft: VehicleIconType Helicopter: VehicleIconType Ship: VehicleIconType endglobal record VehiclePart
new: function(): VehiclePart modelId: integer reversed: boolean compartment2loadConfig: {LoadConfig} color: Vec3f endglobal record VehicleProblem
NoPathElectric: integer NoPathShip: integer NoPathAircraft: integer NoPathGeneric: integer Blocked: integer endglobal record VehicleState
RUNNING: VehicleState STOPPING: VehicleState STOPPED: VehicleState ARRIVED: VehicleState endglobal record Vendor
Steam: Vendor Gog: Vendor Eos: Vendor MacAppstore: Vendor Microsoft: Vendor Sony: Vendor Dev: Vendor endglobal record View
getEye: function(View): Vec3f getCenter: function(View): Vec3f getUp: function(View): Vec3f isVisible: function(view : View, position : Vec3f, radius : number): boolean endglobal record Waypoint
new: function(): Waypoint clone: function(Waypoint): Waypoint equals: function(Waypoint, Waypoint) edgePos: EdgePos pos: Vec3f tag: integer endglobal record ipairs_native<T>
metamethod __call: function(ipairs<T>_native): function() : (integer, T) endglobal record orderedPairs<T, V>
metamethod __call: function(orderedPairs<T, V>, any): function() : (T, V) endglobal recordDef: booleanglobal record pairs_native<T, V>
metamethod __call: function(pairs<T, V>_native): function() : (T, V) end
Category: main🔗
Type🔗
global record Type
ScriptParam: ScriptParam LangKey: LangKey ModDesc: Mod.ModDesc ModId: Mod.ModId KeyCombo: KeyCombo KeyComboDef: KeyComboDef AppConfig: AppConfig enum: Enum Vec5f: Vec5f Vec4f: Vec4f Vec3f: Vec3f Vec2f: Vec2f Mat4f: Mat4f Vec2i: Vec2i Box3: Box3f Box2: Box2f Clock: Clock CommandProgress: CommandProgress LoaderHelper: LoaderHelper Connection: Connection ComponentType: Engine.ComponentType Date: Date JournalEntry: JournalEntry EdgeId: EdgeId EdgePos: EdgePos NodeId: NodeId Waypoint: Waypoint SignalId: SignalId StationTerminal: StationTerminal ScriptRef: ScriptRef ModuleDesc: ModuleDesc ConstructionDesc: ConstructionDesc GameScriptDesc: GameScriptDesc DynamicConstructionTemplate: DynamicConstructionTemplate Line: Engine.Component.Line EmissionGrid: Engine.Component.EmissionGrid MovePathAircraft: Engine.Component.MovePathAircraft TransportVehicle: Engine.Component.TransportVehicle LoadConfig: LoadConfig BaseConfig: BaseConfig CargoTypeSet: CargoTypeSet TransportVehiclePart: TransportVehiclePart TransportVehicleConfig: TransportVehicleConfig Context: Context Proposal: Proposal SimpleProposal: SimpleProposal ProposalData: ProposalData StreetProposal: Proposal.StreetProposal SimpleStreetProposal: SimpleStreetProposal CatchmentArea: CatchmentArea LayerConfig: LayerConfig NodeViewerData: NodeViewerData ParticleParamFloat: ParticleParamFloat ParticleParamVec2f: ParticleParamVec2f ParticleParamCurveFloat: ParticleParamCurveFloat ParticleParamCurveVec2f: ParticleParamCurveVec2f ParticleParamCurveVec3f: ParticleParamCurveVec3f Path: Path PathPos: PathPos AnimationState: Transformator.AnimationState HeighmapGenerationMode: HeighmapGenerationMode TownIndustryGenerationMode: TownIndustryGenerationMode ImportExportHeightmapMode: ImportExportHeightmapMode StreetGenerationMode: StreetGenerationMode Map: GameMap StartGameParams: StartGameParams SaveGameInfo: SaveGameInfo SavegameId: SaveGameId SaveGameDetails: SaveGameData.SaveGameDetails SaveGameData: SaveGameData ChartConfig: ChartConfig FinanceData: FinanceData Failure: Failure NodeAndEntity: Proposal.NodeAndEntity SegmentAndEntity: Proposal.SegmentAndEntity BaseNodeLaneConnectionAndEntity: Proposal.BaseNodeLaneConnectionAndEntity EdgeGeometry: EdgeGeometry MetadataMap: ModelMetadata Collider: Collider mod: Mod modhub: Modhub TrackType: TrackType GenericGameRes: GenericGameRes BridgeType: BridgeType Industry: Engine.Component.Industry StockList: Engine.Component.StockList LineIssue: LineIssue TrafficLightConfig: Engine.Component.TrafficLightConfig TrafficLightState: Engine.Component.TrafficLightState end
Types namespace (used in api.type....)
Type.ScriptParam🔗
Type.ScriptParam: ScriptParam
Type.LangKey🔗
Type.LangKey: LangKey
Type.ModDesc🔗
Type.ModDesc: Mod.ModDesc
Type.ModId🔗
Type.ModId: Mod.ModId
Type.KeyCombo🔗
Type.KeyCombo: KeyCombo
Type.KeyComboDef🔗
Type.KeyComboDef: KeyComboDef
Type.AppConfig🔗
Type.AppConfig: AppConfig
Type.enum🔗
Type.enum: Enum
Type.Vec5f🔗
Type.Vec5f: Vec5f
Type.Vec4f🔗
Type.Vec4f: Vec4f
Type.Vec3f🔗
Type.Vec3f: Vec3f
Type.Vec2f🔗
Type.Vec2f: Vec2f
Type.Mat4f🔗
Type.Mat4f: Mat4f
Type.Vec2i🔗
Type.Vec2i: Vec2i
Type.Box3🔗
Type.Box3: Box3f
Type.Box2🔗
Type.Box2: Box2f
Type.Clock🔗
Type.Clock: Clock
Type.CommandProgress🔗
Type.CommandProgress: CommandProgress
Type.LoaderHelper🔗
Type.LoaderHelper: LoaderHelper
Type.Connection🔗
Type.Connection: Connection
Type.ComponentType🔗
Type.ComponentType: Engine.ComponentType
Type.Date🔗
Type.Date: Date
Type.JournalEntry🔗
Type.JournalEntry: JournalEntry
Type.EdgeId🔗
Type.EdgeId: EdgeId
Type.EdgePos🔗
Type.EdgePos: EdgePos
Type.NodeId🔗
Type.NodeId: NodeId
Type.Waypoint🔗
Type.Waypoint: Waypoint
Type.SignalId🔗
Type.SignalId: SignalId
Type.StationTerminal🔗
Type.StationTerminal: StationTerminal
Type.ScriptRef🔗
Type.ScriptRef: ScriptRef
Type.ModuleDesc🔗
Type.ModuleDesc: ModuleDesc
Type.ConstructionDesc🔗
Type.ConstructionDesc: ConstructionDesc
Type.GameScriptDesc🔗
Type.GameScriptDesc: GameScriptDesc
Type.DynamicConstructionTemplate🔗
Type.DynamicConstructionTemplate: DynamicConstructionTemplate
Type.Line🔗
Type.Line: Engine.Component.Line
Type.EmissionGrid🔗
Type.EmissionGrid: Engine.Component.EmissionGrid
Type.MovePathAircraft🔗
Type.MovePathAircraft: Engine.Component.MovePathAircraft
Type.TransportVehicle🔗
Type.TransportVehicle: Engine.Component.TransportVehicle
Type.LoadConfig🔗
Type.LoadConfig: LoadConfig
Type.BaseConfig🔗
Type.BaseConfig: BaseConfig
Type.CargoTypeSet🔗
Type.CargoTypeSet: CargoTypeSet
Type.TransportVehiclePart🔗
Type.TransportVehiclePart: TransportVehiclePart
Type.TransportVehicleConfig🔗
Type.TransportVehicleConfig: TransportVehicleConfig
Type.Context🔗
Type.Context: Context
Type.Proposal🔗
Type.Proposal: Proposal
Type.SimpleProposal🔗
Type.SimpleProposal: SimpleProposal
Type.ProposalData🔗
Type.ProposalData: ProposalData
Type.StreetProposal🔗
Type.StreetProposal: Proposal.StreetProposal
Type.SimpleStreetProposal🔗
Type.SimpleStreetProposal: SimpleStreetProposal
Type.CatchmentArea🔗
Type.CatchmentArea: CatchmentArea
Type.LayerConfig🔗
Type.LayerConfig: LayerConfig
Type.NodeViewerData🔗
Type.NodeViewerData: NodeViewerData
Type.ParticleParamFloat🔗
Type.ParticleParamFloat: ParticleParamFloat
Type.ParticleParamVec2f🔗
Type.ParticleParamVec2f: ParticleParamVec2f
Type.ParticleParamCurveFloat🔗
Type.ParticleParamCurveFloat: ParticleParamCurveFloat
Type.ParticleParamCurveVec2f🔗
Type.ParticleParamCurveVec2f: ParticleParamCurveVec2f
Type.ParticleParamCurveVec3f🔗
Type.ParticleParamCurveVec3f: ParticleParamCurveVec3f
Type.Path🔗
Type.Path: Path
Type.PathPos🔗
Type.PathPos: PathPos
Type.AnimationState🔗
Type.AnimationState: Transformator.AnimationState
Type.HeighmapGenerationMode🔗
Type.HeighmapGenerationMode: HeighmapGenerationMode
Type.TownIndustryGenerationMode🔗
Type.TownIndustryGenerationMode: TownIndustryGenerationMode
Type.ImportExportHeightmapMode🔗
Type.ImportExportHeightmapMode: ImportExportHeightmapMode
Type.StreetGenerationMode🔗
Type.StreetGenerationMode: StreetGenerationMode
Type.Map🔗
Type.Map: GameMap
Type.StartGameParams🔗
Type.StartGameParams: StartGameParams
Type.SaveGameInfo🔗
Type.SaveGameInfo: SaveGameInfo
Type.SavegameId🔗
Type.SavegameId: SaveGameId
Type.SaveGameDetails🔗
Type.SaveGameDetails: SaveGameData.SaveGameDetails
Type.SaveGameData🔗
Type.SaveGameData: SaveGameData
Type.ChartConfig🔗
Type.ChartConfig: ChartConfig
Type.FinanceData🔗
Type.FinanceData: FinanceData
Type.Failure🔗
Type.Failure: Failure
Type.NodeAndEntity🔗
Type.NodeAndEntity: Proposal.NodeAndEntity
Type.SegmentAndEntity🔗
Type.SegmentAndEntity: Proposal.SegmentAndEntity
Type.BaseNodeLaneConnectionAndEntity🔗
Type.BaseNodeLaneConnectionAndEntity: Proposal.BaseNodeLaneConnectionAndEntity
Type.EdgeGeometry🔗
Type.EdgeGeometry: EdgeGeometry
Type.MetadataMap🔗
Type.MetadataMap: ModelMetadata
Type.Collider🔗
Type.Collider: Collider
Type.mod🔗
Type.mod: Mod
Type.modhub🔗
Type.modhub: Modhub
Type.TrackType🔗
Type.TrackType: TrackType
Type.GenericGameRes🔗
Type.GenericGameRes: GenericGameRes
Type.BridgeType🔗
Type.BridgeType: BridgeType
Type.Industry🔗
Type.Industry: Engine.Component.Industry
Type.StockList🔗
Type.StockList: Engine.Component.StockList
Type.LineIssue🔗
Type.LineIssue: LineIssue
Type.TrafficLightConfig🔗
Type.TrafficLightConfig: Engine.Component.TrafficLightConfig
Type.TrafficLightState🔗
Type.TrafficLightState: Engine.Component.TrafficLightState
Category: globals🔗
AchievementDesc🔗
global record AchievementDesc
id: string name: string description: string icon: string lockedIcon: string grade: string hidden: boolean campaign: string alwaysEarnable: boolean score: integer playerStatTarget: PlayerStatProgress end
The description of an achievement
AchievementDesc.id🔗
AchievementDesc.id: string
The unique id as a string
AchievementDesc.name🔗
AchievementDesc.name: string
The display name of the achievement
AchievementDesc.description🔗
AchievementDesc.description: string
The description of the acheivement
AchievementDesc.icon🔗
AchievementDesc.icon: string
The icon once completed of the achievement
AchievementDesc.lockedIcon🔗
AchievementDesc.lockedIcon: string
The icon while not yet completed
AchievementDesc.grade🔗
AchievementDesc.grade: string
The grade of the achievement for platform that supports it
AchievementDesc.hidden🔗
AchievementDesc.hidden: boolean
If the achievement is hidden until it's completed
AchievementDesc.campaign🔗
AchievementDesc.campaign: string
If it's a campaign achievement
AchievementDesc.alwaysEarnable🔗
AchievementDesc.alwaysEarnable: boolean
If the achievement can always be earned regardless
AchievementDesc.score🔗
AchievementDesc.score: integer
The score (points) earned when completing the achievements for platforms that supports it
AchievementDesc.playerStatTarget🔗
AchievementDesc.playerStatTarget: PlayerStatProgress
The player start value to reach to unlock the achievement (optional)
AchievementRep🔗
global record AchievementRep
getNumAchievements: function(achievementRep : AchievementRep): integer get: function(achievementRep : AchievementRep, index : integer): AchievementDesc end
Repository for all achievement types (static data)
To access the current state of a player achievements, use UserProfile:getUnlockedAchievementIds
AchievementRep.getNumAchievements🔗
function AchievementRep.getNumAchievements(achievementRep : AchievementRep): integer
Get the number of achievement types
ParametersachievementRep:AchievementRep— the achievement rep
integer— the number of achievements
AchievementRep.get🔗
function AchievementRep.get(achievementRep : AchievementRep, index : integer): AchievementDesc
Get an achievement data by its index
ParametersachievementRep:AchievementRep— the achievement repindex:integer— the achievement index (usegetNumAchievementsto iterate over all achievement types)
AchievementDesc— the achievement desc
AircraftInfo🔗
global record AircraftInfo
weight: number topSpeed: number landingDistance: number maxThrust: number idleThrust: number mainGear: Vec2f bodyAngle: number forwardOffset: number backwardOffset: number taxiHoldOffset: number hasFlaps: boolean isHelicopter: boolean end
Movement information for aircraft
AircraftInfo.weight🔗
AircraftInfo.weight: number
Aircraft weight (in kg)
AircraftInfo.topSpeed🔗
AircraftInfo.topSpeed: number
Maximum speed (in m/s)
AircraftInfo.landingDistance🔗
AircraftInfo.landingDistance: number
Distance required for landing (in meters)
AircraftInfo.maxThrust🔗
AircraftInfo.maxThrust: number
Maximum engine thrust (in kN)
AircraftInfo.idleThrust🔗
AircraftInfo.idleThrust: number
Idle engine thrust (in kN)
AircraftInfo.mainGear🔗
AircraftInfo.mainGear: Vec2f
Position of main landing gear
AircraftInfo.bodyAngle🔗
AircraftInfo.bodyAngle: number
AircraftInfo.forwardOffset🔗
AircraftInfo.forwardOffset: number
How far forward the front of the airfract is (in meters)
AircraftInfo.backwardOffset🔗
AircraftInfo.backwardOffset: number
How far backwards the front of the airfract is (in meters)
AircraftInfo.taxiHoldOffset🔗
AircraftInfo.taxiHoldOffset: number
How far from the hold line the aircraft is supposed to wait (meters)
AircraftInfo.hasFlaps🔗
AircraftInfo.hasFlaps: boolean
Whether the aircraft has flaps
AircraftInfo.isHelicopter🔗
AircraftInfo.isHelicopter: boolean
Whether this is a helicopter
AnyAxis🔗
global record AnyAxis
end
AnyKey🔗
global record AnyKey
end
AppConfig🔗
global record AppConfig
new: function(AppConfig): AppConfig equals: function(AppConfig, AppConfig): boolean distanceSpeedUnit: DistanceSpeedUnit mainMenuState: {<any type> : <any type>} enableKeyboardMouse: boolean keyCmdDefinitions: {string : {KeyComboDef}} moneyPrefix: string cameraTool: boolean showReleaseNotes: boolean hasShownInitialDeluxeThankYou: boolean updateMessageID: integer debugMode: boolean guideSystemActive: boolean experimentalTerrainGeneratorEditor: boolean experimentalMapFeatures: boolean screenMode: integer enableSeamlessStreetBuilder: boolean showIntelHDwarning: boolean showLicenseAgreement: boolean musicEnabled: boolean menuMusicEnabled: boolean voiceOverEnabled: boolean masterVolume: number soundVolume: number musicVolume: number voiceOverVolume: number audioEffectSettings: AudioEffectSettings experimentalTunnelAndBridgeMinHeight: boolean resolutionScale: number cssEffectsVelocity: number end
Game settings
AppConfig.new🔗
function AppConfig.new(AppConfig): AppConfigParameters
AppConfig
AppConfig
AppConfig.equals🔗
function AppConfig.equals(AppConfig, AppConfig): booleanParameters
AppConfigAppConfig
boolean
AppConfig.distanceSpeedUnit🔗
AppConfig.distanceSpeedUnit: DistanceSpeedUnit
Unit of measurement for distance
AppConfig.mainMenuState🔗
AppConfig.mainMenuState: {<any type> : <any type>}
Main menu state data (filled by the UI scripts to persist things like the list of active mods)
AppConfig.enableKeyboardMouse🔗
AppConfig.enableKeyboardMouse: boolean
Whether keyboard and mouse input is enabled
AppConfig.keyCmdDefinitions🔗
AppConfig.keyCmdDefinitions: {string : {KeyComboDef}}
Keybindings (stored settings_keys_v*.lua)
AppConfig.moneyPrefix🔗
AppConfig.moneyPrefix: string
Prefix for money display
AppConfig.cameraTool🔗
AppConfig.cameraTool: boolean
Whether camera tool is enabled
AppConfig.showReleaseNotes🔗
AppConfig.showReleaseNotes: boolean
Whether to show release notes
AppConfig.hasShownInitialDeluxeThankYou🔗
AppConfig.hasShownInitialDeluxeThankYou: boolean
Whether an initial thank you message for owning deluxe edition has been shown before
AppConfig.updateMessageID🔗
AppConfig.updateMessageID: integer
Last update message ID shown
AppConfig.debugMode🔗
AppConfig.debugMode: boolean
Whether debug mode is enabled
AppConfig.guideSystemActive🔗
AppConfig.guideSystemActive: boolean
Whether guide system is active
AppConfig.experimentalTerrainGeneratorEditor🔗
AppConfig.experimentalTerrainGeneratorEditor: boolean
Whether the terrain node graph editor is enabled
AppConfig.experimentalMapFeatures🔗
AppConfig.experimentalMapFeatures: boolean
Whether experimental map features are enabled
AppConfig.screenMode🔗
AppConfig.screenMode: integer
Screen mode setting (WINDOWED = 0, BORDERLESS = 1, FULLSCREEN = 2)
AppConfig.enableSeamlessStreetBuilder🔗
AppConfig.enableSeamlessStreetBuilder: boolean
Whether to enable the seamless construction mode for the street builder
AppConfig.showIntelHDwarning🔗
AppConfig.showIntelHDwarning: boolean
Display unsupported hardware info
AppConfig.showLicenseAgreement🔗
AppConfig.showLicenseAgreement: boolean
AppConfig.musicEnabled🔗
AppConfig.musicEnabled: boolean
Whether music is enabled
AppConfig.menuMusicEnabled🔗
AppConfig.menuMusicEnabled: boolean
Whether menu music is enabled
AppConfig.voiceOverEnabled🔗
AppConfig.voiceOverEnabled: boolean
Whether voice-over is enabled
AppConfig.masterVolume🔗
AppConfig.masterVolume: number
Master volume level
AppConfig.soundVolume🔗
AppConfig.soundVolume: number
Sound effects volume level
AppConfig.musicVolume🔗
AppConfig.musicVolume: number
Music volume level
AppConfig.voiceOverVolume🔗
AppConfig.voiceOverVolume: number
Voice-over volume level
AppConfig.audioEffectSettings🔗
AppConfig.audioEffectSettings: AudioEffectSettings
Audio effect settings
AppConfig.experimentalTunnelAndBridgeMinHeight🔗
AppConfig.experimentalTunnelAndBridgeMinHeight: boolean
Enable experimental tunnel/bridge height settings
AppConfig.resolutionScale🔗
AppConfig.resolutionScale: number
Render extent scale for in-game viewport
AppConfig.cssEffectsVelocity🔗
AppConfig.cssEffectsVelocity: number
Async🔗
global record Async<T>
isCompleted: function(Async<T>): boolean get: function(Async<T>): T abort: function(Async<T>) getProgressMonitor: function(Async<T>): App.ProgressMonitor end
Asynchronous operation wrapper for background tasks
Type Parameters
T
Async.isCompleted🔗
function Async.isCompleted(Async<T>): booleanParameters
Async<T>
boolean
Async.get🔗
function Async.get(Async<T>): T
Block until the task is complete and then return its result
ParametersAsync<T>
T
Async.abort🔗
function Async.abort(Async<T>)Parameters
Async<T>
Async.getProgressMonitor🔗
function Async.getProgressMonitor(Async<T>): App.ProgressMonitorParameters
Async<T>
App.ProgressMonitor
AudioEffectSettings🔗
Specification for audio settings
AudioEffectSettings.bulldozer🔗
AudioEffectSettings.bulldozer: boolean
Bulldozer sound effects enabled
AudioEffectSettings.construction🔗
AudioEffectSettings.construction: boolean
Construction sound effects enabled
AutoGroundTex🔗
global record AutoGroundTex
new: function(): AutoGroundTex category: string gridSize: integer countFrom: integer countTo: integer groundTex: string individual: boolean individualCategory: string end
Specification for auto-generated ground textures
AutoGroundTex.new🔗
function AutoGroundTex.new(): AutoGroundTexReturns
AutoGroundTex
AutoGroundTex.category🔗
AutoGroundTex.category: string
AutoGroundTex.gridSize🔗
AutoGroundTex.gridSize: integer
AutoGroundTex.countFrom🔗
AutoGroundTex.countFrom: integer
AutoGroundTex.countTo🔗
AutoGroundTex.countTo: integer
AutoGroundTex.groundTex🔗
AutoGroundTex.groundTex: string
AutoGroundTex.individual🔗
AutoGroundTex.individual: boolean
AutoGroundTex.individualCategory🔗
AutoGroundTex.individualCategory: string
BaseConfig🔗
global record BaseConfig
record AdvancedOptions
trafficSpeedSensitivityScale: number vehicleMaintenanceEmissionsEffect: number vehicleMaintenancePerformanceEffect: number vehicleMaintenanceRunningCostsEffect: number missionVehicleMaintenanceDisableRepair: boolean missionDisableTunnelBuilding: boolean missionEmissionsScriptFactor: number simPersonHappinessDecayAtVehicle: number simPersonHappinessDecayAtTerminal: number subventionMode: integer subventionRisk: integer subventionFinancialRewardMultiplier: number landmarkResources: number isReforestationActive: boolean endrecord Animal
new: function(): Animal populationDensityMultiplier: number useLocalSpawning: boolean localTileSize: number notifyAnimalDespawn: boolean endrecord Locations
new: function(): Locationsrecord IndustryParamList
new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number endtown: TownParamList industry: IndustryParamList makeInitialStreets: boolean endrecord TownParamList
new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number endrecord Terrain
lodErrorMultiplier: number endrecord Economy
new: function(): EconomycargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment endrecord IndustryDevelopment
spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number endrecord Settings
new: function(): SettingsgeometryQualityOptions: {GeometryQualityOption} endrecord GeometryQualityOption
new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number endanimal: Animal locations: Locations settings: Settings particles: Particles water: Water emission: Emissions scaffold: {string : {string : {string}}} costs: {string : number} advancedOptions: AdvancedOptions economy: Economy terrain: Terrain environment: ResName economyId: ResName nameId: ResName climate: ResName trackCatenaryYearFrom: integer busLaneYearFrom: integer terrainToolMinStrength: number terrainToolMaxStrength: number enforceMainConnections: boolean townDevelopInterval: number chargeMaintenanceInterval: number simulateCargoWeight: boolean simPersonDestinationRecomputationProbability: number townMajorStreetAngleRange: number townConnectionMaxBridgeLength: number maxVehicleCloneAmount: number trainAccelerationFactor: number trainBrakeDeceleration: number terrainToolMinSize: number terrainToolMaxSize: number terrainToolScale: number terrainToolMaxSizeEditor: number terrainPainterMinSize: number terrainPainterMaxSize: number terrainPainterMaxSizeEditor: number terrainPainterScale: number assetBrushMinSize: number assetBrushMaxSize: number assetBrushScale: number treeCostYearMultipliers: {integer : number} townInitialMajorStreetAngleRange: number townCapacityScalingFactor: number sandboxMode: boolean noCosts: boolean constructionScript: ScriptRef endrecord Emissions
noiseLowerBoundDB: number noiseUpperBoundDB: number pollutionLowerBoundDB: number pollutionUpperBoundDB: number townNoiseResidentialAffected: boolean townNoiseCommercialAffected: boolean townNoiseIndustrialAffected: boolean end
Base configuration of a single game
BaseConfig.AdvancedOptions🔗
record BaseConfig.AdvancedOptions
trafficSpeedSensitivityScale: number vehicleMaintenanceEmissionsEffect: number vehicleMaintenancePerformanceEffect: number vehicleMaintenanceRunningCostsEffect: number missionVehicleMaintenanceDisableRepair: boolean missionDisableTunnelBuilding: boolean missionEmissionsScriptFactor: number simPersonHappinessDecayAtVehicle: number simPersonHappinessDecayAtTerminal: number subventionMode: integer subventionRisk: integer subventionFinancialRewardMultiplier: number landmarkResources: number isReforestationActive: boolean end
Advanced gameplay option
BaseConfig.AdvancedOptions.trafficSpeedSensitivityScale🔗
BaseConfig.AdvancedOptions.trafficSpeedSensitivityScale: number
BaseConfig.AdvancedOptions.vehicleMaintenanceEmissionsEffect🔗
BaseConfig.AdvancedOptions.vehicleMaintenanceEmissionsEffect: number
BaseConfig.AdvancedOptions.vehicleMaintenancePerformanceEffect🔗
BaseConfig.AdvancedOptions.vehicleMaintenancePerformanceEffect: number
BaseConfig.AdvancedOptions.vehicleMaintenanceRunningCostsEffect🔗
BaseConfig.AdvancedOptions.vehicleMaintenanceRunningCostsEffect: number
BaseConfig.AdvancedOptions.missionVehicleMaintenanceDisableRepair🔗
BaseConfig.AdvancedOptions.missionVehicleMaintenanceDisableRepair: boolean
BaseConfig.AdvancedOptions.missionDisableTunnelBuilding🔗
BaseConfig.AdvancedOptions.missionDisableTunnelBuilding: boolean
BaseConfig.AdvancedOptions.missionEmissionsScriptFactor🔗
BaseConfig.AdvancedOptions.missionEmissionsScriptFactor: number
BaseConfig.AdvancedOptions.simPersonHappinessDecayAtVehicle🔗
BaseConfig.AdvancedOptions.simPersonHappinessDecayAtVehicle: number
BaseConfig.AdvancedOptions.simPersonHappinessDecayAtTerminal🔗
BaseConfig.AdvancedOptions.simPersonHappinessDecayAtTerminal: number
BaseConfig.AdvancedOptions.subventionMode🔗
BaseConfig.AdvancedOptions.subventionMode: integer
BaseConfig.AdvancedOptions.subventionRisk🔗
BaseConfig.AdvancedOptions.subventionRisk: integer
BaseConfig.AdvancedOptions.subventionFinancialRewardMultiplier🔗
BaseConfig.AdvancedOptions.subventionFinancialRewardMultiplier: number
BaseConfig.AdvancedOptions.landmarkResources🔗
BaseConfig.AdvancedOptions.landmarkResources: number
BaseConfig.AdvancedOptions.isReforestationActive🔗
BaseConfig.AdvancedOptions.isReforestationActive: boolean
BaseConfig.Animal🔗
record BaseConfig.Animal
new: function(): Animal populationDensityMultiplier: number useLocalSpawning: boolean localTileSize: number notifyAnimalDespawn: boolean end
Configuration for animal spawning
BaseConfig.Animal.new🔗
function BaseConfig.Animal.new(): Animal
Creates a new object of type Animal
ReturnsAnimal
BaseConfig.Animal.populationDensityMultiplier🔗
BaseConfig.Animal.populationDensityMultiplier: number
Multiply the density (in square exemplars per square km) by this factor for all animals
BaseConfig.Animal.useLocalSpawning🔗
BaseConfig.Animal.useLocalSpawning: boolean
Spawning only looks at the existing population within localTileSize squared boxes instead of the entire map (results in density
more similarly distributed to the actual scoring functions)
BaseConfig.Animal.localTileSize🔗
BaseConfig.Animal.localTileSize: number
Size used for controlling local spawning
BaseConfig.Animal.notifyAnimalDespawn🔗
BaseConfig.Animal.notifyAnimalDespawn: boolean
Add notification when a named animal despawns
BaseConfig.Locations🔗
record BaseConfig.Locations
new: function(): Locationsrecord IndustryParamList
new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number endtown: TownParamList industry: IndustryParamList makeInitialStreets: boolean endrecord TownParamList
new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number end
Configuration for the placement of industry and towns on max generation
BaseConfig.Locations.new🔗
function BaseConfig.Locations.new(): Locations
Creates a new object of type Locations
ReturnsLocations
BaseConfig.Locations.IndustryParamList🔗
record BaseConfig.Locations.IndustryParamList
new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number end
Configuration parameters for industries
BaseConfig.Locations.IndustryParamList.new🔗
function BaseConfig.Locations.IndustryParamList.new(): IndustryParamList
Creates a new object of type IndustryParamList
ReturnsIndustryParamList
BaseConfig.Locations.IndustryParamList.absoluteMinimum🔗
BaseConfig.Locations.IndustryParamList.absoluteMinimum: integer
Spawning will ensure at least this number of industries is present on the map
BaseConfig.Locations.IndustryParamList.maxNumberPerArea🔗
BaseConfig.Locations.IndustryParamList.maxNumberPerArea: number
Spawning will ensure that the density per square km will not exceed this number
BaseConfig.Locations.IndustryParamList.industryDensity🔗
BaseConfig.Locations.IndustryParamList.industryDensity: number
Spawning will try to spawn this number of industries
BaseConfig.Locations.IndustryParamList.randomSize🔗
BaseConfig.Locations.IndustryParamList.randomSize: boolean
Productivity will be randomized slightly to induce more variation
BaseConfig.Locations.IndustryParamList.industryProductivity🔗
BaseConfig.Locations.IndustryParamList.industryProductivity: number
Scale the industry productivity by this factor
BaseConfig.Locations.TownParamList🔗
record BaseConfig.Locations.TownParamList
new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number end
Configuration parameters for towns
BaseConfig.Locations.TownParamList.new🔗
function BaseConfig.Locations.TownParamList.new(): TownParamList
Creates a new object of type TownParamList
ReturnsTownParamList
BaseConfig.Locations.TownParamList.maxNumberPerArea🔗
BaseConfig.Locations.TownParamList.maxNumberPerArea: number
Spawning will ensure at most this density per square km
BaseConfig.Locations.TownParamList.allowInRoughTerrain🔗
BaseConfig.Locations.TownParamList.allowInRoughTerrain: boolean
Town will be able to spawn in uneven and slightly unsuitable terrain, the resulting town might
be smaller than it's target size
BaseConfig.Locations.TownParamList.townFrequency🔗
BaseConfig.Locations.TownParamList.townFrequency: number
Number of towns per sqm
BaseConfig.Locations.TownParamList.populationDensity🔗
BaseConfig.Locations.TownParamList.populationDensity: number
Population will be scaled by this factor
BaseConfig.Locations.town🔗
BaseConfig.Locations.town: TownParamList
Configuration for town spawning at map generation
BaseConfig.Locations.industry🔗
BaseConfig.Locations.industry: IndustryParamList
Configuration for industry spawning at map generation
BaseConfig.Locations.makeInitialStreets🔗
BaseConfig.Locations.makeInitialStreets: boolean
Add small streets at the edge of industries
BaseConfig.Terrain🔗
record BaseConfig.Terrain
lodErrorMultiplier: number end
Configuration for the terrain mesh (Deprecated)
BaseConfig.Terrain.lodErrorMultiplier🔗
BaseConfig.Terrain.lodErrorMultiplier: number
(Deprecated) Only used with legacy terrain, determines the quality of the terrain mesh
BaseConfig.Economy🔗
record BaseConfig.Economy
new: function(): EconomycargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment endrecord IndustryDevelopment
spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number end
Configures cargo relations and industry developement for a single game
BaseConfig.Economy.new🔗
function BaseConfig.Economy.new(): Economy
Creates a new empty economy
ReturnsEconomy
BaseConfig.Economy.TownDevelopment🔗
record BaseConfig.Economy.TownDevelopment
cargoNeedsPerTown: integer townGrowthMinDistrictFraction: number end
Parameters for the town developement
BaseConfig.Economy.TownDevelopment.cargoNeedsPerTown🔗
BaseConfig.Economy.TownDevelopment.cargoNeedsPerTown: integer
Number of initial cargo needs when the town ist first built
BaseConfig.Economy.TownDevelopment.townGrowthMinDistrictFraction🔗
BaseConfig.Economy.TownDevelopment.townGrowthMinDistrictFraction: number
The minimum a distric fraction (compared to other disctricts) can shrink
BaseConfig.Economy.IndustryDevelopment🔗
record BaseConfig.Economy.IndustryDevelopment
spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number end
Parameters for the industry developement
BaseConfig.Economy.IndustryDevelopment.spawnTargetTimeSpan🔗
BaseConfig.Economy.IndustryDevelopment.spawnTargetTimeSpan: number
Unused
BaseConfig.Economy.IndustryDevelopment.spawnProbabilityExponent🔗
BaseConfig.Economy.IndustryDevelopment.spawnProbabilityExponent: number
Control the frequency at which enw industries appear
BaseConfig.Economy.IndustryDevelopment.spawnIndustries🔗
BaseConfig.Economy.IndustryDevelopment.spawnIndustries: boolean
Control whether new industry might spawn on the map
BaseConfig.Economy.IndustryDevelopment.unusedTimeSpan🔗
BaseConfig.Economy.IndustryDevelopment.unusedTimeSpan: number
Control the mean time after which an industry will begin closing after not being used
BaseConfig.Economy.IndustryDevelopment.closureCountdownTimeSpan🔗
BaseConfig.Economy.IndustryDevelopment.closureCountdownTimeSpan: number
Controls the grace period the player has to prevent closure
BaseConfig.Economy.IndustryDevelopment.closureProbability🔗
BaseConfig.Economy.IndustryDevelopment.closureProbability: number
Controls how likely an unused industry has of being closed
BaseConfig.Economy.IndustryDevelopment.extendTimeSpan🔗
BaseConfig.Economy.IndustryDevelopment.extendTimeSpan: number
Control how often the industry will build new satellites
BaseConfig.Economy.cargoIncomeScript🔗
BaseConfig.Economy.cargoIncomeScript: ScriptRef
A script reference controlling the income of a given cargo given specific parameters
BaseConfig.Economy.passengerIncomeScript🔗
BaseConfig.Economy.passengerIncomeScript: ScriptRef
A script reference controlling the income of a given passengers given specific parameters
BaseConfig.Economy.townDevelopment🔗
BaseConfig.Economy.townDevelopment: TownDevelopment
Controls the automatic development of towns
BaseConfig.Economy.industryDevelopment🔗
BaseConfig.Economy.industryDevelopment: IndustryDevelopment
Controls the automatic developement of industries
BaseConfig.Settings🔗
record BaseConfig.Settings
new: function(): SettingsgeometryQualityOptions: {GeometryQualityOption} endrecord GeometryQualityOption
new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number end
Graphic settings for main quality modes, camera tool and cockpit
BaseConfig.Settings.new🔗
function BaseConfig.Settings.new(): Settings
Creates a new graphic settings parameters
ReturnsSettings
BaseConfig.Settings.GeometryQualityOption🔗
record BaseConfig.Settings.GeometryQualityOption
new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number end
Contains information about graphi quality of a single game
BaseConfig.Settings.GeometryQualityOption.new🔗
function BaseConfig.Settings.GeometryQualityOption.new(): GeometryQualityOption
Creates a new GeometryQualityOption
ReturnsGeometryQualityOption
BaseConfig.Settings.GeometryQualityOption.viewNearFar🔗
BaseConfig.Settings.GeometryQualityOption.viewNearFar: Vec2f
Distance im meters of near and far plane
BaseConfig.Settings.GeometryQualityOption.fogStartEndFarPerc🔗
BaseConfig.Settings.GeometryQualityOption.fogStartEndFarPerc: Vec2f
Unused
BaseConfig.Settings.GeometryQualityOption.lodDistanceScaling🔗
BaseConfig.Settings.GeometryQualityOption.lodDistanceScaling: number
A factor multiplying all lod distances
BaseConfig.Settings.geometryQualityOptions🔗
BaseConfig.Settings.geometryQualityOptions: {GeometryQualityOption}
Quality settings for: {low, medium, high, cockpit, camera tool}
BaseConfig.Water🔗
Configures water look and feel
BaseConfig.Water.Textures🔗
Configures water textures
BaseConfig.Water.Textures.foamNormal🔗
BaseConfig.Water.Textures.foamNormal: string
Normal texture for water foam
BaseConfig.Water.Textures.foamDetail🔗
BaseConfig.Water.Textures.foamDetail: string
Extra detail texture for water foam
BaseConfig.Water.Textures.foam🔗
BaseConfig.Water.Textures.foam: string
Albedo texture for water foam
BaseConfig.Water.textures🔗
BaseConfig.Water.textures: Textures
Configures water textures
BaseConfig.Particles🔗
BaseConfig.Particles.Textures🔗
record BaseConfig.Particles.Textures
noise0: string noise1: string smoke: string smokeNormal: string end
BaseConfig.Particles.Textures.noise0🔗
BaseConfig.Particles.Textures.noise0: string
BaseConfig.Particles.Textures.noise1🔗
BaseConfig.Particles.Textures.noise1: string
BaseConfig.Particles.Textures.smoke🔗
BaseConfig.Particles.Textures.smoke: string
BaseConfig.Particles.Textures.smokeNormal🔗
BaseConfig.Particles.Textures.smokeNormal: string
BaseConfig.Particles.textures🔗
BaseConfig.Particles.textures: Textures
BaseConfig.Emissions🔗
record BaseConfig.Emissions
noiseLowerBoundDB: number noiseUpperBoundDB: number pollutionLowerBoundDB: number pollutionUpperBoundDB: number townNoiseResidentialAffected: boolean townNoiseCommercialAffected: boolean townNoiseIndustrialAffected: boolean end
BaseConfig.Emissions.noiseLowerBoundDB🔗
BaseConfig.Emissions.noiseLowerBoundDB: number
BaseConfig.Emissions.noiseUpperBoundDB🔗
BaseConfig.Emissions.noiseUpperBoundDB: number
BaseConfig.Emissions.pollutionLowerBoundDB🔗
BaseConfig.Emissions.pollutionLowerBoundDB: number
BaseConfig.Emissions.pollutionUpperBoundDB🔗
BaseConfig.Emissions.pollutionUpperBoundDB: number
BaseConfig.Emissions.townNoiseResidentialAffected🔗
BaseConfig.Emissions.townNoiseResidentialAffected: boolean
BaseConfig.Emissions.townNoiseCommercialAffected🔗
BaseConfig.Emissions.townNoiseCommercialAffected: boolean
BaseConfig.Emissions.townNoiseIndustrialAffected🔗
BaseConfig.Emissions.townNoiseIndustrialAffected: boolean
BaseConfig.animal🔗
BaseConfig.animal: Animal
Defines the properties of an animal
BaseConfig.locations🔗
BaseConfig.locations: Locations
BaseConfig.settings🔗
BaseConfig.settings: Settings
BaseConfig.particles🔗
BaseConfig.particles: Particles
BaseConfig.water🔗
BaseConfig.water: Water
BaseConfig.emission🔗
BaseConfig.emission: Emissions
BaseConfig.scaffold🔗
BaseConfig.scaffold: {string : {string : {string}}}
BaseConfig.costs🔗
BaseConfig.costs: {string : number}
BaseConfig.advancedOptions🔗
BaseConfig.advancedOptions: AdvancedOptions
BaseConfig.economy🔗
BaseConfig.economy: Economy
BaseConfig.terrain🔗
BaseConfig.terrain: Terrain
BaseConfig.environment🔗
BaseConfig.environment: ResName
BaseConfig.economyId🔗
BaseConfig.economyId: ResName
BaseConfig.nameId🔗
BaseConfig.nameId: ResName
BaseConfig.climate🔗
BaseConfig.climate: ResName
BaseConfig.trackCatenaryYearFrom🔗
BaseConfig.trackCatenaryYearFrom: integer
BaseConfig.busLaneYearFrom🔗
BaseConfig.busLaneYearFrom: integer
BaseConfig.terrainToolMinStrength🔗
BaseConfig.terrainToolMinStrength: number
BaseConfig.terrainToolMaxStrength🔗
BaseConfig.terrainToolMaxStrength: number
BaseConfig.enforceMainConnections🔗
BaseConfig.enforceMainConnections: boolean
BaseConfig.townDevelopInterval🔗
BaseConfig.townDevelopInterval: number
BaseConfig.chargeMaintenanceInterval🔗
BaseConfig.chargeMaintenanceInterval: number
BaseConfig.simulateCargoWeight🔗
BaseConfig.simulateCargoWeight: boolean
BaseConfig.simPersonDestinationRecomputationProbability🔗
BaseConfig.simPersonDestinationRecomputationProbability: number
BaseConfig.townMajorStreetAngleRange🔗
BaseConfig.townMajorStreetAngleRange: number
BaseConfig.townConnectionMaxBridgeLength🔗
BaseConfig.townConnectionMaxBridgeLength: number
BaseConfig.maxVehicleCloneAmount🔗
BaseConfig.maxVehicleCloneAmount: number
BaseConfig.trainAccelerationFactor🔗
BaseConfig.trainAccelerationFactor: number
BaseConfig.trainBrakeDeceleration🔗
BaseConfig.trainBrakeDeceleration: number
BaseConfig.terrainToolMinSize🔗
BaseConfig.terrainToolMinSize: number
BaseConfig.terrainToolMaxSize🔗
BaseConfig.terrainToolMaxSize: number
BaseConfig.terrainToolScale🔗
BaseConfig.terrainToolScale: number
BaseConfig.terrainToolMaxSizeEditor🔗
BaseConfig.terrainToolMaxSizeEditor: number
BaseConfig.terrainPainterMinSize🔗
BaseConfig.terrainPainterMinSize: number
BaseConfig.terrainPainterMaxSize🔗
BaseConfig.terrainPainterMaxSize: number
BaseConfig.terrainPainterMaxSizeEditor🔗
BaseConfig.terrainPainterMaxSizeEditor: number
BaseConfig.terrainPainterScale🔗
BaseConfig.terrainPainterScale: number
BaseConfig.assetBrushMinSize🔗
BaseConfig.assetBrushMinSize: number
BaseConfig.assetBrushMaxSize🔗
BaseConfig.assetBrushMaxSize: number
BaseConfig.assetBrushScale🔗
BaseConfig.assetBrushScale: number
BaseConfig.treeCostYearMultipliers🔗
BaseConfig.treeCostYearMultipliers: {integer : number}
BaseConfig.townInitialMajorStreetAngleRange🔗
BaseConfig.townInitialMajorStreetAngleRange: number
BaseConfig.townCapacityScalingFactor🔗
BaseConfig.townCapacityScalingFactor: number
BaseConfig.sandboxMode🔗
BaseConfig.sandboxMode: boolean
BaseConfig.noCosts🔗
BaseConfig.noCosts: boolean
BaseConfig.constructionScript🔗
BaseConfig.constructionScript: ScriptRef
BaseEdgeType🔗
Base edge type
BaseEdgeType.NORMAL🔗
BaseEdgeType.NORMAL: BaseEdgeType
BaseEdgeType.BRIDGE🔗
BaseEdgeType.BRIDGE: BaseEdgeType
BaseEdgeType.TUNNEL🔗
BaseEdgeType.TUNNEL: BaseEdgeType
BoundingInfo🔗
Information about the axis aligned bounding box of the model
BoundingInfo.new()🔗
function BoundingInfo.new()(): BoundingInfo
Creates a new empty bounding info
ReturnsBoundingInfo
BoundingInfo.new(Vec3f, Vec3f)🔗
function BoundingInfo.new(Vec3f, Vec3f)(bbMin : Vec3f, bbMax : Vec3f): BoundingInfo
Creates a new bounding info with specified bounds
ParametersbbMin:Vec3f— Corner with lowest coordinatesbbMax:Vec3f— Corner with highest coordinates
BoundingInfo
BoundingInfo.bbMax🔗
BoundingInfo.bbMax: Vec3f
Corner with lowest coordinates
BoundingInfo.bbMin🔗
BoundingInfo.bbMin: Vec3f
Corner with highest coordinates
Box2f🔗
A 2d bounding box
Box2f.new()🔗
function Box2f.new()(): Box2f
Creates a new Box2f
ReturnsBox2f
Box2f.new(Vec2f, Vec2f)🔗
function Box2f.new(Vec2f, Vec2f)(Vec2f, Vec2f): Box2f
Creates a new Box2f
ParametersVec2fVec2f
Box2f
Box2f.min🔗
Box2f.min: Vec3f
Minimum corner of the box
Box2f.max🔗
Box2f.max: Vec3f
Maximum corner of the box
Box3f🔗
A 3d bounding box
Box3f.new()🔗
function Box3f.new()(): Box3f
Creates a new Box3f
ReturnsBox3f
Box3f.new(Vec3f, Vec3f)🔗
function Box3f.new(Vec3f, Vec3f)(Vec3f, Vec3f): Box3f
Creates a new Box3f
ParametersVec3fVec3f
Box3f
Box3f.min🔗
Box3f.min: Vec3f
Minimum corner of the box
Box3f.max🔗
Box3f.max: Vec3f
Maximum corner of the box
BridgeType🔗
global record BridgeType
description: ModelMetadata.Description availability: ModelMetadata.Availability menuCategory: ModelMetadata.MenuCategory cost: number speedLimit: number new: function(): BridgeType costFactors: Vec3f maintenanceCost: integer carriers: {Carrier} padding: number height: number sidewalkHeight: number pillarWidth: number pillarLen: number pillarMinDist: number pillarMaxDist: number pillarTargetDist: number abutmentLen: number abutmentWidth: number materialsToReplace: {<any type> : <any type>} assetsToReplace: {<any type> : <any type>} pillarGroundTexture: string pillarGroundTextureOffset: number updateScript: ScriptRef isAutoSelectable: boolean portals: {<any type> : <any type>} end
Specification for bridge types and also tunnels
BridgeType.description🔗
BridgeType.description: ModelMetadata.Description
Localized strings and icons paths for user interface
BridgeType.availability🔗
BridgeType.availability: ModelMetadata.Availability
Era information for user interface
BridgeType.menuCategory🔗
BridgeType.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
BridgeType.cost🔗
BridgeType.cost: number
Cost per unit length
BridgeType.speedLimit🔗
BridgeType.speedLimit: number
Top speed over the section type, limits top speed of road and tracks
BridgeType.new🔗
function BridgeType.new(): BridgeType
Creates a new empty bridge type
ReturnsBridgeType
BridgeType.costFactors🔗
BridgeType.costFactors: Vec3f
Cost for extensions to bridges: thresold, exponent, offset within a curve
BridgeType.maintenanceCost🔗
BridgeType.maintenanceCost: integer
Maintenance cost per unit length
BridgeType.carriers🔗
BridgeType.carriers: {Carrier}
Carriers allowed on the bridge/tunnel
BridgeType.padding🔗
BridgeType.padding: number
Extra width added to the side of the bridge (in meters)
BridgeType.height🔗
BridgeType.height: number
Height (tunnel only): results in offset applied to the terrain alignment above the bridge
BridgeType.sidewalkHeight🔗
BridgeType.sidewalkHeight: number
Overrides the sidewalk height for the bridge
BridgeType.pillarWidth🔗
BridgeType.pillarWidth: number
Width (in meters) of bridge pillars
BridgeType.pillarLen🔗
BridgeType.pillarLen: number
Length (in meters) of bridge pillars
BridgeType.pillarMinDist🔗
BridgeType.pillarMinDist: number
Minimal distance (in meters) between bridge pillars along the length of the bridge
BridgeType.pillarMaxDist🔗
BridgeType.pillarMaxDist: number
Maximal allowed (in meters) distance between pillars along the length of the bridge
BridgeType.pillarTargetDist🔗
BridgeType.pillarTargetDist: number
Targeted distance (in meters) between pillars, as allowed by the street segment
BridgeType.abutmentLen🔗
BridgeType.abutmentLen: number
Length of abutments along bridges (in meters)
BridgeType.abutmentWidth🔗
BridgeType.abutmentWidth: number
Wdith of abutments along bridges (in meters)
BridgeType.materialsToReplace🔗
BridgeType.materialsToReplace: {<any type> : <any type>}
Override street materials by using the given configurations
BridgeType.assetsToReplace🔗
BridgeType.assetsToReplace: {<any type> : <any type>}
Overrides street assets by using the given list
BridgeType.pillarGroundTexture🔗
BridgeType.pillarGroundTexture: string
Ground textures applied to the base of bridge pillars
BridgeType.pillarGroundTextureOffset🔗
BridgeType.pillarGroundTextureOffset: number
Extra padding applied to the ground texture shape below bridges
BridgeType.updateScript🔗
BridgeType.updateScript: ScriptRef
A script precisely controlling placement of railing models, pillars and entrances
BridgeType.isAutoSelectable🔗
BridgeType.isAutoSelectable: boolean
Allow to be used for auto bridge selection while building roads and tracks, nil defaults to true
BridgeType.portals🔗
BridgeType.portals: {<any type> : <any type>}
Deprecated
BuilderAudioSet🔗
global record BuilderAudioSet
attrs: SoundAttributes dragStart: SoundClip drag: {SoundClip} dragBridge: {SoundClip} dragTunnel: {SoundClip} dragEnd: SoundClip dragOffset: number build: {SoundClip} noMoney: {SoundClip} bulldoze: {SoundClip} terraform: {SoundClip} end
BuilderAudioSet.attrs🔗
BuilderAudioSet.attrs: SoundAttributes
BuilderAudioSet.dragStart🔗
BuilderAudioSet.dragStart: SoundClip
BuilderAudioSet.drag🔗
BuilderAudioSet.drag: {SoundClip}
BuilderAudioSet.dragBridge🔗
BuilderAudioSet.dragBridge: {SoundClip}
BuilderAudioSet.dragTunnel🔗
BuilderAudioSet.dragTunnel: {SoundClip}
BuilderAudioSet.dragEnd🔗
BuilderAudioSet.dragEnd: SoundClip
BuilderAudioSet.dragOffset🔗
BuilderAudioSet.dragOffset: number
BuilderAudioSet.build🔗
BuilderAudioSet.build: {SoundClip}
BuilderAudioSet.noMoney🔗
BuilderAudioSet.noMoney: {SoundClip}
BuilderAudioSet.bulldoze🔗
BuilderAudioSet.bulldoze: {SoundClip}
BuilderAudioSet.terraform🔗
BuilderAudioSet.terraform: {SoundClip}
BuildingType🔗
Specification for town building types
BuildingType.constructionFile🔗
BuildingType.constructionFile: string
Resource name of the construction
BuildingType.params🔗
BuildingType.params: TownBuildingParams
CampaignDesc🔗
global record CampaignDesc
new: function(): CampaignDesc name: string description: string icon: string map: string order: number voiceOver: string requiresCompleted: string unlockingProgression: boolean end
Campaign description
CampaignDesc.new🔗
function CampaignDesc.new(): CampaignDescReturns
CampaignDesc
CampaignDesc.name🔗
CampaignDesc.name: string
CampaignDesc.description🔗
CampaignDesc.description: string
CampaignDesc.icon🔗
CampaignDesc.icon: string
CampaignDesc.map🔗
CampaignDesc.map: string
CampaignDesc.order🔗
CampaignDesc.order: number
CampaignDesc.voiceOver🔗
CampaignDesc.voiceOver: string
CampaignDesc.requiresCompleted🔗
CampaignDesc.requiresCompleted: string
CampaignDesc.unlockingProgression🔗
CampaignDesc.unlockingProgression: boolean
CargoCategory🔗
global record CargoCategory
tier: integer landUses: {LandUseType} requiredIndustryTags: {string} townConsumptionFactor: number end
Represent a group of cargo types that are transported with similar packaging/containers: e.g. liquid, bulk, ...
CargoCategory.tier🔗
CargoCategory.tier: integer
Tier level of the cargo category
CargoCategory.landUses🔗
CargoCategory.landUses: {LandUseType}
Land use types associated with this category
CargoCategory.requiredIndustryTags🔗
CargoCategory.requiredIndustryTags: {string}
Industry tags required for this cargo category
CargoCategory.townConsumptionFactor🔗
CargoCategory.townConsumptionFactor: number
CargoClass🔗
global record CargoClass
new: function(): CargoClass tag: string name: string description: string icon: string color: Vec3f order: integer end
Specification for cargo types
CargoClass.new()🔗
function CargoClass.new()(): CargoClassReturns
CargoClass
CargoClass.new(CargoClass)🔗
function CargoClass.new(CargoClass)(CargoClass): CargoClassParameters
CargoClass
CargoClass
CargoClass.tag🔗
CargoClass.tag: string
unique tag
CargoClass.name🔗
CargoClass.name: string
display name
CargoClass.description🔗
CargoClass.description: string
detailed info
CargoClass.icon🔗
CargoClass.icon: string
display icon path
CargoClass.color🔗
CargoClass.color: Vec3f
color of the cargo class
CargoClass.order🔗
CargoClass.order: integer
display ordering
CargoClassId🔗
global type CargoClassId = integer
CargoType🔗
global record CargoType
new: function(): CargoType name: string icon: string color: Vec3f scriptRef: ScriptRef weight: number cargoClasses: {string} order: integer category: string categoryList: ModelMetadata.CategoryList timeToDeliverInSeconds: integer loadSpeedFactor: number end
Specification for cargo types
CargoType.new()🔗
function CargoType.new()(): CargoTypeReturns
CargoType
CargoType.new(CargoType)🔗
function CargoType.new(CargoType)(CargoType): CargoTypeParameters
CargoType
CargoType
CargoType.name🔗
CargoType.name: string
Display name
CargoType.icon🔗
CargoType.icon: string
Display icon path
CargoType.color🔗
CargoType.color: Vec3f
Color of the cargo
CargoType.scriptRef🔗
CargoType.scriptRef: ScriptRef
Reference to cargo income factor script
CargoType.weight🔗
CargoType.weight: number
Weight of a unit of cargo
CargoType.cargoClasses🔗
CargoType.cargoClasses: {string}
CargoType.order🔗
CargoType.order: integer
Order for sorting in cargo type lists
CargoType.category🔗
CargoType.category: string
Category of the cargo
CargoType.categoryList🔗
CargoType.categoryList: ModelMetadata.CategoryList
CargoType.timeToDeliverInSeconds🔗
CargoType.timeToDeliverInSeconds: integer
Lifetime of cargo in seconds
CargoType.loadSpeedFactor🔗
CargoType.loadSpeedFactor: number
CargoTypeId🔗
global type CargoTypeId = integer
CargoTypeSet🔗
global record CargoTypeSet
new: function(): CargoTypeSet cargoClassesIncluded: {string} cargoClassesExcluded: {string} cargoTypesIncluded: {ResName} cargoTypesExcluded: {ResName} end
Specification for cargo type set
CargoTypeSet.new🔗
function CargoTypeSet.new(): CargoTypeSetReturns
CargoTypeSet
CargoTypeSet.cargoClassesIncluded🔗
CargoTypeSet.cargoClassesIncluded: {string}
cargo classes included
CargoTypeSet.cargoClassesExcluded🔗
CargoTypeSet.cargoClassesExcluded: {string}
cargo classes excluded
CargoTypeSet.cargoTypesIncluded🔗
CargoTypeSet.cargoTypesIncluded: {ResName}
cargo types included
CargoTypeSet.cargoTypesExcluded🔗
CargoTypeSet.cargoTypesExcluded: {ResName}
cargo types excluded
CarriageInfo🔗
global record CarriageInfo
owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: Engine.Entity end: number end
Information about carriages
CarriageInfo.owningVehicle🔗
CarriageInfo.owningVehicle: Engine.Entity
CarriageInfo.index🔗
CarriageInfo.index: integer
CarriageInfo.offset🔗
CarriageInfo.offset: number
CarriageInfo.reversed🔗
CarriageInfo.reversed: boolean
Whether the carriage is reversed
CarriageInfo.crew🔗
CarriageInfo.crew: Engine.Entity
CarriageInfo.end🔗
CarriageInfo.end: number
Carrier🔗
Carrier types for journal entries
Carrier.ROAD🔗
Carrier.ROAD: Carrier
Road vehicles (trucks, buses, cars)
Carrier.RAIL🔗
Carrier.RAIL: Carrier
Rail vehicles (trains)
Carrier.TRAM🔗
Carrier.TRAM: Carrier
Tram vehicles
Carrier.OTHER🔗
Carrier.OTHER: Carrier
Other types of carriers
Carrier.AIR🔗
Carrier.AIR: Carrier
Aircraft (planes, helicopters)
Carrier.WATER🔗
Carrier.WATER: Carrier
Water vehicles (ships, boats)
Carrier.$meta.__index🔗
metamethod Carrier.$meta.__index(Carrier, string): CarrierParameters
Carrierstring
Carrier
CatchmentArea🔗
A catchment area is a cylinder around a position with a specific radius
CatchmentArea.position🔗
CatchmentArea.position: Vec3f
CatchmentArea.radius🔗
CatchmentArea.radius: number
ChartConfig🔗
global record ChartConfig
new: function(): ChartConfig interval: integer count: integer minCount: integer yStepScale: number end
A structure that holds config for a chart
ChartConfig.new🔗
function ChartConfig.new(): ChartConfigReturns
ChartConfig
ChartConfig.interval🔗
ChartConfig.interval: integer
The time in which the data gets collected.
ChartConfig.count🔗
ChartConfig.count: integer
The desired number of intervals.
ChartConfig.minCount🔗
ChartConfig.minCount: integer
The minimum number of intervals to display.
ChartConfig.yStepScale🔗
ChartConfig.yStepScale: number
Modify y stepSize for fine-tuning.
ChartResult🔗
global record ChartResult
equals: function(ChartResult, ChartResult): boolean xRange: {number} yRange: {number} series: {{{number}}} xMarkers: {number} yMarkers: {number} numPotentialGroups: integer end
A structure that holds data for a chart
ChartResult.equals🔗
function ChartResult.equals(ChartResult, ChartResult): booleanParameters
ChartResultChartResult
boolean
ChartResult.xRange🔗
ChartResult.xRange: {number}
X-axis range
ChartResult.yRange🔗
ChartResult.yRange: {number}
Y-axis range
ChartResult.series🔗
ChartResult.series: {{{number}}}
Data series
ChartResult.xMarkers🔗
ChartResult.xMarkers: {number}
X-axis markers
ChartResult.yMarkers🔗
ChartResult.yMarkers: {number}
Y-axis markers
ChartResult.numPotentialGroups🔗
ChartResult.numPotentialGroups: integer
Number of potential groups
ClimateDesc🔗
global record ClimateDesc
new: function(): ClimateDesc id: string desc: ModelMetadata.Description category: string order: integer visible: boolean mapColoring: PreviewColoring economy: string environment: string defaultNames: string end
Contains all data relevant for the climate
ClimateDesc.new🔗
function ClimateDesc.new(): ClimateDesc
Creates a new, empty climate description
ReturnsClimateDesc
ClimateDesc.id🔗
ClimateDesc.id: string
Unique identifier for te climate
ClimateDesc.desc🔗
ClimateDesc.desc: ModelMetadata.Description
Localized strings and icons paths for user interface
ClimateDesc.category🔗
ClimateDesc.category: string
Category for content selection: only objects with matching categories in categoryList will be availalbe in a
game
ClimateDesc.order🔗
ClimateDesc.order: integer
Order for UI sorting
ClimateDesc.visible🔗
ClimateDesc.visible: boolean
Configure visibility of clima zones in the selection screen
ClimateDesc.mapColoring🔗
ClimateDesc.mapColoring: PreviewColoring
Configures minimap preview in colors and look and feel
ClimateDesc.economy🔗
ClimateDesc.economy: string
Default economy for the climate zone
ClimateDesc.environment🔗
ClimateDesc.environment: string
Default environment for the cliamte zone
ClimateDesc.defaultNames🔗
ClimateDesc.defaultNames: string
Default name lists for the cliate zone
Clock🔗
A very precise clock.
Clock.new🔗
function Clock.new(): Clock
Constructs a new intance of a clock and starts its timer
ReturnsClock
Clock.getTime🔗
function Clock.getTime(Clock): integer
Get elapsed time since clock construction in microseconds
ParametersClock
integer
Collider🔗
Information about the collider of the model
Collider.Type🔗
Collider.Type.NONE🔗
Collider.Type.NONE: Type
Collider.Type.BOX🔗
Collider.Type.BOX: Type
Collider.Type.CYLINDER🔗
Collider.Type.CYLINDER: Type
Collider.Type.POINT_CLOUD🔗
Collider.Type.POINT_CLOUD: Type
Collider.Box🔗
A rectangular parallelepiped used for colliders
Collider.Box.halfExtents🔗
Collider.Box.halfExtents: Vec3f
Distance from transform position to define the cuboid (in the direction relative to the transform)
Collider.Cylinder🔗
A cylinder used for colliders
Collider.Cylinder.halfExtents🔗
Collider.Cylinder.halfExtents: Vec3f
The dimensions from the center the cylinder extends to. Before being transformed.
Collider.PointCloud🔗
A set of points used for collision
Collider.PointCloud.points🔗
Collider.PointCloud.points: {Vec3f}
A list of points specifying all collision points
Collider.transf🔗
Collider.transf: Mat4f
The transform of the collider, relative to which the other data is transformed
Collider.type🔗
Collider.type: Type
The type of collider
Collider.box🔗
Collider.box: Box
Only if type == 1, a collider with a cuboidal shape
Collider.cylinder🔗
Collider.cylinder: Cylinder
Only if type == 2, a collider with a cylindrical shape
Collider.pointCloud🔗
Collider.pointCloud: PointCloud
Only if type == 3, a collider made up of a set of points
CommandProgress🔗
global record CommandProgress
new: function(): CommandProgress get: function(CommandProgress): number end
Command progress tracker
CommandProgress.new🔗
function CommandProgress.new(): CommandProgressReturns
CommandProgress
CommandProgress.get🔗
function CommandProgress.get(CommandProgress): numberParameters
CommandProgress
number
CompanyValue🔗
global record CompanyValue
totalScore: integer railVehicles: integer trams: integer roadVehicles: integer aircrafts: integer ships: integer trackTotalLength: integer trackElectricLength: integer bridgeTotalLength: integer tunnelTotalLength: integer roadTotalLength: integer suppliedTowns: integer connectedIndustries: integer numberOfLines: integer totalStations: integer railStations: integer tramStations: integer roadStations: integer aircraftStations: integer shipStations: integer topSpeed: number topLength: number oldestTransportVehicle: integer balance: integer totalAssets: integer debt: integer end
A structure that holds information about the company's value
CompanyValue.totalScore🔗
CompanyValue.totalScore: integer
CompanyValue.railVehicles🔗
CompanyValue.railVehicles: integer
CompanyValue.trams🔗
CompanyValue.trams: integer
CompanyValue.roadVehicles🔗
CompanyValue.roadVehicles: integer
CompanyValue.aircrafts🔗
CompanyValue.aircrafts: integer
CompanyValue.ships🔗
CompanyValue.ships: integer
CompanyValue.trackTotalLength🔗
CompanyValue.trackTotalLength: integer
CompanyValue.trackElectricLength🔗
CompanyValue.trackElectricLength: integer
CompanyValue.bridgeTotalLength🔗
CompanyValue.bridgeTotalLength: integer
CompanyValue.tunnelTotalLength🔗
CompanyValue.tunnelTotalLength: integer
CompanyValue.roadTotalLength🔗
CompanyValue.roadTotalLength: integer
CompanyValue.suppliedTowns🔗
CompanyValue.suppliedTowns: integer
CompanyValue.connectedIndustries🔗
CompanyValue.connectedIndustries: integer
CompanyValue.numberOfLines🔗
CompanyValue.numberOfLines: integer
CompanyValue.totalStations🔗
CompanyValue.totalStations: integer
CompanyValue.railStations🔗
CompanyValue.railStations: integer
CompanyValue.tramStations🔗
CompanyValue.tramStations: integer
CompanyValue.roadStations🔗
CompanyValue.roadStations: integer
CompanyValue.aircraftStations🔗
CompanyValue.aircraftStations: integer
CompanyValue.shipStations🔗
CompanyValue.shipStations: integer
CompanyValue.topSpeed🔗
CompanyValue.topSpeed: number
CompanyValue.topLength🔗
CompanyValue.topLength: number
CompanyValue.oldestTransportVehicle🔗
CompanyValue.oldestTransportVehicle: integer
CompanyValue.balance🔗
CompanyValue.balance: integer
CompanyValue.totalAssets🔗
CompanyValue.totalAssets: integer
CompanyValue.debt🔗
CompanyValue.debt: integer
ComponentCustomState🔗
global record ComponentCustomState
new: function(): ComponentCustomState state: {<any type> : <any type>} end
A custom component might contain any data in form of a lua table (without functions) and can used with custom
scripts to create new custom objects in game
ComponentCustomState.new()🔗
function ComponentCustomState.new()(): ComponentCustomStateReturns
ComponentCustomState
ComponentCustomState.new(ComponentCustomState)🔗
function ComponentCustomState.new(ComponentCustomState)(ComponentCustomState): Engine.Component.LineParameters
ComponentCustomState
Engine.Component.Line
ComponentCustomState.state🔗
ComponentCustomState.state: {<any type> : <any type>}
Any lua table, as long as it is serializable
Connection🔗
An object used to disconnect callbacks.
Connection.disconnect🔗
function Connection.disconnect(Connection)
The callback will be no longer called
ParametersConnection
ConsoleGen🔗
global record ConsoleGen
Gen9pro: ConsoleGen Gen9standard: ConsoleGen Gen9base: ConsoleGen PC: ConsoleGen end
ConsoleGen.Gen9pro🔗
ConsoleGen.Gen9pro: ConsoleGen
ConsoleGen.Gen9standard🔗
ConsoleGen.Gen9standard: ConsoleGen
ConsoleGen.Gen9base🔗
ConsoleGen.Gen9base: ConsoleGen
ConsoleGen.PC🔗
ConsoleGen.PC: ConsoleGen
ConstructionDesc🔗
global record ConstructionDesc
new: function(ConstructionDesc): ConstructionDesc updateScript: ScriptRef configureLayerScript: ScriptRef configureHudIconsScript: ScriptRef hudIconScript: ScriptRef entityWindowScript: ScriptRef fileName: string availability: ModelMetadata.Availability soundConfig: ModelMetadata.SoundConfig description: ModelMetadata.Description categoryList: ModelMetadata.CategoryList params: {ScriptParam} categories: {string} order: number menuCategory: ModelMetadata.MenuCategory constructionTemplates: {ConstructionTemplate} constructionTemplates_native: Vector<ConstructionTemplate> placementTag: string metadata: ConstructionDescMetadata snapping: SnapConfig undergroundView: boolean heightAdjustable: boolean isIndustry: boolean edgeObject: EdgeObject townBuildingParams: TownBuildingParams endrecord EdgeObject
minDistToCrossing: number snapToStreet: boolean snapToTrack: boolean catchmentCargo: boolean catchmentPassengers: boolean catchmentAreaRadius: number end
Describes a construction
ConstructionDesc.SnapConfig🔗
ConstructionDesc.SnapConfig.rail🔗
ConstructionDesc.SnapConfig.rail: boolean
ConstructionDesc.SnapConfig.road🔗
ConstructionDesc.SnapConfig.road: boolean
ConstructionDesc.SnapConfig.water🔗
ConstructionDesc.SnapConfig.water: boolean
ConstructionDesc.EdgeObject🔗
record ConstructionDesc.EdgeObject
minDistToCrossing: number snapToStreet: boolean snapToTrack: boolean catchmentCargo: boolean catchmentPassengers: boolean catchmentAreaRadius: number end
ConstructionDesc.EdgeObject.minDistToCrossing🔗
ConstructionDesc.EdgeObject.minDistToCrossing: number
Minimum distance to crossings (in meters)
ConstructionDesc.EdgeObject.snapToStreet🔗
ConstructionDesc.EdgeObject.snapToStreet: boolean
Whether edge object snaps to streets
ConstructionDesc.EdgeObject.snapToTrack🔗
ConstructionDesc.EdgeObject.snapToTrack: boolean
Whether edge object snaps to tracks
ConstructionDesc.EdgeObject.catchmentCargo🔗
ConstructionDesc.EdgeObject.catchmentCargo: boolean
Whether edge object has cargo catchment area
ConstructionDesc.EdgeObject.catchmentPassengers🔗
ConstructionDesc.EdgeObject.catchmentPassengers: boolean
Whether edge object has passenger catchment area
ConstructionDesc.EdgeObject.catchmentAreaRadius🔗
ConstructionDesc.EdgeObject.catchmentAreaRadius: number
Catchment area radius (in meters)
ConstructionDesc.new🔗
function ConstructionDesc.new(ConstructionDesc): ConstructionDescParameters
ConstructionDesc
ConstructionDesc
ConstructionDesc.updateScript🔗
ConstructionDesc.updateScript: ScriptRef
ConstructionDesc.configureLayerScript🔗
ConstructionDesc.configureLayerScript: ScriptRef
ConstructionDesc.configureHudIconsScript🔗
ConstructionDesc.configureHudIconsScript: ScriptRef
ConstructionDesc.hudIconScript🔗
ConstructionDesc.hudIconScript: ScriptRef
ConstructionDesc.entityWindowScript🔗
ConstructionDesc.entityWindowScript: ScriptRef
ConstructionDesc.fileName🔗
ConstructionDesc.fileName: string
A file name or unique identifier for the construction.
ConstructionDesc.availability🔗
ConstructionDesc.availability: ModelMetadata.Availability
ConstructionDesc.soundConfig🔗
ConstructionDesc.soundConfig: ModelMetadata.SoundConfig
Defines the sound emitted by the model when in-game
ConstructionDesc.description🔗
ConstructionDesc.description: ModelMetadata.Description
ConstructionDesc.categoryList🔗
ConstructionDesc.categoryList: ModelMetadata.CategoryList
ConstructionDesc.params🔗
ConstructionDesc.params: {ScriptParam}
A list of parameters that can be used to configure the construction.
ConstructionDesc.categories🔗
ConstructionDesc.categories: {string}
ConstructionDesc.order🔗
ConstructionDesc.order: number
ConstructionDesc.menuCategory🔗
ConstructionDesc.menuCategory: ModelMetadata.MenuCategory
ConstructionDesc.constructionTemplates🔗
ConstructionDesc.constructionTemplates: {ConstructionTemplate}
[DEPRECATED] Use metaconstructions instead
ConstructionDesc.constructionTemplates_native🔗
ConstructionDesc.constructionTemplates_native: Vector<ConstructionTemplate>
[DEPRECATED] Use metaconstructions instead
ConstructionDesc.placementTag🔗
ConstructionDesc.placementTag: string
ConstructionDesc.metadata🔗
ConstructionDesc.metadata: ConstructionDescMetadata
ConstructionDesc.snapping🔗
ConstructionDesc.snapping: SnapConfig
ConstructionDesc.undergroundView🔗
ConstructionDesc.undergroundView: boolean
ConstructionDesc.heightAdjustable🔗
ConstructionDesc.heightAdjustable: boolean
ConstructionDesc.isIndustry🔗
ConstructionDesc.isIndustry: boolean
ConstructionDesc.edgeObject🔗
ConstructionDesc.edgeObject: EdgeObject
Optional edge object configuration
ConstructionDesc.townBuildingParams🔗
ConstructionDesc.townBuildingParams: TownBuildingParams
ConstructionDescMetadata🔗
ConstructionDescMetadata.EmissionConfig🔗
ConstructionDescMetadata.EmissionConfig.noise🔗
ConstructionDescMetadata.EmissionConfig.noise: number
ConstructionDescMetadata.EmissionConfig.pollution🔗
ConstructionDescMetadata.EmissionConfig.pollution: number
ConstructionDescMetadata.emissionConfig🔗
ConstructionDescMetadata.emissionConfig: EmissionConfig
ConstructionId🔗
global type ConstructionId = integer
ConstructionInstanceMetadata🔗
global record ConstructionInstanceMetadata
costScaleFactor: number end
ConstructionInstanceMetadata.costScaleFactor🔗
ConstructionInstanceMetadata.costScaleFactor: number
ConstructionResult🔗
global record ConstructionResult
subconstructions: {Proposal.Subconstruction} metadata: ConstructionInstanceMetadata cost: number maintenanceCost: number maintenanceCarrier: string streetTerminal: Proposal.StreetTerminal params: {<any type> : <any type>} end
Contains the processed result of a construction
ConstructionResult.subconstructions🔗
ConstructionResult.subconstructions: {Proposal.Subconstruction}
ConstructionResult.metadata🔗
ConstructionResult.metadata: ConstructionInstanceMetadata
ConstructionResult.cost🔗
ConstructionResult.cost: number
ConstructionResult.maintenanceCost🔗
ConstructionResult.maintenanceCost: number
ConstructionResult.maintenanceCarrier🔗
ConstructionResult.maintenanceCarrier: string
ConstructionResult.streetTerminal🔗
ConstructionResult.streetTerminal: Proposal.StreetTerminal
ConstructionResult.params🔗
ConstructionResult.params: {<any type> : <any type>}
ConstructionScriptParam🔗
global record ConstructionScriptParam
key: string name: string group: string tooltip: string values: {string} numbers: {number} tooltips: {string} postConstructionModifiable: boolean hideLabel: boolean images: {string} defaultIndex: Index uiType: Type location: Location displayMode: DisplayMode tags: {string} yearFrom: integer yearTo: integer checkEnabledScript: ScriptRef stepValueScript: ScriptRef formatValueScript: ScriptRef end
ConstructionScriptParam.Type🔗
ConstructionScriptParam.Type."Button"🔗
Push button
ConstructionScriptParam.Type."CheckBox"🔗
Check box
ConstructionScriptParam.Type."ComboBox"🔗
Drop-down combo box
ConstructionScriptParam.Type."IconButton"🔗
Button with an icon
ConstructionScriptParam.Type."Slider"🔗
Slider
ConstructionScriptParam.Location🔗
ConstructionScriptParam.Location."Default"🔗
Default construction parameter panel
ConstructionScriptParam.Location."Toolbar"🔗
Toolbar area of construction panel
ConstructionScriptParam.DisplayMode🔗
ConstructionScriptParam.DisplayMode."Compact"🔗
Value is collapsed, full parameter is shown in a callout
ConstructionScriptParam.DisplayMode."Default"🔗
For BottomBar==on is Horizontal, for BottomBar==off is Sparse
ConstructionScriptParam.DisplayMode."Horizontal"🔗
Label is shown left of value
ConstructionScriptParam.DisplayMode."Sparse"🔗
Label is shown above the value, and the value might grow to multiple lines
ConstructionScriptParam.DisplayMode."Vertical"🔗
Label is shown above value
ConstructionScriptParam.key🔗
ConstructionScriptParam.key: string
Unique key that is passed to the construction functions
ConstructionScriptParam.name🔗
ConstructionScriptParam.name: string
Display name
ConstructionScriptParam.group🔗
ConstructionScriptParam.group: string
Display Group:
- If hideLabel is true, items will be grouped horizontally
- Else items will be separated by a divider
ConstructionScriptParam.tooltip🔗
ConstructionScriptParam.tooltip: string
Tooltip to display over certain parameters
ConstructionScriptParam.values🔗
ConstructionScriptParam.values: {string}
All display values of the params
ConstructionScriptParam.numbers🔗
ConstructionScriptParam.numbers: {number}
Specified return values instead of default 1, 2, 3...
ConstructionScriptParam.tooltips🔗
ConstructionScriptParam.tooltips: {string}
Tooltips for the individual values
ConstructionScriptParam.postConstructionModifiable🔗
ConstructionScriptParam.postConstructionModifiable: boolean
This param can be changed when the construction is already built
ConstructionScriptParam.hideLabel🔗
ConstructionScriptParam.hideLabel: boolean
Allow to hide the label
ConstructionScriptParam.images🔗
ConstructionScriptParam.images: {string}
Image representations of the values (for Compact Mode)
ConstructionScriptParam.defaultIndex🔗
ConstructionScriptParam.defaultIndex: Index
Default index/state
ConstructionScriptParam.uiType🔗
ConstructionScriptParam.uiType: Type
Type of ui shown in user interface selection
ConstructionScriptParam.location🔗
ConstructionScriptParam.location: Location
construction menu has two possible locations for parameters: default or toolbar
ConstructionScriptParam.displayMode🔗
ConstructionScriptParam.displayMode: DisplayMode
displayMode controls whether the parameter is displayed in default or compact mode
ConstructionScriptParam.tags🔗
ConstructionScriptParam.tags: {string}
Tags associated with the script param for filtering
ConstructionScriptParam.yearFrom🔗
ConstructionScriptParam.yearFrom: integer
Availability from
ConstructionScriptParam.yearTo🔗
ConstructionScriptParam.yearTo: integer
Availability to
ConstructionScriptParam.checkEnabledScript🔗
ConstructionScriptParam.checkEnabledScript: ScriptRef
callback function to allow dynamic disabling or hiding of the paramter
function(params : {string : number}, scriptRefParams : table) : ConstructionMenuParam.CheckEnabledResult
ConstructionScriptParam.stepValueScript🔗
ConstructionScriptParam.stepValueScript: ScriptRef
callback function to allow returning any value on input actions
function(value : number, direction : integer, precise : boolean) : number
ConstructionScriptParam.formatValueScript🔗
ConstructionScriptParam.formatValueScript: ScriptRef
callback function to allow formatting the value display in the UI
function(value : number) : string
ConstructionTemplate🔗
Construction template with availability and type information
ConstructionTemplate.availability🔗
ConstructionTemplate.availability: ModelMetadata.Availability
Specific availability (date) for the template (optional)
ConstructionTemplate.desc🔗
ConstructionTemplate.desc: ModelMetadata.Description
Localized strings and icons paths for user interface
ConstructionTemplate.data🔗
ConstructionTemplate.data: ConstructionTemplateData
Additional slot configuration and params
ConstructionTemplate.menuCategory🔗
ConstructionTemplate.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
ConstructionTemplate.builderAudioRes🔗
ConstructionTemplate.builderAudioRes: ResName
ConstructionTemplate.configureHudIconsScript🔗
ConstructionTemplate.configureHudIconsScript: ScriptRef
ConstructionTemplateData🔗
global record ConstructionTemplateData
initialModules: {ResName : integer} params: {ScriptParam} end
Specify additional variants of the construction by providing a list of modules and the slot in which they belong
ConstructionTemplateData.initialModules🔗
ConstructionTemplateData.initialModules: {ResName : integer}
List of modules that come with the construction
ConstructionTemplateData.params🔗
ConstructionTemplateData.params: {ScriptParam}
Additional scriptparams that are used for this specific template
ConstructionType🔗
global record ConstructionType
STREET_STATION: ConstructionType RAIL_STATION: ConstructionType AIRPORT: ConstructionType HARBOR: ConstructionType STREET_STATION_CARGO: ConstructionType RAIL_STATION_CARGO: ConstructionType HARBOR_CARGO: ConstructionType STREET_DEPOT: ConstructionType RAIL_DEPOT: ConstructionType WATER_DEPOT: ConstructionType INDUSTRY: ConstructionType WAREHOUSE: ConstructionType ASSET_DEFAULT: ConstructionType ASSET_TRACK: ConstructionType TOWN_BUILDING: ConstructionType STREET_CONSTRUCTION: ConstructionType NONE: ConstructionType AIRPORT_CARGO: ConstructionType TRACK_CONSTRUCTION: ConstructionType WATER_WAYPOINT: ConstructionType end
Type of the construction for displaying in the correct UI category and controlling specific behaviour for the type.
ConstructionType.STREET_STATION🔗
ConstructionType.STREET_STATION: ConstructionType
ConstructionType.RAIL_STATION🔗
ConstructionType.RAIL_STATION: ConstructionType
ConstructionType.AIRPORT🔗
ConstructionType.AIRPORT: ConstructionType
ConstructionType.HARBOR🔗
ConstructionType.HARBOR: ConstructionType
ConstructionType.STREET_STATION_CARGO🔗
ConstructionType.STREET_STATION_CARGO: ConstructionType
ConstructionType.RAIL_STATION_CARGO🔗
ConstructionType.RAIL_STATION_CARGO: ConstructionType
ConstructionType.HARBOR_CARGO🔗
ConstructionType.HARBOR_CARGO: ConstructionType
ConstructionType.STREET_DEPOT🔗
ConstructionType.STREET_DEPOT: ConstructionType
ConstructionType.RAIL_DEPOT🔗
ConstructionType.RAIL_DEPOT: ConstructionType
ConstructionType.WATER_DEPOT🔗
ConstructionType.WATER_DEPOT: ConstructionType
ConstructionType.INDUSTRY🔗
ConstructionType.INDUSTRY: ConstructionType
ConstructionType.WAREHOUSE🔗
ConstructionType.WAREHOUSE: ConstructionType
ConstructionType.ASSET_DEFAULT🔗
ConstructionType.ASSET_DEFAULT: ConstructionType
ConstructionType.ASSET_TRACK🔗
ConstructionType.ASSET_TRACK: ConstructionType
ConstructionType.TOWN_BUILDING🔗
ConstructionType.TOWN_BUILDING: ConstructionType
ConstructionType.STREET_CONSTRUCTION🔗
ConstructionType.STREET_CONSTRUCTION: ConstructionType
ConstructionType.NONE🔗
ConstructionType.NONE: ConstructionType
ConstructionType.AIRPORT_CARGO🔗
ConstructionType.AIRPORT_CARGO: ConstructionType
ConstructionType.TRACK_CONSTRUCTION🔗
ConstructionType.TRACK_CONSTRUCTION: ConstructionType
ConstructionType.WATER_WAYPOINT🔗
ConstructionType.WATER_WAYPOINT: ConstructionType
Context🔗
global record Context
new: function(): Context checkTerrainAlignment: boolean cleanupStreetGraph: boolean gatherBuildings: boolean gatherFields: boolean player: Engine.Entity refundableEntities: {{Engine.Entity, integer}, {Engine.Revision, integer}} extendProposalRedoPillars: boolean end
Proposal context to configure how the proposal is to be applied
Context.new🔗
function Context.new(): ContextReturns
Context
Context.checkTerrainAlignment🔗
Context.checkTerrainAlignment: boolean
Context.cleanupStreetGraph🔗
Context.cleanupStreetGraph: boolean
If true, attempts to simplifyy the base edge and base node graph
Context.gatherBuildings🔗
Context.gatherBuildings: boolean
Context.gatherFields🔗
Context.gatherFields: boolean
Context.player🔗
Context.player: Engine.Entity
Context.refundableEntities🔗
Context.refundableEntities: {{Engine.Entity, integer}, {Engine.Revision, integer}}
Context.extendProposalRedoPillars🔗
Context.extendProposalRedoPillars: boolean
Find colliding bridge pillars and try to move them off the side
Date🔗
global record Date
new: function(year : integer, month : integer, day : integer): Date now: function(): Date fromYear: function(integer : integer): Date fromString: function(str : string): Date getEndOfMonth: function(current : Date): Date getDayOfWeek: function(current : Date): integer addOffsetDays: function(date : Date, numDays : integer): Date year: integer month: integer day: integer end
Date representation with year, month, and day
Date.new(integer, integer, integer)🔗
function Date.new(integer, integer, integer)(year : integer, month : integer, day : integer): Date
Creates a new date from year, month and day.
Parametersyear:integer— Yearmonth:integer— Month (1-12)day:integer— Day (1-31)
Date— New Date
Date.new(integer)🔗
function Date.new(integer)(year : integer): Date
Creates a new date from year
Parametersyear:integer— Year
Date— New Date
Date.now🔗
function Date.now(): Date
Get date of current day
ReturnsDate— Current date
Date.fromYear🔗
function Date.fromYear(integer : integer): Date
Create date at the first day of the given year
Parametersinteger:integer— year integer
Date— A new Date
Date.fromString🔗
function Date.fromString(str : string): Date
Parse date from string
Parametersstr:string— Date string
Date— Parsed date
Date.getEndOfMonth🔗
function Date.getEndOfMonth(current : Date): Date
Get the last day of the current month
Parameterscurrent:Date— Current date
Date— Date representing end of month
Date.getDayOfWeek🔗
function Date.getDayOfWeek(current : Date): integer
Get the day of the week of the current date
Parameterscurrent:Date— Current date
integer— The day of the week
Date.addOffsetDays🔗
function Date.addOffsetDays(date : Date, numDays : integer): Date
add offset in days
Parametersdate:Date— the date to offsetnumDays:integer— number of days to add
Date— New Date offset by the given number of days
Date.year🔗
Date.year: integer
Year component
Date.month🔗
Date.month: integer
Month component (1-12)
Date.day🔗
Date.day: integer
Day component (1-31)
DateFormat🔗
global record DateFormat
LONG: DateFormat SHORT: DateFormat MEDIUM: DateFormat FULL: DateFormat FILENAME: DateFormat YEAR: DateFormat end
DateFormat used for formatting calendar entries
DateFormat.LONG🔗
DateFormat.LONG: DateFormat
DateFormat.SHORT🔗
DateFormat.SHORT: DateFormat
DateFormat.MEDIUM🔗
DateFormat.MEDIUM: DateFormat
DateFormat.FULL🔗
DateFormat.FULL: DateFormat
DateFormat.FILENAME🔗
DateFormat.FILENAME: DateFormat
DateFormat.YEAR🔗
DateFormat.YEAR: DateFormat
Only output year
DistanceSpeedUnit🔗
DistanceSpeedUnit represents the unit of measurement used for distance and speed.
DistanceSpeedUnit.Metric🔗
DistanceSpeedUnit.Metric: DistanceSpeedUnit
DistanceSpeedUnit.Imperial🔗
DistanceSpeedUnit.Imperial: DistanceSpeedUnit
DynamicConstructionTemplate🔗
Dynamic construction template configuration
DynamicConstructionTemplate.params🔗
DynamicConstructionTemplate.params: {ScriptParam}
Easing🔗
global record Easing
Linear: integer EaseOutSqrt: integer EaseInSine: integer EaseOutSine: integer EaseInOutSine: integer EaseInQuad: integer EaseOutQuad: integer EaseInOutQuad: integer EaseInCubic: integer EaseOutCubic: integer EaseInOutCubic: integer EaseInQuart: integer EaseOutQuart: integer EaseInOutQuart: integer EaseInQuint: integer EaseOutQuint: integer EaseInOutQuint: integer EaseInExpo: integer EaseOutExpo: integer EaseInOutExpo: integer EaseInCirc: integer EaseOutCirc: integer EaseInOutCirc: integer EaseInBack: integer EaseOutBack: integer EaseInOutBack: integer EaseInElastic: integer EaseOutElastic: integer EaseInOutElastic: integer EaseInBounce: integer EaseOutBounce: integer EaseInOutBounce: integer end
Easing functions for particle curve interpolation
Easing.Linear🔗
Easing.Linear: integer
Easing.EaseOutSqrt🔗
Easing.EaseOutSqrt: integer
Easing.EaseInSine🔗
Easing.EaseInSine: integer
Easing.EaseOutSine🔗
Easing.EaseOutSine: integer
Easing.EaseInOutSine🔗
Easing.EaseInOutSine: integer
Easing.EaseInQuad🔗
Easing.EaseInQuad: integer
Easing.EaseOutQuad🔗
Easing.EaseOutQuad: integer
Easing.EaseInOutQuad🔗
Easing.EaseInOutQuad: integer
Easing.EaseInCubic🔗
Easing.EaseInCubic: integer
Easing.EaseOutCubic🔗
Easing.EaseOutCubic: integer
Easing.EaseInOutCubic🔗
Easing.EaseInOutCubic: integer
Easing.EaseInQuart🔗
Easing.EaseInQuart: integer
Easing.EaseOutQuart🔗
Easing.EaseOutQuart: integer
Easing.EaseInOutQuart🔗
Easing.EaseInOutQuart: integer
Easing.EaseInQuint🔗
Easing.EaseInQuint: integer
Easing.EaseOutQuint🔗
Easing.EaseOutQuint: integer
Easing.EaseInOutQuint🔗
Easing.EaseInOutQuint: integer
Easing.EaseInExpo🔗
Easing.EaseInExpo: integer
Easing.EaseOutExpo🔗
Easing.EaseOutExpo: integer
Easing.EaseInOutExpo🔗
Easing.EaseInOutExpo: integer
Easing.EaseInCirc🔗
Easing.EaseInCirc: integer
Easing.EaseOutCirc🔗
Easing.EaseOutCirc: integer
Easing.EaseInOutCirc🔗
Easing.EaseInOutCirc: integer
Easing.EaseInBack🔗
Easing.EaseInBack: integer
Easing.EaseOutBack🔗
Easing.EaseOutBack: integer
Easing.EaseInOutBack🔗
Easing.EaseInOutBack: integer
Easing.EaseInElastic🔗
Easing.EaseInElastic: integer
Easing.EaseOutElastic🔗
Easing.EaseOutElastic: integer
Easing.EaseInOutElastic🔗
Easing.EaseInOutElastic: integer
Easing.EaseInBounce🔗
Easing.EaseInBounce: integer
Easing.EaseOutBounce🔗
Easing.EaseOutBounce: integer
Easing.EaseInOutBounce🔗
Easing.EaseInOutBounce: integer
EconomyDesc🔗
global record EconomyDesc
new: function(): EconomyDesc desc: ModelMetadata.Description order: integer visible: boolean category: string industryWeightsSum2Population: number placementParams: {string : PlacementParams} cargoCategories: {string : CargoCategory} townLevels2CargoInfos: {integer : {TownCargoLevelInfo}} cargoRequiredIndustries: {<any type> : <any type>} companyRankRequiredIndustries: {<any type> : <any type>} defaultIndustryDensity: number defaultPopulationDensity: number defaultIndustryProductivity: number endrecord TownCargoLevelInfo
new: function(): TownCargoLevelInfo minTier: integer maxTier: integer landUseType: LandUseType end
Contains all data relevant for the economy.
EconomyDesc.TownCargoLevelInfo🔗
record EconomyDesc.TownCargoLevelInfo
new: function(): TownCargoLevelInfo minTier: integer maxTier: integer landUseType: LandUseType end
Contains all data relevant for adding new cargo requirements to a town at a specific level
EconomyDesc.TownCargoLevelInfo.new()🔗
function EconomyDesc.TownCargoLevelInfo.new()(): TownCargoLevelInfoReturns
TownCargoLevelInfo
EconomyDesc.TownCargoLevelInfo.new(TownCargoLevelInfo)🔗
function EconomyDesc.TownCargoLevelInfo.new(TownCargoLevelInfo)(TownCargoLevelInfo): TownCargoLevelInfoParameters
TownCargoLevelInfo
TownCargoLevelInfo
EconomyDesc.TownCargoLevelInfo.minTier🔗
EconomyDesc.TownCargoLevelInfo.minTier: integer
EconomyDesc.TownCargoLevelInfo.maxTier🔗
EconomyDesc.TownCargoLevelInfo.maxTier: integer
EconomyDesc.TownCargoLevelInfo.landUseType🔗
EconomyDesc.TownCargoLevelInfo.landUseType: LandUseType
EconomyDesc.new🔗
function EconomyDesc.new(): EconomyDesc
Creates a new, empty economy description
ReturnsEconomyDesc
EconomyDesc.desc🔗
EconomyDesc.desc: ModelMetadata.Description
Localized strings and icons paths for user interface
EconomyDesc.order🔗
EconomyDesc.order: integer
User interface order for sorting
EconomyDesc.visible🔗
EconomyDesc.visible: boolean
Selects the availability of the economy on the selection screen
EconomyDesc.category🔗
EconomyDesc.category: string
Used for selecting content based on the economy, depending on whether the object has matching tags in categoryList categories
EconomyDesc.industryWeightsSum2Population🔗
EconomyDesc.industryWeightsSum2Population: number
EconomyDesc.placementParams🔗
EconomyDesc.placementParams: {string : PlacementParams}
EconomyDesc.cargoCategories🔗
EconomyDesc.cargoCategories: {string : CargoCategory}
EconomyDesc.townLevels2CargoInfos🔗
EconomyDesc.townLevels2CargoInfos: {integer : {TownCargoLevelInfo}}
EconomyDesc.cargoRequiredIndustries🔗
EconomyDesc.cargoRequiredIndustries: {<any type> : <any type>}
EconomyDesc.companyRankRequiredIndustries🔗
EconomyDesc.companyRankRequiredIndustries: {<any type> : <any type>}
EconomyDesc.defaultIndustryDensity🔗
EconomyDesc.defaultIndustryDensity: number
EconomyDesc.defaultPopulationDensity🔗
EconomyDesc.defaultPopulationDensity: number
EconomyDesc.defaultIndustryProductivity🔗
EconomyDesc.defaultIndustryProductivity: number
Edge🔗
global record Edge
conns: {NodeId} geometry: EdgeGeometry transportModes: {TransportMode : boolean} speedLimit: number curveSpeedLimit: number curSpeed: number linkable: integer pedestrianWalkPenalty: number precedence: boolean noiseModifier: number pollutionModifier: number needsReservation: boolean forwardOnly: boolean end
A single edge within a Transport Network.
Edge.conns🔗
Edge.conns: {NodeId}
Start and end node
Edge.geometry🔗
Edge.geometry: EdgeGeometry
Edge geometry definition
Edge.transportModes🔗
Edge.transportModes: {TransportMode : boolean}
Transport modes allowed on this edge
Edge.speedLimit🔗
Edge.speedLimit: number
Speed limit for the edge
Edge.curveSpeedLimit🔗
Edge.curveSpeedLimit: number
Speed limit due to curvature
Edge.curSpeed🔗
Edge.curSpeed: number
Current speed on the edge (for statistics)
Edge.linkable🔗
Edge.linkable: integer
Edge.pedestrianWalkPenalty🔗
Edge.pedestrianWalkPenalty: number
Penalty for pedestrian walking
Edge.precedence🔗
Edge.precedence: boolean
Edge.noiseModifier🔗
Edge.noiseModifier: number
Noise modifier
Edge.pollutionModifier🔗
Edge.pollutionModifier: number
Pollution modifier
Edge.needsReservation🔗
Edge.needsReservation: boolean
Whether the edge needs reservation
Edge.forwardOnly🔗
Edge.forwardOnly: boolean
Whether the edge only allowed to be traversed in forward direction
EdgeDecoration🔗
global record EdgeDecoration
new: function(): EdgeDecoration availability: ModelMetadata.Availability desc: ModelMetadata.Description cost: ModelMetadata.Cost maintenance: number categoryList: ModelMetadata.CategoryList requiredTags: {string} incompatibleTags: {string} repModel: string length: number stretch: boolean verticalAlignment: integer snapMode: integer offset: number skipSameInParallelStrip: boolean order: integer modifiers: Modifiers menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName end
An addon to the sides (or the center) of BaseEdge like noise barrier and alleys
EdgeDecoration.new()🔗
function EdgeDecoration.new()(): EdgeDecorationReturns
EdgeDecoration
EdgeDecoration.new(EdgeDecoration)🔗
function EdgeDecoration.new(EdgeDecoration)(EdgeDecoration): EdgeDecorationParameters
EdgeDecoration
EdgeDecoration
EdgeDecoration.availability🔗
EdgeDecoration.availability: ModelMetadata.Availability
Era information for user interface
EdgeDecoration.desc🔗
EdgeDecoration.desc: ModelMetadata.Description
Localized strings and icons paths for user interface
EdgeDecoration.cost🔗
EdgeDecoration.cost: ModelMetadata.Cost
Cost per unit of length
EdgeDecoration.maintenance🔗
EdgeDecoration.maintenance: number
Maintenance cost per unit of length
EdgeDecoration.categoryList🔗
EdgeDecoration.categoryList: ModelMetadata.CategoryList
Filtering tags for incompatibility between edge decorations and clima zone selection
EdgeDecoration.requiredTags🔗
EdgeDecoration.requiredTags: {string}
An edge decoration will only be able to be built if the union of the base edge tags and all edge decoration category list are
containing all required tags. Base edges have special tags denoting whether they are "track" or "street" edges and if they are "bridge" and "tunnel edges"
EdgeDecoration.incompatibleTags🔗
EdgeDecoration.incompatibleTags: {string}
An edge decoration will only be able to be built if the union of the base edge tags and all edge decoration category list are
not containing any incompatible tags. Any edge with one or more decoration has the additional built-in tag "decorated"
EdgeDecoration.repModel🔗
EdgeDecoration.repModel: string
Model name that will be repeated along the decoration
EdgeDecoration.length🔗
EdgeDecoration.length: number
Length of the model
EdgeDecoration.stretch🔗
EdgeDecoration.stretch: boolean
Do stretch the model to perfectly fill in thegaps
EdgeDecoration.verticalAlignment🔗
EdgeDecoration.verticalAlignment: integer
Align models vertically or based on the slope of the edge: 0 = keep models vertical, 1 = keep model vertical but apply vertical shear to fill the
gaps and align with stree slop, 2 = rotate the model to be normal to the street
EdgeDecoration.snapMode🔗
EdgeDecoration.snapMode: integer
Snapping mode for the decoration: 0 = at the centerline of the transport network, 1 = at the side of the transport network
EdgeDecoration.offset🔗
EdgeDecoration.offset: number
Offset (orthogonal to the direction of the edge (in meters)) from the center line
EdgeDecoration.skipSameInParallelStrip🔗
EdgeDecoration.skipSameInParallelStrip: boolean
If a decoration is applied on the matching side of the same parallel strip, it will not be shown
EdgeDecoration.order🔗
EdgeDecoration.order: integer
Order for user interface menus
EdgeDecoration.modifiers🔗
EdgeDecoration.modifiers: Modifiers
Modifers that are applied to vehicles travelling onto edges with such edge decoration
EdgeDecoration.menuCategory🔗
EdgeDecoration.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
EdgeDecoration.builderAudioRes🔗
EdgeDecoration.builderAudioRes: ResName
EdgeGeometry🔗
global record EdgeGeometry
new: function(): EdgeGeometry type: Type arc: Arc straight: Straight cubicSpline: CubicSpline cubicOffsetSpline: CubicOffsetSpline tangent: Vec2f height: Vec2f length: number width: number locate: function(geom : EdgeGeometry, pos : Vec3f, maxSteps : integer, tol : number): {number, boolean} calcPos: function(geom : EdgeGeometry, param : number): {Vec3f, Vec3f, Vec3f} endrecord CubicOffsetSpline
new: function(): CubicOffsetSpline pos: {Vec2f} tangent: {Vec2f} offset: number end
Defines the geometry (shape) of an edge
EdgeGeometry.Type🔗
Type of the edge geometry
EdgeGeometry.Type.ARC🔗
EdgeGeometry.Type.ARC: Type
EdgeGeometry.Type.STRAIGHT🔗
EdgeGeometry.Type.STRAIGHT: Type
EdgeGeometry.Type.CUBIC_SPLINE🔗
EdgeGeometry.Type.CUBIC_SPLINE: Type
EdgeGeometry.Type.CUBIC_OFFSET_SPLINE🔗
EdgeGeometry.Type.CUBIC_OFFSET_SPLINE: Type
EdgeGeometry.Arc🔗
record EdgeGeometry.Arc
new: function(): Arc center: Vec2f radius: number startAngle: number angle: number end
Arc geometry parameters
EdgeGeometry.Arc.new🔗
function EdgeGeometry.Arc.new(): ArcReturns
Arc
EdgeGeometry.Arc.center🔗
EdgeGeometry.Arc.center: Vec2f
Center point of the arc
EdgeGeometry.Arc.radius🔗
EdgeGeometry.Arc.radius: number
Radius of the arc
EdgeGeometry.Arc.startAngle🔗
EdgeGeometry.Arc.startAngle: number
Starting angle in radians
EdgeGeometry.Arc.angle🔗
EdgeGeometry.Arc.angle: number
Arc angle in radians
EdgeGeometry.Straight🔗
Straight line geometry parameters
EdgeGeometry.Straight.new🔗
function EdgeGeometry.Straight.new(): StraightReturns
Straight
EdgeGeometry.Straight.pos🔗
EdgeGeometry.Straight.pos: {Vec2f}
Start and end positions
EdgeGeometry.CubicSpline🔗
Cubic spline geometry parameters
EdgeGeometry.CubicSpline.new🔗
function EdgeGeometry.CubicSpline.new(): CubicSplineReturns
CubicSpline
EdgeGeometry.CubicSpline.pos🔗
EdgeGeometry.CubicSpline.pos: {Vec2f}
Start and end positions
EdgeGeometry.CubicSpline.tangent🔗
EdgeGeometry.CubicSpline.tangent: {Vec2f}
Tangent vectors at start and end
EdgeGeometry.CubicOffsetSpline🔗
record EdgeGeometry.CubicOffsetSpline
new: function(): CubicOffsetSpline pos: {Vec2f} tangent: {Vec2f} offset: number end
Cubic offset spline geometry parameters
EdgeGeometry.CubicOffsetSpline.new🔗
function EdgeGeometry.CubicOffsetSpline.new(): CubicOffsetSplineReturns
CubicOffsetSpline
EdgeGeometry.CubicOffsetSpline.pos🔗
EdgeGeometry.CubicOffsetSpline.pos: {Vec2f}
Start and end positions
EdgeGeometry.CubicOffsetSpline.tangent🔗
EdgeGeometry.CubicOffsetSpline.tangent: {Vec2f}
Tangent vectors at start and end
EdgeGeometry.CubicOffsetSpline.offset🔗
EdgeGeometry.CubicOffsetSpline.offset: number
Offset value
EdgeGeometry.new🔗
function EdgeGeometry.new(): EdgeGeometryReturns
EdgeGeometry
EdgeGeometry.type🔗
EdgeGeometry.type: Type
Type for the 2D (xy) shape
EdgeGeometry.arc🔗
EdgeGeometry.arc: Arc
Arc parameters (if type is ARC)
EdgeGeometry.straight🔗
EdgeGeometry.straight: Straight
Straight parameters (if type is STRAIGHT)
EdgeGeometry.cubicSpline🔗
EdgeGeometry.cubicSpline: CubicSpline
Cubic spline parameters (if type is CUBIC_SPLINE)
EdgeGeometry.cubicOffsetSpline🔗
EdgeGeometry.cubicOffsetSpline: CubicOffsetSpline
Cubic offset spline parameters (if type is CUBICOFFSETSPLINE)
EdgeGeometry.tangent🔗
EdgeGeometry.tangent: Vec2f
Vertical tangents at start and end
EdgeGeometry.height🔗
EdgeGeometry.height: Vec2f
Heights at start and end
EdgeGeometry.length🔗
EdgeGeometry.length: number
Length of the edge
EdgeGeometry.width🔗
EdgeGeometry.width: number
Width of the edge
EdgeGeometry.locate🔗
function EdgeGeometry.locate(geom : EdgeGeometry, pos : Vec3f, maxSteps : integer, tol : number): {number, boolean}
Finds the parameter on a spline for a given world position
Parametersgeom:EdgeGeometry— the edge geometry to samplepos:Vec3f— a 3d world position to search formaxSteps:integer— the maximum number of steps to performtol:number— a maximal distance for the point to be found
{number, boolean}— paramAndFound the parameter value and whether there was a point on the spline
EdgeGeometry.calcPos🔗
function EdgeGeometry.calcPos(geom : EdgeGeometry, param : number): {Vec3f, Vec3f, Vec3f}
Calculate a position on an edgegeometry, given a parameter in [0, 1]
Parametersgeom:EdgeGeometry— the edge geometry to sampleparam:number— a number in [0, 1]
{Vec3f, Vec3f, Vec3f}— the position, tangent and second derivative at the specified param
EdgeId🔗
References a single transport network edge within a transport network entity
EdgeId.new()🔗
function EdgeId.new()(): EdgeIdReturns
EdgeId
EdgeId.new(integer, integer)🔗
function EdgeId.new(integer, integer)(entity : integer, index : integer): EdgeId
Constructor with entity and index
Parametersentity:integer— The TransportNetwork entityindex:integer— The zero-based index within the edges field of the TransportNetwork component
EdgeId
EdgeId.entity🔗
EdgeId.entity: Engine.Entity
The TransportNetwork entity
EdgeId.index🔗
EdgeId.index: integer
The zero-basd index within the edges field of the TransportNetwork component
EdgeIsect🔗
Specifies the intersection of two edges, with waiting area for vehicles.
EdgeIsect.Info🔗
Data for an edge intersection entry
EdgeIsect.Info.index🔗
EdgeIsect.Info.index: integer
The index of the other edge in the intersection
EdgeIsect.Info.param🔗
EdgeIsect.Info.param: number
The parameter position on the edge
EdgeIsect.Info.pos🔗
EdgeIsect.Info.pos: Vec3f
The world position of the intersection
EdgeIsect.infos🔗
EdgeIsect.infos: {Info, Info}
The two intersection info entries for each of the two edges
EdgeObjectType🔗
global record EdgeObjectType
STOP_LEFT: EdgeObjectType STOP_RIGHT: EdgeObjectType SIGNAL: EdgeObjectType end
Types of objects that can be placed on a BaseEdge
EdgeObjectType.STOP_LEFT🔗
EdgeObjectType.STOP_LEFT: EdgeObjectType
Stop on the left side of the edge
EdgeObjectType.STOP_RIGHT🔗
EdgeObjectType.STOP_RIGHT: EdgeObjectType
Stop on the right side of the edge
EdgeObjectType.SIGNAL🔗
EdgeObjectType.SIGNAL: EdgeObjectType
Signal controlling rail reservation
EdgePos🔗
References a position inside an EdgeId
EdgePos.new()🔗
function EdgePos.new()(): EdgePosReturns
EdgePos
EdgePos.new(EdgePos)🔗
function EdgePos.new(EdgePos)(EdgePos): EdgePos
Copy constructor
ParametersEdgePos
EdgePos
EdgePos.equals🔗
function EdgePos.equals(EdgePos, EdgePos): booleanParameters
EdgePosEdgePos
boolean
EdgePos.edgeId🔗
EdgePos.edgeId: EdgeId
The edge (entity and index within TransportNetwork)
EdgePos.param🔗
EdgePos.param: number
The position on the edge
Enum🔗
global record Enum
LogLevel: LogLevel SaveGameType: SaveGameType DateFormat: DateFormat EdgeObjectType: EdgeObjectType TransportVehicleState: TransportVehicleState Carrier: Carrier SignalType: SignalType VehicleEngineType: VehicleEngineType LineProblem: LineProblem LineStationProblem: LineStationProblem VehicleProblem: VehicleProblem VehicleIconType: VehicleIconType TownProblem: TownProblem StockListType: StockListType ConstructionType: ConstructionType TransportMode: TransportMode TramTrackType: TramTrackType LandUseType: LandUseType InputMode: InputMode GamepadType: GamepadType Platform: Platform Vendor: Vendor ConsoleGen: ConsoleGen TrafficLightPreference: TrafficLightPreference BaseEdgeType: BaseEdgeType MoveMode: MoveMode RoadType: RoadType ScriptParamType: ScriptParamType ScriptParamLocation: ScriptParamLocation ScriptParamDisplayMode: ScriptParamDisplayMode DistanceSpeedUnit: DistanceSpeedUnit HudEffectMode: HudEffectMode FontScaleClass: FontScaleClass MoneyMode: MoneyMode PowerUnit: PowerUnit WeightUnit: WeightUnit ForceUnit: ForceUnit Gender: Gender UgcAccessLimitedReason: UgcAccessLimitedReason FlightState: FlightState Easing: Easing PdxErrorCodes: PdxErrorCodes PdxLegalDocumentType: PdxLegalDocumentType PdxThirdPartyLinkState: PdxThirdPartyLinkState PdxThirdPartyAutoLoginPromptState: PdxThirdPartyAutoLoginPromptState end
Enum.LogLevel🔗
Enum.LogLevel: LogLevel
Enum.SaveGameType🔗
Enum.SaveGameType: SaveGameType
Enum.DateFormat🔗
Enum.DateFormat: DateFormat
Enum.EdgeObjectType🔗
Enum.EdgeObjectType: EdgeObjectType
Enum.TransportVehicleState🔗
Enum.TransportVehicleState: TransportVehicleState
Enum.Carrier🔗
Enum.Carrier: Carrier
Enum.SignalType🔗
Enum.SignalType: SignalType
Enum.VehicleEngineType🔗
Enum.VehicleEngineType: VehicleEngineType
Enum.LineProblem🔗
Enum.LineProblem: LineProblem
Enum.LineStationProblem🔗
Enum.LineStationProblem: LineStationProblem
Enum.VehicleProblem🔗
Enum.VehicleProblem: VehicleProblem
Enum.VehicleIconType🔗
Enum.VehicleIconType: VehicleIconType
Enum.TownProblem🔗
Enum.TownProblem: TownProblem
Enum.StockListType🔗
Enum.StockListType: StockListType
Enum.ConstructionType🔗
Enum.ConstructionType: ConstructionType
Enum.TransportMode🔗
Enum.TransportMode: TransportMode
Enum.TramTrackType🔗
Enum.TramTrackType: TramTrackType
Enum.LandUseType🔗
Enum.LandUseType: LandUseType
Enum.InputMode🔗
Enum.InputMode: InputMode
Enum.GamepadType🔗
Enum.GamepadType: GamepadType
Enum.Platform🔗
Enum.Platform: Platform
Enum.Vendor🔗
Enum.Vendor: Vendor
Enum.ConsoleGen🔗
Enum.ConsoleGen: ConsoleGen
Enum.TrafficLightPreference🔗
Enum.TrafficLightPreference: TrafficLightPreference
Enum.BaseEdgeType🔗
Enum.BaseEdgeType: BaseEdgeType
Enum.MoveMode🔗
Enum.MoveMode: MoveMode
Enum.RoadType🔗
Enum.RoadType: RoadType
Enum.ScriptParamType🔗
Enum.ScriptParamType: ScriptParamType
Enum.ScriptParamLocation🔗
Enum.ScriptParamLocation: ScriptParamLocation
Enum.ScriptParamDisplayMode🔗
Enum.ScriptParamDisplayMode: ScriptParamDisplayMode
Enum.DistanceSpeedUnit🔗
Enum.DistanceSpeedUnit: DistanceSpeedUnit
Enum.HudEffectMode🔗
Enum.HudEffectMode: HudEffectMode
Enum.FontScaleClass🔗
Enum.FontScaleClass: FontScaleClass
Enum.MoneyMode🔗
Enum.MoneyMode: MoneyMode
Enum.PowerUnit🔗
Enum.PowerUnit: PowerUnit
Enum.WeightUnit🔗
Enum.WeightUnit: WeightUnit
Enum.ForceUnit🔗
Enum.ForceUnit: ForceUnit
Enum.Gender🔗
Enum.Gender: Gender
Enum.UgcAccessLimitedReason🔗
Enum.UgcAccessLimitedReason: UgcAccessLimitedReason
Enum.FlightState🔗
Enum.FlightState: FlightState
Enum.Easing🔗
Enum.Easing: Easing
Enum.PdxErrorCodes🔗
Enum.PdxErrorCodes: PdxErrorCodes
Enum.PdxLegalDocumentType🔗
Enum.PdxLegalDocumentType: PdxLegalDocumentType
Enum.PdxThirdPartyLinkState🔗
Enum.PdxThirdPartyLinkState: PdxThirdPartyLinkState
Enum.PdxThirdPartyAutoLoginPromptState🔗
Enum.PdxThirdPartyAutoLoginPromptState: PdxThirdPartyAutoLoginPromptState
Environment🔗
global record Environment
new: function(): Environment atmosphere: AthmostphereParams name: string isToolEnvironment: boolean endrecord AthmostphereParams
new: function(): AthmostphereParams cloudCoverage: number cloudBase: number cloudTop: number cloudScattering: number dayOfYear: number sunRotation: number end
Specification for environment
Environment.AthmostphereParams🔗
record Environment.AthmostphereParams
new: function(): AthmostphereParams cloudCoverage: number cloudBase: number cloudTop: number cloudScattering: number dayOfYear: number sunRotation: number end
Specification for atmosphere parameters
Environment.AthmostphereParams.new🔗
function Environment.AthmostphereParams.new(): AthmostphereParamsReturns
AthmostphereParams
Environment.AthmostphereParams.cloudCoverage🔗
Environment.AthmostphereParams.cloudCoverage: number
Environment.AthmostphereParams.cloudBase🔗
Environment.AthmostphereParams.cloudBase: number
Environment.AthmostphereParams.cloudTop🔗
Environment.AthmostphereParams.cloudTop: number
Environment.AthmostphereParams.cloudScattering🔗
Environment.AthmostphereParams.cloudScattering: number
Environment.AthmostphereParams.dayOfYear🔗
Environment.AthmostphereParams.dayOfYear: number
Environment.AthmostphereParams.sunRotation🔗
Environment.AthmostphereParams.sunRotation: number
Environment.new🔗
function Environment.new(): EnvironmentReturns
Environment
Environment.atmosphere🔗
Environment.atmosphere: AthmostphereParams
Environment.name🔗
Environment.name: string
Environment.isToolEnvironment🔗
Environment.isToolEnvironment: boolean
ExtPath🔗
A path comprised of EdgePathEdges that does not necessarily start/end on a Port
ExtPath.ExtPathEdge🔗
A path edge of an ExtPath.
It can be either an EdgeRange (a sub-interval of an edge) or a LinkEdge connecting two arbitrary points of different edges.
ExtPath.ExtPathEdge.range🔗
ExtPath.ExtPathEdge.range: EdgeRange
If the edge represents an EdgeRange, provides access to its data (nil otherwise)
ExtPath.ExtPathEdge.link🔗
ExtPath.ExtPathEdge.link: LinkEdge
If the edge represents a LinkEdge, provides access to its data (nil otherwise)
ExtPath.ExtPathEdge.EdgeRange🔗
An EdgeRange of an ExtPath.ExtPathEdge
ExtPath.ExtPathEdge.EdgeRange.edgeId🔗
ExtPath.ExtPathEdge.EdgeRange.edgeId: EdgeId
The ID of the corresponding transport edge
ExtPath.ExtPathEdge.EdgeRange.params🔗
ExtPath.ExtPathEdge.EdgeRange.params: {number, number}
The start and end positions (range: 0.0 - 1.0)
ExtPath.ExtPathEdge.EdgeRange.dir🔗
ExtPath.ExtPathEdge.EdgeRange.dir: boolean
Direction along the edge (true if along the direction of edgeId, false for reverse)
ExtPath.ExtPathEdge.LinkEdge🔗
A LinkEdge of an ExtPath.ExtPathEdge
ExtPath.ExtPathEdge.LinkEdge.points🔗
ExtPath.ExtPathEdge.LinkEdge.points: {EdgePos, EdgePos}
The two locations that are connected
ExtPath.edges🔗
ExtPath.edges: {ExtPathEdge}
Extent🔗
Information about the game-logic related bounds, usually for vehicles (bbMax.x being the vehicle's front)
Extent.new()🔗
function Extent.new()(): Extent
Creates a new extent with zero bounds
ReturnsExtent
Extent.new(Vec3f, Vec3f)🔗
function Extent.new(Vec3f, Vec3f)(bbMin : Vec3f, bbMax : Vec3f): Extent
Creates a new bounding info with specified bounds
ParametersbbMin:Vec3f— Corner with lowest coordinatesbbMax:Vec3f— Corner with highest coordinates
Extent
Extent.bbMax🔗
Extent.bbMax: Vec3f
Corner with lowest coordinates
Extent.bbMin🔗
Extent.bbMin: Vec3f
Corner with highest coordinates
Failure🔗
Failure.Reason🔗
Failure.Reason.Unkown🔗
Failure.Reason.Unkown: Reason
Failure.Reason.NoPath🔗
Failure.Reason.NoPath: Reason
Failure.Reason.NoElectric🔗
Failure.Reason.NoElectric: Reason
Failure.Reason.NoTram🔗
Failure.Reason.NoTram: Reason
Failure.Reason.NoTramButTramTrack🔗
Failure.Reason.NoTramButTramTrack: Reason
Failure.Reason.NoTramTrackButRail🔗
Failure.Reason.NoTramTrackButRail: Reason
Failure.Reason.NoRail🔗
Failure.Reason.NoRail: Reason
Failure.Reason.NoRoad🔗
Failure.Reason.NoRoad: Reason
Failure.Reason.NoSmallAircraft🔗
Failure.Reason.NoSmallAircraft: Reason
Failure.Reason.NoSmallShip🔗
Failure.Reason.NoSmallShip: Reason
Failure.reason🔗
Failure.reason: Reason
Failure.pos🔗
Failure.pos: Vec3f
FilePath🔗
global type FilePath = string
FinanceData🔗
global record FinanceData
equals: function(FinanceData, FinanceData): boolean transport: {JournalEntry.Carrier : {integer : {integer}}} investment: {integer : {integer}} other: {JournalEntry.Other, {integer}} loan: {integer} interest: {integer} loanBorrowing: {integer} loanRepayment: {integer} total: {integer} balance: {integer} header: {string} unfoldKey: function(FinanceData, integer): {JournalEntry.Type, JournalEntry.Maintenance, JournalEntry.Construction} foreach_carrier: function(FinanceData, function(JournalEntry.Carrier, {integer : {integer}})) foreach_transport: function(FinanceData, function(integer, {integer}), JournalEntry.Carrier) foreach_investment: function(FinanceData, function(integer, {integer})) foreach_other: function(FinanceData, function(JournalEntry.Other, {integer})) end
FinanceData.equals🔗
function FinanceData.equals(FinanceData, FinanceData): booleanParameters
FinanceDataFinanceData
boolean
FinanceData.transport🔗
FinanceData.transport: {JournalEntry.Carrier : {integer : {integer}}}
FinanceData.investment🔗
FinanceData.investment: {integer : {integer}}
FinanceData.other🔗
FinanceData.other: {JournalEntry.Other, {integer}}
FinanceData.loan🔗
FinanceData.loan: {integer}
FinanceData.interest🔗
FinanceData.interest: {integer}
FinanceData.loanBorrowing🔗
FinanceData.loanBorrowing: {integer}
FinanceData.loanRepayment🔗
FinanceData.loanRepayment: {integer}
FinanceData.total🔗
FinanceData.total: {integer}
FinanceData.balance🔗
FinanceData.balance: {integer}
FinanceData.header🔗
FinanceData.header: {string}
FinanceData.unfoldKey🔗
function FinanceData.unfoldKey(FinanceData, integer): {JournalEntry.Type, JournalEntry.Maintenance, JournalEntry.Construction}Parameters
FinanceDatainteger
{JournalEntry.Type, JournalEntry.Maintenance, JournalEntry.Construction}
FinanceData.foreach_carrier🔗
function FinanceData.foreach_carrier(FinanceData, function(JournalEntry.Carrier, {integer : {integer}}))Parameters
FinanceDatafunction(JournalEntry.Carrier, {integer : {integer}})
FinanceData.foreach_transport🔗
function FinanceData.foreach_transport(FinanceData, function(integer, {integer}), JournalEntry.Carrier)Parameters
FinanceDatafunction(integer, {integer})JournalEntry.Carrier
FinanceData.foreach_investment🔗
function FinanceData.foreach_investment(FinanceData, function(integer, {integer}))Parameters
FinanceDatafunction(integer, {integer})
FinanceData.foreach_other🔗
function FinanceData.foreach_other(FinanceData, function(JournalEntry.Other, {integer}))Parameters
FinanceDatafunction(JournalEntry.Other, {integer})
FlightState🔗
global record FlightState
Taxi0: FlightState TakeOff: FlightState Flight: FlightState Approach: FlightState Landing: FlightState Taxi1: FlightState end
Flight State of an Aircraft
FlightState.Taxi0🔗
FlightState.Taxi0: FlightState
FlightState.TakeOff🔗
FlightState.TakeOff: FlightState
FlightState.Flight🔗
FlightState.Flight: FlightState
FlightState.Approach🔗
FlightState.Approach: FlightState
FlightState.Landing🔗
FlightState.Landing: FlightState
FlightState.Taxi1🔗
FlightState.Taxi1: FlightState
FontScaleClass🔗
FontScaleClass represents the current UI font scaling factor.
FontScaleClass.Small🔗
FontScaleClass.Small: FontScaleClass
FontScaleClass.Medium🔗
FontScaleClass.Medium: FontScaleClass
FontScaleClass.Large🔗
FontScaleClass.Large: FontScaleClass
ForceUnit🔗
ForceUnit represents the unit of measurement used for force.
ForceUnit.KN🔗
ForceUnit.KN: ForceUnit
ForceUnit.KGF🔗
ForceUnit.KGF: ForceUnit
ForceUnit.LBF🔗
ForceUnit.LBF: ForceUnit
GPUCapabilities🔗
GPUCapabilities.hasDiscreteGPU🔗
GPUCapabilities.hasDiscreteGPU: boolean
GPUCapabilities.hasUnsupportedGPU🔗
GPUCapabilities.hasUnsupportedGPU: boolean
GameMap🔗
global record GameMap
record Town
new: function(): Town pos: Vec2f name: string sizeFactors: {number} landUse2CargoNeeds: {LandUseType : {{string, number}}} existing: Engine.Entity endnew: function(): GameMap setHeightMap: function(GameMap, integer, number) heightmap: {number} numTilesX: integer numTilesY: integer levels: integer offsetZ: number waterLevel: number climateId: string resolution: Vec3f towns: {GameMap.Town} industries: {GameMap.Industry} townConnections: {{integer, integer}} trees: GameMap.MapTree assets: GameMap.MapAsset endrecord Industry
new: function(): Industry pos: Vec2f angle: number onWater: boolean fileName: string tag: string existing: Engine.Entity end
Information about the map, for map generation purposes.
GameMap.Town🔗
record GameMap.Town
new: function(): Town pos: Vec2f name: string sizeFactors: {number} landUse2CargoNeeds: {LandUseType : {{string, number}}} existing: Engine.Entity end
Information about towns on a map
GameMap.Town.new🔗
function GameMap.Town.new(): TownReturns
Town
GameMap.Town.pos🔗
GameMap.Town.pos: Vec2f
Town placement position
GameMap.Town.name🔗
GameMap.Town.name: string
Town name
GameMap.Town.sizeFactors🔗
GameMap.Town.sizeFactors: {number}
The size factor for each district
GameMap.Town.landUse2CargoNeeds🔗
GameMap.Town.landUse2CargoNeeds: {LandUseType : {{string, number}}}
Cargo categories per land use type (note: these are not CargoTypeId's)
GameMap.Town.existing🔗
GameMap.Town.existing: Engine.Entity
The town entity if it already exists
GameMap.Industry🔗
Information about industries on a map
GameMap.Industry.new🔗
function GameMap.Industry.new(): IndustryReturns
Industry
GameMap.Industry.pos🔗
GameMap.Industry.pos: Vec2f
GameMap.Industry.angle🔗
GameMap.Industry.angle: number
GameMap.Industry.onWater🔗
GameMap.Industry.onWater: boolean
GameMap.Industry.fileName🔗
GameMap.Industry.fileName: string
GameMap.Industry.tag🔗
GameMap.Industry.tag: string
GameMap.Industry.existing🔗
GameMap.Industry.existing: Engine.Entity
The industry entity if it already exists
GameMap.MapTree🔗
Container for tree data to be placed on the map
GameMap.MapTree.add🔗
function GameMap.MapTree.add(category : GameMap.MapTree, position : string, Vec3f)
Adds a tree to the map
Parameterscategory:GameMap.MapTree— The tree categoryposition:string— The world positionVec3f
GameMap.MapAsset🔗
Container for asset data to be placed on the map
GameMap.MapAsset.add🔗
function GameMap.MapAsset.add(category : GameMap.MapAsset, position : string, Mat4f)
Adds an asset to the map
Parameterscategory:GameMap.MapAsset— The asset categoryposition:string— The world transformMat4f
GameMap.Tree🔗
A single tree on the map
GameMap.Tree.id🔗
GameMap.Tree.id: integer
Tree model id
GameMap.Tree.pos🔗
GameMap.Tree.pos: Vec3f
Tree position
GameMap.Asset🔗
A single asset on the map
GameMap.Asset.id🔗
GameMap.Asset.id: integer
Asset model id
GameMap.Asset.transf🔗
GameMap.Asset.transf: Mat4f
Asset transform
GameMap.new()🔗
function GameMap.new()(): GameMapReturns
GameMap
GameMap.new(GameMap)🔗
function GameMap.new(GameMap)(GameMap): GameMap
Copy constructor
ParametersGameMap
GameMap
GameMap.setHeightMap🔗
function GameMap.setHeightMap(GameMap, integer, number)Parameters
GameMapintegernumber
GameMap.heightmap🔗
GameMap.heightmap: {number}
GameMap.numTilesX🔗
GameMap.numTilesX: integer
numTilesX number of tiles (256 m x 256 blocks) in X direction
GameMap.numTilesY🔗
GameMap.numTilesY: integer
numTilesY number of tiles (256 m x 256 blocks) in Y direction
GameMap.levels🔗
GameMap.levels: integer
GameMap.offsetZ🔗
GameMap.offsetZ: number
GameMap.waterLevel🔗
GameMap.waterLevel: number
GameMap.climateId🔗
GameMap.climateId: string
GameMap.resolution🔗
GameMap.resolution: Vec3f
GameMap.towns🔗
GameMap.towns: {GameMap.Town}
GameMap.industries🔗
GameMap.industries: {GameMap.Industry}
GameMap.townConnections🔗
GameMap.townConnections: {{integer, integer}}
GameMap.trees🔗
GameMap.trees: GameMap.MapTree
GameMap.assets🔗
GameMap.assets: GameMap.MapAsset
GameMetadata🔗
global record GameMetadata
date: integer balance: integer population: integer startYear: integer numVehicleModels: integer terrainDimensions: Vec2i companyValue: CompanyValue transportationStats: TransportationStats scriptMetadata: SavegameScriptMetadata gameModDescs: {Mod.GameModDesc} achievementsEarnable: boolean screenshot: GameScreenshot end
Game metadata from a savegame
GameMetadata.date🔗
GameMetadata.date: integer
GameMetadata.balance🔗
GameMetadata.balance: integer
Player's account balance
GameMetadata.population🔗
GameMetadata.population: integer
Current world population
GameMetadata.startYear🔗
GameMetadata.startYear: integer
List of game mods used
Year the game was started
GameMetadata.numVehicleModels🔗
GameMetadata.numVehicleModels: integer
The number of vehicle models present in the savegame
GameMetadata.terrainDimensions🔗
GameMetadata.terrainDimensions: Vec2i
Map dimensions in meters
GameMetadata.companyValue🔗
GameMetadata.companyValue: CompanyValue
GameMetadata.transportationStats🔗
GameMetadata.transportationStats: TransportationStats
GameMetadata.scriptMetadata🔗
GameMetadata.scriptMetadata: SavegameScriptMetadata
GameMetadata.gameModDescs🔗
GameMetadata.gameModDescs: {Mod.GameModDesc}
GameMetadata.achievementsEarnable🔗
GameMetadata.achievementsEarnable: boolean
Whether achievements can be earned
GameMetadata.screenshot🔗
GameMetadata.screenshot: GameScreenshot
Screenshot of the game
GameScreenshot🔗
global record GameScreenshot
width: integer height: integer image: {integer} image_native: Vector<integer> end
Game screenshot data
GameScreenshot.width🔗
GameScreenshot.width: integer
Screenshot width in pixels
GameScreenshot.height🔗
GameScreenshot.height: integer
Screenshot height in pixels
GameScreenshot.image🔗
GameScreenshot.image: {integer}
Raw image data
GameScreenshot.image_native🔗
GameScreenshot.image_native: Vector<integer>
Native vector of image data
GameScriptDesc🔗
global record GameScriptDesc
new: function(): GameScriptDesc postUpdateScript: ScriptRef handleEventScript: ScriptRef guiUpdateScript: ScriptRef guiHandleEventScript: ScriptRef updateScript: ScriptRef end
Contains all data describing a game script
GameScriptDesc.new()🔗
function GameScriptDesc.new()(): GameScriptDescReturns
GameScriptDesc
GameScriptDesc.new(GameScriptDesc)🔗
function GameScriptDesc.new(GameScriptDesc)(GameScriptDesc): GameScriptDescParameters
GameScriptDesc
GameScriptDesc
GameScriptDesc.postUpdateScript🔗
GameScriptDesc.postUpdateScript: ScriptRef
GameScriptDesc.handleEventScript🔗
GameScriptDesc.handleEventScript: ScriptRef
GameScriptDesc.guiUpdateScript🔗
GameScriptDesc.guiUpdateScript: ScriptRef
GameScriptDesc.guiHandleEventScript🔗
GameScriptDesc.guiHandleEventScript: ScriptRef
GameScriptDesc.updateScript🔗
GameScriptDesc.updateScript: ScriptRef
GamepadType🔗
global record GamepadType
None: GamepadType XBox: GamepadType PlayStation5: GamepadType PlayStation4: GamepadType end
GamepadType represents the current gamepad.
GamepadType.None🔗
GamepadType.None: GamepadType
GamepadType.XBox🔗
GamepadType.XBox: GamepadType
GamepadType.PlayStation5🔗
GamepadType.PlayStation5: GamepadType
GamepadType.PlayStation4🔗
GamepadType.PlayStation4: GamepadType
Gender🔗
Gender.FEMALE🔗
Gender.FEMALE: Gender
Gender.MALE🔗
Gender.MALE: Gender
GenericGameRes🔗
global record GenericGameRes
new: function(): GenericGameRes type: string data: {<any type> : <any type>} setData: function(GenericGameRes, {<any type> : <any type>}) end
Describes a generic game resource
GenericGameRes.new🔗
function GenericGameRes.new(): GenericGameRes
Creates a new empty resource
ReturnsGenericGameRes
GenericGameRes.type🔗
GenericGameRes.type: string
Each generic resource has a type to differentiate its uses and enable querying by type
GenericGameRes.data🔗
GenericGameRes.data: {<any type> : <any type>}
Any serializable data might be stored in a generic resource
GenericGameRes.setData🔗
function GenericGameRes.setData(GenericGameRes, {<any type> : <any type>})
Utility function to quickly set a data table
ParametersGenericGameRes{<any type> : <any type>}
GenericGameResT🔗
global record GenericGameResT<T>
new: function(): GenericGameResT<T> type: string data: T setData: function(GenericGameResT<T>, T) end
Describes a generic game resource
Type Parameters
T
GenericGameResT.new🔗
function GenericGameResT.new(): GenericGameResT<T>
Creates a new empty resource
ReturnsGenericGameResT<T>
GenericGameResT.type🔗
GenericGameResT.type: string
Each generic resource has a type to differentiate its uses and enable querying by type
GenericGameResT.data🔗
GenericGameResT.data: T
Any serializable data might be stored in a generic resource
GenericGameResT.setData🔗
function GenericGameResT.setData(GenericGameResT<T>, T)
Utility function to quickly set a data table
ParametersGenericGameResT<T>T
GlobalType🔗
global GlobalType: Type
GridCollisionSystem🔗
global record GridCollisionSystem
getCollisionDataAt: function(GridCollisionSystem, Vec2f): integer end
A single instance of a grid collision system
GridCollisionSystem.getCollisionDataAt🔗
function GridCollisionSystem.getCollisionDataAt(GridCollisionSystem, Vec2f): integer
Gets the collision data at the specified position
ParametersGridCollisionSystemVec2f
integer
GridVec2f🔗
A 2D grid of Vec2f values
GridVec2f.new()🔗
function GridVec2f.new()(): GridVec2f
Creates a new empty grid.
ReturnsGridVec2f— New empty GridVec2f
GridVec2f.new(integer, integer, integer, integer)🔗
function GridVec2f.new(integer, integer, integer, integer)(x0 : integer, y0 : integer, width : integer, height : integer): GridVec2f
Creates a new grid with specified dimensions.
Parametersx0:integer— X offset of the gridy0:integer— Y offset of the gridwidth:integer— Grid widthheight:integer— Grid height
GridVec2f— New GridVec2f
GridVec2f.new(integer, integer, integer, integer, number)🔗
function GridVec2f.new(integer, integer, integer, integer, number)(x0 : integer, y0 : integer, width : integer, height : integer, value : number): GridVec2f
Creates a new grid with specified dimensions and initial value.
Parametersx0:integer— X offset of the gridy0:integer— Y offset of the gridwidth:integer— Grid widthheight:integer— Grid heightvalue:number— Initial value for all cells
GridVec2f— New GridVec2f
GridVec2f.width🔗
GridVec2f.width: integer
Grid width
GridVec2f.height🔗
GridVec2f.height: integer
Grid height
GridVec2f.x0🔗
GridVec2f.x0: integer
X offset of the grid
GridVec2f.y0🔗
GridVec2f.y0: integer
Y offset of the grid
GridVec2f.at🔗
function GridVec2f.at(grid : GridVec2f, pos : Vec2i): Vec2f
Get value at position
Parametersgrid:GridVec2f— Grid to querypos:Vec2i— Grid position
Vec2f— Vec2f value at position
Gridf🔗
A 2D grid of float values
Gridf.new()🔗
function Gridf.new()(): Gridf
Creates a new empty grid.
ReturnsGridf— New empty Gridf
Gridf.new(integer, integer, integer, integer)🔗
function Gridf.new(integer, integer, integer, integer)(x0 : integer, y0 : integer, width : integer, height : integer): Gridf
Creates a new grid with specified dimensions.
Parametersx0:integer— X offset of the gridy0:integer— Y offset of the gridwidth:integer— Grid widthheight:integer— Grid height
Gridf— New Gridf
Gridf.new(integer, integer, integer, integer, number)🔗
function Gridf.new(integer, integer, integer, integer, number)(x0 : integer, y0 : integer, width : integer, height : integer, value : number): Gridf
Creates a new grid with specified dimensions and initial value.
Parametersx0:integer— X offset of the gridy0:integer— Y offset of the gridwidth:integer— Grid widthheight:integer— Grid heightvalue:number— Initial value for all cells
Gridf— New Gridf
Gridf.width🔗
Gridf.width: integer
Grid width
Gridf.height🔗
Gridf.height: integer
Grid height
Gridf.at🔗
function Gridf.at(pos : Vec2i): number
Get value at position. Returns 0 if position is out of bounds.
Parameterspos:Vec2i— Grid position
number— Value at position
GroundTexture🔗
global record GroundTexture
new: function(): GroundTexture matIndexMap: {<any type> : <any type>} indices: {<any type> : <any type>} priority: integer texSize: number end
Specification for ground textures
GroundTexture.new()🔗
function GroundTexture.new()(): GroundTextureReturns
GroundTexture
GroundTexture.new(GroundTexture)🔗
function GroundTexture.new(GroundTexture)(GroundTexture): GroundTextureParameters
GroundTexture
GroundTexture
GroundTexture.matIndexMap🔗
GroundTexture.matIndexMap: {<any type> : <any type>}
Mapping of material indices
GroundTexture.indices🔗
GroundTexture.indices: {<any type> : <any type>}
Texture indices
GroundTexture.priority🔗
GroundTexture.priority: integer
Priority for texture selection
GroundTexture.texSize🔗
GroundTexture.texSize: number
Size of the texture
GroundTexture.Data🔗
Extra information for ground textures
GroundTexture.Data.data🔗
GroundTexture.Data.data: {<any type> : <any type>}
Raw texture data
GroundTexture.Data.size🔗
GroundTexture.Data.size: integer
Size of the texture data
HeighmapGenerationMode🔗
global record HeighmapGenerationMode
new: function(): HeighmapGenerationMode terrainGenerator: string generateTowns: boolean generateIndustries: boolean generateAssets: boolean keepHeightmap: boolean end
Map generation mode for heightmap generation
HeighmapGenerationMode.new🔗
function HeighmapGenerationMode.new(): HeighmapGenerationModeReturns
HeighmapGenerationMode
HeighmapGenerationMode.terrainGenerator🔗
HeighmapGenerationMode.terrainGenerator: string
Terrain generator script resource name
HeighmapGenerationMode.generateTowns🔗
HeighmapGenerationMode.generateTowns: boolean
Whether to generate towns
HeighmapGenerationMode.generateIndustries🔗
HeighmapGenerationMode.generateIndustries: boolean
Whether to generate industries
HeighmapGenerationMode.generateAssets🔗
HeighmapGenerationMode.generateAssets: boolean
Whether to generate assets
HeighmapGenerationMode.keepHeightmap🔗
HeighmapGenerationMode.keepHeightmap: boolean
Whether to keep the heightmap
HeightmapNew🔗
global record HeightmapNew
getSize: function(): Vec2i at: function(x : integer, y : integer): number end
Abstraction of heightmap data, consisting of a cell with floating point values at each point
HeightmapNew.getSize🔗
function HeightmapNew.getSize(): Vec2i
The total size of the heightmap (x, y)
ReturnsVec2i
HeightmapNew.at🔗
function HeightmapNew.at(x : integer, y : integer): number
Get the value of the heightmap at the given x, y coordinate
Parametersx:integer— x coordinatey:integer— y coordinate
number
HudEffectMode🔗
global record HudEffectMode
Always: HudEffectMode CockpitOnly: HudEffectMode Never: HudEffectMode end
HudEffectMode configures the HUD effects
HudEffectMode.Always🔗
HudEffectMode.Always: HudEffectMode
HudEffectMode.CockpitOnly🔗
HudEffectMode.CockpitOnly: HudEffectMode
HudEffectMode.Never🔗
HudEffectMode.Never: HudEffectMode
ImportExportHeightmapMode🔗
global record ImportExportHeightmapMode
new: function(): ImportExportHeightmapMode fileName: string import: boolean generateAssets: boolean minH: number maxH: number end
Map generation mode for importing or exporting heightmaps
ImportExportHeightmapMode.new🔗
function ImportExportHeightmapMode.new(): ImportExportHeightmapModeReturns
ImportExportHeightmapMode
ImportExportHeightmapMode.fileName🔗
ImportExportHeightmapMode.fileName: string
File name for import/export
ImportExportHeightmapMode.import🔗
ImportExportHeightmapMode.import: boolean
Whether to import (true) or export (false)
ImportExportHeightmapMode.generateAssets🔗
ImportExportHeightmapMode.generateAssets: boolean
Whether to generate assets
ImportExportHeightmapMode.minH🔗
ImportExportHeightmapMode.minH: number
Minimum height value
ImportExportHeightmapMode.maxH🔗
ImportExportHeightmapMode.maxH: number
Maximum height value
Index🔗
global type Index = integer
IndustryInfo🔗
global record IndustryInfo
fileName: string bbox: Box2f streetPoint: Vec2i transf: Mat4f onWater: boolean end
Industry placement information
IndustryInfo.fileName🔗
IndustryInfo.fileName: string
IndustryInfo.bbox🔗
IndustryInfo.bbox: Box2f
IndustryInfo.streetPoint🔗
IndustryInfo.streetPoint: Vec2i
IndustryInfo.transf🔗
IndustryInfo.transf: Mat4f
IndustryInfo.onWater🔗
IndustryInfo.onWater: boolean
IndustryResult🔗
Results of industry generation operations
IndustryResult.toRemove🔗
IndustryResult.toRemove: {Engine.Entity}
IndustryResult.toAdd🔗
IndustryResult.toAdd: {IndustryInfo}
InputActionDesc🔗
global record InputActionDesc
uiName: string type: integer defaultBindings: {KeyComboDef} modifierOnly: boolean uiCategory: string uiOrder: integer duplicateOf: string duplicatedKeybindings: boolean end
Description of an input action for key binding
InputActionDesc.uiName🔗
InputActionDesc.uiName: string
Display name in UI
InputActionDesc.type🔗
InputActionDesc.type: integer
Type index
0: Simple1: AxisLinear2: AxisRadial
InputActionDesc.defaultBindings🔗
InputActionDesc.defaultBindings: {KeyComboDef}
Default key bindings for this action
InputActionDesc.modifierOnly🔗
InputActionDesc.modifierOnly: boolean
Whether this action is modifier-only (i.e. has no trigger key and can be triggered even if the keys are already used elsewhere)
InputActionDesc.uiCategory🔗
InputActionDesc.uiCategory: string
UI category for organization in settings menu
InputActionDesc.uiOrder🔗
InputActionDesc.uiOrder: integer
Display order inside the category in settings menu
InputActionDesc.duplicateOf🔗
InputActionDesc.duplicateOf: string
This is supposed to be an alias only duplicateOf
InputActionDesc.duplicatedKeybindings🔗
InputActionDesc.duplicatedKeybindings: boolean
If keybindings are configured exactly as for the duplicateOf. UI should hide the entry in this case.
InputActionRep🔗
global record InputActionRep
getAll: function(InputActionRep): {string} get: function(InputActionRep, string): InputActionDesc end
InputActionRep.getAll🔗
function InputActionRep.getAll(InputActionRep): {string}Parameters
InputActionRep
{string}
InputActionRep.get🔗
function InputActionRep.get(InputActionRep, string): InputActionDescParameters
InputActionRepstring
InputActionDesc
InputMode🔗
InputMode represents the current input mode.
InputMode.Undefined🔗
InputMode.Undefined: InputMode
InputMode.KeyboardMouse🔗
InputMode.KeyboardMouse: InputMode
InputMode.Gamepad🔗
InputMode.Gamepad: InputMode
KeyCombo🔗
global record KeyCombo
new: function(KeyComboDef): KeyCombo toString: function(KeyCombo): string isModifierOnly: function(KeyCombo): boolean relevantFor: function(KeyCombo, InputMode): boolean end
Key combination for input binding
KeyCombo.new🔗
function KeyCombo.new(KeyComboDef): KeyComboParameters
KeyComboDef
KeyCombo
KeyCombo.toString🔗
function KeyCombo.toString(KeyCombo): stringParameters
KeyCombo
string
KeyCombo.isModifierOnly🔗
function KeyCombo.isModifierOnly(KeyCombo): booleanParameters
KeyCombo
boolean
KeyCombo.relevantFor🔗
function KeyCombo.relevantFor(KeyCombo, InputMode): booleanParameters
KeyComboInputMode
boolean
KeyComboDef🔗
global record KeyComboDef
new: function(): KeyComboDef setKeyScancode: function(KeyComboDef, integer) addModifierKey: function(KeyComboDef, integer) condition: integer end
Key combination definition for input binding
KeyComboDef.new()🔗
function KeyComboDef.new()(): KeyComboDefReturns
KeyComboDef
KeyComboDef.new(KeyComboDef)🔗
function KeyComboDef.new(KeyComboDef)(KeyComboDef): KeyComboDefParameters
KeyComboDef
KeyComboDef
KeyComboDef.setKeyScancode🔗
function KeyComboDef.setKeyScancode(KeyComboDef, integer)
Set the trigger key to this scancode (ignored if scancode is a modifier key)
ParametersKeyComboDefinteger
KeyComboDef.addModifierKey🔗
function KeyComboDef.addModifierKey(KeyComboDef, integer)
Add a modifier scancode to this combination (ignored if scancode is not a modifier key)
ParametersKeyComboDefinteger
KeyComboDef.condition🔗
KeyComboDef.condition: integer
Trigger condition for the key combination
0: Initial trigger on keydown or when conflicting longpress is rejected1: Initial triggers when keycombo is pressed for X time)
LandUseType🔗
global record LandUseType
RESIDENTIAL: LandUseType COMMERCIAL: LandUseType INDUSTRIAL: LandUseType end
Enumeration for land use types
LandUseType.RESIDENTIAL🔗
LandUseType.RESIDENTIAL: LandUseType
LandUseType.COMMERCIAL🔗
LandUseType.COMMERCIAL: LandUseType
LandUseType.INDUSTRIAL🔗
LandUseType.INDUSTRIAL: LandUseType
LandVehicleMoveInfo🔗
global record LandVehicleMoveInfo
availPower: number traction: number tractiveEffort: number vehicleAvailPower: {number} end
Movement information for land vehicles (trains, trams, road vehicles)
LandVehicleMoveInfo.availPower🔗
LandVehicleMoveInfo.availPower: number
LandVehicleMoveInfo.traction🔗
LandVehicleMoveInfo.traction: number
LandVehicleMoveInfo.tractiveEffort🔗
LandVehicleMoveInfo.tractiveEffort: number
LandVehicleMoveInfo.vehicleAvailPower🔗
LandVehicleMoveInfo.vehicleAvailPower: {number}
Available power per vehicle part
LaneConfig🔗
global record LaneConfig
speed: number width: number height: number forward: boolean transportModes: {TransportMode : boolean} offset: number end
Specification for the lanes of street
LaneConfig.speed🔗
LaneConfig.speed: number
Speed limit for the lane
LaneConfig.width🔗
LaneConfig.width: number
Width of the lane
LaneConfig.height🔗
LaneConfig.height: number
Height of the lane
LaneConfig.forward🔗
LaneConfig.forward: boolean
Whether the lane is in forward direction
LaneConfig.transportModes🔗
LaneConfig.transportModes: {TransportMode : boolean}
Transport modes allowed on this lane
LaneConfig.offset🔗
LaneConfig.offset: number
Offset from center
LaneConnection🔗
global record LaneConnection
segment0: Engine.Entity lane0: integer segment1: Engine.Entity lane1: integer withRoad: boolean withTram: boolean end
A custom configuration for lanes on crossings
LaneConnection.segment0🔗
LaneConnection.segment0: Engine.Entity
Incoming segment entity
LaneConnection.lane0🔗
LaneConnection.lane0: integer
Incoming lane index (zero-based, from left to right when looking from the Node to segment0)
LaneConnection.segment1🔗
LaneConnection.segment1: Engine.Entity
Outgoing segment entity
LaneConnection.lane1🔗
LaneConnection.lane1: integer
Outgoing lane index (zero-based, from left to right when looking from the Node to segment1)
LaneConnection.withRoad🔗
LaneConnection.withRoad: boolean
Whether connection supports road
LaneConnection.withTram🔗
LaneConnection.withTram: boolean
Whether connection supports tram
LangKey🔗
Localization information
LangKey.new🔗
function LangKey.new(): LangKeyReturns
LangKey
LangKey.equals🔗
function LangKey.equals(LangKey, LangKey): booleanParameters
LangKeyLangKey
boolean
LangKey.code🔗
LangKey.code: string
Language code as two characters code or two characters and a two character rvariant code separated by underscore
LangKey.mod🔗
LangKey.mod: Mod.ModId
Mod from which the lanuage is originating from
LanguageRep🔗
Contains all available languages of the application, including languages added by mods
LanguageRep.getAllLanguages🔗
function LanguageRep.getAllLanguages(LanguageRep): {{string, LangKey}}Parameters
LanguageRep
{{string, LangKey}}
LayerConfig🔗
global record LayerConfig
new: function(): LayerConfigrecord EmissionColorMap
new: function(): EmissionColorMaprecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} endcolors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType endrecord VisualizationType
DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType endrecord TerrainColorMap
new: function(): TerrainColorMapcolors: Colors endrecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean endrecord TerrainContours
new: function(): TerrainContourscontours: {Contour} endrecord Contour
new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number endrecord ColorPassFn
new: function(): ColorPassFnrecord BaseColor
new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean endrecord BaseMappedColor
new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean endrecord CargoColor
new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean endrecord DestinationColor
new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer endrecord EmissionEmitterColor
new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number endrecord EmissionImpactColor
new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number endrecord FallbackColor
new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor endrecord IndustryColor
new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean endrecord LandUseColor
new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor endrecord LineVehicleColor
new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} endrecord MaintainedTransportVehicleColor
new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity endrecord SpeedLimitsColor
new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean endterrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor endrecord TrafficColor
new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean endrecord BuildingRenderableConfig
new: function(): BuildingRenderableConfig isVisible: boolean includeTownBuildings: boolean includeTownBuildingModels: boolean includeTownBuildingMainModel: boolean includeIndustries: boolean includeWarehouses: boolean includeStations: boolean includeEdges: boolean endrecord CatchmentAreaDisplaySettings
new: function(): CatchmentAreaDisplaySettings personBaseColor: Vec3f cargoBaseColor: Vec3f inactiveColor: Vec3f unreachableColor: Vec3f deleteColor: Vec3f maintenanceColor: Vec3f noiseColor: Vec3f pollutionColor: Vec3f borderAlpha: number borderAlphaPassive: number godrayAlpha: number godrayAlphaPassive: number innerAlpha: number buildingAlpha: number borderWidth: number endrecord CatchmentAreaRenderableConfig
new: function(): CatchmentAreaRenderableConfig isVisible: boolean displaySettings: CatchmentAreaDisplaySettings cargo: boolean person: boolean maintenance: boolean noise: boolean pollution: boolean addGodrays: boolean entity: Engine.Entity carriers: {Carrier} endrecord CargoEdgesRenderables
new: function(): CargoEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} showPlayerTransport: boolean showPrivateTransport: boolean playerTransportColor: {Vec4f, Vec4f} privateTransportColor: {Vec4f, Vec4f} numTransportLevels: integer signConfig: SignConfig endrecord SatisfactionEdgesRenderables
new: function(): SatisfactionEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} colors: {Vec4f} thresholds: {number} signConfig: SignConfig endrecord SpeedLimitsEdgesRenderables
new: function(): SpeedLimitsEdgesRenderables speedColor: {Vec4f, Vec4f, Vec4f} undergroundSpeedColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer tunnelOutlineColor: Vec4f tunnelOutlineSize: number signConfig: SignConfig hideNonPlayerOwned: boolean hideNonLocked: boolean endrecord TrafficEdgesRenderables
new: function(): TrafficEdgesRenderables trafficColor: {Vec4f, Vec4f, Vec4f} undergroundTrafficColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer discrete: boolean tunnelOutlineColor: Vec4f tunnelOutlineSize: number endrecord VoronoiRenderableConfig
new: function(): VoronoiRenderableConfig showTowns: boolean townsOfInterest: {Engine.Entity} showMapBorder: boolean lineWidth: number colors: {Vec4f} sectionsPerColor: integer fadingMinHeight: number fadingDeltaHeight: number endrecord WindRenderableConfig
new: function(): WindRenderableConfig isVisible: boolean emissionType: Engine.Component.EmissionGrid.Type endcolorMap: any contours: TerrainContours colorPassFn: ColorPassFn colorPassFnForBuildingRenderableOnly: boolean buildingRenderableConfig: BuildingRenderableConfig catchmentAreaRenderableConfig: CatchmentAreaRenderableConfig edgeRenderableConfig: any voronoiRenderableConfig: VoronoiRenderableConfig windRenderableConfig: WindRenderableConfig plotsRenderableConfig: PlotsRenderableConfig cargoFlowRenderableConfig: CargoFlowRenderableConfig undergroundMode: boolean showOneWay: boolean endrecord CargoFlowRenderableConfig
new: function(): CargoFlowRenderableConfigflowData: {FlowData} endrecord FlowData
new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
Describes configuration for 3d layers that can be enabled with the react interface
LayerConfig.new()🔗
function LayerConfig.new()(): LayerConfigReturns
LayerConfig
LayerConfig.new(LayerConfig)🔗
function LayerConfig.new(LayerConfig)(LayerConfig): LayerConfigParameters
LayerConfig
LayerConfig
LayerConfig.EmissionColorMap🔗
record LayerConfig.EmissionColorMap
new: function(): EmissionColorMaprecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} endcolors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType endrecord VisualizationType
DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType end
Colors entities and terrain based on
LayerConfig.EmissionColorMap.new()🔗
function LayerConfig.EmissionColorMap.new()(): EmissionColorMapReturns
EmissionColorMap
LayerConfig.EmissionColorMap.new(EmissionColorMap)🔗
function LayerConfig.EmissionColorMap.new(EmissionColorMap)(EmissionColorMap): EmissionColorMapParameters
EmissionColorMap
EmissionColorMap
LayerConfig.EmissionColorMap.Colors🔗
record LayerConfig.EmissionColorMap.Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} end
Thresholds and colors for the emission visualization gradient
LayerConfig.EmissionColorMap.Colors.new()🔗
function LayerConfig.EmissionColorMap.Colors.new()(): ColorsReturns
Colors
LayerConfig.EmissionColorMap.Colors.new(Colors)🔗
function LayerConfig.EmissionColorMap.Colors.new(Colors)(Colors): ColorsParameters
Colors
Colors
LayerConfig.EmissionColorMap.Colors.numberOfLevels🔗
LayerConfig.EmissionColorMap.Colors.numberOfLevels: integer
LayerConfig.EmissionColorMap.Colors.colors🔗
LayerConfig.EmissionColorMap.Colors.colors: {Vec4f}
LayerConfig.EmissionColorMap.Colors.thresholds🔗
LayerConfig.EmissionColorMap.Colors.thresholds: {number}
LayerConfig.EmissionColorMap.VisualizationType🔗
Type of visualization for the emission color
LayerConfig.EmissionColorMap.VisualizationType.DecibelCurrent🔗
LayerConfig.EmissionColorMap.VisualizationType.DecibelCurrent: VisualizationType
LayerConfig.EmissionColorMap.VisualizationType.DecibelAverage🔗
LayerConfig.EmissionColorMap.VisualizationType.DecibelAverage: VisualizationType
LayerConfig.EmissionColorMap.VisualizationType.Combined🔗
LayerConfig.EmissionColorMap.VisualizationType.Combined: VisualizationType
LayerConfig.EmissionColorMap.colors🔗
LayerConfig.EmissionColorMap.colors: Colors
Configures colors as a gradient map from the given threshold
LayerConfig.EmissionColorMap.currentEmissionId🔗
LayerConfig.EmissionColorMap.currentEmissionId: Engine.Component.EmissionGrid.Type
Choose among visualization of noise or pollution
LayerConfig.EmissionColorMap.visualizationType🔗
LayerConfig.EmissionColorMap.visualizationType: VisualizationType
The type of emission visualization to dsplay: average or instant
LayerConfig.TerrainColorMap🔗
record LayerConfig.TerrainColorMap
new: function(): TerrainColorMapcolors: Colors endrecord Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean end
Configures the terrain to be visualize terrain heightmap features like elevation and presence of navigable waters
LayerConfig.TerrainColorMap.new()🔗
function LayerConfig.TerrainColorMap.new()(): TerrainColorMap
Iniztialize a new TerrainColorMap object
ReturnsTerrainColorMap
LayerConfig.TerrainColorMap.new(TerrainColorMap)🔗
function LayerConfig.TerrainColorMap.new(TerrainColorMap)(TerrainColorMap): TerrainColorMap
Copy constructs a TerrainColorMap
ParametersTerrainColorMap
TerrainColorMap
LayerConfig.TerrainColorMap.Colors🔗
record LayerConfig.TerrainColorMap.Colors
new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean end
Actual color configuration for the terrain visualization
LayerConfig.TerrainColorMap.Colors.new()🔗
function LayerConfig.TerrainColorMap.Colors.new()(): ColorsReturns
Colors
LayerConfig.TerrainColorMap.Colors.new(Colors)🔗
function LayerConfig.TerrainColorMap.Colors.new(Colors)(Colors): ColorsParameters
Colors
Colors
LayerConfig.TerrainColorMap.Colors.numberOfLevels🔗
LayerConfig.TerrainColorMap.Colors.numberOfLevels: integer
LayerConfig.TerrainColorMap.Colors.colors🔗
LayerConfig.TerrainColorMap.Colors.colors: {Vec4f}
Set the colors corrsponding to the thresholds, length must be equal to numerOfLevels and less than 4
LayerConfig.TerrainColorMap.Colors.thresholds🔗
LayerConfig.TerrainColorMap.Colors.thresholds: {number}
Elevation thresholds (in meters above water) for the matching colors
LayerConfig.TerrainColorMap.Colors.water🔗
LayerConfig.TerrainColorMap.Colors.water: Vec4f
Color (as RGBA value) of non-navigable waters
LayerConfig.TerrainColorMap.Colors.navigableWater🔗
LayerConfig.TerrainColorMap.Colors.navigableWater: Vec4f
Color (as RGBA value) of navigable waters
LayerConfig.TerrainColorMap.Colors.interpolateNavigableWater🔗
LayerConfig.TerrainColorMap.Colors.interpolateNavigableWater: boolean
Smoothen edges of navigable water grid with linear interpolation for more pleasant (yet imprecise) look
LayerConfig.TerrainColorMap.colors🔗
LayerConfig.TerrainColorMap.colors: Colors
Color configuration for the TerrainColorMap
LayerConfig.TerrainContours🔗
record LayerConfig.TerrainContours
new: function(): TerrainContourscontours: {Contour} endrecord Contour
new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number end
Configuration for contour lines
LayerConfig.TerrainContours.new()🔗
function LayerConfig.TerrainContours.new()(): TerrainContoursReturns
TerrainContours
LayerConfig.TerrainContours.new(TerrainContours)🔗
function LayerConfig.TerrainContours.new(TerrainContours)(TerrainContours): TerrainContoursParameters
TerrainContours
TerrainContours
LayerConfig.TerrainContours.Contour🔗
record LayerConfig.TerrainContours.Contour
new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number end
Configuration of a single contour (level line)
LayerConfig.TerrainContours.Contour.new()🔗
function LayerConfig.TerrainContours.Contour.new()(): ContourReturns
Contour
LayerConfig.TerrainContours.Contour.new(Contour)🔗
function LayerConfig.TerrainContours.Contour.new(Contour)(Contour): ContourParameters
Contour
Contour
LayerConfig.TerrainContours.Contour.color🔗
LayerConfig.TerrainContours.Contour.color: Vec4f
LayerConfig.TerrainContours.Contour.level🔗
LayerConfig.TerrainContours.Contour.level: number
LayerConfig.TerrainContours.Contour.thickness🔗
LayerConfig.TerrainContours.Contour.thickness: number
Thicknes of the contour
LayerConfig.TerrainContours.Contour.fadeDistance🔗
LayerConfig.TerrainContours.Contour.fadeDistance: number
how far the countour lines will be visible for
LayerConfig.TerrainContours.contours🔗
LayerConfig.TerrainContours.contours: {Contour}
List of contours for the terrain (at most 10)
LayerConfig.ColorPassFn🔗
record LayerConfig.ColorPassFn
new: function(): ColorPassFnrecord BaseColor
new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean endrecord BaseMappedColor
new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean endrecord CargoColor
new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean endrecord DestinationColor
new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer endrecord EmissionEmitterColor
new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number endrecord EmissionImpactColor
new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number endrecord FallbackColor
new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor endrecord IndustryColor
new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean endrecord LandUseColor
new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor endrecord LineVehicleColor
new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} endrecord MaintainedTransportVehicleColor
new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity endrecord SpeedLimitsColor
new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean endterrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor endrecord TrafficColor
new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean end
Configures the coloring for entities: each entity type can be configured with its own specific coloring
among a selection of available modes
LayerConfig.ColorPassFn.new()🔗
function LayerConfig.ColorPassFn.new()(): ColorPassFn
Creates a new isntance of a color pass configuration
ReturnsColorPassFn
LayerConfig.ColorPassFn.new(ColorPassFn)🔗
function LayerConfig.ColorPassFn.new(ColorPassFn)(ColorPassFn): ColorPassFn
Copy the color pass function
ParametersColorPassFn
ColorPassFn
LayerConfig.ColorPassFn.BaseColor🔗
record LayerConfig.ColorPassFn.BaseColor
new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean end
Generic static constant color for this type of entity, can be applied to any entity
LayerConfig.ColorPassFn.BaseColor.new🔗
function LayerConfig.ColorPassFn.BaseColor.new(BaseColor): BaseColor
Creates a new instance of a basic color with default values or as a copy of an existing color
ParametersBaseColor
BaseColor
LayerConfig.ColorPassFn.BaseColor.fromColor🔗
function LayerConfig.ColorPassFn.BaseColor.fromColor(Vec4f, boolean): BaseColor
Create an instance of base color from a color
ParametersVec4fboolean
BaseColor
LayerConfig.ColorPassFn.BaseColor.value🔗
LayerConfig.ColorPassFn.BaseColor.value: Vec4f
Color RGBA value
LayerConfig.ColorPassFn.BaseColor.overrideColorMap🔗
LayerConfig.ColorPassFn.BaseColor.overrideColorMap: boolean
If this value is set, the value of a configured color map (such as emission) will be overridden
LayerConfig.ColorPassFn.BaseMappedColor🔗
record LayerConfig.ColorPassFn.BaseMappedColor
new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean end
A color that depends on the given input values and applies a different gradient depending on the input
LayerConfig.ColorPassFn.BaseMappedColor.new()🔗
function LayerConfig.ColorPassFn.BaseMappedColor.new()(): BaseMappedColorReturns
BaseMappedColor
LayerConfig.ColorPassFn.BaseMappedColor.new(BaseMappedColor)🔗
function LayerConfig.ColorPassFn.BaseMappedColor.new(BaseMappedColor)(BaseMappedColor): BaseMappedColorParameters
BaseMappedColor
BaseMappedColor
LayerConfig.ColorPassFn.BaseMappedColor.new({number}, {Vec4f}, boolean, boolean)🔗
function LayerConfig.ColorPassFn.BaseMappedColor.new({number}, {Vec4f}, boolean, boolean)({number}, {Vec4f}, boolean, boolean): BaseRangeColorParameters
{number}{Vec4f}booleanboolean
BaseRangeColor
LayerConfig.ColorPassFn.BaseMappedColor.thresholds🔗
LayerConfig.ColorPassFn.BaseMappedColor.thresholds: {number}
Specifies values that are assigned to the specific colors
LayerConfig.ColorPassFn.BaseMappedColor.colors🔗
LayerConfig.ColorPassFn.BaseMappedColor.colors: {Vec4f}
List of colors for the matching thresholds. Must have the same length as thresholds
LayerConfig.ColorPassFn.BaseMappedColor.nearest🔗
LayerConfig.ColorPassFn.BaseMappedColor.nearest: boolean
Interpolation applied to color: if neares the gradient will only pick exact values of the color that are specified
LayerConfig.ColorPassFn.BaseMappedColor.overrideColorMap🔗
LayerConfig.ColorPassFn.BaseMappedColor.overrideColorMap: boolean
If this value is set, the value of a configured color map (such as emission) will be overridden
LayerConfig.ColorPassFn.BaseRangeColor🔗
record LayerConfig.ColorPassFn.BaseRangeColor
new: function(): BaseRangeColor minMax: {Vec4f} overrideColorMap: boolean end
Specify two colors that will be mixed based on the input value
LayerConfig.ColorPassFn.BaseRangeColor.new()🔗
function LayerConfig.ColorPassFn.BaseRangeColor.new()(): BaseRangeColor
Constructs a new empty BaseRangeColor
ReturnsBaseRangeColor
LayerConfig.ColorPassFn.BaseRangeColor.new(BaseRangeColor)🔗
function LayerConfig.ColorPassFn.BaseRangeColor.new(BaseRangeColor)(BaseRangeColor): BaseRangeColor
Constructs a copy of the input color range
ParametersBaseRangeColor
BaseRangeColor
LayerConfig.ColorPassFn.BaseRangeColor.new({Vec4f}, boolean)🔗
function LayerConfig.ColorPassFn.BaseRangeColor.new({Vec4f}, boolean)({Vec4f}, boolean): BaseRangeColor
Constructs a BaseRangeColor given a pair of colorsx
Parameters{Vec4f}boolean
BaseRangeColor
LayerConfig.ColorPassFn.BaseRangeColor.minMax🔗
LayerConfig.ColorPassFn.BaseRangeColor.minMax: {Vec4f}
A pair of colors among which the final color will be mixed
LayerConfig.ColorPassFn.BaseRangeColor.overrideColorMap🔗
LayerConfig.ColorPassFn.BaseRangeColor.overrideColorMap: boolean
If this value is set, the value of a configured color map (such as emission) will be overridden
LayerConfig.ColorPassFn.CargoColor🔗
record LayerConfig.ColorPassFn.CargoColor
new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean end
Specifies colors for town buildings for each land use type based on production rating
LayerConfig.ColorPassFn.CargoColor.new🔗
function LayerConfig.ColorPassFn.CargoColor.new(): CargoColor
Constructs a new empty CargoColor
ReturnsCargoColor
LayerConfig.ColorPassFn.CargoColor.clone🔗
function LayerConfig.ColorPassFn.CargoColor.clone(CargoColor): CargoColor
Constructs a copy of the input cargo color
ParametersCargoColor
CargoColor
LayerConfig.ColorPassFn.CargoColor.residential🔗
LayerConfig.ColorPassFn.CargoColor.residential: BaseRangeColor
Color that applies to commercial land use type
LayerConfig.ColorPassFn.CargoColor.industrial🔗
LayerConfig.ColorPassFn.CargoColor.industrial: BaseRangeColor
Color that applies to industrial land use type
LayerConfig.ColorPassFn.CargoColor.commercial🔗
LayerConfig.ColorPassFn.CargoColor.commercial: BaseRangeColor
Color that applies to commercial land use type
LayerConfig.ColorPassFn.CargoColor.numBuildingLevels🔗
LayerConfig.ColorPassFn.CargoColor.numBuildingLevels: integer
Number of discrete steps the color is interpolated into (e.g. a value of 3 will result in interpolation values of 0, 0.5 and 1)
LayerConfig.ColorPassFn.CargoColor.includePassengers🔗
LayerConfig.ColorPassFn.CargoColor.includePassengers: boolean
Whether to include passengers cargo for the coloring (rating also includes line usage for inhabitants)
LayerConfig.ColorPassFn.DestinationColor🔗
record LayerConfig.ColorPassFn.DestinationColor
new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer end
Specifiers colors for PersonCapacity entities based on whether any SimPerson has a destination to it, based
on the specified filtering criteria.
LayerConfig.ColorPassFn.DestinationColor.new()🔗
function LayerConfig.ColorPassFn.DestinationColor.new()(): DestinationColor
Constructs an empty DestinationColor
ReturnsDestinationColor
LayerConfig.ColorPassFn.DestinationColor.new(DestinationColor)🔗
function LayerConfig.ColorPassFn.DestinationColor.new(DestinationColor)(DestinationColor): DestinationColor
Copies a given destination color
ParametersDestinationColor
DestinationColor
LayerConfig.ColorPassFn.DestinationColor.town🔗
LayerConfig.ColorPassFn.DestinationColor.town: Engine.Entity
Only consider TownBuildings that belong to a given Town
LayerConfig.ColorPassFn.DestinationColor.showPlayerTransport🔗
LayerConfig.ColorPassFn.DestinationColor.showPlayerTransport: boolean
Do consider SimPersons moving using Line movement types
LayerConfig.ColorPassFn.DestinationColor.showPrivateTransport🔗
LayerConfig.ColorPassFn.DestinationColor.showPrivateTransport: boolean
Do consider SimPersons moving using Drive or Walk movement types
LayerConfig.ColorPassFn.DestinationColor.residential🔗
LayerConfig.ColorPassFn.DestinationColor.residential: BaseRangeColor
Select colors for people moving to residential destinations, if any filtered person satifies the criteria,
the max color will be applied, otherwise the min color will be used
LayerConfig.ColorPassFn.DestinationColor.industrial🔗
LayerConfig.ColorPassFn.DestinationColor.industrial: BaseRangeColor
Select colors for people moving to industrial destinations, if any filtered person satifies the criteria,
the max color will be applied, otherwise the min color will be used
LayerConfig.ColorPassFn.DestinationColor.commercial🔗
LayerConfig.ColorPassFn.DestinationColor.commercial: BaseRangeColor
Select colors for people moving to commercial destinations, if any filtered person satifies the criteria,
the max color will be applied, otherwise the min color will be used
LayerConfig.ColorPassFn.DestinationColor.numBuildingLevels🔗
LayerConfig.ColorPassFn.DestinationColor.numBuildingLevels: integer
Number of discrete steps the color is interpolated into (e.g. a value of 3 will result in interpolation values of 0, 0.5 and 1)
No effect in this case, always set it to two
LayerConfig.ColorPassFn.EmissionEmitterColor🔗
record LayerConfig.ColorPassFn.EmissionEmitterColor
new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number end
Color EmissionEmitter entities based on emission type and value
LayerConfig.ColorPassFn.EmissionEmitterColor.new()🔗
function LayerConfig.ColorPassFn.EmissionEmitterColor.new()(): EmissionEmitterColor
Creates a new empty instance of EmissionEmitterColor
ReturnsEmissionEmitterColor
LayerConfig.ColorPassFn.EmissionEmitterColor.new(EmissionEmitterColor)🔗
function LayerConfig.ColorPassFn.EmissionEmitterColor.new(EmissionEmitterColor)(EmissionEmitterColor): EmissionImpactColor
Creates a new copy of an instance of EmissionEmitterColor
ParametersEmissionEmitterColor
EmissionImpactColor
LayerConfig.ColorPassFn.EmissionEmitterColor.color🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.color: BaseRangeColor
A pair of colors that will be interpolated, based on the value of the emission
LayerConfig.ColorPassFn.EmissionEmitterColor.currentEmissionId🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.currentEmissionId: Engine.Component.EmissionGrid.Type
Selects the type of emission toconsider between noise and pollution
LayerConfig.ColorPassFn.EmissionEmitterColor.lowerBound🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.lowerBound: number
Lower bound for the range, at which min color of color will be chosen
LayerConfig.ColorPassFn.EmissionEmitterColor.upperBound🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.upperBound: number
Upper bound for the range, at which max color of color will be chosen
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColor🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColor: BaseRangeColor
A pair of colors that will be interpolated, based on the value of the emission, when the emission is negative
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColorLowerBound🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColorLowerBound: number
Lower bound for the negative range, at which min color of color will be chosen
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColorUpperBound🔗
LayerConfig.ColorPassFn.EmissionEmitterColor.goodColorUpperBound: number
Upper bound for the negative range, at which max color of color will be chosen
LayerConfig.ColorPassFn.EmissionImpactColor🔗
record LayerConfig.ColorPassFn.EmissionImpactColor
new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number end
Color the entity based on the current level of emission the entity is experiencing
LayerConfig.ColorPassFn.EmissionImpactColor.new()🔗
function LayerConfig.ColorPassFn.EmissionImpactColor.new()(): EmissionImpactColorReturns
EmissionImpactColor
LayerConfig.ColorPassFn.EmissionImpactColor.new(EmissionImpactColor)🔗
function LayerConfig.ColorPassFn.EmissionImpactColor.new(EmissionImpactColor)(EmissionImpactColor): EmissionImpactColorParameters
EmissionImpactColor
EmissionImpactColor
LayerConfig.ColorPassFn.EmissionImpactColor.color🔗
LayerConfig.ColorPassFn.EmissionImpactColor.color: BaseRangeColor
A pair of colors that maps lowerBoundDB (the min experienced emission) to uppedBoundDB (the max experienced emission)
LayerConfig.ColorPassFn.EmissionImpactColor.currentEmissionId🔗
LayerConfig.ColorPassFn.EmissionImpactColor.currentEmissionId: Engine.Component.EmissionGrid.Type
Selects the type of emission toconsider between noise and pollution
LayerConfig.ColorPassFn.EmissionImpactColor.useAverage🔗
LayerConfig.ColorPassFn.EmissionImpactColor.useAverage: boolean
Choose to apply smoothed (averaged) emission isntead of instantaneous one
LayerConfig.ColorPassFn.EmissionImpactColor.lowerBoundDB🔗
LayerConfig.ColorPassFn.EmissionImpactColor.lowerBoundDB: number
This value maps to min color in color
LayerConfig.ColorPassFn.EmissionImpactColor.upperBoundDB🔗
LayerConfig.ColorPassFn.EmissionImpactColor.upperBoundDB: number
This value maps to max color in color
LayerConfig.ColorPassFn.FallbackColor🔗
record LayerConfig.ColorPassFn.FallbackColor
new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor end
Color chosen if no other selected type matches the entity
LayerConfig.ColorPassFn.FallbackColor.new()🔗
function LayerConfig.ColorPassFn.FallbackColor.new()(): FallbackColor
Creates a new empty isntance FallbackColor
ReturnsFallbackColor
LayerConfig.ColorPassFn.FallbackColor.new(FallbackColor)🔗
function LayerConfig.ColorPassFn.FallbackColor.new(FallbackColor)(FallbackColor): FallbackColor
Creates a copy of FallbackColor
ParametersFallbackColor
FallbackColor
LayerConfig.ColorPassFn.FallbackColor.terrain🔗
LayerConfig.ColorPassFn.FallbackColor.terrain: BaseColor
Color applied to the terrain and terrain-like entities
LayerConfig.ColorPassFn.FallbackColor.water🔗
LayerConfig.ColorPassFn.FallbackColor.water: BaseColor
Color applied to water meshes
LayerConfig.ColorPassFn.FallbackColor.edge🔗
LayerConfig.ColorPassFn.FallbackColor.edge: BaseColor
Color applied to entities with BaseEdge components
LayerConfig.ColorPassFn.FallbackColor.node🔗
LayerConfig.ColorPassFn.FallbackColor.node: BaseColor
Color applied to entities with BaseNode components
LayerConfig.ColorPassFn.FallbackColor.parallelStrip🔗
LayerConfig.ColorPassFn.FallbackColor.parallelStrip: BaseColor
Color applied to entities with ParallelStrip components
LayerConfig.ColorPassFn.FallbackColor.whatever🔗
LayerConfig.ColorPassFn.FallbackColor.whatever: BaseColor
Color applied to any other entity not matching a specific type
LayerConfig.ColorPassFn.IndustryColor🔗
record LayerConfig.ColorPassFn.IndustryColor
new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean end
Apply a color to Industry entities
LayerConfig.ColorPassFn.IndustryColor.new()🔗
function LayerConfig.ColorPassFn.IndustryColor.new()(): IndustryColor
Creates a new empty IndustryColor
ReturnsIndustryColor
LayerConfig.ColorPassFn.IndustryColor.new(IndustryColor)🔗
function LayerConfig.ColorPassFn.IndustryColor.new(IndustryColor)(IndustryColor): IndustryColor
Creates a copy of an existing IndustryColor
ParametersIndustryColor
IndustryColor
LayerConfig.ColorPassFn.IndustryColor.industry🔗
LayerConfig.ColorPassFn.IndustryColor.industry: BaseColor
The color to apply
LayerConfig.ColorPassFn.IndustryColor.onlyWithPersonCapacity🔗
LayerConfig.ColorPassFn.IndustryColor.onlyWithPersonCapacity: boolean
Only apply the color if the entity also has an industrial PersonCapacity color
LayerConfig.ColorPassFn.LandUseColor🔗
record LayerConfig.ColorPassFn.LandUseColor
new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor end
Apply colors to an entity based on the level of the TownBuilding, based on the LandUseType
LayerConfig.ColorPassFn.LandUseColor.new()🔗
function LayerConfig.ColorPassFn.LandUseColor.new()(): LandUseColor
Creates a new empty LandUseColor
ReturnsLandUseColor
LayerConfig.ColorPassFn.LandUseColor.new(LandUseColor)🔗
function LayerConfig.ColorPassFn.LandUseColor.new(LandUseColor)(LandUseColor): LandUseColor
Creates a copy of an existing LandUseColor
ParametersLandUseColor
LandUseColor
LayerConfig.ColorPassFn.LandUseColor.residential🔗
LayerConfig.ColorPassFn.LandUseColor.residential: BaseRangeColor
Color to be applied to residential LandUseType
LayerConfig.ColorPassFn.LandUseColor.industrial🔗
LayerConfig.ColorPassFn.LandUseColor.industrial: BaseRangeColor
Color to be applied to industrial LandUseType
LayerConfig.ColorPassFn.LandUseColor.commercial🔗
LayerConfig.ColorPassFn.LandUseColor.commercial: BaseRangeColor
Color to be applied to commercial LandUseType
LayerConfig.ColorPassFn.LineVehicleColor🔗
record LayerConfig.ColorPassFn.LineVehicleColor
new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} end
Apply colors to vehicles based on the line color
LayerConfig.ColorPassFn.LineVehicleColor.new()🔗
function LayerConfig.ColorPassFn.LineVehicleColor.new()(): LineVehicleColor
Creates a new empty LineVehicleColor
ReturnsLineVehicleColor
LayerConfig.ColorPassFn.LineVehicleColor.new(LineVehicleColor)🔗
function LayerConfig.ColorPassFn.LineVehicleColor.new(LineVehicleColor)(LineVehicleColor): LandUseColor
Creates a copy of an existing LineVehicleColor
ParametersLineVehicleColor
LandUseColor
LayerConfig.ColorPassFn.LineVehicleColor.highlightedEntities🔗
LayerConfig.ColorPassFn.LineVehicleColor.highlightedEntities: {Engine.Entity}
Specify specific entites to apply an highlight effect to
LayerConfig.ColorPassFn.LineVehicleColor.carriers🔗
LayerConfig.ColorPassFn.LineVehicleColor.carriers: {Carrier}
Only apply the color to the selected entities
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor🔗
Apply colors based on the maintenance state of a specific vehicle
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new()🔗
function LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new()(): MaintainedTransportVehicleColor
Creates a new empty MaintainedTransportVehicleColor
ReturnsMaintainedTransportVehicleColor
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new(MaintainedTransportVehicleColor)🔗
function LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new(MaintainedTransportVehicleColor)(MaintainedTransportVehicleColor): MaintainedTransportVehicleColor
Creates a copy of an existing MaintainedTransportVehicleColor
ParametersMaintainedTransportVehicleColor
MaintainedTransportVehicleColor
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.color🔗
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.color: BaseColor
The color to apply if the entity is being maintaned
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.maintenanceStationEntity🔗
LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.maintenanceStationEntity: Engine.Entity
Filter the vehicle based on the specific maintenance station it is maintained with
LayerConfig.ColorPassFn.StationOvercrowdedColor🔗
record LayerConfig.ColorPassFn.StationOvercrowdedColor
new: function(): StationOvercrowdedColor color: BaseMappedColor end
Color stations based on the overcrowdedness of the station
LayerConfig.ColorPassFn.StationOvercrowdedColor.new()🔗
function LayerConfig.ColorPassFn.StationOvercrowdedColor.new()(): StationOvercrowdedColor
Creates a new empty StationOvercrowdedColor
ReturnsStationOvercrowdedColor
LayerConfig.ColorPassFn.StationOvercrowdedColor.new(StationOvercrowdedColor)🔗
function LayerConfig.ColorPassFn.StationOvercrowdedColor.new(StationOvercrowdedColor)(StationOvercrowdedColor): StationOvercrowdedColor
Creates a copy of an existing StationOvercrowdedColor
ParametersStationOvercrowdedColor
StationOvercrowdedColor
LayerConfig.ColorPassFn.StationOvercrowdedColor.color🔗
LayerConfig.ColorPassFn.StationOvercrowdedColor.color: BaseMappedColor
LayerConfig.ColorPassFn.SpeedLimitsColor🔗
record LayerConfig.ColorPassFn.SpeedLimitsColor
new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean end
Color transport network extes based on the max speed of the transport network edge
LayerConfig.ColorPassFn.SpeedLimitsColor.new()🔗
function LayerConfig.ColorPassFn.SpeedLimitsColor.new()(): SpeedLimitsColor
Creates a new empty SpeedLimitsColor
ReturnsSpeedLimitsColor
LayerConfig.ColorPassFn.SpeedLimitsColor.new(SpeedLimitsColor)🔗
function LayerConfig.ColorPassFn.SpeedLimitsColor.new(SpeedLimitsColor)(SpeedLimitsColor): SpeedLimitsColor
Creates a copy of an existing SpeedLimitsColor
ParametersSpeedLimitsColor
SpeedLimitsColor
LayerConfig.ColorPassFn.SpeedLimitsColor.slowToFast🔗
LayerConfig.ColorPassFn.SpeedLimitsColor.slowToFast: {BaseColor}
Interolates colors in this list between the min speed and max speed, based on all available street templates for the year
LayerConfig.ColorPassFn.SpeedLimitsColor.numberOfLevels🔗
LayerConfig.ColorPassFn.SpeedLimitsColor.numberOfLevels: integer
Discretize the number of levels based on this value
LayerConfig.ColorPassFn.SpeedLimitsColor.hideNonPlayerOwned🔗
LayerConfig.ColorPassFn.SpeedLimitsColor.hideNonPlayerOwned: boolean
Hide edges that are not owned by the player
LayerConfig.ColorPassFn.SpeedLimitsColor.hideNonLocked🔗
LayerConfig.ColorPassFn.SpeedLimitsColor.hideNonLocked: boolean
Hide edges that do not have the roadDevelopmentLocked flag
LayerConfig.ColorPassFn.TrafficColor🔗
record LayerConfig.ColorPassFn.TrafficColor
new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean end
Color the base edge based on the amount of traffic present on it
LayerConfig.ColorPassFn.TrafficColor.new()🔗
function LayerConfig.ColorPassFn.TrafficColor.new()(): TrafficColor
Creates a new empty TrafficColor
ReturnsTrafficColor
LayerConfig.ColorPassFn.TrafficColor.new(TrafficColor)🔗
function LayerConfig.ColorPassFn.TrafficColor.new(TrafficColor)(TrafficColor): TrafficColor
Creates a copy of an existing TrafficColor
ParametersTrafficColor
TrafficColor
LayerConfig.ColorPassFn.TrafficColor.poorToGood🔗
LayerConfig.ColorPassFn.TrafficColor.poorToGood: {BaseColor}
Interpolates colors in this list (must have three elements) based on the traffic rating of the edge
LayerConfig.ColorPassFn.TrafficColor.numberOfLevels🔗
LayerConfig.ColorPassFn.TrafficColor.numberOfLevels: integer
Discretize the number of levels based on this value
LayerConfig.ColorPassFn.TrafficColor.discrete🔗
LayerConfig.ColorPassFn.TrafficColor.discrete: boolean
Unused
LayerConfig.ColorPassFn.HappinessColor🔗
record LayerConfig.ColorPassFn.HappinessColor
new: function(): HappinessColor normalToPoor: {BaseColor} end
Apply color to entities (station, terminal and warehouse) based on the average happines of their users
LayerConfig.ColorPassFn.HappinessColor.new()🔗
function LayerConfig.ColorPassFn.HappinessColor.new()(): HappinessColor
Creates a new empty HappinessColor
ReturnsHappinessColor
LayerConfig.ColorPassFn.HappinessColor.new(HappinessColor)🔗
function LayerConfig.ColorPassFn.HappinessColor.new(HappinessColor)(HappinessColor): HappinessColor
Creates a copy of an existing HappinessColor
ParametersHappinessColor
HappinessColor
LayerConfig.ColorPassFn.HappinessColor.normalToPoor🔗
LayerConfig.ColorPassFn.HappinessColor.normalToPoor: {BaseColor}
Interpolates colors in this list (must have three elements) based on the average happines of the entity
LayerConfig.ColorPassFn.terrainPainter🔗
LayerConfig.ColorPassFn.terrainPainter: any
Optional terrain painter configuration: nil or BaseColor
LayerConfig.ColorPassFn.waterPainter🔗
LayerConfig.ColorPassFn.waterPainter: any
Optional water painter configuration: nil or BaseColor
LayerConfig.ColorPassFn.townBuildingPainter🔗
LayerConfig.ColorPassFn.townBuildingPainter: any
Optional town building painter configuration: nil, BaseColor, CargoColor, DestinationColor, EmissionImpactColor or LandUseColor
LayerConfig.ColorPassFn.industryPainter🔗
LayerConfig.ColorPassFn.industryPainter: any
Optional industry painter configuration: nil, IndustryColor or DestinationColor
LayerConfig.ColorPassFn.emissionEmitterPainter🔗
LayerConfig.ColorPassFn.emissionEmitterPainter: any
Optional emission emitter painter configuration: nil or EmissionEmitterColor
LayerConfig.ColorPassFn.stationPainter🔗
LayerConfig.ColorPassFn.stationPainter: any
Optional station painter configuration: nil, BaseColor, HappinessColor or StationOvercrowdedColor
LayerConfig.ColorPassFn.warehousePainter🔗
LayerConfig.ColorPassFn.warehousePainter: any
Optional warehouse painter configuration: nil or HappinessColor
LayerConfig.ColorPassFn.transportNetworkPainter🔗
LayerConfig.ColorPassFn.transportNetworkPainter: any
Optional transport network painter configuration: nil, peedLimitsColor or TrafficColor
LayerConfig.ColorPassFn.transportVehiclePainter🔗
LayerConfig.ColorPassFn.transportVehiclePainter: any
Optional transport vehicle painter configuration: nil, LineVehicleColor, TrafficColor or EmissionEmitterColor
LayerConfig.ColorPassFn.landVehiclePainter🔗
LayerConfig.ColorPassFn.landVehiclePainter: any
Optional land vehicle painter configuration: nil or TrafficColor
LayerConfig.ColorPassFn.simAtTerminalPainter🔗
LayerConfig.ColorPassFn.simAtTerminalPainter: any
Optional sim at terminal painter configuration: nil or HappinessColor
LayerConfig.ColorPassFn.fallbackColor🔗
LayerConfig.ColorPassFn.fallbackColor: FallbackColor
Fallback color (if none of the above matches)
LayerConfig.BuildingRenderableConfig🔗
record LayerConfig.BuildingRenderableConfig
new: function(): BuildingRenderableConfig isVisible: boolean includeTownBuildings: boolean includeTownBuildingModels: boolean includeTownBuildingMainModel: boolean includeIndustries: boolean includeWarehouses: boolean includeStations: boolean includeEdges: boolean end
Configures a preview showing town buildings and parcels
LayerConfig.BuildingRenderableConfig.new()🔗
function LayerConfig.BuildingRenderableConfig.new()(): BuildingRenderableConfig
Creates a new empty BuildingRenerableConfig
ReturnsBuildingRenderableConfig
LayerConfig.BuildingRenderableConfig.new(BuildingRenderableConfig)🔗
function LayerConfig.BuildingRenderableConfig.new(BuildingRenderableConfig)(BuildingRenderableConfig): BuildingRenderableConfig
Creates a copy of BuildingRenderableConfig object
ParametersBuildingRenderableConfig
BuildingRenderableConfig
LayerConfig.BuildingRenderableConfig.isVisible🔗
LayerConfig.BuildingRenderableConfig.isVisible: boolean
Actually render this preview
LayerConfig.BuildingRenderableConfig.includeTownBuildings🔗
LayerConfig.BuildingRenderableConfig.includeTownBuildings: boolean
Apply the rendering to town building parcel faces
LayerConfig.BuildingRenderableConfig.includeTownBuildingModels🔗
LayerConfig.BuildingRenderableConfig.includeTownBuildingModels: boolean
Apply the rendering to the actual model instances of the town building
LayerConfig.BuildingRenderableConfig.includeTownBuildingMainModel🔗
LayerConfig.BuildingRenderableConfig.includeTownBuildingMainModel: boolean
Apply the rendering to the main model instance of the town building only, without set dressing
LayerConfig.BuildingRenderableConfig.includeIndustries🔗
LayerConfig.BuildingRenderableConfig.includeIndustries: boolean
Apply the rendering to entities with Industry component
LayerConfig.BuildingRenderableConfig.includeWarehouses🔗
LayerConfig.BuildingRenderableConfig.includeWarehouses: boolean
Apply the rendering to entities with Warehouse component
LayerConfig.BuildingRenderableConfig.includeStations🔗
LayerConfig.BuildingRenderableConfig.includeStations: boolean
Apply the rendering to entities with Station component
LayerConfig.BuildingRenderableConfig.includeEdges🔗
LayerConfig.BuildingRenderableConfig.includeEdges: boolean
Apply the rendering to entities with BaseEdge component
LayerConfig.CatchmentAreaDisplaySettings🔗
record LayerConfig.CatchmentAreaDisplaySettings
new: function(): CatchmentAreaDisplaySettings personBaseColor: Vec3f cargoBaseColor: Vec3f inactiveColor: Vec3f unreachableColor: Vec3f deleteColor: Vec3f maintenanceColor: Vec3f noiseColor: Vec3f pollutionColor: Vec3f borderAlpha: number borderAlphaPassive: number godrayAlpha: number godrayAlphaPassive: number innerAlpha: number buildingAlpha: number borderWidth: number end
Configures the rendering of catchment area of entities
LayerConfig.CatchmentAreaDisplaySettings.new()🔗
function LayerConfig.CatchmentAreaDisplaySettings.new()(): CatchmentAreaDisplaySettings
Creates a new empty CatchmentAreaDisplaySettings
ReturnsCatchmentAreaDisplaySettings
LayerConfig.CatchmentAreaDisplaySettings.new(CatchmentAreaDisplaySettings)🔗
function LayerConfig.CatchmentAreaDisplaySettings.new(CatchmentAreaDisplaySettings)(CatchmentAreaDisplaySettings): CatchmentAreaDisplaySettings
Creates a copy of CatchmentAreaDisplaySettings object
ParametersCatchmentAreaDisplaySettings
CatchmentAreaDisplaySettings
LayerConfig.CatchmentAreaDisplaySettings.personBaseColor🔗
LayerConfig.CatchmentAreaDisplaySettings.personBaseColor: Vec3f
Color for catchment areas that apply to pasengers
LayerConfig.CatchmentAreaDisplaySettings.cargoBaseColor🔗
LayerConfig.CatchmentAreaDisplaySettings.cargoBaseColor: Vec3f
Color for catchment areas that apply to non-passenger cargo
LayerConfig.CatchmentAreaDisplaySettings.inactiveColor🔗
LayerConfig.CatchmentAreaDisplaySettings.inactiveColor: Vec3f
Color for catchment areas that are not affected by current selections
LayerConfig.CatchmentAreaDisplaySettings.unreachableColor🔗
LayerConfig.CatchmentAreaDisplaySettings.unreachableColor: Vec3f
Color for catchment areas that are not reachable
LayerConfig.CatchmentAreaDisplaySettings.deleteColor🔗
LayerConfig.CatchmentAreaDisplaySettings.deleteColor: Vec3f
Color for catchment areas that are being removed
LayerConfig.CatchmentAreaDisplaySettings.maintenanceColor🔗
LayerConfig.CatchmentAreaDisplaySettings.maintenanceColor: Vec3f
Color for catchment areas for maintenance stations repairs
LayerConfig.CatchmentAreaDisplaySettings.noiseColor🔗
LayerConfig.CatchmentAreaDisplaySettings.noiseColor: Vec3f
Color for radii of noise emitters
LayerConfig.CatchmentAreaDisplaySettings.pollutionColor🔗
LayerConfig.CatchmentAreaDisplaySettings.pollutionColor: Vec3f
Color for radii of pollution emitters
LayerConfig.CatchmentAreaDisplaySettings.borderAlpha🔗
LayerConfig.CatchmentAreaDisplaySettings.borderAlpha: number
Transparency of the catchment area border
LayerConfig.CatchmentAreaDisplaySettings.borderAlphaPassive🔗
LayerConfig.CatchmentAreaDisplaySettings.borderAlphaPassive: number
Transparency of the catchment area border when the catchment area is not involved
LayerConfig.CatchmentAreaDisplaySettings.godrayAlpha🔗
LayerConfig.CatchmentAreaDisplaySettings.godrayAlpha: number
Transparency of the middle positioning beam
LayerConfig.CatchmentAreaDisplaySettings.godrayAlphaPassive🔗
LayerConfig.CatchmentAreaDisplaySettings.godrayAlphaPassive: number
Transparency of the middle positioning beam when the catchment area is not involved
LayerConfig.CatchmentAreaDisplaySettings.innerAlpha🔗
LayerConfig.CatchmentAreaDisplaySettings.innerAlpha: number
Transparency of the inside part of the circle
LayerConfig.CatchmentAreaDisplaySettings.buildingAlpha🔗
LayerConfig.CatchmentAreaDisplaySettings.buildingAlpha: number
Transparency of the town building
LayerConfig.CatchmentAreaDisplaySettings.borderWidth🔗
LayerConfig.CatchmentAreaDisplaySettings.borderWidth: number
Width of the catchment are circle's perimeter
LayerConfig.CatchmentAreaRenderableConfig🔗
record LayerConfig.CatchmentAreaRenderableConfig
new: function(): CatchmentAreaRenderableConfig isVisible: boolean displaySettings: CatchmentAreaDisplaySettings cargo: boolean person: boolean maintenance: boolean noise: boolean pollution: boolean addGodrays: boolean entity: Engine.Entity carriers: {Carrier} end
Configures which catchment areas to render
LayerConfig.CatchmentAreaRenderableConfig.new()🔗
function LayerConfig.CatchmentAreaRenderableConfig.new()(): CatchmentAreaRenderableConfigReturns
CatchmentAreaRenderableConfig
LayerConfig.CatchmentAreaRenderableConfig.new(CatchmentAreaRenderableConfig)🔗
function LayerConfig.CatchmentAreaRenderableConfig.new(CatchmentAreaRenderableConfig)(CatchmentAreaRenderableConfig): VoronoiRenderableConfigParameters
CatchmentAreaRenderableConfig
VoronoiRenderableConfig
LayerConfig.CatchmentAreaRenderableConfig.isVisible🔗
LayerConfig.CatchmentAreaRenderableConfig.isVisible: boolean
Activates and deactivate rendering of catchment areas
LayerConfig.CatchmentAreaRenderableConfig.displaySettings🔗
LayerConfig.CatchmentAreaRenderableConfig.displaySettings: CatchmentAreaDisplaySettings
Configures the look and feel of the areas
LayerConfig.CatchmentAreaRenderableConfig.cargo🔗
LayerConfig.CatchmentAreaRenderableConfig.cargo: boolean
Do display cargo-compatible areas
LayerConfig.CatchmentAreaRenderableConfig.person🔗
LayerConfig.CatchmentAreaRenderableConfig.person: boolean
Do display passenger-compatible areas
LayerConfig.CatchmentAreaRenderableConfig.maintenance🔗
LayerConfig.CatchmentAreaRenderableConfig.maintenance: boolean
Do display maintenance station radii
LayerConfig.CatchmentAreaRenderableConfig.noise🔗
LayerConfig.CatchmentAreaRenderableConfig.noise: boolean
Do display emission emitter noise radii
LayerConfig.CatchmentAreaRenderableConfig.pollution🔗
LayerConfig.CatchmentAreaRenderableConfig.pollution: boolean
Do display emission emitter pollution radii
LayerConfig.CatchmentAreaRenderableConfig.addGodrays🔗
LayerConfig.CatchmentAreaRenderableConfig.addGodrays: boolean
Add positioning beams in the middle of the circle
LayerConfig.CatchmentAreaRenderableConfig.entity🔗
LayerConfig.CatchmentAreaRenderableConfig.entity: Engine.Entity
Only add areas to the specific entity
LayerConfig.CatchmentAreaRenderableConfig.carriers🔗
LayerConfig.CatchmentAreaRenderableConfig.carriers: {Carrier}
Only add areas that are affected by specific carriers
LayerConfig.PlotsRenderableConfig🔗
record LayerConfig.PlotsRenderableConfig
new: function(): PlotsRenderableConfig triangles: {Vec2f} end
Configure industry plots renderable
LayerConfig.PlotsRenderableConfig.new()🔗
function LayerConfig.PlotsRenderableConfig.new()(): PlotsRenderableConfigReturns
PlotsRenderableConfig
LayerConfig.PlotsRenderableConfig.new(PlotsRenderableConfig)🔗
function LayerConfig.PlotsRenderableConfig.new(PlotsRenderableConfig)(PlotsRenderableConfig): PlotsRenderableConfigParameters
PlotsRenderableConfig
PlotsRenderableConfig
LayerConfig.PlotsRenderableConfig.triangles🔗
LayerConfig.PlotsRenderableConfig.triangles: {Vec2f}
LayerConfig.SignConfig🔗
Configures the texttual display on edges
LayerConfig.SignConfig.new()🔗
function LayerConfig.SignConfig.new()(): SignConfig
Creates an empty SignConfig object
ReturnsSignConfig
LayerConfig.SignConfig.new(SignConfig)🔗
function LayerConfig.SignConfig.new(SignConfig)(SignConfig): SignConfig
Copies a given SignConfig object
ParametersSignConfig
SignConfig
LayerConfig.SignConfig.signRenderDistance🔗
LayerConfig.SignConfig.signRenderDistance: number
Maximal render distance for spped limits
LayerConfig.CargoEdgesRenderables🔗
record LayerConfig.CargoEdgesRenderables
new: function(): CargoEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} showPlayerTransport: boolean showPrivateTransport: boolean playerTransportColor: {Vec4f, Vec4f} privateTransportColor: {Vec4f, Vec4f} numTransportLevels: integer signConfig: SignConfig end
Add an extra layer on top of base edges showing cargo that flowed onto this edge
LayerConfig.CargoEdgesRenderables.new()🔗
function LayerConfig.CargoEdgesRenderables.new()(): CargoEdgesRenderables
Creates a new empty object of type CargoEdgesRenderables
ReturnsCargoEdgesRenderables
LayerConfig.CargoEdgesRenderables.new(CargoEdgesRenderables)🔗
function LayerConfig.CargoEdgesRenderables.new(CargoEdgesRenderables)(CargoEdgesRenderables): CargoEdgesRenderables
Creates a copy of an object of type CargoEdgesRenderables
ParametersCargoEdgesRenderables
CargoEdgesRenderables
LayerConfig.CargoEdgesRenderables.town🔗
LayerConfig.CargoEdgesRenderables.town: Engine.Entity
Filter only cargo types flowing towards this town entitsy
LayerConfig.CargoEdgesRenderables.cargoTypes🔗
LayerConfig.CargoEdgesRenderables.cargoTypes: {CargoTypeId}
Filter only cargo transported of the given type
LayerConfig.CargoEdgesRenderables.showPlayerTransport🔗
LayerConfig.CargoEdgesRenderables.showPlayerTransport: boolean
Consider cargo transported via lines
LayerConfig.CargoEdgesRenderables.showPrivateTransport🔗
LayerConfig.CargoEdgesRenderables.showPrivateTransport: boolean
Consider cargo transported via private transport
LayerConfig.CargoEdgesRenderables.playerTransportColor🔗
LayerConfig.CargoEdgesRenderables.playerTransportColor: {Vec4f, Vec4f}
Color for low and hight occupancy of transported cargo on public transport (lines)
LayerConfig.CargoEdgesRenderables.privateTransportColor🔗
LayerConfig.CargoEdgesRenderables.privateTransportColor: {Vec4f, Vec4f}
Color for low and hight occupancy of transported cargo on private transport (cargo)
LayerConfig.CargoEdgesRenderables.numTransportLevels🔗
LayerConfig.CargoEdgesRenderables.numTransportLevels: integer
Discretization levels for the cargo
LayerConfig.CargoEdgesRenderables.signConfig🔗
LayerConfig.CargoEdgesRenderables.signConfig: SignConfig
Configures look and feel of labels
LayerConfig.SatisfactionEdgesRenderables🔗
record LayerConfig.SatisfactionEdgesRenderables
new: function(): SatisfactionEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} colors: {Vec4f} thresholds: {number} signConfig: SignConfig end
Configures the rendering of cargo satisfaction on the edge
LayerConfig.SatisfactionEdgesRenderables.new()🔗
function LayerConfig.SatisfactionEdgesRenderables.new()(): SatisfactionEdgesRenderables
Creates a new empty object of type SatisfactionEdgesRenderables
ReturnsSatisfactionEdgesRenderables
LayerConfig.SatisfactionEdgesRenderables.new(SatisfactionEdgesRenderables)🔗
function LayerConfig.SatisfactionEdgesRenderables.new(SatisfactionEdgesRenderables)(SatisfactionEdgesRenderables): SatisfactionEdgesRenderables
Creates a copy of an object of type SatisfactionEdgesRenderables
ParametersSatisfactionEdgesRenderables
SatisfactionEdgesRenderables
LayerConfig.SatisfactionEdgesRenderables.town🔗
LayerConfig.SatisfactionEdgesRenderables.town: Engine.Entity
LayerConfig.SatisfactionEdgesRenderables.cargoTypes🔗
LayerConfig.SatisfactionEdgesRenderables.cargoTypes: {CargoTypeId}
Only consider this cargo types
LayerConfig.SatisfactionEdgesRenderables.colors🔗
LayerConfig.SatisfactionEdgesRenderables.colors: {Vec4f}
Interpotate based on satisfaction percentage of cargo transited through the edge
LayerConfig.SatisfactionEdgesRenderables.thresholds🔗
LayerConfig.SatisfactionEdgesRenderables.thresholds: {number}
Values for the gradient of colors (must have same length as colors)
LayerConfig.SatisfactionEdgesRenderables.signConfig🔗
LayerConfig.SatisfactionEdgesRenderables.signConfig: SignConfig
Configures look and feel of text labels
LayerConfig.SpeedLimitsEdgesRenderables🔗
record LayerConfig.SpeedLimitsEdgesRenderables
new: function(): SpeedLimitsEdgesRenderables speedColor: {Vec4f, Vec4f, Vec4f} undergroundSpeedColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer tunnelOutlineColor: Vec4f tunnelOutlineSize: number signConfig: SignConfig hideNonPlayerOwned: boolean hideNonLocked: boolean end
Configures the rendering of the speed limits on edges
LayerConfig.SpeedLimitsEdgesRenderables.new()🔗
function LayerConfig.SpeedLimitsEdgesRenderables.new()(): SpeedLimitsEdgesRenderables
Creates a new empty object of type SpeedLimitsEdgesRenderables
ReturnsSpeedLimitsEdgesRenderables
LayerConfig.SpeedLimitsEdgesRenderables.new(SpeedLimitsEdgesRenderables)🔗
function LayerConfig.SpeedLimitsEdgesRenderables.new(SpeedLimitsEdgesRenderables)(SpeedLimitsEdgesRenderables): SpeedLimitsEdgesRenderables
Creates a copy of an object of type SpeedLimitsEdgesRenderables
ParametersSpeedLimitsEdgesRenderables
SpeedLimitsEdgesRenderables
LayerConfig.SpeedLimitsEdgesRenderables.speedColor🔗
LayerConfig.SpeedLimitsEdgesRenderables.speedColor: {Vec4f, Vec4f, Vec4f}
Intepolate between these colors based on the speed of the edges
LayerConfig.SpeedLimitsEdgesRenderables.undergroundSpeedColor🔗
LayerConfig.SpeedLimitsEdgesRenderables.undergroundSpeedColor: {Vec4f, Vec4f, Vec4f}
Intepolate between these colors based on the speed of the edges (applied to tunnels)
LayerConfig.SpeedLimitsEdgesRenderables.numberOfLevels🔗
LayerConfig.SpeedLimitsEdgesRenderables.numberOfLevels: integer
LayerConfig.SpeedLimitsEdgesRenderables.tunnelOutlineColor🔗
LayerConfig.SpeedLimitsEdgesRenderables.tunnelOutlineColor: Vec4f
Color of the outline on tunnels
LayerConfig.SpeedLimitsEdgesRenderables.tunnelOutlineSize🔗
LayerConfig.SpeedLimitsEdgesRenderables.tunnelOutlineSize: number
Width of the outline on tunnels
LayerConfig.SpeedLimitsEdgesRenderables.signConfig🔗
LayerConfig.SpeedLimitsEdgesRenderables.signConfig: SignConfig
Configures look and feel of text labels
LayerConfig.SpeedLimitsEdgesRenderables.hideNonPlayerOwned🔗
LayerConfig.SpeedLimitsEdgesRenderables.hideNonPlayerOwned: boolean
Hide edges that are not owned by the player
LayerConfig.SpeedLimitsEdgesRenderables.hideNonLocked🔗
LayerConfig.SpeedLimitsEdgesRenderables.hideNonLocked: boolean
Hide edges that do not have the roadDevelopmentLocked flag
LayerConfig.TrafficEdgesRenderables🔗
record LayerConfig.TrafficEdgesRenderables
new: function(): TrafficEdgesRenderables trafficColor: {Vec4f, Vec4f, Vec4f} undergroundTrafficColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer discrete: boolean tunnelOutlineColor: Vec4f tunnelOutlineSize: number end
Configures the rendering of traffic in edges
LayerConfig.TrafficEdgesRenderables.new()🔗
function LayerConfig.TrafficEdgesRenderables.new()(): TrafficEdgesRenderables
Creates a new empty object of type TrafficEdgesRenderables
ReturnsTrafficEdgesRenderables
LayerConfig.TrafficEdgesRenderables.new(TrafficEdgesRenderables)🔗
function LayerConfig.TrafficEdgesRenderables.new(TrafficEdgesRenderables)(TrafficEdgesRenderables): TrafficEdgesRenderables
Creates a copy of an object of type TrafficEdgesRenderables
ParametersTrafficEdgesRenderables
TrafficEdgesRenderables
LayerConfig.TrafficEdgesRenderables.trafficColor🔗
LayerConfig.TrafficEdgesRenderables.trafficColor: {Vec4f, Vec4f, Vec4f}
Interpolate bewteen these colors based on the amount of traffic on the edges
LayerConfig.TrafficEdgesRenderables.undergroundTrafficColor🔗
LayerConfig.TrafficEdgesRenderables.undergroundTrafficColor: {Vec4f, Vec4f, Vec4f}
Interpolate bewteen these colors based on the amount of traffic on the edges (applied to tunnels)
LayerConfig.TrafficEdgesRenderables.numberOfLevels🔗
LayerConfig.TrafficEdgesRenderables.numberOfLevels: integer
Number of discretizaton levels of speedColor
LayerConfig.TrafficEdgesRenderables.discrete🔗
LayerConfig.TrafficEdgesRenderables.discrete: boolean
Unused
LayerConfig.TrafficEdgesRenderables.tunnelOutlineColor🔗
LayerConfig.TrafficEdgesRenderables.tunnelOutlineColor: Vec4f
Color of the outline on tunnels
LayerConfig.TrafficEdgesRenderables.tunnelOutlineSize🔗
LayerConfig.TrafficEdgesRenderables.tunnelOutlineSize: number
Width of the outline on tunnels
LayerConfig.VoronoiRenderableConfig🔗
record LayerConfig.VoronoiRenderableConfig
new: function(): VoronoiRenderableConfig showTowns: boolean townsOfInterest: {Engine.Entity} showMapBorder: boolean lineWidth: number colors: {Vec4f} sectionsPerColor: integer fadingMinHeight: number fadingDeltaHeight: number end
Configure the rendering of town limits (based on closest distance to towns)
LayerConfig.VoronoiRenderableConfig.new()🔗
function LayerConfig.VoronoiRenderableConfig.new()(): VoronoiRenderableConfig
Creates a new empty object of type VoronoiRenderableConfig
ReturnsVoronoiRenderableConfig
LayerConfig.VoronoiRenderableConfig.new(VoronoiRenderableConfig)🔗
function LayerConfig.VoronoiRenderableConfig.new(VoronoiRenderableConfig)(VoronoiRenderableConfig): VoronoiRenderableConfig
Creates a copy of an object of type VoronoiRenderableConfig
ParametersVoronoiRenderableConfig
VoronoiRenderableConfig
LayerConfig.VoronoiRenderableConfig.showTowns🔗
LayerConfig.VoronoiRenderableConfig.showTowns: boolean
Only consider towns of interest
LayerConfig.VoronoiRenderableConfig.townsOfInterest🔗
LayerConfig.VoronoiRenderableConfig.townsOfInterest: {Engine.Entity}
Optional towns of interest: If set AND showTowns is true, only those townns are considered
LayerConfig.VoronoiRenderableConfig.showMapBorder🔗
LayerConfig.VoronoiRenderableConfig.showMapBorder: boolean
Display also borders at the edge of the map
LayerConfig.VoronoiRenderableConfig.lineWidth🔗
LayerConfig.VoronoiRenderableConfig.lineWidth: number
Width of the line
LayerConfig.VoronoiRenderableConfig.colors🔗
LayerConfig.VoronoiRenderableConfig.colors: {Vec4f}
Colors of the line (alternatings)
LayerConfig.VoronoiRenderableConfig.sectionsPerColor🔗
LayerConfig.VoronoiRenderableConfig.sectionsPerColor: integer
Number of section for each color
LayerConfig.VoronoiRenderableConfig.fadingMinHeight🔗
LayerConfig.VoronoiRenderableConfig.fadingMinHeight: number
Height at which rendering is no longer visible
LayerConfig.VoronoiRenderableConfig.fadingDeltaHeight🔗
LayerConfig.VoronoiRenderableConfig.fadingDeltaHeight: number
Height at which rendering stops is fadingMinHeight+fadingDeltaHeight
LayerConfig.WindRenderableConfig🔗
record LayerConfig.WindRenderableConfig
new: function(): WindRenderableConfig isVisible: boolean emissionType: Engine.Component.EmissionGrid.Type end
Configure wind display and its impact on diverse emisson types
LayerConfig.WindRenderableConfig.new()🔗
function LayerConfig.WindRenderableConfig.new()(): WindRenderableConfig
Creates a new empty object of type WindRenderableConfig
ReturnsWindRenderableConfig
LayerConfig.WindRenderableConfig.new(WindRenderableConfig)🔗
function LayerConfig.WindRenderableConfig.new(WindRenderableConfig)(WindRenderableConfig): WindRenderableConfig
Creates a copy of an object of type WindRenderableConfig
ParametersWindRenderableConfig
WindRenderableConfig
LayerConfig.WindRenderableConfig.isVisible🔗
LayerConfig.WindRenderableConfig.isVisible: boolean
Enables or disable rendering of the visualization
LayerConfig.WindRenderableConfig.emissionType🔗
LayerConfig.WindRenderableConfig.emissionType: Engine.Component.EmissionGrid.Type
Grid to use to chose the wind direction (usually applies only to pollution)
LayerConfig.CargoFlowRenderableConfig🔗
record LayerConfig.CargoFlowRenderableConfig
new: function(): CargoFlowRenderableConfigflowData: {FlowData} endrecord FlowData
new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
Configure 3d cargo flow arrows
LayerConfig.CargoFlowRenderableConfig.new()🔗
function LayerConfig.CargoFlowRenderableConfig.new()(): CargoFlowRenderableConfig
Creates a new empty object of type CargoFlowRenderableConfig
ReturnsCargoFlowRenderableConfig
LayerConfig.CargoFlowRenderableConfig.new(CargoFlowRenderableConfig)🔗
function LayerConfig.CargoFlowRenderableConfig.new(CargoFlowRenderableConfig)(CargoFlowRenderableConfig): CargoFlowRenderableConfig
Creates a copy of an object of type CargoFlowRenderableConfig
ParametersCargoFlowRenderableConfig
CargoFlowRenderableConfig
LayerConfig.CargoFlowRenderableConfig.FlowData🔗
record LayerConfig.CargoFlowRenderableConfig.FlowData
new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
LayerConfig.CargoFlowRenderableConfig.FlowData.new()🔗
function LayerConfig.CargoFlowRenderableConfig.FlowData.new()(): FlowDataReturns
FlowData
LayerConfig.CargoFlowRenderableConfig.FlowData.new(FlowData)🔗
function LayerConfig.CargoFlowRenderableConfig.FlowData.new(FlowData)(FlowData): FlowDataParameters
FlowData
FlowData
LayerConfig.CargoFlowRenderableConfig.FlowData.from🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.from: Vec3f
LayerConfig.CargoFlowRenderableConfig.FlowData.to🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.to: Vec3f
LayerConfig.CargoFlowRenderableConfig.FlowData.speed🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.speed: number
LayerConfig.CargoFlowRenderableConfig.FlowData.arrowColors🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.arrowColors: {Vec4f}
LayerConfig.CargoFlowRenderableConfig.FlowData.cargoIconAlpha🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.cargoIconAlpha: number
LayerConfig.CargoFlowRenderableConfig.FlowData.cargoTypes🔗
LayerConfig.CargoFlowRenderableConfig.FlowData.cargoTypes: {CargoTypeId}
LayerConfig.CargoFlowRenderableConfig.flowData🔗
LayerConfig.CargoFlowRenderableConfig.flowData: {FlowData}
LayerConfig.colorMap🔗
LayerConfig.colorMap: any
Optional color map config: nil, EmissionColorMap or TerrainColorMap
LayerConfig.contours🔗
LayerConfig.contours: TerrainContours
LayerConfig.colorPassFn🔗
LayerConfig.colorPassFn: ColorPassFn
LayerConfig.colorPassFnForBuildingRenderableOnly🔗
LayerConfig.colorPassFnForBuildingRenderableOnly: boolean
LayerConfig.buildingRenderableConfig🔗
LayerConfig.buildingRenderableConfig: BuildingRenderableConfig
LayerConfig.catchmentAreaRenderableConfig🔗
LayerConfig.catchmentAreaRenderableConfig: CatchmentAreaRenderableConfig
LayerConfig.edgeRenderableConfig🔗
LayerConfig.edgeRenderableConfig: any
LayerConfig.voronoiRenderableConfig🔗
LayerConfig.voronoiRenderableConfig: VoronoiRenderableConfig
LayerConfig.windRenderableConfig🔗
LayerConfig.windRenderableConfig: WindRenderableConfig
LayerConfig.plotsRenderableConfig🔗
LayerConfig.plotsRenderableConfig: PlotsRenderableConfig
LayerConfig.cargoFlowRenderableConfig🔗
LayerConfig.cargoFlowRenderableConfig: CargoFlowRenderableConfig
LayerConfig.undergroundMode🔗
LayerConfig.undergroundMode: boolean
Underground mode enables rendering and snapping of underground entities
LayerConfig.showOneWay🔗
LayerConfig.showOneWay: boolean
Display one way arrows on streets
LineCargoInfo🔗
global record LineCargoInfo
realSectionTimes: {{number, integer}} sectionTimes: {number} frequency: number driveRealSectionTimes: {{number, integer}} driveSectionTimes: {number} numVehicles: integer totalCapacity: integer availableCapacities: {integer} comfortFactor: number priceFactor: number end
Information about cargo on a line
LineCargoInfo.realSectionTimes🔗
LineCargoInfo.realSectionTimes: {{number, integer}}
Real times for each section
LineCargoInfo.sectionTimes🔗
LineCargoInfo.sectionTimes: {number}
Scheduled times for each section
LineCargoInfo.frequency🔗
LineCargoInfo.frequency: number
Frequency of the cargo on the line
LineCargoInfo.driveRealSectionTimes🔗
LineCargoInfo.driveRealSectionTimes: {{number, integer}}
Real drive times for each section
LineCargoInfo.driveSectionTimes🔗
LineCargoInfo.driveSectionTimes: {number}
Drive times for each section
LineCargoInfo.numVehicles🔗
LineCargoInfo.numVehicles: integer
Number of vehicles
LineCargoInfo.totalCapacity🔗
LineCargoInfo.totalCapacity: integer
Total capacity
LineCargoInfo.availableCapacities🔗
LineCargoInfo.availableCapacities: {integer}
Available capacities
LineCargoInfo.comfortFactor🔗
LineCargoInfo.comfortFactor: number
Comfort factor for this cargo on the line
LineCargoInfo.priceFactor🔗
LineCargoInfo.priceFactor: number
Price factor for this cargo on the line
LineIssue🔗
global record LineIssue
type: Type stopIndex: integer cargoType: CargoTypeId endrecord Type
NowhereToLoad: Type NowhereToUnload: Type NoVehicleToLoadCargo: Type VehicleUseless: Type LineCargoConfig: Type None: Type end
LineIssue.Type🔗
LineIssue.Type.NowhereToLoad🔗
LineIssue.Type.NowhereToLoad: Type
LineIssue.Type.NowhereToUnload🔗
LineIssue.Type.NowhereToUnload: Type
LineIssue.Type.NoVehicleToLoadCargo🔗
LineIssue.Type.NoVehicleToLoadCargo: Type
LineIssue.Type.VehicleUseless🔗
LineIssue.Type.VehicleUseless: Type
LineIssue.Type.LineCargoConfig🔗
LineIssue.Type.LineCargoConfig: Type
LineIssue.Type.None🔗
LineIssue.Type.None: Type
LineIssue.type🔗
LineIssue.type: Type
LineIssue.stopIndex🔗
LineIssue.stopIndex: integer
LineIssue.cargoType🔗
LineIssue.cargoType: CargoTypeId
LineOrEdges🔗
global record LineOrEdges
line: Engine.Entity lineStop0: integer lineStop1: integer lineTerminal1: {Engine.Entity, integer} edges: {EdgePos} end
LineOrEdges.line🔗
LineOrEdges.line: Engine.Entity
LineOrEdges.lineStop0🔗
LineOrEdges.lineStop0: integer
LineOrEdges.lineStop1🔗
LineOrEdges.lineStop1: integer
LineOrEdges.lineTerminal1🔗
LineOrEdges.lineTerminal1: {Engine.Entity, integer}
LineOrEdges.edges🔗
LineOrEdges.edges: {EdgePos}
LineProblem🔗
global record LineProblem
NOTHING: integer ZERO_OR_ONE_STATION: integer DOUBLE_STATIONS: integer INCOMPATIBLE_STATIONS: integer NO_PATH: integer BAD_ALTERNATIVE_TERMINAL: integer end
Information about the problem of a line.
LineProblem.NOTHING🔗
LineProblem.NOTHING: integer
LineProblem.ZERO_OR_ONE_STATION🔗
LineProblem.ZERO_OR_ONE_STATION: integer
LineProblem.DOUBLE_STATIONS🔗
LineProblem.DOUBLE_STATIONS: integer
LineProblem.INCOMPATIBLE_STATIONS🔗
LineProblem.INCOMPATIBLE_STATIONS: integer
LineProblem.NO_PATH🔗
LineProblem.NO_PATH: integer
LineProblem.BAD_ALTERNATIVE_TERMINAL🔗
LineProblem.BAD_ALTERNATIVE_TERMINAL: integer
LineStationProblem🔗
global record LineStationProblem
StopUseless: integer PassengerStopUseless: integer CargoStopUseless: integer AllPassengerStopUseless: integer CargoTypeUnloadUseless: integer CargoTypeLoadUseless: integer end
Information about the problem of station within a line.
LineStationProblem.StopUseless🔗
LineStationProblem.StopUseless: integer
LineStationProblem.PassengerStopUseless🔗
LineStationProblem.PassengerStopUseless: integer
LineStationProblem.CargoStopUseless🔗
LineStationProblem.CargoStopUseless: integer
LineStationProblem.AllPassengerStopUseless🔗
LineStationProblem.AllPassengerStopUseless: integer
LineStationProblem.CargoTypeUnloadUseless🔗
LineStationProblem.CargoTypeUnloadUseless: integer
LineStationProblem.CargoTypeLoadUseless🔗
LineStationProblem.CargoTypeLoadUseless: integer
LineVehicleInfo🔗
Configuration of vehicles that can use the line
LineVehicleInfo.transportModes🔗
LineVehicleInfo.transportModes: {TransportMode : boolean}
Type of tranport modes that can use the line
LoadConfig🔗
global record LoadConfig
new: function(): LoadConfig loadConfigIndex: integer cargoTypeId: CargoTypeId end
Configuration for loading cargo into a vehicle compartment
LoadConfig.new🔗
function LoadConfig.new(): LoadConfigReturns
LoadConfig
LoadConfig.loadConfigIndex🔗
LoadConfig.loadConfigIndex: integer
Index of the load configuration
LoadConfig.cargoTypeId🔗
LoadConfig.cargoTypeId: CargoTypeId
Type of cargo to load
LoaderHelper🔗
Helper class that allows loading and calling files in other modules
LoaderHelper.useFn🔗
function LoaderHelper.useFn(LoaderHelper, string)Parameters
LoaderHelperstring
LogLevel🔗
Log level enumeration
LogLevel.Raw🔗
LogLevel.Raw: LogLevel
LogLevel.Error🔗
LogLevel.Error: LogLevel
LogLevel.Warning🔗
LogLevel.Warning: LogLevel
LogLevel.Message🔗
LogLevel.Message: LogLevel
LogLevel.Verbose🔗
LogLevel.Verbose: LogLevel
Map🔗
Type Parameters
KV
Map.find🔗
function Map.find(Map<K, V>, K): VParameters
Map<K, V>K
V
Map.insert🔗
function Map.insert(Map<K, V>, K, V)Parameters
Map<K, V>KV
Map.size🔗
function Map.size(Map<K, V>): integerParameters
Map<K, V>
integer
Map.asTable🔗
function Map.asTable(Map<K, V>): {K : V}Parameters
Map<K, V>
{K : V}
Map.next🔗
function Map.next(K): KParameters
K
K
Mat4f🔗
global record Mat4f
new: function(): Mat4f clone: function(Mat4f): Mat4f cols: function(matrix : Mat4f, colIndex : integer): Vec4f getTransl: function(Mat4f): Vec3f setTransl: function(v : Mat4f, Vec3f): Mat4f transformPosition: function(v : Mat4f, Vec3f): Vec3f transformDirection: function(v : Mat4f, Vec3f): Vec3f rotZ: function(angle : number): Mat4f rotY: function(angle : number): Mat4f rotX: function(angle : number): Mat4f rotZTransl: function(angle : number, transl : Vec3f): Mat4f rotZYTransl: function(angles : Vec2f, transl : Vec3f): Mat4f scale: function(scale : Vec3f): Mat4f scaleRotZTransl: function(scale : Vec3f, angle : number, transl : Vec3f): Mat4f scaleTransl: function(scale : Vec3f, transl : Vec3f): Mat4f transl: function(transl : Vec3f): Mat4f metamethod __index: function(Mat4f, integer): number end
A 4x4 transformation matrix
Supports addition +, subtraction - and multiplication *. Supports array subscript with mat[i] access (16 elements in column-major order).
Mat4f.new()🔗
function Mat4f.new()(): Mat4f
Creates a new matrix.
ReturnsMat4f— Identity matrix
Mat4f.new(Vec4f)🔗
function Mat4f.new(Vec4f)(v : Vec4f): Mat4f
Creates a new matrix from Vec4f.
Parametersv:Vec4f— Vec4f to initialize all columns
Mat4f— New Mat4f
Mat4f.new(Vec4f, Vec4f, Vec4f, Vec4f)🔗
function Mat4f.new(Vec4f, Vec4f, Vec4f, Vec4f)(col1 : Vec4f, col2 : Vec4f, col3 : Vec4f, col4 : Vec4f): Mat4f
Creates a new matrix from four column vectors.
Parameterscol1:Vec4f— First columncol2:Vec4f— Second columncol3:Vec4f— Third columncol4:Vec4f— Fourth column
Mat4f— New Mat4f
Mat4f.clone🔗
function Mat4f.clone(Mat4f): Mat4f
Create a copy of the matrix
ParametersMat4f
Mat4f— Cloned matrix
Mat4f.cols🔗
function Mat4f.cols(matrix : Mat4f, colIndex : integer): Vec4f
Get column vector at index
Parametersmatrix:Mat4f— the matrixcolIndex:integer— Column index (1-4)
Vec4f— Column vector
Mat4f.getTransl🔗
function Mat4f.getTransl(Mat4f): Vec3f
Get translation component of the matrix
ParametersMat4f
Vec3f— Translation vector
Mat4f.setTransl🔗
function Mat4f.setTransl(v : Mat4f, Vec3f): Mat4f
Set translation component of the matrix
Parametersv:Mat4f— Translation vectorVec3f
Mat4f— Modified matrix
Mat4f.transformPosition🔗
function Mat4f.transformPosition(v : Mat4f, Vec3f): Vec3f
Transform a position by the matrix
Parametersv:Mat4f— Position to transformVec3f
Vec3f— Transformed position
Mat4f.transformDirection🔗
function Mat4f.transformDirection(v : Mat4f, Vec3f): Vec3f
Transform a direction by the matrix
Parametersv:Mat4f— Direction to transformVec3f
Vec3f— Transformed direction
Mat4f.rotZ🔗
function Mat4f.rotZ(angle : number): Mat4f
Creates a new Z-axis rotation
Parametersangle:number— Rotation angle in radians
Mat4f— Rotation matrix
Mat4f.rotY🔗
function Mat4f.rotY(angle : number): Mat4f
Creates a new Y-axis rotation
Parametersangle:number— Rotation angle in radians
Mat4f— Rotation matrix
Mat4f.rotX🔗
function Mat4f.rotX(angle : number): Mat4f
Creates a new X-axis rotation
Parametersangle:number— Rotation angle in radians
Mat4f— Rotation matrix
Mat4f.rotZTransl🔗
function Mat4f.rotZTransl(angle : number, transl : Vec3f): Mat4f
Creates a new Z-axis rotation matrix plus translation
Parametersangle:number— Rotation angle in radianstransl:Vec3f— Translation vector
Mat4f— Transformation matrix
Mat4f.rotZYTransl🔗
function Mat4f.rotZYTransl(angles : Vec2f, transl : Vec3f): Mat4f
Creates a new Z-axis and Y-axis rotation matrix plus translation
Parametersangles:Vec2f— Rotation angles (x: Z angle, y: Y angle)transl:Vec3f— Translation vector
Mat4f— Transformation matrix
Mat4f.scale🔗
function Mat4f.scale(scale : Vec3f): Mat4f
Create scale matrix
Parametersscale:Vec3f— Scale factors
Mat4f— Scale matrix
Mat4f.scaleRotZTransl🔗
function Mat4f.scaleRotZTransl(scale : Vec3f, angle : number, transl : Vec3f): Mat4f
Creates a new Z-axis rotation matrix plus translation and scale
Parametersscale:Vec3f— Scale factorsangle:number— Rotation angle in radianstransl:Vec3f— Translation vector
Mat4f— Transformation matrix
Mat4f.scaleTransl🔗
function Mat4f.scaleTransl(scale : Vec3f, transl : Vec3f): Mat4f
Creates a new translation and scaling matrix
Parametersscale:Vec3f— Scale factorstransl:Vec3f— Translation vector
Mat4f— Transformation matrix
Mat4f.transl🔗
function Mat4f.transl(transl : Vec3f): Mat4f
Creates a new translation matrix
Parameterstransl:Vec3f— Translation vector
Mat4f— Translation matrix
Mat4f.$meta.__index🔗
metamethod Mat4f.$meta.__index(Mat4f, integer): numberParameters
Mat4finteger
number
Mat4f.$meta.__add🔗
metamethod Mat4f.$meta.__add(Mat4f, Mat4f): Mat4fParameters
Mat4fMat4f
Mat4f
Mat4f.$meta.__sub🔗
metamethod Mat4f.$meta.__sub(Mat4f, Mat4f): Mat4fParameters
Mat4fMat4f
Mat4f
Mat4f.$meta.__mul🔗
metamethod Mat4f.$meta.__mul(Mat4f, Mat4f): Mat4fParameters
Mat4fMat4f
Mat4f
MemoryStatistics🔗
global record MemoryStatistics
vidMemUsage: integer trackedVidMemUsage: integer vidMemMax: integer peakVidMem: integer ramUsage: integer trackedRamUsage: integer ramMax: integer peakRam: integer peakTotalMem: integer largestFreeBlock: integer end
Collection of useful memory statistics
MemoryStatistics.vidMemUsage🔗
MemoryStatistics.vidMemUsage: integer
Video memory usage
MemoryStatistics.trackedVidMemUsage🔗
MemoryStatistics.trackedVidMemUsage: integer
Tracked video memory usage
MemoryStatistics.vidMemMax🔗
MemoryStatistics.vidMemMax: integer
Maximum video memory
MemoryStatistics.peakVidMem🔗
MemoryStatistics.peakVidMem: integer
Peak video memory usage
MemoryStatistics.ramUsage🔗
MemoryStatistics.ramUsage: integer
RAM usage
MemoryStatistics.trackedRamUsage🔗
MemoryStatistics.trackedRamUsage: integer
Tracked RAM usage
MemoryStatistics.ramMax🔗
MemoryStatistics.ramMax: integer
Maximum RAM
MemoryStatistics.peakRam🔗
MemoryStatistics.peakRam: integer
Peak RAM usage
MemoryStatistics.peakTotalMem🔗
MemoryStatistics.peakTotalMem: integer
Peak total memory usage
MemoryStatistics.largestFreeBlock🔗
MemoryStatistics.largestFreeBlock: integer
Largest free memory block
MetaConstructionDesc🔗
global record MetaConstructionDesc
new: function(MetaConstructionDesc): MetaConstructionDesc availability: ModelMetadata.Availability description: ModelMetadata.Description soundConfig: ModelMetadata.SoundConfig categoryList: ModelMetadata.CategoryList params: {ConstructionScriptParam} menuCategory: ModelMetadata.MenuCategory undergroundView: boolean heightAdjustable: boolean isIndustry: boolean heightModView: boolean configureLayerScript: ScriptRef configureHudIconsScript: ScriptRef metadata: ConstructionDescMetadata relativePath: string createTemplateScript: ScriptRef order: integer end
A Metaconstruction is a collection of constructions and modules that can be simultaneously be built
(replaces the deprecated construction templates)
MetaConstructionDesc.new🔗
function MetaConstructionDesc.new(MetaConstructionDesc): MetaConstructionDesc
Creates a new MetaConstructionDesc object
ParametersMetaConstructionDesc
MetaConstructionDesc
MetaConstructionDesc.availability🔗
MetaConstructionDesc.availability: ModelMetadata.Availability
Main menu availability range
MetaConstructionDesc.description🔗
MetaConstructionDesc.description: ModelMetadata.Description
Textual description and icons
MetaConstructionDesc.soundConfig🔗
MetaConstructionDesc.soundConfig: ModelMetadata.SoundConfig
Configuration for building sounds
MetaConstructionDesc.categoryList🔗
MetaConstructionDesc.categoryList: ModelMetadata.CategoryList
Additional tags
MetaConstructionDesc.params🔗
MetaConstructionDesc.params: {ConstructionScriptParam}
Parameters passed to the template function
MetaConstructionDesc.menuCategory🔗
MetaConstructionDesc.menuCategory: ModelMetadata.MenuCategory
Menu category
MetaConstructionDesc.undergroundView🔗
MetaConstructionDesc.undergroundView: boolean
Enable underground parameters when building
MetaConstructionDesc.heightAdjustable🔗
MetaConstructionDesc.heightAdjustable: boolean
Enable height adjustment options when building
MetaConstructionDesc.isIndustry🔗
MetaConstructionDesc.isIndustry: boolean
MetaConstructionDesc.heightModView🔗
MetaConstructionDesc.heightModView: boolean
Enable heigh modification grid visualization when building
MetaConstructionDesc.configureLayerScript🔗
MetaConstructionDesc.configureLayerScript: ScriptRef
Custom layer function for display when building
MetaConstructionDesc.configureHudIconsScript🔗
MetaConstructionDesc.configureHudIconsScript: ScriptRef
Custom layer function for display when building
MetaConstructionDesc.metadata🔗
MetaConstructionDesc.metadata: ConstructionDescMetadata
Additional user defined metadata
MetaConstructionDesc.relativePath🔗
MetaConstructionDesc.relativePath: string
Relative path to use withing template script
MetaConstructionDesc.createTemplateScript🔗
MetaConstructionDesc.createTemplateScript: ScriptRef
A definition of a script function returning a list of construction, modules and transforms
MetaConstructionDesc.order🔗
MetaConstructionDesc.order: integer
MissionCampaign🔗
Campaign and mission identifier
MissionCampaign.campaign🔗
MissionCampaign.campaign: ResName
MissionCampaign.mission🔗
MissionCampaign.mission: ResName
MissionDesc🔗
global record MissionDesc
record Medal
id: string name: string nameLocked: string iconLocked: string iconCompleted: string endname: string description: string campaign: string characters: {Character} order: integer image: string imagePreview: string imageSuccess: string imageFailure: string loadscreen: string loadscreenDescription: string loadscreenVoiceOver: string savegame: string languageScript: string playlistOverride: string medals: {Medal} starsDescription: string stars: {Star} voiceOver: string location: string year: string musicTracks: {{ResName, boolean}} endrecord Star
id: string name: string description: string iconLocked: string iconCompleted: string end
Campaign mission description
MissionDesc.Medal🔗
record MissionDesc.Medal
id: string name: string nameLocked: string iconLocked: string iconCompleted: string end
Campaign mission medal information
MissionDesc.Medal.id🔗
MissionDesc.Medal.id: string
MissionDesc.Medal.name🔗
MissionDesc.Medal.name: string
MissionDesc.Medal.nameLocked🔗
MissionDesc.Medal.nameLocked: string
MissionDesc.Medal.iconLocked🔗
MissionDesc.Medal.iconLocked: string
MissionDesc.Medal.iconCompleted🔗
MissionDesc.Medal.iconCompleted: string
MissionDesc.Star🔗
record MissionDesc.Star
id: string name: string description: string iconLocked: string iconCompleted: string end
Campaign mission star (achievement) information
MissionDesc.Star.id🔗
MissionDesc.Star.id: string
MissionDesc.Star.name🔗
MissionDesc.Star.name: string
MissionDesc.Star.description🔗
MissionDesc.Star.description: string
MissionDesc.Star.iconLocked🔗
MissionDesc.Star.iconLocked: string
MissionDesc.Star.iconCompleted🔗
MissionDesc.Star.iconCompleted: string
MissionDesc.Character🔗
Campaign mission character information
MissionDesc.Character.name🔗
MissionDesc.Character.name: string
MissionDesc.Character.info🔗
MissionDesc.Character.info: string
MissionDesc.Character.portrait🔗
MissionDesc.Character.portrait: string
MissionDesc.name🔗
MissionDesc.name: string
MissionDesc.description🔗
MissionDesc.description: string
MissionDesc.campaign🔗
MissionDesc.campaign: string
MissionDesc.characters🔗
MissionDesc.characters: {Character}
MissionDesc.order🔗
MissionDesc.order: integer
MissionDesc.image🔗
MissionDesc.image: string
MissionDesc.imagePreview🔗
MissionDesc.imagePreview: string
MissionDesc.imageSuccess🔗
MissionDesc.imageSuccess: string
MissionDesc.imageFailure🔗
MissionDesc.imageFailure: string
MissionDesc.loadscreen🔗
MissionDesc.loadscreen: string
MissionDesc.loadscreenDescription🔗
MissionDesc.loadscreenDescription: string
MissionDesc.loadscreenVoiceOver🔗
MissionDesc.loadscreenVoiceOver: string
MissionDesc.savegame🔗
MissionDesc.savegame: string
MissionDesc.languageScript🔗
MissionDesc.languageScript: string
MissionDesc.playlistOverride🔗
MissionDesc.playlistOverride: string
MissionDesc.medals🔗
MissionDesc.medals: {Medal}
MissionDesc.starsDescription🔗
MissionDesc.starsDescription: string
MissionDesc.stars🔗
MissionDesc.stars: {Star}
MissionDesc.voiceOver🔗
MissionDesc.voiceOver: string
MissionDesc.location🔗
MissionDesc.location: string
MissionDesc.year🔗
MissionDesc.year: string
MissionDesc.musicTracks🔗
MissionDesc.musicTracks: {{ResName, boolean}}
ModRep🔗
global record ModRep
getInstalledMods: function(ModRep): {Mod.ModId} exists: function(ModRep, Mod.ModId): boolean getModDesc: function(ModRep, Mod.ModId): Mod.ModDesc getModSize: function(ModRep, Mod.ModId): Mod.ModSize getGameModDesc: function(ModRep, Mod.ModId): Mod.GameModDesc getModSource: function(ModRep, Mod.ModId): string wouldForceActivateAchievements: function(ModRep, {Mod.ModId}): boolean couldAchievementsBeEarned: function(ModRep, {Mod.ModId}): boolean end
Contains all active and installed mods and their description
ModRep.getInstalledMods🔗
function ModRep.getInstalledMods(ModRep): {Mod.ModId}Parameters
ModRep
{Mod.ModId}
ModRep.exists(ModRep, Mod.ModId)🔗
function ModRep.exists(ModRep, Mod.ModId)(ModRep, Mod.ModId): booleanParameters
ModRepMod.ModId
boolean
ModRep.exists(ModRep, Mod.ModId)🔗
function ModRep.exists(ModRep, Mod.ModId)(ModRep, Mod.ModId): booleanParameters
ModRepMod.ModId
boolean
ModRep.getModDesc🔗
function ModRep.getModDesc(ModRep, Mod.ModId): Mod.ModDescParameters
ModRepMod.ModId
Mod.ModDesc
ModRep.getModSize🔗
function ModRep.getModSize(ModRep, Mod.ModId): Mod.ModSizeParameters
ModRepMod.ModId
Mod.ModSize
ModRep.getGameModDesc🔗
function ModRep.getGameModDesc(ModRep, Mod.ModId): Mod.GameModDescParameters
ModRepMod.ModId
Mod.GameModDesc
ModRep.getModSource🔗
function ModRep.getModSource(ModRep, Mod.ModId): stringParameters
ModRepMod.ModId
string
ModRep.wouldForceActivateAchievements🔗
function ModRep.wouldForceActivateAchievements(ModRep, {Mod.ModId}): booleanParameters
ModRep{Mod.ModId}
boolean
ModRep.couldAchievementsBeEarned🔗
function ModRep.couldAchievementsBeEarned(ModRep, {Mod.ModId}): booleanParameters
ModRep{Mod.ModId}
boolean
Model🔗
global record Model
metadata: {<any type> : <any type>} boundingInfo: BoundingInfo collider: {<any type> : <any type>} modelPath: ResName end
Information about a single model file: metadata and bounding information
Model.metadata🔗
Model.metadata: {<any type> : <any type>}
Additional information about the model
Model.boundingInfo🔗
Model.boundingInfo: BoundingInfo
Bounding box for the model
Model.collider🔗
Model.collider: {<any type> : <any type>}
Collider information
Model.modelPath🔗
Model.modelPath: ResName
ModelInstance🔗
global record ModelInstance
modelId: integer transf0: Mat4f transf: Mat4f transformator: integer end
A model in the world, with complete information
ModelInstance.modelId🔗
ModelInstance.modelId: integer
The model id, referenced in modelRep
ModelInstance.transf0🔗
ModelInstance.transf0: Mat4f
The model transform at the previous frame
ModelInstance.transf🔗
ModelInstance.transf: Mat4f
The model transform
ModelInstance.transformator🔗
ModelInstance.transformator: integer
Zero-basd index of the transformator for the model (-1 if none)
ModelMetadata🔗
global record ModelMetadata
record Animal
config: Config movementTypes: {MovementType} idForAchievement: string endrecord MovementType
description: string endrecord Description
name: string description: string iconSmall: string iconSmallCblend: string icon: string icon20: string icon3d: string icon20cblend: string lockedIcon: string previewIcon: string attributes: {string : {number, number}} attributes_native: Map<string, {number, number}> cargoTypeSet: CargoTypeSet endrecord Category
categories: {string} endrecord CategoryList
categories: {string} endrecord MenuCategory
categories: {CategoryWithOrder} endrecord CategoryWithOrder
new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} endrecord Availability
yearFrom: integer yearTo: integer notifyWhenAvailable: boolean notificationGroup: string notificationSortKey: integer endrecord Maintenance
lifespan: integer runningCosts: number runningCostScale: number maintenanceScale: number topSpeedMaintenanceFactorPenaltyPerLevel: number endrecord TransportVehicle
line: Engine.Entity carrier: Carrier compartments: {Compartment} loadSpeed: number reversible: boolean arrivalDelay: integer departureDelay: integer groupFileName: ResName transportModes: {TransportMode} engineTransportModes: {TransportMode} filterTags: {string} comfortFactor: number priceFactor: number maintenanceFactor: number noCblendMask: boolean endrecord CargoEntry
cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string endrecord LandVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number engines: {VehicleEngine} friction: number endrecord WaterVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number availPower: number maxRpm: number area: number endrecord AirVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number maxThrust: number isHelicopter: boolean endendrecord Tree
reputationFactor: number end
Contains all metadata of a model. A specific metadata might be nil.
ModelMetadata.Animal🔗
record ModelMetadata.Animal
config: Config movementTypes: {MovementType} idForAchievement: string endrecord MovementType
description: string end
ModelMetadata.Animal.MovementType🔗
record ModelMetadata.Animal.MovementType
description: string end
ModelMetadata.Animal.MovementType.description🔗
ModelMetadata.Animal.MovementType.description: string
ModelMetadata.Animal.Config🔗
ModelMetadata.Animal.Config.density🔗
ModelMetadata.Animal.Config.density: number
ModelMetadata.Animal.Config.fish🔗
ModelMetadata.Animal.Config.fish: boolean
ModelMetadata.Animal.config🔗
ModelMetadata.Animal.config: Config
ModelMetadata.Animal.movementTypes🔗
ModelMetadata.Animal.movementTypes: {MovementType}
ModelMetadata.Animal.idForAchievement🔗
ModelMetadata.Animal.idForAchievement: string
ModelMetadata.Description🔗
record ModelMetadata.Description
name: string description: string iconSmall: string iconSmallCblend: string icon: string icon20: string icon3d: string icon20cblend: string lockedIcon: string previewIcon: string attributes: {string : {number, number}} attributes_native: Map<string, {number, number}> cargoTypeSet: CargoTypeSet end
ModelMetadata.Description.name🔗
ModelMetadata.Description.name: string
ModelMetadata.Description.description🔗
ModelMetadata.Description.description: string
ModelMetadata.Description.iconSmall🔗
ModelMetadata.Description.iconSmall: string
ModelMetadata.Description.iconSmallCblend🔗
ModelMetadata.Description.iconSmallCblend: string
ModelMetadata.Description.icon🔗
ModelMetadata.Description.icon: string
ModelMetadata.Description.icon20🔗
ModelMetadata.Description.icon20: string
ModelMetadata.Description.icon3d🔗
ModelMetadata.Description.icon3d: string
ModelMetadata.Description.icon20cblend🔗
ModelMetadata.Description.icon20cblend: string
ModelMetadata.Description.lockedIcon🔗
ModelMetadata.Description.lockedIcon: string
ModelMetadata.Description.previewIcon🔗
ModelMetadata.Description.previewIcon: string
ModelMetadata.Description.attributes🔗
ModelMetadata.Description.attributes: {string : {number, number}}
ModelMetadata.Description.attributes_native🔗
ModelMetadata.Description.attributes_native: Map<string, {number, number}>
ModelMetadata.Description.cargoTypeSet🔗
ModelMetadata.Description.cargoTypeSet: CargoTypeSet
ModelMetadata.Category🔗
record ModelMetadata.Category
categories: {string} end
ModelMetadata.Category.categories🔗
ModelMetadata.Category.categories: {string}
ModelMetadata.CategoryList🔗
record ModelMetadata.CategoryList
categories: {string} end
ModelMetadata.CategoryList.categories🔗
ModelMetadata.CategoryList.categories: {string}
ModelMetadata.MenuCategory🔗
record ModelMetadata.MenuCategory
categories: {CategoryWithOrder} endrecord CategoryWithOrder
new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} end
ModelMetadata.MenuCategory.CategoryWithOrder🔗
record ModelMetadata.MenuCategory.CategoryWithOrder
new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} end
ModelMetadata.MenuCategory.CategoryWithOrder.new🔗
function ModelMetadata.MenuCategory.CategoryWithOrder.new(): CategoryWithOrderReturns
CategoryWithOrder
ModelMetadata.MenuCategory.CategoryWithOrder.category🔗
ModelMetadata.MenuCategory.CategoryWithOrder.category: string
ModelMetadata.MenuCategory.CategoryWithOrder.order🔗
ModelMetadata.MenuCategory.CategoryWithOrder.order: integer
ModelMetadata.MenuCategory.CategoryWithOrder.filterCategories🔗
ModelMetadata.MenuCategory.CategoryWithOrder.filterCategories: {string}
ModelMetadata.MenuCategory.categories🔗
ModelMetadata.MenuCategory.categories: {CategoryWithOrder}
ModelMetadata.Availability🔗
record ModelMetadata.Availability
yearFrom: integer yearTo: integer notifyWhenAvailable: boolean notificationGroup: string notificationSortKey: integer end
ModelMetadata.Availability.yearFrom🔗
ModelMetadata.Availability.yearFrom: integer
ModelMetadata.Availability.yearTo🔗
ModelMetadata.Availability.yearTo: integer
ModelMetadata.Availability.notifyWhenAvailable🔗
ModelMetadata.Availability.notifyWhenAvailable: boolean
ModelMetadata.Availability.notificationGroup🔗
ModelMetadata.Availability.notificationGroup: string
ModelMetadata.Availability.notificationSortKey🔗
ModelMetadata.Availability.notificationSortKey: integer
ModelMetadata.SoundConfig🔗
record ModelMetadata.SoundConfig
soundSet: SoundSet effects: {string : {string}} builderAudioRes: ResName end
ModelMetadata.SoundConfig.SoundSet🔗
record ModelMetadata.SoundConfig.SoundSet
name: string end
ModelMetadata.SoundConfig.SoundSet.name🔗
ModelMetadata.SoundConfig.SoundSet.name: string
ModelMetadata.SoundConfig.soundSet🔗
ModelMetadata.SoundConfig.soundSet: SoundSet
ModelMetadata.SoundConfig.effects🔗
ModelMetadata.SoundConfig.effects: {string : {string}}
Sound effects, map from key to list of file paths
used to overwrite certain clips in SoundSet (if SoundSet is set and has those)
ModelMetadata.SoundConfig.builderAudioRes🔗
ModelMetadata.SoundConfig.builderAudioRes: ResName
ModelMetadata.Maintenance🔗
record ModelMetadata.Maintenance
lifespan: integer runningCosts: number runningCostScale: number maintenanceScale: number topSpeedMaintenanceFactorPenaltyPerLevel: number end
ModelMetadata.Maintenance.lifespan🔗
ModelMetadata.Maintenance.lifespan: integer
ModelMetadata.Maintenance.runningCosts🔗
ModelMetadata.Maintenance.runningCosts: number
ModelMetadata.Maintenance.runningCostScale🔗
ModelMetadata.Maintenance.runningCostScale: number
ModelMetadata.Maintenance.maintenanceScale🔗
ModelMetadata.Maintenance.maintenanceScale: number
ModelMetadata.Maintenance.topSpeedMaintenanceFactorPenaltyPerLevel🔗
ModelMetadata.Maintenance.topSpeedMaintenanceFactorPenaltyPerLevel: number
ModelMetadata.Emission🔗
ModelMetadata.Emission.idle🔗
ModelMetadata.Emission.idle: number
ModelMetadata.Emission.speed🔗
ModelMetadata.Emission.speed: number
ModelMetadata.Emission.power🔗
ModelMetadata.Emission.power: number
ModelMetadata.Emission.score🔗
ModelMetadata.Emission.score: number
ModelMetadata.Emissions🔗
ModelMetadata.Emissions.noise🔗
ModelMetadata.Emissions.noise: Emission
ModelMetadata.Emissions.pollution🔗
ModelMetadata.Emissions.pollution: Emission
ModelMetadata.VehicleEngine🔗
ModelMetadata.VehicleEngine.power🔗
ModelMetadata.VehicleEngine.power: number
ModelMetadata.VehicleEngine.tractiveEffort🔗
ModelMetadata.VehicleEngine.tractiveEffort: number
ModelMetadata.VehicleEngine.type🔗
ModelMetadata.VehicleEngine.type: VehicleEngineType
ModelMetadata.TransportVehicle🔗
record ModelMetadata.TransportVehicle
line: Engine.Entity carrier: Carrier compartments: {Compartment} loadSpeed: number reversible: boolean arrivalDelay: integer departureDelay: integer groupFileName: ResName transportModes: {TransportMode} engineTransportModes: {TransportMode} filterTags: {string} comfortFactor: number priceFactor: number maintenanceFactor: number noCblendMask: boolean endrecord CargoEntry
cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string end
ModelMetadata.TransportVehicle.CargoEntry🔗
record ModelMetadata.TransportVehicle.CargoEntry
cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string end
ModelMetadata.TransportVehicle.CargoEntry.cargoTypeSet🔗
ModelMetadata.TransportVehicle.CargoEntry.cargoTypeSet: CargoTypeSet
ModelMetadata.TransportVehicle.CargoEntry.capacity🔗
ModelMetadata.TransportVehicle.CargoEntry.capacity: integer
ModelMetadata.TransportVehicle.CargoEntry.seats🔗
ModelMetadata.TransportVehicle.CargoEntry.seats: {integer}
ModelMetadata.TransportVehicle.CargoEntry.loadIndicator🔗
ModelMetadata.TransportVehicle.CargoEntry.loadIndicator: string
Used in conjunction with transport vehicle / industry metadata to define cargo positioning of custom cargo models
ModelMetadata.TransportVehicle.LoadConfig🔗
record ModelMetadata.TransportVehicle.LoadConfig
new: function(): LoadConfig cargoEntry: CargoEntry toHide: {string} end
ModelMetadata.TransportVehicle.LoadConfig.new🔗
function ModelMetadata.TransportVehicle.LoadConfig.new(): LoadConfigReturns
LoadConfig
ModelMetadata.TransportVehicle.LoadConfig.cargoEntry🔗
ModelMetadata.TransportVehicle.LoadConfig.cargoEntry: CargoEntry
ModelMetadata.TransportVehicle.LoadConfig.toHide🔗
ModelMetadata.TransportVehicle.LoadConfig.toHide: {string}
ModelMetadata.TransportVehicle.Compartment🔗
ModelMetadata.TransportVehicle.Compartment.loadConfigs🔗
ModelMetadata.TransportVehicle.Compartment.loadConfigs: {LoadConfig}
ModelMetadata.TransportVehicle.line🔗
ModelMetadata.TransportVehicle.line: Engine.Entity
ModelMetadata.TransportVehicle.carrier🔗
ModelMetadata.TransportVehicle.carrier: Carrier
ModelMetadata.TransportVehicle.compartments🔗
ModelMetadata.TransportVehicle.compartments: {Compartment}
ModelMetadata.TransportVehicle.loadSpeed🔗
ModelMetadata.TransportVehicle.loadSpeed: number
ModelMetadata.TransportVehicle.reversible🔗
ModelMetadata.TransportVehicle.reversible: boolean
ModelMetadata.TransportVehicle.arrivalDelay🔗
ModelMetadata.TransportVehicle.arrivalDelay: integer
ModelMetadata.TransportVehicle.departureDelay🔗
ModelMetadata.TransportVehicle.departureDelay: integer
ModelMetadata.TransportVehicle.groupFileName🔗
ModelMetadata.TransportVehicle.groupFileName: ResName
ModelMetadata.TransportVehicle.transportModes🔗
ModelMetadata.TransportVehicle.transportModes: {TransportMode}
ModelMetadata.TransportVehicle.engineTransportModes🔗
ModelMetadata.TransportVehicle.engineTransportModes: {TransportMode}
ModelMetadata.TransportVehicle.filterTags🔗
ModelMetadata.TransportVehicle.filterTags: {string}
ModelMetadata.TransportVehicle.comfortFactor🔗
ModelMetadata.TransportVehicle.comfortFactor: number
ModelMetadata.TransportVehicle.priceFactor🔗
ModelMetadata.TransportVehicle.priceFactor: number
ModelMetadata.TransportVehicle.maintenanceFactor🔗
ModelMetadata.TransportVehicle.maintenanceFactor: number
ModelMetadata.TransportVehicle.noCblendMask🔗
ModelMetadata.TransportVehicle.noCblendMask: boolean
ModelMetadata.Cost🔗
ModelMetadata.Cost.priceScale🔗
ModelMetadata.Cost.priceScale: number
ModelMetadata.Cost.price🔗
ModelMetadata.Cost.price: integer
ModelMetadata.LandVehicle🔗
record ModelMetadata.LandVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number engines: {VehicleEngine} friction: number end
ModelMetadata.LandVehicle.topSpeed🔗
ModelMetadata.LandVehicle.topSpeed: number
ModelMetadata.LandVehicle.weightEmpty🔗
ModelMetadata.LandVehicle.weightEmpty: number
ModelMetadata.LandVehicle.weightMaxPayload🔗
ModelMetadata.LandVehicle.weightMaxPayload: number
ModelMetadata.LandVehicle.engines🔗
ModelMetadata.LandVehicle.engines: {VehicleEngine}
ModelMetadata.LandVehicle.friction🔗
ModelMetadata.LandVehicle.friction: number
ModelMetadata.WaterVehicle🔗
record ModelMetadata.WaterVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number availPower: number maxRpm: number area: number end
ModelMetadata.WaterVehicle.topSpeed🔗
ModelMetadata.WaterVehicle.topSpeed: number
ModelMetadata.WaterVehicle.weightEmpty🔗
ModelMetadata.WaterVehicle.weightEmpty: number
ModelMetadata.WaterVehicle.weightMaxPayload🔗
ModelMetadata.WaterVehicle.weightMaxPayload: number
ModelMetadata.WaterVehicle.availPower🔗
ModelMetadata.WaterVehicle.availPower: number
ModelMetadata.WaterVehicle.maxRpm🔗
ModelMetadata.WaterVehicle.maxRpm: number
ModelMetadata.WaterVehicle.area🔗
ModelMetadata.WaterVehicle.area: number
ModelMetadata.AirVehicle🔗
record ModelMetadata.AirVehicle
topSpeed: number weightEmpty: number weightMaxPayload: number maxThrust: number isHelicopter: boolean end
ModelMetadata.AirVehicle.topSpeed🔗
ModelMetadata.AirVehicle.topSpeed: number
ModelMetadata.AirVehicle.weightEmpty🔗
ModelMetadata.AirVehicle.weightEmpty: number
ModelMetadata.AirVehicle.weightMaxPayload🔗
ModelMetadata.AirVehicle.weightMaxPayload: number
ModelMetadata.AirVehicle.maxThrust🔗
ModelMetadata.AirVehicle.maxThrust: number
ModelMetadata.AirVehicle.isHelicopter🔗
ModelMetadata.AirVehicle.isHelicopter: boolean
ModelMetadata.Person🔗
ModelMetadata.Person.gender🔗
ModelMetadata.Person.gender: Gender
ModelMetadata.Tree🔗
record ModelMetadata.Tree
reputationFactor: number end
ModelMetadata.Tree.reputationFactor🔗
ModelMetadata.Tree.reputationFactor: number
Modifiers🔗
global record Modifiers
new: function(): Modifiers equals: function(Modifiers, Modifiers): boolean noiseModifier: number pollutionModifier: number maxSpeedModifier: number end
Configure additiive modifiers for specific entities
Modifiers.new()🔗
function Modifiers.new()(): Modifiers
Create a new Modifiers object
ReturnsModifiers
Modifiers.new(Modifiers)🔗
function Modifiers.new(Modifiers)(Modifiers): Modifiers
Create a copy of a Modifier object
ParametersModifiers
Modifiers
Modifiers.equals🔗
function Modifiers.equals(Modifiers, Modifiers): boolean
Compare Modifier for equality
ParametersModifiersModifiers
boolean
Modifiers.noiseModifier🔗
Modifiers.noiseModifier: number
A value of X will mean that noise produced by the entity is equal to (baseValue * (1 + X))
Modifiers.pollutionModifier🔗
Modifiers.pollutionModifier: number
A value of X will mean that pollution produced by the entity is equal to (baseValue * (1 + X))
Modifiers.maxSpeedModifier🔗
Modifiers.maxSpeedModifier: number
A value of X will mean that the top speed of the entity entity is equal to (baseValue * (1 + X))
ModuleDesc🔗
global record ModuleDesc
new: function(): ModuleDesc fileName: ResName type: string autoRemovable: boolean availability: ModelMetadata.Availability description: ModelMetadata.Description category: ModelMetadata.Category cost: ModelMetadata.Cost menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName metadata: {<any type> : <any type>} metadata_native: Map<string, number> relativePath: string updateScript: ScriptRef getModelsScript: ScriptRef end
Used to configure new modules
ModuleDesc.new🔗
function ModuleDesc.new(): ModuleDescReturns
ModuleDesc
ModuleDesc.fileName🔗
ModuleDesc.fileName: ResName
Resource name of the module file
ModuleDesc.type🔗
ModuleDesc.type: string
Type of the module, a module of a specific type can be built only on slots with the same type
ModuleDesc.autoRemovable🔗
ModuleDesc.autoRemovable: boolean
Whether it is automatically removed when building something on it (e.g. farm fields)
ModuleDesc.availability🔗
ModuleDesc.availability: ModelMetadata.Availability
Availability by year for module builder
ModuleDesc.description🔗
ModuleDesc.description: ModelMetadata.Description
Localized strings and icons paths for user interface
ModuleDesc.category🔗
ModuleDesc.category: ModelMetadata.Category
Unused
ModuleDesc.cost🔗
ModuleDesc.cost: ModelMetadata.Cost
Cost per unit
ModuleDesc.menuCategory🔗
ModuleDesc.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
ModuleDesc.builderAudioRes🔗
ModuleDesc.builderAudioRes: ResName
ModuleDesc.metadata🔗
ModuleDesc.metadata: {<any type> : <any type>}
Additional metadata as table
ModuleDesc.metadata_native🔗
ModuleDesc.metadata_native: Map<string, number>
Additional metadata as native map
ModuleDesc.relativePath🔗
ModuleDesc.relativePath: string
Deprecated
ModuleDesc.updateScript🔗
ModuleDesc.updateScript: ScriptRef
Script function that gets called once per build module after the updateScript of the construction has run
ModuleDesc.getModelsScript🔗
ModuleDesc.getModelsScript: ScriptRef
Script function used to generate module preview when building with module builder
MoneyMode🔗
MoneyMode represents the money mode.
MoneyMode.RAW🔗
MoneyMode.RAW: MoneyMode
MoneyMode.KMB🔗
MoneyMode.KMB: MoneyMode
MoveMode🔗
MoveMode.WALK🔗
MoveMode.WALK: MoveMode
MoveMode.DRIVE🔗
MoveMode.DRIVE: MoveMode
MoveMode.LINES🔗
MoveMode.LINES: MoveMode
MultipleUnit🔗
global record MultipleUnit
new: function(): MultipleUnit vehicles: {MultipleUnit.Vehicle} name: string desc: string filterTags: {string} availabilityNotificationGroup: string availabilityNotificationSortKey: integer groupFileName: string end
Specification for multiple units
MultipleUnit.new()🔗
function MultipleUnit.new()(): MultipleUnit
Create a new MultipleUnit object
ReturnsMultipleUnit
MultipleUnit.new(MultipleUnit)🔗
function MultipleUnit.new(MultipleUnit)(MultipleUnit): MultipleUnit
Create a copy of a MultiplUnit object
ParametersMultipleUnit
MultipleUnit
MultipleUnit.vehicles🔗
MultipleUnit.vehicles: {MultipleUnit.Vehicle}
List of models of which the multiple unit is compsed of
MultipleUnit.name🔗
MultipleUnit.name: string
Localized display name for the unit
MultipleUnit.desc🔗
MultipleUnit.desc: string
Localized display description for the unit
MultipleUnit.filterTags🔗
MultipleUnit.filterTags: {string}
Vehicle filter tags
MultipleUnit.availabilityNotificationGroup🔗
MultipleUnit.availabilityNotificationGroup: string
Group string to combine availability notifications of related vehicles
MultipleUnit.availabilityNotificationSortKey🔗
MultipleUnit.availabilityNotificationSortKey: integer
sortkey for availability notification group
MultipleUnit.groupFileName🔗
MultipleUnit.groupFileName: string
Used for variant goupings: multiple units belonging to the same group will be shown as variants of each other
MultipleUnit.Vehicle🔗
Specification for multiple units individual vehicles
MultipleUnit.Vehicle.name🔗
MultipleUnit.Vehicle.name: string
Vehicle resource name
MultipleUnit.Vehicle.forward🔗
MultipleUnit.Vehicle.forward: boolean
Whether the vehicle faces forward
NameDesc🔗
global record NameDesc
name: string personNamesScript: string townNamesScript: string streetNamesScript: string end
Name list description for procedural name generation
NameDesc.name🔗
NameDesc.name: string
NameDesc.personNamesScript🔗
NameDesc.personNamesScript: string
NameDesc.townNamesScript🔗
NameDesc.townNamesScript: string
NameDesc.streetNamesScript🔗
NameDesc.streetNamesScript: string
NativeLuaTable🔗
global record NativeLuaTable
find: function(NativeLuaTable, NativeLuaValue): NativeLuaValue findPath: function(NativeLuaTable, {NativeLuaValue}): NativeLuaValue insert: function(NativeLuaTable, NativeLuaValue, any) insert_native: function(NativeLuaTable, NativeLuaValue, NativeLuaValue) remove: function(NativeLuaTable, NativeLuaValue) size: function(NativeLuaTable): integer asTable: function(NativeLuaTable): {<any type> : <any type>} clone: function(NativeLuaTable): NativeLuaTable next: function(NativeLuaTable, NativeLuaValue): NativeLuaValue end
NativeLuaTable.find🔗
function NativeLuaTable.find(NativeLuaTable, NativeLuaValue): NativeLuaValueParameters
NativeLuaTableNativeLuaValue
NativeLuaValue
NativeLuaTable.findPath🔗
function NativeLuaTable.findPath(NativeLuaTable, {NativeLuaValue}): NativeLuaValueParameters
NativeLuaTable{NativeLuaValue}
NativeLuaValue
NativeLuaTable.insert🔗
function NativeLuaTable.insert(NativeLuaTable, NativeLuaValue, any)Parameters
NativeLuaTableNativeLuaValueany
NativeLuaTable.insert_native🔗
function NativeLuaTable.insert_native(NativeLuaTable, NativeLuaValue, NativeLuaValue)Parameters
NativeLuaTableNativeLuaValueNativeLuaValue
NativeLuaTable.remove🔗
function NativeLuaTable.remove(NativeLuaTable, NativeLuaValue)Parameters
NativeLuaTableNativeLuaValue
NativeLuaTable.size🔗
function NativeLuaTable.size(NativeLuaTable): integerParameters
NativeLuaTable
integer
NativeLuaTable.asTable🔗
function NativeLuaTable.asTable(NativeLuaTable): {<any type> : <any type>}Parameters
NativeLuaTable
{<any type> : <any type>}
NativeLuaTable.clone🔗
function NativeLuaTable.clone(NativeLuaTable): NativeLuaTableParameters
NativeLuaTable
NativeLuaTable
NativeLuaTable.next🔗
function NativeLuaTable.next(NativeLuaTable, NativeLuaValue): NativeLuaValueParameters
NativeLuaTableNativeLuaValue
NativeLuaValue
NativeLuaValue🔗
global type NativeLuaValue = string | number | boolean | nil | NativeLuaTable
Node🔗
global record Node
end
A single node within a TRANSPORT_NETWORK component.
NodeId🔗
References a single transport network node within a transport network entity
NodeId.new()🔗
function NodeId.new()(): NodeIdReturns
NodeId
NodeId.new(Engine.Entity, integer)🔗
function NodeId.new(Engine.Entity, integer)(entity : Engine.Entity, index : integer): NodeId
Constructor
Parametersentity:Engine.Entity— The TransportNetwork entityindex:integer— The zero-based index within the nodes field of the TransportNetwork component
NodeId
NodeId.entity🔗
NodeId.entity: Engine.Entity
The TransportNetwork entity
NodeId.index🔗
NodeId.index: integer
The zero-based index within the nodes field of the TransportNetwork component
NodeViewerData🔗
global record NodeViewerData
new: function(): NodeViewerData clone: function(NodeViewerData): NodeViewerData edgeIdx: integer colors: {Vec4f} order: integer width: number end
Struct containing information for rendering transport network edges of a BaseNode
NodeViewerData.new🔗
function NodeViewerData.new(): NodeViewerDataReturns
NodeViewerData
NodeViewerData.clone🔗
function NodeViewerData.clone(NodeViewerData): NodeViewerDataParameters
NodeViewerData
NodeViewerData
NodeViewerData.edgeIdx🔗
NodeViewerData.edgeIdx: integer
NodeViewerData.colors🔗
NodeViewerData.colors: {Vec4f}
Colors that will be smoothly interpolated from the beginning to the end of the edge
NodeViewerData.order🔗
NodeViewerData.order: integer
Rendering order of the edge
NodeViewerData.width🔗
NodeViewerData.width: number
Width of the edge
ParcelData🔗
Entities attached to a segment
ParcelData.leftEntities🔗
ParcelData.leftEntities: {Engine.Entity}
Parcels on the left of the segment
ParcelData.rightParcels🔗
ParcelData.rightParcels: {Engine.Entity}
Parcels on the right of the segment
ParsedSavegameName🔗
global record ParsedSavegameName
type: SaveGameType groupName: string ingameTimestamp: string fileTimestamp: string end
Savegame info extracted solely from its filename
ParsedSavegameName.type🔗
ParsedSavegameName.type: SaveGameType
ParsedSavegameName.groupName🔗
ParsedSavegameName.groupName: string
ParsedSavegameName.ingameTimestamp🔗
ParsedSavegameName.ingameTimestamp: string
ParsedSavegameName.fileTimestamp🔗
ParsedSavegameName.fileTimestamp: string
ParticleParamCurveFloat🔗
global record ParticleParamCurveFloat
new: function(): ParticleParamCurveFloat curve: {CurvePoint} end
Particle system parameter curve for float values
ParticleParamCurveFloat.new()🔗
function ParticleParamCurveFloat.new()(): ParticleParamCurveFloat
Creates a new particle parameter curve
ReturnsParticleParamCurveFloat
ParticleParamCurveFloat.new({CurvePoint})🔗
function ParticleParamCurveFloat.new({CurvePoint})({CurvePoint}): ParticleParamCurveFloat
Creates a new particle parameter curve with curve points
Parameters{CurvePoint}
ParticleParamCurveFloat
ParticleParamCurveFloat.CurvePoint🔗
record ParticleParamCurveFloat.CurvePoint
new: function(): CurvePoint time: number value: number easing: integer end
Curve point for float curve
ParticleParamCurveFloat.CurvePoint.new()🔗
function ParticleParamCurveFloat.CurvePoint.new()(): CurvePointReturns
CurvePoint
ParticleParamCurveFloat.CurvePoint.new(number, number, integer)🔗
function ParticleParamCurveFloat.CurvePoint.new(number, number, integer)(number, number, integer): CurvePointParameters
numbernumberinteger
CurvePoint
ParticleParamCurveFloat.CurvePoint.time🔗
ParticleParamCurveFloat.CurvePoint.time: number
Time point (0.0 to 1.0)
ParticleParamCurveFloat.CurvePoint.value🔗
ParticleParamCurveFloat.CurvePoint.value: number
Value at this time point
ParticleParamCurveFloat.CurvePoint.easing🔗
ParticleParamCurveFloat.CurvePoint.easing: integer
Easing function (enum.Easing)
ParticleParamCurveFloat.curve🔗
ParticleParamCurveFloat.curve: {CurvePoint}
Array of curve points
ParticleParamCurveVec2f🔗
global record ParticleParamCurveVec2f
new: function(): ParticleParamCurveVec2f curve: {CurvePoint} end
Particle system parameter curve for vec2f values
ParticleParamCurveVec2f.new()🔗
function ParticleParamCurveVec2f.new()(): ParticleParamCurveVec2f
Creates a new particle parameter curve
ReturnsParticleParamCurveVec2f
ParticleParamCurveVec2f.new({CurvePoint})🔗
function ParticleParamCurveVec2f.new({CurvePoint})({CurvePoint}): ParticleParamCurveVec2f
Creates a new particle parameter curve with curve points
Parameters{CurvePoint}
ParticleParamCurveVec2f
ParticleParamCurveVec2f.CurvePoint🔗
record ParticleParamCurveVec2f.CurvePoint
new: function(): CurvePoint time: number value: Vec2f easing: integer end
Curve point for vec2f curve
ParticleParamCurveVec2f.CurvePoint.new()🔗
function ParticleParamCurveVec2f.CurvePoint.new()(): CurvePointReturns
CurvePoint
ParticleParamCurveVec2f.CurvePoint.new(number, Vec2f, integer)🔗
function ParticleParamCurveVec2f.CurvePoint.new(number, Vec2f, integer)(number, Vec2f, integer): CurvePointParameters
numberVec2finteger
CurvePoint
ParticleParamCurveVec2f.CurvePoint.time🔗
ParticleParamCurveVec2f.CurvePoint.time: number
Time point (0.0 to 1.0)
ParticleParamCurveVec2f.CurvePoint.value🔗
ParticleParamCurveVec2f.CurvePoint.value: Vec2f
Value at this time point
ParticleParamCurveVec2f.CurvePoint.easing🔗
ParticleParamCurveVec2f.CurvePoint.easing: integer
Easing function (enum.Easing)
ParticleParamCurveVec2f.curve🔗
ParticleParamCurveVec2f.curve: {CurvePoint}
Array of curve points
ParticleParamCurveVec3f🔗
global record ParticleParamCurveVec3f
new: function(): ParticleParamCurveVec3f curve: {CurvePoint} end
Particle system parameter curve for vec3f values
ParticleParamCurveVec3f.new()🔗
function ParticleParamCurveVec3f.new()(): ParticleParamCurveVec3f
Creates a new particle parameter curve
ReturnsParticleParamCurveVec3f
ParticleParamCurveVec3f.new({CurvePoint})🔗
function ParticleParamCurveVec3f.new({CurvePoint})({CurvePoint}): ParticleParamCurveVec3f
Creates a new particle parameter curve with curve points
Parameters{CurvePoint}
ParticleParamCurveVec3f
ParticleParamCurveVec3f.CurvePoint🔗
record ParticleParamCurveVec3f.CurvePoint
new: function(): CurvePoint time: number value: Vec3f easing: integer end
Curve point for vec3f curve
ParticleParamCurveVec3f.CurvePoint.new()🔗
function ParticleParamCurveVec3f.CurvePoint.new()(): CurvePointReturns
CurvePoint
ParticleParamCurveVec3f.CurvePoint.new(number, Vec3f, integer)🔗
function ParticleParamCurveVec3f.CurvePoint.new(number, Vec3f, integer)(number, Vec3f, integer): CurvePointParameters
numberVec3finteger
CurvePoint
ParticleParamCurveVec3f.CurvePoint.time🔗
ParticleParamCurveVec3f.CurvePoint.time: number
Time point (0.0 to 1.0)
ParticleParamCurveVec3f.CurvePoint.value🔗
ParticleParamCurveVec3f.CurvePoint.value: Vec3f
Value at this time point
ParticleParamCurveVec3f.CurvePoint.easing🔗
ParticleParamCurveVec3f.CurvePoint.easing: integer
Easing function (enum.Easing)
ParticleParamCurveVec3f.curve🔗
ParticleParamCurveVec3f.curve: {CurvePoint}
Array of curve points
ParticleParamFloat🔗
Particle system parameter for float values
ParticleParamFloat.new()🔗
function ParticleParamFloat.new()(): ParticleParamFloat
Creates a new particle parameter
ReturnsParticleParamFloat
ParticleParamFloat.new(number)🔗
function ParticleParamFloat.new(number)(number): ParticleParamFloat
Creates a new particle parameter with a value
Parametersnumber
ParticleParamFloat
ParticleParamFloat.new(RandomMinMax)🔗
function ParticleParamFloat.new(RandomMinMax)(RandomMinMax): ParticleParamFloat
Creates a new particle parameter with a range
ParametersRandomMinMax
ParticleParamFloat
ParticleParamFloat.new(ComponentWiseMinMax)🔗
function ParticleParamFloat.new(ComponentWiseMinMax)(ComponentWiseMinMax): ParticleParamFloat
Creates a new particle parameter with a component-wise range
ParametersComponentWiseMinMax
ParticleParamFloat
ParticleParamFloat.RandomMinMax🔗
Random min/max range for particle parameters
ParticleParamFloat.RandomMinMax.new()🔗
function ParticleParamFloat.RandomMinMax.new()(): RandomMinMaxReturns
RandomMinMax
ParticleParamFloat.RandomMinMax.new(number, number)🔗
function ParticleParamFloat.RandomMinMax.new(number, number)(number, number): RandomMinMaxParameters
numbernumber
RandomMinMax
ParticleParamFloat.RandomMinMax.min🔗
ParticleParamFloat.RandomMinMax.min: number
Minimum value
ParticleParamFloat.RandomMinMax.max🔗
ParticleParamFloat.RandomMinMax.max: number
Maximum value
ParticleParamFloat.ComponentWiseMinMax🔗
record ParticleParamFloat.ComponentWiseMinMax
new: function(): ComponentWiseMinMax min: number max: number end
Random min/max range for particle parameters
ParticleParamFloat.ComponentWiseMinMax.new()🔗
function ParticleParamFloat.ComponentWiseMinMax.new()(): ComponentWiseMinMaxReturns
ComponentWiseMinMax
ParticleParamFloat.ComponentWiseMinMax.new(number, number)🔗
function ParticleParamFloat.ComponentWiseMinMax.new(number, number)(number, number): ComponentWiseMinMaxParameters
numbernumber
ComponentWiseMinMax
ParticleParamFloat.ComponentWiseMinMax.min🔗
ParticleParamFloat.ComponentWiseMinMax.min: number
Minimum value
ParticleParamFloat.ComponentWiseMinMax.max🔗
ParticleParamFloat.ComponentWiseMinMax.max: number
Maximum value
ParticleParamFloat.value🔗
ParticleParamFloat.value: any
Value or range (variant of number or RandomMinMax)
ParticleParamVec2f🔗
Particle system parameter for vec2f values
ParticleParamVec2f.new()🔗
function ParticleParamVec2f.new()(): ParticleParamVec2f
Creates a new particle parameter
ReturnsParticleParamVec2f
ParticleParamVec2f.new(Vec2f)🔗
function ParticleParamVec2f.new(Vec2f)(Vec2f): ParticleParamVec2f
Creates a new particle parameter with a value
ParametersVec2f
ParticleParamVec2f
ParticleParamVec2f.new(RandomMinMax)🔗
function ParticleParamVec2f.new(RandomMinMax)(RandomMinMax): ParticleParamVec2f
Creates a new particle parameter with a range
ParametersRandomMinMax
ParticleParamVec2f
ParticleParamVec2f.new(ComponentWiseMinMax)🔗
function ParticleParamVec2f.new(ComponentWiseMinMax)(ComponentWiseMinMax): ParticleParamVec2f
Creates a new particle parameter with a component-wise range
ParametersComponentWiseMinMax
ParticleParamVec2f
ParticleParamVec2f.RandomMinMax🔗
Random min/max range for particle parameters
ParticleParamVec2f.RandomMinMax.new()🔗
function ParticleParamVec2f.RandomMinMax.new()(): RandomMinMaxReturns
RandomMinMax
ParticleParamVec2f.RandomMinMax.new(Vec2f, Vec2f)🔗
function ParticleParamVec2f.RandomMinMax.new(Vec2f, Vec2f)(Vec2f, Vec2f): RandomMinMaxParameters
Vec2fVec2f
RandomMinMax
ParticleParamVec2f.RandomMinMax.min🔗
ParticleParamVec2f.RandomMinMax.min: Vec2f
Minimum value
ParticleParamVec2f.RandomMinMax.max🔗
ParticleParamVec2f.RandomMinMax.max: Vec2f
Maximum value
ParticleParamVec2f.ComponentWiseMinMax🔗
record ParticleParamVec2f.ComponentWiseMinMax
new: function(): ComponentWiseMinMax min: Vec2f max: Vec2f end
Random min/max range for particle parameters
ParticleParamVec2f.ComponentWiseMinMax.new()🔗
function ParticleParamVec2f.ComponentWiseMinMax.new()(): ComponentWiseMinMaxReturns
ComponentWiseMinMax
ParticleParamVec2f.ComponentWiseMinMax.new(Vec2f, Vec2f)🔗
function ParticleParamVec2f.ComponentWiseMinMax.new(Vec2f, Vec2f)(Vec2f, Vec2f): ComponentWiseMinMaxParameters
Vec2fVec2f
ComponentWiseMinMax
ParticleParamVec2f.ComponentWiseMinMax.min🔗
ParticleParamVec2f.ComponentWiseMinMax.min: Vec2f
Minimum value
ParticleParamVec2f.ComponentWiseMinMax.max🔗
ParticleParamVec2f.ComponentWiseMinMax.max: Vec2f
Maximum value
ParticleParamVec2f.value🔗
ParticleParamVec2f.value: any
Value or range (variant of Vec2f or RandomMinMax)
Path🔗
global record Path
new: function(): Path edges: {{EdgeId, boolean}} endOffset: integer terminalDecisionOffset: integer earlyArrivalIndices: integer end
A path comprised of EdgeId and directions
Path.new🔗
function Path.new(): Path
Create a new instance of a Path object
ReturnsPath
Path.edges🔗
Path.edges: {{EdgeId, boolean}}
List of edges and their directions (true = forward, false = reverse)
Path.endOffset🔗
Path.endOffset: integer
The actual end of the path (i.e. where to stop) as offset from the end
Path.terminalDecisionOffset🔗
Path.terminalDecisionOffset: integer
The position at which the alternative terminal choice will start, as an offset from the end
Path.earlyArrivalIndices🔗
Path.earlyArrivalIndices: integer
PathFactoryInput🔗
global record PathFactoryInput
fromEdgesWalk: {EdgePos} fromEdgesDrive: {EdgePos} fromLineOrEdges: LineOrEdges moveMode2costFactor: {number, number, number} toEntityWalk: Engine.Entity toEdgesDrive: {EdgePos} fromEdgesWalkForDrive: {EdgePos} toEdgesWalkForDrive: {EdgePos} cargoType: CargoTypeId end
PathFactoryInput.fromEdgesWalk🔗
PathFactoryInput.fromEdgesWalk: {EdgePos}
PathFactoryInput.fromEdgesDrive🔗
PathFactoryInput.fromEdgesDrive: {EdgePos}
PathFactoryInput.fromLineOrEdges🔗
PathFactoryInput.fromLineOrEdges: LineOrEdges
PathFactoryInput.moveMode2costFactor🔗
PathFactoryInput.moveMode2costFactor: {number, number, number}
PathFactoryInput.toEntityWalk🔗
PathFactoryInput.toEntityWalk: Engine.Entity
PathFactoryInput.toEdgesDrive🔗
PathFactoryInput.toEdgesDrive: {EdgePos}
PathFactoryInput.fromEdgesWalkForDrive🔗
PathFactoryInput.fromEdgesWalkForDrive: {EdgePos}
PathFactoryInput.toEdgesWalkForDrive🔗
PathFactoryInput.toEdgesWalkForDrive: {EdgePos}
PathFactoryInput.cargoType🔗
PathFactoryInput.cargoType: CargoTypeId
PathFactoryOutput🔗
global record PathFactoryOutput
line0: LineSection line1: LineSection path: ExtPath cost: number moveMode: MoveMode end
Output result from pathfinding
PathFactoryOutput.LineSection🔗
PathFactoryOutput.LineSection.line🔗
PathFactoryOutput.LineSection.line: Engine.Entity
PathFactoryOutput.LineSection.lineStop0🔗
PathFactoryOutput.LineSection.lineStop0: integer
PathFactoryOutput.LineSection.lineStop1🔗
PathFactoryOutput.LineSection.lineStop1: integer
PathFactoryOutput.line0🔗
PathFactoryOutput.line0: LineSection
PathFactoryOutput.line1🔗
PathFactoryOutput.line1: LineSection
PathFactoryOutput.path🔗
PathFactoryOutput.path: ExtPath
PathFactoryOutput.cost🔗
PathFactoryOutput.cost: number
PathFactoryOutput.moveMode🔗
PathFactoryOutput.moveMode: MoveMode
PathPos🔗
The position on a Path
PathPos.new🔗
function PathPos.new(): PathPos
Create a new instance of a PathPos object
ReturnsPathPos
PathPos.edgeIndex🔗
PathPos.edgeIndex: integer
The zero-based index within a path
PathPos.pos🔗
PathPos.pos: number
The position on the spline, relative to the length of the spline
PathPos.pos01🔗
PathPos.pos01: number
The position on the spline, normalized as parameter from 0 to 1
PathPosData🔗
The position in the world
PathPosData.position🔗
PathPosData.position: Vec3f
Position in world coordinates
PathPosData.pPrime🔗
PathPosData.pPrime: Vec3f
First derivative of position (velocity direction)
PathPosData.pPrimePrime🔗
PathPosData.pPrimePrime: Vec3f
Second derivative of position (acceleration direction)
PdxAccountInfo🔗
global record PdxAccountInfo
email: string end
PdxAccountInfo.email🔗
PdxAccountInfo.email: string
PdxCountry🔗
PdxCountry.name🔗
PdxCountry.name: string
PdxCountry.code🔗
PdxCountry.code: integer
PdxErrorCodes🔗
global record PdxErrorCodes
AccountAlreadyExists: PdxErrorCodes BadEmailAddressFormat: PdxErrorCodes BadPasswordLength: PdxErrorCodes BadDateFormat: PdxErrorCodes UnderAgeAccount: PdxErrorCodes MissingAccountInfo: PdxErrorCodes ProfileDoesNotExist: PdxErrorCodes ProfileAlreadyTaken: PdxErrorCodes ProfileAlreadyExists: PdxErrorCodes ProfileNameTooLong: PdxErrorCodes ProfileNameTooShort: PdxErrorCodes ProfileNameInvalid: PdxErrorCodes end
PdxErrorCodes.AccountAlreadyExists🔗
PdxErrorCodes.AccountAlreadyExists: PdxErrorCodes
PdxErrorCodes.BadEmailAddressFormat🔗
PdxErrorCodes.BadEmailAddressFormat: PdxErrorCodes
PdxErrorCodes.BadPasswordLength🔗
PdxErrorCodes.BadPasswordLength: PdxErrorCodes
PdxErrorCodes.BadDateFormat🔗
PdxErrorCodes.BadDateFormat: PdxErrorCodes
PdxErrorCodes.UnderAgeAccount🔗
PdxErrorCodes.UnderAgeAccount: PdxErrorCodes
PdxErrorCodes.MissingAccountInfo🔗
PdxErrorCodes.MissingAccountInfo: PdxErrorCodes
PdxErrorCodes.ProfileDoesNotExist🔗
PdxErrorCodes.ProfileDoesNotExist: PdxErrorCodes
PdxErrorCodes.ProfileAlreadyTaken🔗
PdxErrorCodes.ProfileAlreadyTaken: PdxErrorCodes
PdxErrorCodes.ProfileAlreadyExists🔗
PdxErrorCodes.ProfileAlreadyExists: PdxErrorCodes
PdxErrorCodes.ProfileNameTooLong🔗
PdxErrorCodes.ProfileNameTooLong: PdxErrorCodes
PdxErrorCodes.ProfileNameTooShort🔗
PdxErrorCodes.ProfileNameTooShort: PdxErrorCodes
PdxErrorCodes.ProfileNameInvalid🔗
PdxErrorCodes.ProfileNameInvalid: PdxErrorCodes
PdxFuture🔗
Type Parameters
T
PdxFuture.getResult🔗
function PdxFuture.getResult(PdxFuture<T>): TParameters
PdxFuture<T>
T
PdxLegalDocument🔗
PdxLegalDocument.title🔗
PdxLegalDocument.title: string
PdxLegalDocument.text🔗
PdxLegalDocument.text: string
PdxLegalDocumentType🔗
global record PdxLegalDocumentType
UserAgreement: PdxLegalDocumentType PrivacyPolicy: PdxLegalDocumentType end
PdxLegalDocumentType.UserAgreement🔗
PdxLegalDocumentType.UserAgreement: PdxLegalDocumentType
PdxLegalDocumentType.PrivacyPolicy🔗
PdxLegalDocumentType.PrivacyPolicy: PdxLegalDocumentType
PdxLoginResult🔗
global record PdxLoginResult
end
PdxProfileResult🔗
PdxProfileResult.id🔗
PdxProfileResult.id: string
PdxProfileResult.name🔗
PdxProfileResult.name: string
PdxResult🔗
PdxResult.success🔗
PdxResult.success: boolean
PdxResult.errorCode🔗
PdxResult.errorCode: PdxErrorCodes
PdxThirdPartyAutoLoginPromptState🔗
PdxThirdPartyAutoLoginPromptState.NotShown🔗
PdxThirdPartyAutoLoginPromptState.NotShown: PdxThirdPartyAutoLoginPromptState
PdxThirdPartyAutoLoginPromptState.Accepted🔗
PdxThirdPartyAutoLoginPromptState.Accepted: PdxThirdPartyAutoLoginPromptState
PdxThirdPartyAutoLoginPromptState.Rejected🔗
PdxThirdPartyAutoLoginPromptState.Rejected: PdxThirdPartyAutoLoginPromptState
PdxThirdPartyLinkState🔗
PdxThirdPartyLinkState.NeitherAccountHasLink🔗
PdxThirdPartyLinkState.NeitherAccountHasLink: PdxThirdPartyLinkState
PdxThirdPartyLinkState.ParadoxAccountHasLink🔗
PdxThirdPartyLinkState.ParadoxAccountHasLink: PdxThirdPartyLinkState
PdxThirdPartyLinkState.ThirdPartyAccountHasLink🔗
PdxThirdPartyLinkState.ThirdPartyAccountHasLink: PdxThirdPartyLinkState
PdxThirdPartyLinkState.BothAccountsHaveLinks🔗
PdxThirdPartyLinkState.BothAccountsHaveLinks: PdxThirdPartyLinkState
PdxThirdPartyLinkState.BothAccountsAreLinked🔗
PdxThirdPartyLinkState.BothAccountsAreLinked: PdxThirdPartyLinkState
PlacementParams🔗
global record PlacementParams
requiredIndustryTags: {string} tags: {string} distanceWeights: {string : number} allowedOnLand: boolean allowedOnWater: boolean buildOrder: integer initWeight: integer tier: integer weights: {string : number} end
PlacementParams.requiredIndustryTags🔗
PlacementParams.requiredIndustryTags: {string}
PlacementParams.tags🔗
PlacementParams.tags: {string}
PlacementParams.distanceWeights🔗
PlacementParams.distanceWeights: {string : number}
PlacementParams.allowedOnLand🔗
PlacementParams.allowedOnLand: boolean
PlacementParams.allowedOnWater🔗
PlacementParams.allowedOnWater: boolean
PlacementParams.buildOrder🔗
PlacementParams.buildOrder: integer
PlacementParams.initWeight🔗
PlacementParams.initWeight: integer
PlacementParams.tier🔗
PlacementParams.tier: integer
PlacementParams.weights🔗
PlacementParams.weights: {string : number}
Platform🔗
Platform represents the platform type.
Platform.Windows🔗
Platform.Windows: Platform
Platform.Linux🔗
Platform.Linux: Platform
Platform.Mac🔗
Platform.Mac: Platform
Platform.XBoxSeries🔗
Platform.XBoxSeries: Platform
Platform.PS5🔗
Platform.PS5: Platform
Platform.PS🔗
Platform.PS: Platform
Platform.XBox🔗
Platform.XBox: Platform
Platform.Desktop🔗
Platform.Desktop: Platform
Platform.Console🔗
Platform.Console: Platform
PlatformDeviceSpec🔗
Platform device specifications
PlatformDeviceSpec.gen🔗
PlatformDeviceSpec.gen: ConsoleGen
PlatformDeviceSpec.resolution🔗
PlatformDeviceSpec.resolution: Vec2i
PlayerStatDesc🔗
global record PlayerStatDesc
id: string end
A player stat, used for start tracking
PlayerStatDesc.id🔗
PlayerStatDesc.id: string
The unique id for that stat
PlayerStatProgress🔗
The value of a player stat
PlayerStatProgress.id🔗
PlayerStatProgress.id: string
the unique id for the stat
PlayerStatProgress.getValue🔗
function PlayerStatProgress.getValue(PlayerStatProgress): number
the value of the stats (either the current value or a target value depending on the use context)
ParametersPlayerStatProgress
number
PlayerStatRep🔗
global record PlayerStatRep
get: function(playerStatRep : PlayerStatRep, statId : string): PlayerStatDesc end
Repository for all player stat types (static data)
Access the current state of a player stats, use UserProfile:getPlayerStatProgress
PlayerStatRep.get🔗
function PlayerStatRep.get(playerStatRep : PlayerStatRep, statId : string): PlayerStatDesc
Get a player stat description from its id
ParametersplayerStatRep:PlayerStatRep— the player start repstatId:string— the player stat id
PlayerStatDesc— the player stat desc
PlaylistDesc🔗
global record PlaylistDesc
name: string tracks: {PlaylistTrack} order: integer hidden: boolean allFilter: boolean end
Music playlist description
PlaylistDesc.name🔗
PlaylistDesc.name: string
PlaylistDesc.tracks🔗
PlaylistDesc.tracks: {PlaylistTrack}
PlaylistDesc.order🔗
PlaylistDesc.order: integer
PlaylistDesc.hidden🔗
PlaylistDesc.hidden: boolean
PlaylistDesc.allFilter🔗
PlaylistDesc.allFilter: boolean
PlaylistTrack🔗
Music playlist track information
PlaylistTrack.name🔗
PlaylistTrack.name: string
id
PlaylistTrack.fileName🔗
PlaylistTrack.fileName: string
file path to the music file
PlaylistTrack.yearFrom🔗
PlaylistTrack.yearFrom: integer
Year when track becomes available
PlaylistTrack.yearTo🔗
PlaylistTrack.yearTo: integer
Last year before track becomes unavailable
PortId🔗
Identifies a Port of a Node within a transport network
PortId.nodeId🔗
PortId.nodeId: NodeId
The NodeId of the node this port belongs to
PortId.port🔗
PortId.port: integer
The zero-based port index on the node
PowerUnit🔗
PowerUnit represents the unit of measurement used for power.
PowerUnit.KW🔗
PowerUnit.KW: PowerUnit
PowerUnit.HP🔗
PowerUnit.HP: PowerUnit
PrecedencePreference🔗
global record PrecedencePreference
YES: PrecedencePreference NO: PrecedencePreference AUTO: PrecedencePreference end
PrecedencePreference.YES🔗
PrecedencePreference.YES: PrecedencePreference
PrecedencePreference.NO🔗
PrecedencePreference.NO: PrecedencePreference
PrecedencePreference.AUTO🔗
PrecedencePreference.AUTO: PrecedencePreference
PreviewColoring🔗
global record PreviewColoring
end
Proposal🔗
global record Proposal
record EdgeObject
resultEntity: Engine.Entity category: integer modelInstance: ModelInstance playerEntity: Engine.Entity left: boolean endrecord NodeAndEntity
new: function(): NodeAndEntity entity: Engine.Entity comp: Engine.Component.BaseNode endrecord SegmentAndEntity
new: function(): SegmentAndEntity entity: Engine.Entity comp: Engine.Component.BaseEdge type: integer streetEdge: Engine.Component.BaseEdgeStreet emissionEmitter: Engine.Component.EmissionEmitter playerOwned: Engine.Component.PlayerOwned endrecord BaseNodeLaneConnectionAndEntity
new: function(): BaseNodeLaneConnectionAndEntity comp: Engine.Component.BaseNodeConfig entity: Engine.Entity endrecord StreetProposal
addedNodes: {NodeAndEntity} addedNodes_native: Vector<NodeAndEntity> addedSegments: {SegmentAndEntity} addedSegments_native: Vector<SegmentAndEntity> removedSegments: {SegmentAndEntity} removedNodes: {NodeAndEntity} edgeObjectsToAdd: {EdgeObject} new2oldEdgeObjects: {Engine.Entity : {Engine.Entity}} old2newEdgeObjects: {Engine.Entity : {Engine.Entity}} nodeConfigsToAdd: {BaseNodeLaneConnectionAndEntity} nodeConfigsToRemove: {Engine.Entity} endrecord Subconstruction
models: {TransformedModel} models_native: Vector<TransformedModel> metadata: SubconstructionInstanceMetadata station: Station colliders: {Collider} endrecord Construction
subconstructions: {Subconstruction} subconstructions_native: Vector<Subconstruction> fileName: string frozenNodes: {Engine.Entity} frozenEdges: {Engine.Entity} depots: {Engine.Entity} stations: {Engine.Entity} industries: {Engine.Entity} townBuildings: {Engine.Entity} persistentMetadata: ConstructionInstanceMetadata params: {<any type> : <any type>} endrecord StreetTerminal
cargo: boolean passengers: boolean capacity: integer wantSymmetric: boolean cargoUnload: boolean cargoLoad: boolean endnew: function(): Proposal clone: function(Proposal): Proposal proposal: StreetProposal toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> old2new: {Engine.Entity : integer} toAdd: {ConstructionEntity} toAdd_native: Vector<ConstructionEntity> terrain: Terrain endrecord ConstructionEntity
fileName: ResName hasCargoPlatform: boolean desc: ConstructionDesc construction: Construction transf: Mat4f playerEntity: Engine.Entity end
A more complete version of the SimpleProposal.
Most data can be read from a ProposalData or in the result of api.cmd.makeWorldBuildProposalCmd.
Proposal.EdgeObject🔗
record Proposal.EdgeObject
resultEntity: Engine.Entity category: integer modelInstance: ModelInstance playerEntity: Engine.Entity left: boolean end
Edge object information
Proposal.EdgeObject.resultEntity🔗
Proposal.EdgeObject.resultEntity: Engine.Entity
Resulting entity
Proposal.EdgeObject.category🔗
Proposal.EdgeObject.category: integer
Category (0 = stop, 1 = waypoint, 2 = signal)
Proposal.EdgeObject.modelInstance🔗
Proposal.EdgeObject.modelInstance: ModelInstance
Model instance for the edge object
Proposal.EdgeObject.playerEntity🔗
Proposal.EdgeObject.playerEntity: Engine.Entity
Player entity that owns this edge object
Proposal.EdgeObject.left🔗
Proposal.EdgeObject.left: boolean
Whether on left side
Proposal.NodeAndEntity🔗
record Proposal.NodeAndEntity
new: function(): NodeAndEntity entity: Engine.Entity comp: Engine.Component.BaseNode end
An entity with a BaseNode.
Used to specify a new base node entity to be added.
Proposal.NodeAndEntity.new🔗
function Proposal.NodeAndEntity.new(): NodeAndEntityReturns
NodeAndEntity
Proposal.NodeAndEntity.entity🔗
Proposal.NodeAndEntity.entity: Engine.Entity
Proposal.NodeAndEntity.comp🔗
Proposal.NodeAndEntity.comp: Engine.Component.BaseNode
Proposal.SegmentAndEntity🔗
An entity with a BaseEdge component and extra information.
Proposal.SegmentAndEntity.new🔗
function Proposal.SegmentAndEntity.new(): SegmentAndEntityReturns
SegmentAndEntity
Proposal.SegmentAndEntity.entity🔗
Proposal.SegmentAndEntity.entity: Engine.Entity
Proposal.SegmentAndEntity.comp🔗
Proposal.SegmentAndEntity.comp: Engine.Component.BaseEdge
Proposal.SegmentAndEntity.type🔗
Proposal.SegmentAndEntity.type: integer
Type (0 = street, 1 = track)
Proposal.SegmentAndEntity.streetEdge🔗
Proposal.SegmentAndEntity.streetEdge: Engine.Component.BaseEdgeStreet
Street edge component
Proposal.SegmentAndEntity.emissionEmitter🔗
Proposal.SegmentAndEntity.emissionEmitter: Engine.Component.EmissionEmitter
Emission emitter component (optional)
Proposal.SegmentAndEntity.playerOwned🔗
Proposal.SegmentAndEntity.playerOwned: Engine.Component.PlayerOwned
Player owned component (optional)
Proposal.BaseNodeLaneConnectionAndEntity🔗
record Proposal.BaseNodeLaneConnectionAndEntity
new: function(): BaseNodeLaneConnectionAndEntity comp: Engine.Component.BaseNodeConfig entity: Engine.Entity end
An entity with a BaseNodeLaneConnection component.
Used to specify a new base node configuration entity to be added.
Proposal.BaseNodeLaneConnectionAndEntity.new🔗
function Proposal.BaseNodeLaneConnectionAndEntity.new(): BaseNodeLaneConnectionAndEntityReturns
BaseNodeLaneConnectionAndEntity
Proposal.BaseNodeLaneConnectionAndEntity.comp🔗
Proposal.BaseNodeLaneConnectionAndEntity.comp: Engine.Component.BaseNodeConfig
Proposal.BaseNodeLaneConnectionAndEntity.entity🔗
Proposal.BaseNodeLaneConnectionAndEntity.entity: Engine.Entity
Proposal.StreetProposal🔗
record Proposal.StreetProposal
addedNodes: {NodeAndEntity} addedNodes_native: Vector<NodeAndEntity> addedSegments: {SegmentAndEntity} addedSegments_native: Vector<SegmentAndEntity> removedSegments: {SegmentAndEntity} removedNodes: {NodeAndEntity} edgeObjectsToAdd: {EdgeObject} new2oldEdgeObjects: {Engine.Entity : {Engine.Entity}} old2newEdgeObjects: {Engine.Entity : {Engine.Entity}} nodeConfigsToAdd: {BaseNodeLaneConnectionAndEntity} nodeConfigsToRemove: {Engine.Entity} end
A more complete version of the SimpleStreetProposal.
Most data can be read from a ProposalData or in the result of cmd.makeWorldBuildProposalCmd.
Proposal.StreetProposal.addedNodes🔗
Proposal.StreetProposal.addedNodes: {NodeAndEntity}
Added nodes
Proposal.StreetProposal.addedNodes_native🔗
Proposal.StreetProposal.addedNodes_native: Vector<NodeAndEntity>
Added nodes as native vector
Proposal.StreetProposal.addedSegments🔗
Proposal.StreetProposal.addedSegments: {SegmentAndEntity}
Added segments
Proposal.StreetProposal.addedSegments_native🔗
Proposal.StreetProposal.addedSegments_native: Vector<SegmentAndEntity>
Added segments as native vector
Proposal.StreetProposal.removedSegments🔗
Proposal.StreetProposal.removedSegments: {SegmentAndEntity}
Removed segments
Proposal.StreetProposal.removedNodes🔗
Proposal.StreetProposal.removedNodes: {NodeAndEntity}
Removed nodes
Proposal.StreetProposal.edgeObjectsToAdd🔗
Proposal.StreetProposal.edgeObjectsToAdd: {EdgeObject}
Edge objects to add
Proposal.StreetProposal.new2oldEdgeObjects🔗
Proposal.StreetProposal.new2oldEdgeObjects: {Engine.Entity : {Engine.Entity}}
Mapping of new to old edge objects
Proposal.StreetProposal.old2newEdgeObjects🔗
Proposal.StreetProposal.old2newEdgeObjects: {Engine.Entity : {Engine.Entity}}
Mapping of old to new edge objects
Proposal.StreetProposal.nodeConfigsToAdd🔗
Proposal.StreetProposal.nodeConfigsToAdd: {BaseNodeLaneConnectionAndEntity}
Node configurations that will be added
Proposal.StreetProposal.nodeConfigsToRemove🔗
Proposal.StreetProposal.nodeConfigsToRemove: {Engine.Entity}
Node configurations that will be removed (node itself cannot be removed at the same time)
Proposal.TransformedModel🔗
Transformed model information
Proposal.TransformedModel.id🔗
Proposal.TransformedModel.id: string
Proposal.TransformedModel.tag🔗
Proposal.TransformedModel.tag: integer
Proposal.TransformedModel.transf🔗
Proposal.TransformedModel.transf: Mat4f
Proposal.TransformedModel.thin🔗
Proposal.TransformedModel.thin: boolean
Proposal.Subconstruction🔗
Proposal.Subconstruction.models🔗
Proposal.Subconstruction.models: {TransformedModel}
Proposal.Subconstruction.models_native🔗
Proposal.Subconstruction.models_native: Vector<TransformedModel>
Proposal.Subconstruction.metadata🔗
Proposal.Subconstruction.metadata: SubconstructionInstanceMetadata
Proposal.Subconstruction.station🔗
Proposal.Subconstruction.station: Station
Proposal.Subconstruction.colliders🔗
Proposal.Subconstruction.colliders: {Collider}
Proposal.Construction🔗
record Proposal.Construction
subconstructions: {Subconstruction} subconstructions_native: Vector<Subconstruction> fileName: string frozenNodes: {Engine.Entity} frozenEdges: {Engine.Entity} depots: {Engine.Entity} stations: {Engine.Entity} industries: {Engine.Entity} townBuildings: {Engine.Entity} persistentMetadata: ConstructionInstanceMetadata params: {<any type> : <any type>} end
A construction: usually contains stations, depots, town buildings or industries.
Proposal.Construction.subconstructions🔗
Proposal.Construction.subconstructions: {Subconstruction}
all subconstructions generated by the construction
Proposal.Construction.subconstructions_native🔗
Proposal.Construction.subconstructions_native: Vector<Subconstruction>
all subconstructions generated by the construction, as native vector
Proposal.Construction.fileName🔗
Proposal.Construction.fileName: string
the resource name of the construction (or the id in case of dynamic constructions)
Proposal.Construction.frozenNodes🔗
Proposal.Construction.frozenNodes: {Engine.Entity}
nodes that belong to the construction and cannot be moved
Proposal.Construction.frozenEdges🔗
Proposal.Construction.frozenEdges: {Engine.Entity}
frozenEdges edges that belong to the construction and cannot be moved
Proposal.Construction.depots🔗
Proposal.Construction.depots: {Engine.Entity}
depots that belong to the construction
Proposal.Construction.stations🔗
Proposal.Construction.stations: {Engine.Entity}
stations that belong to the construction
Proposal.Construction.industries🔗
Proposal.Construction.industries: {Engine.Entity}
industries that belong to the construction
Proposal.Construction.townBuildings🔗
Proposal.Construction.townBuildings: {Engine.Entity}
town buildings that belong to the construction
Proposal.Construction.persistentMetadata🔗
Proposal.Construction.persistentMetadata: ConstructionInstanceMetadata
Construction metadata persisted per instance
Proposal.Construction.params🔗
Proposal.Construction.params: {<any type> : <any type>}
construction params
Proposal.StreetTerminal🔗
record Proposal.StreetTerminal
cargo: boolean passengers: boolean capacity: integer wantSymmetric: boolean cargoUnload: boolean cargoLoad: boolean end
Proposal.StreetTerminal.cargo🔗
Proposal.StreetTerminal.cargo: boolean
Proposal.StreetTerminal.passengers🔗
Proposal.StreetTerminal.passengers: boolean
Proposal.StreetTerminal.capacity🔗
Proposal.StreetTerminal.capacity: integer
Proposal.StreetTerminal.wantSymmetric🔗
Proposal.StreetTerminal.wantSymmetric: boolean
Proposal.StreetTerminal.cargoUnload🔗
Proposal.StreetTerminal.cargoUnload: boolean
Proposal.StreetTerminal.cargoLoad🔗
Proposal.StreetTerminal.cargoLoad: boolean
Proposal.Signal🔗
Proposal.Signal.type🔗
Proposal.Signal.type: SignalType
Proposal.ConstructionEntity🔗
record Proposal.ConstructionEntity
fileName: ResName hasCargoPlatform: boolean desc: ConstructionDesc construction: Construction transf: Mat4f playerEntity: Engine.Entity end
Construction entity data for use in proposals
Most data can be read from a ProposalData or in the result of cmd.makeWorldBuildProposalCmd.
Proposal.ConstructionEntity.fileName🔗
Proposal.ConstructionEntity.fileName: ResName
Construction resource name
Proposal.ConstructionEntity.hasCargoPlatform🔗
Proposal.ConstructionEntity.hasCargoPlatform: boolean
Whether it has cargo platform
Proposal.ConstructionEntity.desc🔗
Proposal.ConstructionEntity.desc: ConstructionDesc
Construction description
Proposal.ConstructionEntity.construction🔗
Proposal.ConstructionEntity.construction: Construction
Construction data
Proposal.ConstructionEntity.transf🔗
Proposal.ConstructionEntity.transf: Mat4f
Transformation matrix
Proposal.ConstructionEntity.playerEntity🔗
Proposal.ConstructionEntity.playerEntity: Engine.Entity
Owning player entity
Proposal.Terrain🔗
Contains proposal terrain modifications.
Proposal.Terrain.baseHeightMod🔗
Proposal.Terrain.baseHeightMod: GridVec2f
Proposal.new🔗
function Proposal.new(): ProposalReturns
Proposal
Proposal.clone🔗
function Proposal.clone(Proposal): ProposalParameters
Proposal
Proposal
Proposal.proposal🔗
Proposal.proposal: StreetProposal
Street proposal
Proposal.toRemove🔗
Proposal.toRemove: {Engine.Entity}
Entities to remove
Proposal.toRemove_native🔗
Proposal.toRemove_native: Vector<Engine.Entity>
Entities to remove as native vector
Proposal.old2new🔗
Proposal.old2new: {Engine.Entity : integer}
Mapping from old to new entities
Proposal.toAdd🔗
Proposal.toAdd: {ConstructionEntity}
Construction entities to add
Proposal.toAdd_native🔗
Proposal.toAdd_native: Vector<ConstructionEntity>
Construction entities to add as native vector
Proposal.terrain🔗
Proposal.terrain: Terrain
Terrain modifications
ProposalData🔗
global record ProposalData
record ConstructionData
boundingVolume: Engine.Component.BoundingVolume subconstructionDatas: {SubconstructionData} subconstructionDatas_native: Vector<SubconstructionData> endrecord CollisionInfo
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} endcollisionInfo: CollisionInfo old2new: {Engine.Entity : integer} toAddData: {ConstructionData} toAddData_native: Vector<ConstructionData> parallelProposal: ParallelStripProposal terrainPreviewHeightModLocations: {Vec3f} terrainPreviewHeightModCutFill: {Vec2f} errorState: ErrorState entity2tn: {Engine.Entity : Engine.Component.TransportNetwork} tpNetLinkProposal: TpNetLinkProposal costs: integer endrecord ParallelStripProposal
toAdd: {Engine.Component.BaseParallelStrip} toAdd_native: Vector<Engine.Component.BaseParallelStrip> toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> end
Contains the processed result of a Proposal.
ProposalData.SubconstructionData🔗
ProposalData.SubconstructionData.station🔗
ProposalData.SubconstructionData.station: Engine.Component.Station
ProposalData.ConstructionData🔗
ProposalData.ConstructionData.boundingVolume🔗
ProposalData.ConstructionData.boundingVolume: Engine.Component.BoundingVolume
ProposalData.ConstructionData.subconstructionDatas🔗
ProposalData.ConstructionData.subconstructionDatas: {SubconstructionData}
ProposalData.ConstructionData.subconstructionDatas_native🔗
ProposalData.ConstructionData.subconstructionDatas_native: Vector<SubconstructionData>
ProposalData.CollisionInfo🔗
record ProposalData.CollisionInfo
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} end
ProposalData.CollisionInfo.EntityData🔗
More data about the collision.
ProposalData.CollisionInfo.EntityData.entity🔗
ProposalData.CollisionInfo.EntityData.entity: Engine.Entity
ProposalData.CollisionInfo.collisionEntities🔗
ProposalData.CollisionInfo.collisionEntities: {EntityData}
ProposalData.CollisionInfo.autoRemovalEntity2models🔗
ProposalData.CollisionInfo.autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}}
ProposalData.CollisionInfo.buildingEntities🔗
ProposalData.CollisionInfo.buildingEntities: {Engine.Entity}
ProposalData.CollisionInfo.removableModules🔗
ProposalData.CollisionInfo.removableModules: {Engine.Entity}
ProposalData.ErrorState🔗
record ProposalData.ErrorState
critical: boolean messages: {string} warnings: {string} infos: {string} end
Contains error information for a proposal.
Wherever a construction cannot be built for any reason, then the ErrorState will contain
one or more message signaling the error type.
ProposalData.ErrorState.critical🔗
ProposalData.ErrorState.critical: boolean
ProposalData.ErrorState.messages🔗
ProposalData.ErrorState.messages: {string}
ProposalData.ErrorState.warnings🔗
ProposalData.ErrorState.warnings: {string}
ProposalData.ErrorState.infos🔗
ProposalData.ErrorState.infos: {string}
ProposalData.ParallelStripProposal🔗
Information about a parallel strip proposal.
ProposalData.ParallelStripProposal.toAdd🔗
ProposalData.ParallelStripProposal.toAdd: {Engine.Component.BaseParallelStrip}
The parallel strips to add
ProposalData.ParallelStripProposal.toAdd_native🔗
ProposalData.ParallelStripProposal.toAdd_native: Vector<Engine.Component.BaseParallelStrip>
The parallel strips to add as native vector
ProposalData.ParallelStripProposal.toRemove🔗
ProposalData.ParallelStripProposal.toRemove: {Engine.Entity}
The parallel strips to remove
ProposalData.ParallelStripProposal.toRemove_native🔗
ProposalData.ParallelStripProposal.toRemove_native: Vector<Engine.Entity>
The parallel strips to remove as native vector
ProposalData.collisionInfo🔗
ProposalData.collisionInfo: CollisionInfo
ProposalData.old2new🔗
ProposalData.old2new: {Engine.Entity : integer}
ProposalData.toAddData🔗
ProposalData.toAddData: {ConstructionData}
ProposalData.toAddData_native🔗
ProposalData.toAddData_native: Vector<ConstructionData>
ProposalData.parallelProposal🔗
ProposalData.parallelProposal: ParallelStripProposal
ProposalData.terrainPreviewHeightModLocations🔗
ProposalData.terrainPreviewHeightModLocations: {Vec3f}
ProposalData.terrainPreviewHeightModCutFill🔗
ProposalData.terrainPreviewHeightModCutFill: {Vec2f}
ProposalData.errorState🔗
ProposalData.errorState: ErrorState
ProposalData.entity2tn🔗
ProposalData.entity2tn: {Engine.Entity : Engine.Component.TransportNetwork}
ProposalData.tpNetLinkProposal🔗
ProposalData.tpNetLinkProposal: TpNetLinkProposal
ProposalData.costs🔗
ProposalData.costs: integer
ProposalEventData🔗
Event data provided in builder.proposalApply event
ProposalEventData.proposal🔗
ProposalEventData.proposal: Proposal
ProposalEventData.data🔗
ProposalEventData.data: ProposalData
ProposalEventData.result🔗
ProposalEventData.result: {Engine.Entity}
RailroadCrossingType🔗
global record RailroadCrossingType
description: ModelMetadata.Description availability: ModelMetadata.Availability menuCategory: ModelMetadata.MenuCategory cost: number speedLimit: number new: function(): RailroadCrossingType soundFileName: string config: {RailroadCrossingType.ConfigEntry} trafficDelay: number crossingMaterial: string categoryList: ModelMetadata.CategoryList isAutoSelectable: boolean end
Specification for railroad crossings
RailroadCrossingType.description🔗
RailroadCrossingType.description: ModelMetadata.Description
Localized strings and icons paths for user interface
RailroadCrossingType.availability🔗
RailroadCrossingType.availability: ModelMetadata.Availability
Era information for user interface
RailroadCrossingType.menuCategory🔗
RailroadCrossingType.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
RailroadCrossingType.cost🔗
RailroadCrossingType.cost: number
Cost per unit length
RailroadCrossingType.speedLimit🔗
RailroadCrossingType.speedLimit: number
Top speed over the section type, limits top speed of road and tracks
RailroadCrossingType.new🔗
function RailroadCrossingType.new(): RailroadCrossingType
Creates a new RailroadCrossingType object
ReturnsRailroadCrossingType
RailroadCrossingType.soundFileName🔗
RailroadCrossingType.soundFileName: string
Sound effect to play when the crossing is closing
RailroadCrossingType.config🔗
RailroadCrossingType.config: {RailroadCrossingType.ConfigEntry}
RailroadCrossingType.trafficDelay🔗
RailroadCrossingType.trafficDelay: number
RailroadCrossingType.crossingMaterial🔗
RailroadCrossingType.crossingMaterial: string
RailroadCrossingType.categoryList🔗
RailroadCrossingType.categoryList: ModelMetadata.CategoryList
RailroadCrossingType.isAutoSelectable🔗
RailroadCrossingType.isAutoSelectable: boolean
Allow to be used for auto railroad crossing selection while building roads and tracks, nil defaults to true
RailroadCrossingType.ConfigEntry🔗
record RailroadCrossingType.ConfigEntry
modelLeft: string modelRight: string streetWidth: number end
Specification for railroad crossings models
RailroadCrossingType.ConfigEntry.modelLeft🔗
RailroadCrossingType.ConfigEntry.modelLeft: string
RailroadCrossingType.ConfigEntry.modelRight🔗
RailroadCrossingType.ConfigEntry.modelRight: string
RailroadCrossingType.ConfigEntry.streetWidth🔗
RailroadCrossingType.ConfigEntry.streetWidth: number
ResName🔗
global type ResName = string
RoadType🔗
Road vs Track type.
RoadType.STREET🔗
RoadType.STREET: RoadType
RoadType.TRACK🔗
RoadType.TRACK: RoadType
Runway🔗
Contains runway data
Runway.type🔗
Runway.type: RunwayType
Type of runway (landing or takeoff)
Runway.nodeId🔗
Runway.nodeId: NodeId
Node ID of the runway
Runway.edgeIds🔗
Runway.edgeIds: {EdgeId}
List of edge IDs that make up the runway
RunwayType🔗
Runway type enumeration
RunwayType.LANDING🔗
RunwayType.LANDING: RunwayType
Landing runway
RunwayType.TAKEOFF🔗
RunwayType.TAKEOFF: RunwayType
Takeoff runway
SaveGameData🔗
global record SaveGameData
new: function(SaveGameData): SaveGameData errorMsg: string info: SaveGameDetails endrecord SaveGameDetails
new: function(SaveGameDetails): SaveGameDetails metadata: GameMetadata mods: {Mod.ModId} configDict: {{string, string}} modParams: {string : {string : integer}} campaign: string mission: string end
Savegame data with info and error message
SaveGameData.SaveGameDetails🔗
record SaveGameData.SaveGameDetails
new: function(SaveGameDetails): SaveGameDetails metadata: GameMetadata mods: {Mod.ModId} configDict: {{string, string}} modParams: {string : {string : integer}} campaign: string mission: string end
Detailed information about a savegame
SaveGameData.SaveGameDetails.new🔗
function SaveGameData.SaveGameDetails.new(SaveGameDetails): SaveGameDetailsParameters
SaveGameDetails
SaveGameDetails
SaveGameData.SaveGameDetails.metadata🔗
SaveGameData.SaveGameDetails.metadata: GameMetadata
SaveGameData.SaveGameDetails.mods🔗
SaveGameData.SaveGameDetails.mods: {Mod.ModId}
SaveGameData.SaveGameDetails.configDict🔗
SaveGameData.SaveGameDetails.configDict: {{string, string}}
SaveGameData.SaveGameDetails.modParams🔗
SaveGameData.SaveGameDetails.modParams: {string : {string : integer}}
SaveGameData.SaveGameDetails.campaign🔗
SaveGameData.SaveGameDetails.campaign: string
SaveGameData.SaveGameDetails.mission🔗
SaveGameData.SaveGameDetails.mission: string
SaveGameData.new🔗
function SaveGameData.new(SaveGameData): SaveGameDataParameters
SaveGameData
SaveGameData
SaveGameData.errorMsg🔗
SaveGameData.errorMsg: string
Error message if loading failed (empty string otherwise)
SaveGameData.info🔗
SaveGameData.info: SaveGameDetails
SaveGameId🔗
global record SaveGameId
new: function(): SaveGameId path: string saveGameName: string saveGameNamespace: string end
Savegame identifier with path and namespace
SaveGameId.new🔗
function SaveGameId.new(): SaveGameIdReturns
SaveGameId
SaveGameId.path🔗
SaveGameId.path: string
SaveGameId.saveGameName🔗
SaveGameId.saveGameName: string
SaveGameId.saveGameNamespace🔗
SaveGameId.saveGameNamespace: string
SaveGameInfo🔗
global record SaveGameInfo
new: function(): SaveGameInfo equals: function(SaveGameInfo, SaveGameInfo): boolean size: integer timestamp: integer path: string modId: ModId saveName: string end
Information about a savegame
SaveGameInfo.new🔗
function SaveGameInfo.new(): SaveGameInfo
Creates a new SaveGameInfo.
ReturnsSaveGameInfo— New SaveGameInfo
SaveGameInfo.equals🔗
function SaveGameInfo.equals(SaveGameInfo, SaveGameInfo): booleanParameters
SaveGameInfoSaveGameInfo
boolean
SaveGameInfo.size🔗
SaveGameInfo.size: integer
File size in bytes
SaveGameInfo.timestamp🔗
SaveGameInfo.timestamp: integer
SaveGameInfo.path🔗
SaveGameInfo.path: string
SaveGameInfo.modId🔗
SaveGameInfo.modId: ModId
ModId of the mod providing this save
SaveGameInfo.saveName🔗
SaveGameInfo.saveName: string
SaveGameStorageInfo🔗
Information about savegame storage capacity
SaveGameStorageInfo.totalSpace🔗
SaveGameStorageInfo.totalSpace: number
Total storage space available, in bytes
SaveGameStorageInfo.usedSpace🔗
SaveGameStorageInfo.usedSpace: number
Storage space currently used, in bytes
SaveGameType🔗
global record SaveGameType
Manual: SaveGameType Autosave: SaveGameType Crash: SaveGameType Exit: SaveGameType end
SaveGameType.Manual🔗
SaveGameType.Manual: SaveGameType
SaveGameType.Autosave🔗
SaveGameType.Autosave: SaveGameType
SaveGameType.Crash🔗
SaveGameType.Crash: SaveGameType
SaveGameType.Exit🔗
SaveGameType.Exit: SaveGameType
SavegameScriptMetadata🔗
global record SavegameScriptMetadata
end
Marker for type-safe savegame metadata table
ScriptParam🔗
global record ScriptParam
new: function(): ScriptParam key: string name: string group: string tooltip: string values: {string} numbers: {number} tooltips: {string} postConstructionModifiable: boolean hideLabel: boolean images: {string} defaultIndex: Index uiType: ScriptParamType location: ScriptParamLocation displayMode: ScriptParamDisplayMode tags: {string} yearFrom: integer yearTo: integer checkEnabledScript: ScriptRef stepValueScript: ScriptRef formatValueScript: ScriptRef end
Used to configure the parameter-based UI
ScriptParam.new🔗
function ScriptParam.new(): ScriptParamReturns
ScriptParam
ScriptParam.key🔗
ScriptParam.key: string
Unique key that is passed to the construction functions
ScriptParam.name🔗
ScriptParam.name: string
Display name
ScriptParam.group🔗
ScriptParam.group: string
Display Group:
- If hideLabel is true, items will be grouped horizontally
- Else items will be separated by a divider
ScriptParam.tooltip🔗
ScriptParam.tooltip: string
Tooltip to display over certain parameters
ScriptParam.values🔗
ScriptParam.values: {string}
All possible values of the params
ScriptParam.numbers🔗
ScriptParam.numbers: {number}
Allow numbers to be used as value
ScriptParam.tooltips🔗
ScriptParam.tooltips: {string}
Allow tooltips to be used as value
ScriptParam.postConstructionModifiable🔗
ScriptParam.postConstructionModifiable: boolean
This param can be changed when the construction is already built
ScriptParam.hideLabel🔗
ScriptParam.hideLabel: boolean
Allow to hide the label
ScriptParam.images🔗
ScriptParam.images: {string}
Image representations of the values (for Compact Mode)
ScriptParam.defaultIndex🔗
ScriptParam.defaultIndex: Index
Default index/state
ScriptParam.uiType🔗
ScriptParam.uiType: ScriptParamType
Type of ui shown in user interface selection
ScriptParam.location🔗
ScriptParam.location: ScriptParamLocation
construction menu has two possible locations for parameters: default or toolbar (see ScriptParamLocation)
ScriptParam.displayMode🔗
ScriptParam.displayMode: ScriptParamDisplayMode
displayMode controls whether the parameter is displayed in default, compact, or sparse mode (see ScriptParamDisplayMode)
ScriptParam.tags🔗
ScriptParam.tags: {string}
Tags associated with the script param for filtering
ScriptParam.yearFrom🔗
ScriptParam.yearFrom: integer
Availability from
ScriptParam.yearTo🔗
ScriptParam.yearTo: integer
Availability to
ScriptParam.checkEnabledScript🔗
ScriptParam.checkEnabledScript: ScriptRef
callback function to allow dynamic disabling or hiding of the paramter
function(params : {string : number}, scriptRefParams : table) : ConstructionMenuParam.CheckEnabledResult
ScriptParam.stepValueScript🔗
ScriptParam.stepValueScript: ScriptRef
callback function to allow returning any value on input actions
function(value : number, direction : integer, precise : boolean) : number
ScriptParam.formatValueScript🔗
ScriptParam.formatValueScript: ScriptRef
callback function to allow formatting the value display in the UI
function(value : number) : string
ScriptParamDisplayMode🔗
Controls how the parameter is displayed in the UI
ScriptParamDisplayMode.Default🔗
ScriptParamDisplayMode.Default: ScriptParamDisplayMode
For BottomBar==on is Horizontal, for BottomBar==off is Sparse
ScriptParamDisplayMode.Compact🔗
ScriptParamDisplayMode.Compact: ScriptParamDisplayMode
Value is collapsed, full parameter is shown in a callout
ScriptParamDisplayMode.Horizontal🔗
ScriptParamDisplayMode.Horizontal: ScriptParamDisplayMode
Value is shown left of value
ScriptParamDisplayMode.Vertical🔗
ScriptParamDisplayMode.Vertical: ScriptParamDisplayMode
Value is shown above value
ScriptParamDisplayMode.Sparse🔗
ScriptParamDisplayMode.Sparse: ScriptParamDisplayMode
Label is shown above the value, and the value might grow to multiple lines
ScriptParamLocation🔗
Controls bottom bar mode of the parameter
ScriptParamLocation.Default🔗
ScriptParamLocation.Default: ScriptParamLocation
ScriptParamLocation.Toolbar🔗
ScriptParamLocation.Toolbar: ScriptParamLocation
special location for construction menu parameters, which will be displayed in the tool bar on the left side
ScriptParamType🔗
global record ScriptParamType
Button: ScriptParamType Slider: ScriptParamType ComboBox: ScriptParamType IconButton: ScriptParamType CheckBox: ScriptParamType end
UI Type for displaying the parameter. Used to configure the parameters used for constructions.
ScriptParamType.Button🔗
ScriptParamType.Button: ScriptParamType
ScriptParamType.Slider🔗
ScriptParamType.Slider: ScriptParamType
ScriptParamType.ComboBox🔗
ScriptParamType.ComboBox: ScriptParamType
ScriptParamType.IconButton🔗
ScriptParamType.IconButton: ScriptParamType
ScriptParamType.CheckBox🔗
ScriptParamType.CheckBox: ScriptParamType
ScriptRef🔗
References a function in a lua script file with ".script" extension.
ScriptRef.new🔗
function ScriptRef.new(): ScriptRefReturns
ScriptRef
ScriptRef.fileName🔗
ScriptRef.fileName: string
The script path, toghether with the lua path inside the function.
For example, this is the reference for a Crane flock function:
"models/model/animal/animal.flock.crane"
- the tokens separated by '/' before '.' are taken as part of the the path: "models/model/animal/animal"
- the tokens after the second '.' represent the lua path (in this case "flock.crane")
ScriptRef.params🔗
ScriptRef.params: {<any type> : <any type>}
A lua table of closure parameters that will be added at the end of the parameter list when the script is called.
Set🔗
Type Parameters
T
Set.contains🔗
function Set.contains(Set<T>, T): booleanParameters
Set<T>T
boolean
Set.insert🔗
function Set.insert(Set<T>, T): booleanParameters
Set<T>T
boolean
Set.size🔗
function Set.size(Set<T>): integerParameters
Set<T>
integer
Set.asTable🔗
function Set.asTable(Set<T>): {T : boolean}Parameters
Set<T>
{T : boolean}
Shape🔗
Contains a procedurally generated shape.
Shape.subShapes🔗
Shape.subShapes: {SubShape}
List of subshapes for the shape.
Shape.generator🔗
Shape.generator: integer
Procedural generator (index) used to generate the shape.
ShipInfo🔗
Movement information for ships
ShipInfo.topSpeed🔗
ShipInfo.topSpeed: number
Maximum speed (in m/s)
ShipInfo.maxTractiveEffort🔗
ShipInfo.maxTractiveEffort: number
ShipInfo.availablePower🔗
ShipInfo.availablePower: number
Signal🔗
Contains information about a street/track signal
Signal.Type🔗
Enum containing the type of the signal
Signal.Type.SIGNAL🔗
Signal.Type.SIGNAL: Type
Normal signal
Signal.Type.ONE_WAY_SIGNAL🔗
Signal.Type.ONE_WAY_SIGNAL: Type
One-way signal
Signal.Type.WAYPOINT🔗
Signal.Type.WAYPOINT: Type
Waypoint
Signal.edgePr🔗
Signal.edgePr: {EdgeId, boolean}
EdgeId and direction pair
Signal.type🔗
Signal.type: Type
The type of the signal
Signal.state🔗
Signal.state: integer
Current animation playing
Signal.stateTime🔗
Signal.stateTime: integer
Timer for the animation
SignalId🔗
Identifies a street/track signal
SignalId.new()🔗
function SignalId.new()(): SignalIdReturns
SignalId
SignalId.new(SignalId)🔗
function SignalId.new(SignalId)(SignalId): SignalIdParameters
SignalId
SignalId
SignalId.entity🔗
SignalId.entity: Engine.Entity
The entity of the SignalList
SignalId.index🔗
SignalId.index: integer
The zero-based index of the signal inside the signal list
SignalType🔗
global record SignalType
PATH_SIGNAL: SignalType WAYPOINT: SignalType ONE_WAY_PATH_SIGNAL: SignalType end
Enum containing the type of the signal
SignalType.PATH_SIGNAL🔗
SignalType.PATH_SIGNAL: SignalType
SignalType.WAYPOINT🔗
SignalType.WAYPOINT: SignalType
SignalType.ONE_WAY_PATH_SIGNAL🔗
SignalType.ONE_WAY_PATH_SIGNAL: SignalType
SimpleProposal🔗
global record SimpleProposal
new: function(): SimpleProposalconstructionsToAdd: {ConstructionEntity} constructionsToRemove: {Engine.Entity} old2new: {Engine.Entity : integer} streetProposal: SimpleStreetProposal endrecord ConstructionEntity
new: function(): ConstructionEntity fileName: string params: {<any type> : <any type>} transf: Mat4f name: string playerEntity: Engine.Entity autoFillSlots: boolean end
A structure holding information to build/remove and update constructions and streets.
It offers much more functionality than a simple ".con" file. See also
build_street.lua for an example.The most important operations that can be performed with a Simple Proposal is adding/removing and modifying
the following objects: constructions (stations, depots, ), (base) edges and (base) nodes, and edgeobjects (signals,
street terminals, waypoints).
In general, there are a few rules concerning this proposal. First, old entities are reference with the usual non-negative
id, whilst new entities are assigned a decreasing negative number starting at -1.
The general rule is that the modification/upgrade of a construction entails removing it and adding it
anew. The same rule applies to streets and edgeobjects.
The proposal will take care of updating lines, stop, people and cargo.
SimpleProposal.new🔗
function SimpleProposal.new(): SimpleProposalReturns
SimpleProposal
SimpleProposal.ConstructionEntity🔗
record SimpleProposal.ConstructionEntity
new: function(): ConstructionEntity fileName: string params: {<any type> : <any type>} transf: Mat4f name: string playerEntity: Engine.Entity autoFillSlots: boolean end
A structure holding information to add construction entities together with a SimpleProposal.
It uses the data contained in a ".con" file (or added via api.res.constructionRep) to specify a construction.
SimpleProposal.ConstructionEntity.new🔗
function SimpleProposal.ConstructionEntity.new(): ConstructionEntityReturns
ConstructionEntity
SimpleProposal.ConstructionEntity.fileName🔗
SimpleProposal.ConstructionEntity.fileName: string
A fileName (or identifier in the case of dynamic constructions)
SimpleProposal.ConstructionEntity.params🔗
SimpleProposal.ConstructionEntity.params: {<any type> : <any type>}
The parameters, as received by the updateFn
SimpleProposal.ConstructionEntity.transf🔗
SimpleProposal.ConstructionEntity.transf: Mat4f
The local transformation in the world, used also as local transformation for models and modules
SimpleProposal.ConstructionEntity.name🔗
SimpleProposal.ConstructionEntity.name: string
A name to give to the final resulting entity
SimpleProposal.ConstructionEntity.playerEntity🔗
SimpleProposal.ConstructionEntity.playerEntity: Engine.Entity
The player entity who will own the construction
SimpleProposal.ConstructionEntity.autoFillSlots🔗
SimpleProposal.ConstructionEntity.autoFillSlots: boolean
If true, the suitable (auto-fillable) construction slots will be automatically filled with modules
SimpleProposal.constructionsToAdd🔗
SimpleProposal.constructionsToAdd: {ConstructionEntity}
List of constructions to add (the entity id for constructions in this vector are an decreasing starting from -1)
SimpleProposal.constructionsToRemove🔗
SimpleProposal.constructionsToRemove: {Engine.Entity}
List of construction entities to remove
SimpleProposal.old2new🔗
SimpleProposal.old2new: {Engine.Entity : integer}
Mapping from old construction entities to new construction entities (must be an index in constructionsToAdd)
SimpleProposal.streetProposal🔗
SimpleProposal.streetProposal: SimpleStreetProposal
Block defining modification and addition of streets
SimpleStreetProposal🔗
global record SimpleStreetProposal
new: function(): SimpleStreetProposal nodesToAdd: {Proposal.NodeAndEntity} edgesToAdd: {Proposal.SegmentAndEntity} nodesToRemove: {Engine.Entity} edgesToRemove: {Engine.Entity} edgeObjectsToAdd: {EdgeObject} edgeObjectsToRemove: {Engine.Entity} nodeConfigsToAdd: {Proposal.BaseNodeLaneConnectionAndEntity} nodeConfigsToRemove: {Engine.Entity} node2rcType: {Engine.Entity : integer} endrecord EdgeObject
new: function(): EdgeObject edgeEntity: Engine.Entity param: number oneWay: boolean left: boolean model: ResName playerEntity: Engine.Entity name: string end
A structure holding information to add street and track entities together with a SimpleProposal.
A street proposal can add, remove and modify street, tracks, nodes and edge objects. To modify a street, you
need to remove all appropriate entities and add them with the correct information.
SimpleStreetProposal.EdgeObject🔗
record SimpleStreetProposal.EdgeObject
new: function(): EdgeObject edgeEntity: Engine.Entity param: number oneWay: boolean left: boolean model: ResName playerEntity: Engine.Entity name: string end
A structure that holds information about new edgeobjects added to the streets
SimpleStreetProposal.EdgeObject.new🔗
function SimpleStreetProposal.EdgeObject.new(): EdgeObject
Creates a new EdgeObject object
ReturnsEdgeObject
SimpleStreetProposal.EdgeObject.edgeEntity🔗
SimpleStreetProposal.EdgeObject.edgeEntity: Engine.Entity
Edge entity (must be a new edge in edgesToAdd, starting from -1 and decreasing)
SimpleStreetProposal.EdgeObject.param🔗
SimpleStreetProposal.EdgeObject.param: number
Position between 0.0 and 1.0 within said edge
SimpleStreetProposal.EdgeObject.oneWay🔗
SimpleStreetProposal.EdgeObject.oneWay: boolean
Flag specifying if one way or not
SimpleStreetProposal.EdgeObject.left🔗
SimpleStreetProposal.EdgeObject.left: boolean
Flag specifying the side of the road
SimpleStreetProposal.EdgeObject.model🔗
SimpleStreetProposal.EdgeObject.model: ResName
Model id of the edge object
SimpleStreetProposal.EdgeObject.playerEntity🔗
SimpleStreetProposal.EdgeObject.playerEntity: Engine.Entity
Owner of the object
SimpleStreetProposal.EdgeObject.name🔗
SimpleStreetProposal.EdgeObject.name: string
Name to give the object
SimpleStreetProposal.new🔗
function SimpleStreetProposal.new(): SimpleStreetProposalReturns
SimpleStreetProposal
SimpleStreetProposal.nodesToAdd🔗
SimpleStreetProposal.nodesToAdd: {Proposal.NodeAndEntity}
List of base nodes to add (entity id will be decreasing starting from -1 for all new entities)
SimpleStreetProposal.edgesToAdd🔗
SimpleStreetProposal.edgesToAdd: {Proposal.SegmentAndEntity}
List of base edges to add (includes edge object reference which must match the content of edgeObjectsToRemove)
SimpleStreetProposal.nodesToRemove🔗
SimpleStreetProposal.nodesToRemove: {Engine.Entity}
List of entities with component BaseNode to remove
SimpleStreetProposal.edgesToRemove🔗
SimpleStreetProposal.edgesToRemove: {Engine.Entity}
List of entities with component BaseEdge to remove
SimpleStreetProposal.edgeObjectsToAdd🔗
SimpleStreetProposal.edgeObjectsToAdd: {EdgeObject}
List of EdgeObject to add (must be compatible with edgesToAdd)
SimpleStreetProposal.edgeObjectsToRemove🔗
SimpleStreetProposal.edgeObjectsToRemove: {Engine.Entity}
List of entities to be removed
SimpleStreetProposal.nodeConfigsToAdd🔗
SimpleStreetProposal.nodeConfigsToAdd: {Proposal.BaseNodeLaneConnectionAndEntity}
List of node configurations to add
SimpleStreetProposal.nodeConfigsToRemove🔗
SimpleStreetProposal.nodeConfigsToRemove: {Engine.Entity}
List of node configuration entities to remove
SimpleStreetProposal.node2rcType🔗
SimpleStreetProposal.node2rcType: {Engine.Entity : integer}
A map from node to railroad crossing type index
Slot🔗
Modular construction slot
Slot.autoFill🔗
Slot.autoFill: boolean
Autofill slots are used by field construction to add satellites automatically when the construction spawns
Slot.id🔗
Slot.id: integer
Unique identifier for the slot, can also be used to reconstruct the coordinates of the slot when encoded as specific pattern
Slot.type🔗
Slot.type: string
Type of the slot: only modules of the same type can be built on this slot
Slot.transf🔗
Slot.transf: Mat4f
Transformation relative to the construction origin
Slot.spacing🔗
Slot.spacing: Vec4f
Extent of the slot relative to it's origin, (x, y) are the distances to the left, resp. right, and (z, w) are the distances
to the south and north part (when seen from above)
Slot.height🔗
Slot.height: number
Height of the slot for collision purposes
Slot.shape🔗
Slot.shape: integer
Shape of the module snap point visualization, 0 = square, 1 = triangle, 2 = rectangle
Slot.alignToTerrain🔗
Slot.alignToTerrain: boolean
Slots with this flag will be moved vertically to macht the height of the terrain (used e.g. for fields)
Slot.replaceable🔗
Slot.replaceable: boolean
Modules in slots with this flag can be replaced by other modules of the same type without bulldozing first
SlotConfig🔗
Slot configuration can specify additional properties for slots of a given type
SlotConfig.maxModules🔗
SlotConfig.maxModules: integer
Max number of modules of this type that might be built
SlotConfig.message🔗
SlotConfig.message: string
Message for when this limit is reached
SlotConfig.skipCollisionCheck🔗
SlotConfig.skipCollisionCheck: boolean
Slots with this flag will not collide with other objects, but only the slot itself, the final construction
still has to pass the usual collision checks
SoundAttributes🔗
global record SoundAttributes
gain: number refDist: number rolloffFact: number hasVelocity: boolean end
SoundClip attributes
SoundAttributes.gain🔗
SoundAttributes.gain: number
SoundAttributes.refDist🔗
SoundAttributes.refDist: number
SoundAttributes.rolloffFact🔗
SoundAttributes.rolloffFact: number
SoundAttributes.hasVelocity🔗
SoundAttributes.hasVelocity: boolean
SoundClip🔗
SoundClip for SoundSet, BuilderAudioSet, ...
SoundClip.name🔗
SoundClip.name: string
SoundClip.attrs🔗
SoundClip.attrs: SoundAttributes
SoundClipList🔗
SoundClipList for SoundSet
SoundClipList.names🔗
SoundClipList.names: {string}
SoundClipList.attrs🔗
SoundClipList.attrs: SoundAttributes
SoundSet🔗
global record SoundSet
tracks: {SoundClip} events: {string : SoundClipList} updateScript: ScriptRef attrs: SoundAttributes end
Configure sound effects for entities
SoundSet.tracks🔗
SoundSet.tracks: {SoundClip}
SoundSet.events🔗
SoundSet.events: {string : SoundClipList}
SoundSet.updateScript🔗
SoundSet.updateScript: ScriptRef
SoundSet.attrs🔗
SoundSet.attrs: SoundAttributes
StartGameParams🔗
global record StartGameParams
new: function(): StartGameParams numTiles: Vec2i climateGenerator: string terrainGenerator: string economy: string mods: {string} modParams: {string : {string : integer}} seed: string startDate: Date startTimeOfDaySeconds: integer startCloudCoverage: number isMapEditor: boolean generateTowns: boolean generateIndustries: boolean generateAssets: boolean locationsConfig: BaseConfig.Locations end
Parameters for starting a new game
StartGameParams.new🔗
function StartGameParams.new(): StartGameParams
Constructor
ReturnsStartGameParams
StartGameParams.numTiles🔗
StartGameParams.numTiles: Vec2i
Map size in tiles
StartGameParams.climateGenerator🔗
StartGameParams.climateGenerator: string
Climate generator script resource name
StartGameParams.terrainGenerator🔗
StartGameParams.terrainGenerator: string
Terrain generator script resource name
StartGameParams.economy🔗
StartGameParams.economy: string
Economy difficulty script resource name
StartGameParams.mods🔗
StartGameParams.mods: {string}
List of mod identifiers to load
StartGameParams.modParams🔗
StartGameParams.modParams: {string : {string : integer}}
List of mod parameters
StartGameParams.seed🔗
StartGameParams.seed: string
Random seed for map generation
StartGameParams.startDate🔗
StartGameParams.startDate: Date
Starting date for the game
StartGameParams.startTimeOfDaySeconds🔗
StartGameParams.startTimeOfDaySeconds: integer
Starting time in seconds of the time
StartGameParams.startCloudCoverage🔗
StartGameParams.startCloudCoverage: number
Starting cloud coverage
StartGameParams.isMapEditor🔗
StartGameParams.isMapEditor: boolean
Whether to start the game in map editor mode
StartGameParams.generateTowns🔗
StartGameParams.generateTowns: boolean
Whether to generate towns
StartGameParams.generateIndustries🔗
StartGameParams.generateIndustries: boolean
Whether to generate industries
StartGameParams.generateAssets🔗
StartGameParams.generateAssets: boolean
Whether to generate assets
StartGameParams.locationsConfig🔗
StartGameParams.locationsConfig: BaseConfig.Locations
Configuration for the placement of industry and towns on max generation
StaticConstructionTemplate🔗
Static construction template configuration
StaticConstructionTemplate.initialModules🔗
StaticConstructionTemplate.initialModules: {ResName : integer}
Station🔗
Data for a Station
Station.Pool🔗
Defines a common pool in a station for overflowing terminal capacities
Station.Pool.new🔗
function Station.Pool.new(): PoolReturns
Pool
Station.Pool.edges🔗
Station.Pool.edges: {EdgeId}
the list of edges of the shared waiting area
Station.Pool.capacity🔗
Station.Pool.capacity: integer
the size of the shared pool
Station.new🔗
function Station.new(): StationReturns
Station
Station.tag🔗
Station.tag: integer
A tag for identifying station between upgrades
Station.terminals🔗
Station.terminals: {Terminal}
Station.catchmentAreas🔗
Station.catchmentAreas: {CatchmentArea}
Station.pool🔗
Station.pool: Pool
StationTerminal🔗
global record StationTerminal
new: function(): StationTerminal station: integer terminal: integer end
Identifies a Terminal inside a StationGroup
StationTerminal.new()🔗
function StationTerminal.new()(): StationTerminal
Constructor: creates empty terminal reference
ReturnsStationTerminal
StationTerminal.new(StationTerminal)🔗
function StationTerminal.new(StationTerminal)(StationTerminal): StationTerminal
Copy constructor
ParametersStationTerminal
StationTerminal
StationTerminal.new(integer, integer)🔗
function StationTerminal.new(integer, integer)(station : integer, terminal : integer): StationTerminal
Constructor with station and terminal indices
Parametersstation:integer— The zero-based station index in the StationGroupterminal:integer— The zero-based terminal index in the Station
StationTerminal
StationTerminal.station🔗
StationTerminal.station: integer
The zero-based station index in the StationGroup
StationTerminal.terminal🔗
StationTerminal.terminal: integer
The zero-based terminal index in the Station
StockId🔗
global type StockId = integer
StockListType🔗
global record StockListType
InputStock: StockListType OutputStock: StockListType StorageStock: StockListType end
Defines the stock list type
StockListType.InputStock🔗
StockListType.InputStock: StockListType
StockListType.OutputStock🔗
StockListType.OutputStock: StockListType
StockListType.StorageStock🔗
StockListType.StorageStock: StockListType
StopState🔗
global record StopState
empty: boolean noPath: boolean noPathFromAlternative: boolean noPathToAlternative: boolean duplicateStop: boolean incompatibleStop: boolean noPathLocation: boolean end
Information about the problem state of a stop within a line.
StopState.empty🔗
StopState.empty: boolean
Stop is empty / valid
StopState.noPath🔗
StopState.noPath: boolean
No path between stops
StopState.noPathFromAlternative🔗
StopState.noPathFromAlternative: boolean
No path from an alternative stop
StopState.noPathToAlternative🔗
StopState.noPathToAlternative: boolean
No path to an alternative stop
StopState.duplicateStop🔗
StopState.duplicateStop: boolean
Stop is a duplicate
StopState.incompatibleStop🔗
StopState.incompatibleStop: boolean
Stop is incompatible with the line's transport mode
StopState.noPathLocation🔗
StopState.noPathLocation: boolean
No path for a location stop
StreetGenerationMode🔗
Map generation mode for street generation
StreetGenerationMode.new🔗
function StreetGenerationMode.new(): StreetGenerationModeReturns
StreetGenerationMode
StreetStyle🔗
global record StreetStyle
categoryList: ModelMetadata.CategoryList trackStraightModel: {string, string, string, string} end
Specifies the look and feel of streets and tracks
StreetStyle.categoryList🔗
StreetStyle.categoryList: ModelMetadata.CategoryList
StreetStyle.trackStraightModel🔗
StreetStyle.trackStraightModel: {string, string, string, string}
Models used for stright sections of tracks
StreetTemplate🔗
global record StreetTemplate
new: function(string): StreetTemplate roadType: RoadType description: ModelMetadata.Description availability: ModelMetadata.Availability simBuildable: boolean initiallyLocked: boolean country: boolean laneConfigs: {LaneConfig} transportModesStreet: {TransportMode} modifiers: Modifiers cost: integer maintenanceCost: integer fillGroundTex: ResName sidewalkFillGroundTex: ResName borderGroundTex: ResName streetStyle: ResName defaultEdgeDecorations: {{ResName, boolean}} defaultWithCrosswalk: boolean embankmentSlopeLow: number embankmentSlopeHigh: number maxSlope: number maxSlopeShape: number priority: integer busAndTramRight: boolean pedestrianWalkPenalty: number speedCoeffs: {number} minCurveRadius: number minCurveRadiusBuild: number trackDistance: number maxSlopeBuild: number slopeBuildSteps: number menuCategory: ModelMetadata.MenuCategory emissions: Emissions catenaryAdd: ResName catenaryRemove: ResName builderAudioRes: ResName end
Specification for street templates which define simulation relevant quantities like lanes, costs and transport modes
StreetTemplate.new🔗
function StreetTemplate.new(string): StreetTemplate
Creates a new object of StreetTemplate type
Parametersstring
StreetTemplate
StreetTemplate.roadType🔗
StreetTemplate.roadType: RoadType
Localized display name
StreetTemplate.description🔗
StreetTemplate.description: ModelMetadata.Description
Localized strings and icons paths for user interface
StreetTemplate.availability🔗
StreetTemplate.availability: ModelMetadata.Availability
Availability from/to year for UI and simulation
StreetTemplate.simBuildable🔗
StreetTemplate.simBuildable: boolean
if this template can be used by town developer / industry connections at all.
StreetTemplate.initiallyLocked🔗
StreetTemplate.initiallyLocked: boolean
Initial value for the locking tool when built by the player
StreetTemplate.country🔗
StreetTemplate.country: boolean
Whether to consider a country or town road, this affects simulation and UI behaviour in various ways
StreetTemplate.laneConfigs🔗
StreetTemplate.laneConfigs: {LaneConfig}
List of lanes with configuration, from left to right in the build direction
StreetTemplate.transportModesStreet🔗
StreetTemplate.transportModesStreet: {TransportMode}
Transport network types applied to vehicle lanes
StreetTemplate.modifiers🔗
StreetTemplate.modifiers: Modifiers
Modifiers applied to vehicles on the road
StreetTemplate.cost🔗
StreetTemplate.cost: integer
Cost in unit-length
StreetTemplate.maintenanceCost🔗
StreetTemplate.maintenanceCost: integer
Maintenance cost in unit-length
StreetTemplate.fillGroundTex🔗
StreetTemplate.fillGroundTex: ResName
Ground texture applied to the interior of the road
StreetTemplate.sidewalkFillGroundTex🔗
StreetTemplate.sidewalkFillGroundTex: ResName
Ground texture applied under sidewalks
StreetTemplate.borderGroundTex🔗
StreetTemplate.borderGroundTex: ResName
Ground texture applied at the edges of the road
StreetTemplate.streetStyle🔗
StreetTemplate.streetStyle: ResName
Default street style deciding look and feel of the road/track
StreetTemplate.defaultEdgeDecorations🔗
StreetTemplate.defaultEdgeDecorations: {{ResName, boolean}}
Default edge decorations when newly built
StreetTemplate.defaultWithCrosswalk🔗
StreetTemplate.defaultWithCrosswalk: boolean
Whether to create crosswalks when the street is built
StreetTemplate.embankmentSlopeLow🔗
StreetTemplate.embankmentSlopeLow: number
Terrain alignment embankment from below
StreetTemplate.embankmentSlopeHigh🔗
StreetTemplate.embankmentSlopeHigh: number
Terrain alignment embankment from above
StreetTemplate.maxSlope🔗
StreetTemplate.maxSlope: number
Max slope of the road the user can select
StreetTemplate.maxSlopeShape🔗
StreetTemplate.maxSlopeShape: number
Max slope for the resulting street
StreetTemplate.priority🔗
StreetTemplate.priority: integer
Priority for applying the street style at crossings
StreetTemplate.busAndTramRight🔗
StreetTemplate.busAndTramRight: boolean
Whether bus and tram lanes are by default on the rightmost lane
StreetTemplate.pedestrianWalkPenalty🔗
StreetTemplate.pedestrianWalkPenalty: number
Pathfinding walk penalty when pedestran walk on sidewalk edges
StreetTemplate.speedCoeffs🔗
StreetTemplate.speedCoeffs: {number}
Max speed based on three different curvatures of the street
StreetTemplate.minCurveRadius🔗
StreetTemplate.minCurveRadius: number
Minimal radius of the finial proposal
StreetTemplate.minCurveRadiusBuild🔗
StreetTemplate.minCurveRadiusBuild: number
Minimal radius buildable by the player
StreetTemplate.trackDistance🔗
StreetTemplate.trackDistance: number
Distance between track centers
StreetTemplate.maxSlopeBuild🔗
StreetTemplate.maxSlopeBuild: number
Max slope when built by the player
StreetTemplate.slopeBuildSteps🔗
StreetTemplate.slopeBuildSteps: number
How fine grained the selection of the slope will be
StreetTemplate.menuCategory🔗
StreetTemplate.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
StreetTemplate.Emissions🔗
StreetTemplate.Emissions.noise🔗
StreetTemplate.Emissions.noise: number
StreetTemplate.Emissions.pollution🔗
StreetTemplate.Emissions.pollution: number
StreetTemplate.Emissions.radius🔗
StreetTemplate.Emissions.radius: number
StreetTemplate.emissions🔗
StreetTemplate.emissions: Emissions
Static nosie and pollution emitter for each road segment
StreetTemplate.catenaryAdd🔗
StreetTemplate.catenaryAdd: ResName
The street template to use to replace this street template when adding catenary
StreetTemplate.catenaryRemove🔗
StreetTemplate.catenaryRemove: ResName
The street template to use to replace this street template when removing catenary
StreetTemplate.builderAudioRes🔗
StreetTemplate.builderAudioRes: ResName
SubShape🔗
Contains a procedurally generated sub-shape.
SubShape.faces🔗
SubShape.faces: {{Vec3f}}
SubShape.startRule🔗
SubShape.startRule: integer
SubShape.height0🔗
SubShape.height0: number
Min height for collision purposes.
SubShape.height1🔗
SubShape.height1: number
Max height for collision purposes.
SubconstructionInstanceMetadata🔗
global record SubconstructionInstanceMetadata
end
TargetData🔗
Information about target destinations
TargetData.entries🔗
TargetData.entries: {TargetDataEntry}
TargetData.edges🔗
TargetData.edges: {EdgePos}
TargetDataEntry🔗
global record TargetDataEntry
entity: Engine.Entity freeCapacity: integer capacity: integer edgeWalk: {integer, integer} edgeDrive: {integer, integer} isIndustry: boolean end
Target data for land use types
TargetDataEntry.entity🔗
TargetDataEntry.entity: Engine.Entity
TargetDataEntry.freeCapacity🔗
TargetDataEntry.freeCapacity: integer
TargetDataEntry.capacity🔗
TargetDataEntry.capacity: integer
TargetDataEntry.edgeWalk🔗
TargetDataEntry.edgeWalk: {integer, integer}
TargetDataEntry.edgeDrive🔗
TargetDataEntry.edgeDrive: {integer, integer}
TargetDataEntry.isIndustry🔗
TargetDataEntry.isIndustry: boolean
TargetsByLandUse🔗
Target destinations organized by land use type
TargetsByLandUse.targets🔗
TargetsByLandUse.targets: {TargetData, TargetData}
Terminal🔗
global record Terminal
vehicleNodeId: NodeId personNodes: {NodeId} personEdges: {EdgeId} vehicleEdges: {EdgePos} tag: integer cargoLoad: boolean passengersLoad: boolean cargoUnload: boolean passengersUnload: boolean transportModes: {TransportMode : boolean}cargoTransferSpeeds: {TerminalCargoTransferSpeed} comfortFactor: number capacity: integer terminalAssignmentWeight: number endrecord TerminalCargoTransferSpeed
cargoTypeSet: CargoTypeSet loadSpeedModifier: number length: number end
Data for a Station terminal.
Terminal.vehicleNodeId🔗
Terminal.vehicleNodeId: NodeId
The position (node) where the vehicle will attempt to stop
Terminal.personNodes🔗
Terminal.personNodes: {NodeId}
List of all nodes for the person/cargo wait area
Terminal.personEdges🔗
Terminal.personEdges: {EdgeId}
List of all edges for the person/cargo wait area
Terminal.vehicleEdges🔗
Terminal.vehicleEdges: {EdgePos}
list of all edges for the vehicle to stop
Terminal.tag🔗
Terminal.tag: integer
Identifying tag
Terminal.cargoLoad🔗
Terminal.cargoLoad: boolean
Whether this terminal can handle cargo
Terminal.passengersLoad🔗
Terminal.passengersLoad: boolean
Whether this terminal can handle passengers
Terminal.cargoUnload🔗
Terminal.cargoUnload: boolean
Whether this terminal can handle cargo
Terminal.passengersUnload🔗
Terminal.passengersUnload: boolean
Whether this terminal can handle passengers
Terminal.transportModes🔗
Terminal.transportModes: {TransportMode : boolean}
Terminal.TerminalCargoTransferSpeed🔗
record Terminal.TerminalCargoTransferSpeed
cargoTypeSet: CargoTypeSet loadSpeedModifier: number length: number end
Information about terminal cargo transfer speeds
Terminal.TerminalCargoTransferSpeed.cargoTypeSet🔗
Terminal.TerminalCargoTransferSpeed.cargoTypeSet: CargoTypeSet
Set of cargo types this setting applies to
Terminal.TerminalCargoTransferSpeed.loadSpeedModifier🔗
Terminal.TerminalCargoTransferSpeed.loadSpeedModifier: number
Speed modifier for loading cargo
Terminal.TerminalCargoTransferSpeed.length🔗
Terminal.TerminalCargoTransferSpeed.length: number
Length of the terminal section
Terminal.cargoTransferSpeeds🔗
Terminal.cargoTransferSpeeds: {TerminalCargoTransferSpeed}
List of cargo transfer speed configurations
Terminal.comfortFactor🔗
Terminal.comfortFactor: number
Control happiness decrease speed for waiting passengers
Terminal.capacity🔗
Terminal.capacity: integer
How many people can fit the specific terminal
Terminal.terminalAssignmentWeight🔗
Terminal.terminalAssignmentWeight: number
Weighting for the automatic terminal assignment of lines, lower means less important
TerrainAlignment🔗
global record TerrainAlignment
triangles: {{Vec3f, Vec3f, Vec3f}} weights: {{number, number, number}} type: TerrainAlignmentType bbox: Box2f end
Terrain alignment configuration
TerrainAlignment.triangles🔗
TerrainAlignment.triangles: {{Vec3f, Vec3f, Vec3f}}
TerrainAlignment.weights🔗
TerrainAlignment.weights: {{number, number, number}}
TerrainAlignment.type🔗
TerrainAlignment.type: TerrainAlignmentType
TerrainAlignment.bbox🔗
TerrainAlignment.bbox: Box2f
TerrainAlignmentType🔗
global record TerrainAlignmentType
EQUAL: TerrainAlignmentType LESS: TerrainAlignmentType GREATER: TerrainAlignmentType end
Terrain alignment type enumeration
TerrainAlignmentType.EQUAL🔗
TerrainAlignmentType.EQUAL: TerrainAlignmentType
TerrainAlignmentType.LESS🔗
TerrainAlignmentType.LESS: TerrainAlignmentType
TerrainAlignmentType.GREATER🔗
TerrainAlignmentType.GREATER: TerrainAlignmentType
TerrainGeneratorDesc🔗
global record TerrainGeneratorDesc
new: function(): TerrainGeneratorDesc desc: ModelMetadata.Description order: integer editorOnly: boolean visible: boolean climate: string nodeTree: string params: {ScriptParam} end
Contains all data relevant for the heightmap generation
TerrainGeneratorDesc.new🔗
function TerrainGeneratorDesc.new(): TerrainGeneratorDescReturns
TerrainGeneratorDesc
TerrainGeneratorDesc.desc🔗
TerrainGeneratorDesc.desc: ModelMetadata.Description
Localized strings and icons paths for user interface
TerrainGeneratorDesc.order🔗
TerrainGeneratorDesc.order: integer
TerrainGeneratorDesc.editorOnly🔗
TerrainGeneratorDesc.editorOnly: boolean
Only selectable in editor
TerrainGeneratorDesc.visible🔗
TerrainGeneratorDesc.visible: boolean
Invisible (will never be a choice)
TerrainGeneratorDesc.climate🔗
TerrainGeneratorDesc.climate: string
Climate resource name to which the generator belongs to
TerrainGeneratorDesc.nodeTree🔗
TerrainGeneratorDesc.nodeTree: string
Resource name for the tree generator associated to this terrain generator
TerrainGeneratorDesc.params🔗
TerrainGeneratorDesc.params: {ScriptParam}
Script parameters (passed as input to tree node generator)
TerrainMaterialType🔗
global record TerrainMaterialType
new: function(): TerrainMaterialType name: string desc: string icon: ResName previewIcon: ResName categories: {string} detailColorTexture: string detailMetalGlossAoHTexture: string detailNormalTexture: string overlayTexture: string detailSize: number overlaySize: number overlayStrength: number hScale: number order: integer menuCategory: ModelMetadata.MenuCategory priority: integer grass: ResName categoryList: ModelMetadata.CategoryList end
Specification for terrain material types
TerrainMaterialType.new()🔗
function TerrainMaterialType.new()(): TerrainMaterialTypeReturns
TerrainMaterialType
TerrainMaterialType.new(TerrainMaterialType)🔗
function TerrainMaterialType.new(TerrainMaterialType)(TerrainMaterialType): TerrainMaterialTypeParameters
TerrainMaterialType
TerrainMaterialType
TerrainMaterialType.name🔗
TerrainMaterialType.name: string
TerrainMaterialType.desc🔗
TerrainMaterialType.desc: string
TerrainMaterialType.icon🔗
TerrainMaterialType.icon: ResName
TerrainMaterialType.previewIcon🔗
TerrainMaterialType.previewIcon: ResName
TerrainMaterialType.categories🔗
TerrainMaterialType.categories: {string}
TerrainMaterialType.detailColorTexture🔗
TerrainMaterialType.detailColorTexture: string
TerrainMaterialType.detailMetalGlossAoHTexture🔗
TerrainMaterialType.detailMetalGlossAoHTexture: string
TerrainMaterialType.detailNormalTexture🔗
TerrainMaterialType.detailNormalTexture: string
TerrainMaterialType.overlayTexture🔗
TerrainMaterialType.overlayTexture: string
TerrainMaterialType.detailSize🔗
TerrainMaterialType.detailSize: number
TerrainMaterialType.overlaySize🔗
TerrainMaterialType.overlaySize: number
TerrainMaterialType.overlayStrength🔗
TerrainMaterialType.overlayStrength: number
TerrainMaterialType.hScale🔗
TerrainMaterialType.hScale: number
TerrainMaterialType.order🔗
TerrainMaterialType.order: integer
TerrainMaterialType.menuCategory🔗
TerrainMaterialType.menuCategory: ModelMetadata.MenuCategory
TerrainMaterialType.priority🔗
TerrainMaterialType.priority: integer
TerrainMaterialType.grass🔗
TerrainMaterialType.grass: ResName
TerrainMaterialType.categoryList🔗
TerrainMaterialType.categoryList: ModelMetadata.CategoryList
ThinModelInstance🔗
A model in the world, with very light information
ThinModelInstance.modelId🔗
ThinModelInstance.modelId: integer
The model id, referenced in modelRep
ThinModelInstance.pos🔗
ThinModelInstance.pos: Vec3f
The position in the world
ThinModelInstance.rot🔗
ThinModelInstance.rot: number
The rotation angle (in radians)
ThinModelInstance.scale🔗
ThinModelInstance.scale: number
The scale in all directions
TownBuildingParams🔗
Town building parameters
TownBuildingParams.landUseType🔗
TownBuildingParams.landUseType: LandUseType
One of residential, commercial or industrial
TownBuildingParams.level🔗
TownBuildingParams.level: integer
Level, which is directly related to capacity and size of the building
TownBuildingParams.parcelSize🔗
TownBuildingParams.parcelSize: Vec2i
(x, y) dimension in parcel cells for the building
TownIndustryGenerationMode🔗
global record TownIndustryGenerationMode
new: function(): TownIndustryGenerationMode numTownsToAdd: integer addIndustries: boolean showExistingTowns: boolean showExistingIndustries: boolean keepExistingTowns: boolean keepExistingIndustries: boolean end
Map generation mode for adding towns and industries
TownIndustryGenerationMode.new🔗
function TownIndustryGenerationMode.new(): TownIndustryGenerationModeReturns
TownIndustryGenerationMode
TownIndustryGenerationMode.numTownsToAdd🔗
TownIndustryGenerationMode.numTownsToAdd: integer
Number of towns to add
TownIndustryGenerationMode.addIndustries🔗
TownIndustryGenerationMode.addIndustries: boolean
if industries should be added
TownIndustryGenerationMode.showExistingTowns🔗
TownIndustryGenerationMode.showExistingTowns: boolean
Whether to show existing towns
TownIndustryGenerationMode.showExistingIndustries🔗
TownIndustryGenerationMode.showExistingIndustries: boolean
Whether to show existing industries
TownIndustryGenerationMode.keepExistingTowns🔗
TownIndustryGenerationMode.keepExistingTowns: boolean
Whether to preserve existing towns when generating new towns
TownIndustryGenerationMode.keepExistingIndustries🔗
TownIndustryGenerationMode.keepExistingIndustries: boolean
Whether to preserve existing industries when generating new industries
TownInfo🔗
global record TownInfo
name: string position: Vec2f initialLandUseCapacities: {integer} landUse2CargoNeedsCategories: {LandUseType : {string}} majorStreetAngle: number initialMajorStreetAngle: number capacityScalingFactor: number end
Extended town information for map generation
TownInfo.name🔗
TownInfo.name: string
Name of the town
TownInfo.position🔗
TownInfo.position: Vec2f
World position of the town
TownInfo.initialLandUseCapacities🔗
TownInfo.initialLandUseCapacities: {integer}
Initial size for residential, commercial, industrial zones
TownInfo.landUse2CargoNeedsCategories🔗
TownInfo.landUse2CargoNeedsCategories: {LandUseType : {string}}
Cargo needs for residential, commercial, industrial zones
TownInfo.majorStreetAngle🔗
TownInfo.majorStreetAngle: number
Major street angle
TownInfo.initialMajorStreetAngle🔗
TownInfo.initialMajorStreetAngle: number
Initial major street angle
TownInfo.capacityScalingFactor🔗
TownInfo.capacityScalingFactor: number
Capacity scaling factor
TownProblem🔗
Town connection problem.
TownProblem.Disconnected🔗
TownProblem.Disconnected: TownProblem
TownProblem.Overlength🔗
TownProblem.Overlength: TownProblem
TownResult🔗
Results of town generation operations
TownResult.toRemove🔗
TownResult.toRemove: {Engine.Entity}
TownResult.toAdd🔗
TownResult.toAdd: {TownInfo}
TpNetData🔗
Contains additional data about the transport network
TpNetData.NodeData🔗
Data attached to a transport network node.
TpNetData.NodeData.Port🔗
An individual port on a NodeData
TpNetData.NodeData.Port.edgeId🔗
TpNetData.NodeData.Port.edgeId: EdgeId
The edge ID this port connects to
TpNetData.NodeData.Port.transitions🔗
TpNetData.NodeData.Port.transitions: {integer}
The indices of the ports this port can transition to
TpNetData.NodeData.ports🔗
TpNetData.NodeData.ports: {Port}
The list of ports on this node
TpNetData.EdgeData🔗
Data attached to a transport network edge.
TpNetData.EdgeData.ports🔗
TpNetData.EdgeData.ports: {PortId, PortId}
The ports at both ends of the edge
TpNetData.EdgeData.equidistParams🔗
TpNetData.EdgeData.equidistParams: {number}
The equidistant parameter samples along the edge
TpNetData.getNodeData🔗
function TpNetData.getNodeData(TpNetData, NodeId): NodeData
Get node data for a specific node
ParametersTpNetDataNodeId
NodeData
TpNetData.getEdgeData🔗
function TpNetData.getEdgeData(TpNetData, EdgeId): EdgeData
Get edge data for a specific edge
ParametersTpNetDataEdgeId
EdgeData
TpNetLinkProposal🔗
Contains the processed result with all edge links.
TpNetLinkProposal.Data🔗
An individual link entry in a TpNetLinkProposal
TpNetLinkProposal.Data.link🔗
TpNetLinkProposal.Data.link: {EdgePos, EdgePos}
The EdgePos pair making up the link
TpNetLinkProposal.toRemove🔗
TpNetLinkProposal.toRemove: {Data}
Links to remove
TpNetLinkProposal.toAdd🔗
TpNetLinkProposal.toAdd: {Data}
Links to add
TrafficLightData🔗
global record TrafficLightData
state2lockedLanes: {{integer}} state2redLightModelIndices: {{integer}} state2duration: {number} animatedModels: {integer} end
Additional traffic light data for a base node
TrafficLightData.state2lockedLanes🔗
TrafficLightData.state2lockedLanes: {{integer}}
TrafficLightData.state2redLightModelIndices🔗
TrafficLightData.state2redLightModelIndices: {{integer}}
TrafficLightData.state2duration🔗
TrafficLightData.state2duration: {number}
TrafficLightData.animatedModels🔗
TrafficLightData.animatedModels: {integer}
TrafficLightPreference🔗
global record TrafficLightPreference
YES: TrafficLightPreference NO: TrafficLightPreference AUTO: TrafficLightPreference end
TrafficLightPreference: controls whether a node/edge has a traffic light.
TrafficLightPreference.YES🔗
TrafficLightPreference.YES: TrafficLightPreference
TrafficLightPreference.NO🔗
TrafficLightPreference.NO: TrafficLightPreference
TrafficLightPreference.AUTO🔗
TrafficLightPreference.AUTO: TrafficLightPreference
TrafficLightType🔗
global record TrafficLightType
availability: ModelMetadata.Availability description: ModelMetadata.Description cost: number categoryList: ModelMetadata.CategoryList menuCategory: ModelMetadata.MenuCategory tryOpposite: boolean modelScript: ScriptRef relativePath: string end
Specification for traffic lights
TrafficLightType.availability🔗
TrafficLightType.availability: ModelMetadata.Availability
Configures year availability of the traffic light (for AI and player building it)
TrafficLightType.description🔗
TrafficLightType.description: ModelMetadata.Description
Localized strings and icons paths for user interface
TrafficLightType.cost🔗
TrafficLightType.cost: number
Cost per unit when built
TrafficLightType.categoryList🔗
TrafficLightType.categoryList: ModelMetadata.CategoryList
Tags for content selection and filtering
TrafficLightType.menuCategory🔗
TrafficLightType.menuCategory: ModelMetadata.MenuCategory
Configure category, order and filter behaviour in the construction menu
TrafficLightType.tryOpposite🔗
TrafficLightType.tryOpposite: boolean
Whether to build North American style on the opposide side of the intersection if possible
TrafficLightType.modelScript🔗
TrafficLightType.modelScript: ScriptRef
A script controlling the actual placement of models on the intersection
TrafficLightType.relativePath🔗
TrafficLightType.relativePath: string
Deprecated
TramTrackType🔗
Defines the type of a tram track.
TramTrackType.NO🔗
TramTrackType.NO: TramTrackType
TramTrackType.YES🔗
TramTrackType.YES: TramTrackType
TramTrackType.ELECTRIC🔗
TramTrackType.ELECTRIC: TramTrackType
TransportMode🔗
global record TransportMode
PERSON: TransportMode CARGO: TransportMode CAR: TransportMode BUS: TransportMode TRUCK: TransportMode TRAM: TransportMode ELECTRIC_TRAM: TransportMode TRAIN: TransportMode ELECTRIC_TRAIN: TransportMode AIRCRAFT: TransportMode SHIP: TransportMode SMALL_AIRCRAFT: TransportMode SMALL_SHIP: TransportMode HELICOPTER: TransportMode TRAM_TRACK: TransportMode ELECTRIC_TRAM_TRACK: TransportMode end
Defines the transport mode (this is used to blacklist/whitelist vehicles onto transport network edges).
These values are mosly used in a bit field to influence the pathfinding for vehicles and people.
TransportMode.PERSON🔗
TransportMode.PERSON: TransportMode
TransportMode.CARGO🔗
TransportMode.CARGO: TransportMode
TransportMode.CAR🔗
TransportMode.CAR: TransportMode
TransportMode.BUS🔗
TransportMode.BUS: TransportMode
TransportMode.TRUCK🔗
TransportMode.TRUCK: TransportMode
TransportMode.TRAM🔗
TransportMode.TRAM: TransportMode
TransportMode.ELECTRIC_TRAM🔗
TransportMode.ELECTRIC_TRAM: TransportMode
TransportMode.TRAIN🔗
TransportMode.TRAIN: TransportMode
TransportMode.ELECTRIC_TRAIN🔗
TransportMode.ELECTRIC_TRAIN: TransportMode
TransportMode.AIRCRAFT🔗
TransportMode.AIRCRAFT: TransportMode
TransportMode.SHIP🔗
TransportMode.SHIP: TransportMode
TransportMode.SMALL_AIRCRAFT🔗
TransportMode.SMALL_AIRCRAFT: TransportMode
TransportMode.SMALL_SHIP🔗
TransportMode.SMALL_SHIP: TransportMode
TransportMode.HELICOPTER🔗
TransportMode.HELICOPTER: TransportMode
TransportMode.TRAM_TRACK🔗
TransportMode.TRAM_TRACK: TransportMode
TransportMode.ELECTRIC_TRAM_TRACK🔗
TransportMode.ELECTRIC_TRAM_TRACK: TransportMode
TransportVehicleConfig🔗
global record TransportVehicleConfig
new: function(): TransportVehicleConfig vehicles: {TransportVehiclePart} vehicleGroups: {integer} muFileNames: {string} end
Complete configuration for a TransportVehicle (train consist, bus, etc.)
TransportVehicleConfig.new()🔗
function TransportVehicleConfig.new()(): TransportVehicleConfigReturns
TransportVehicleConfig
TransportVehicleConfig.new(TransportVehicleConfig)🔗
function TransportVehicleConfig.new(TransportVehicleConfig)(TransportVehicleConfig): TransportVehicleConfigParameters
TransportVehicleConfig
TransportVehicleConfig
TransportVehicleConfig.vehicles🔗
TransportVehicleConfig.vehicles: {TransportVehiclePart}
List of all vehicle parts in order
TransportVehicleConfig.vehicleGroups🔗
TransportVehicleConfig.vehicleGroups: {integer}
Vehicles can be composed into groups, each entry is the size of the group.
The sum of all entries must be the total of vehicles.
for a train made of a multiple unit with three cars and 1 extra waggon would be
{3, 1}.
TransportVehicleConfig.muFileNames🔗
TransportVehicleConfig.muFileNames: {string}
for each group, if it is a multiple unit, stores the res name
TransportVehicleInfo🔗
Information about all cargo of a transport vehicle
TransportVehicleInfo.cargoInfos🔗
TransportVehicleInfo.cargoInfos: {{{VehicleCargoInfo}}}
List of VehicleCargoInfo for vehicles, compartments and cargo types
TransportVehiclePart🔗
global record TransportVehiclePart
new: function(): TransportVehiclePart part: VehiclePart purchaseTime: integer maintenanceChange: number maintenanceState: number autoLoadConfig: {boolean} end
A subsection of a Transport Vehicle.
TransportVehiclePart.new🔗
function TransportVehiclePart.new(): TransportVehiclePart
Creates a new TransportVehiclePart.
ReturnsTransportVehiclePart— New TransportVehiclePart
TransportVehiclePart.part🔗
TransportVehiclePart.part: VehiclePart
Base vehicle part configuration
TransportVehiclePart.purchaseTime🔗
TransportVehiclePart.purchaseTime: integer
Game time when this part was purchased
TransportVehiclePart.maintenanceChange🔗
TransportVehiclePart.maintenanceChange: number
TransportVehiclePart.maintenanceState🔗
TransportVehiclePart.maintenanceState: number
TransportVehiclePart.autoLoadConfig🔗
TransportVehiclePart.autoLoadConfig: {boolean}
Automatic load configuration per compartment
TransportVehicleState🔗
Current state of TransportVehicle
TransportVehicleState.IN_DEPOT🔗
TransportVehicleState.IN_DEPOT: TransportVehicleState
Vehicle is in a depot
TransportVehicleState.EN_ROUTE🔗
TransportVehicleState.EN_ROUTE: TransportVehicleState
Vehicle is traveling between terminals
TransportVehicleState.AT_TERMINAL🔗
TransportVehicleState.AT_TERMINAL: TransportVehicleState
Vehicle is at a terminal (station/stop)
TransportVehicleState.GOING_TO_DEPOT🔗
TransportVehicleState.GOING_TO_DEPOT: TransportVehicleState
Vehicle is traveling to a depot
TransportationStats🔗
A structure that holds information about the transportation data statistics.
TransportationStats.passengersTransported🔗
TransportationStats.passengersTransported: integer
TransportationStats.cargoTransported🔗
TransportationStats.cargoTransported: integer
UgcAccessLimitedReason🔗
Represent the reason why the user doesn't have access to UGC content
UgcAccessLimitedReason.None🔗
UgcAccessLimitedReason.None: UgcAccessLimitedReason
UgcAccessLimitedReason.NotSignedIn🔗
UgcAccessLimitedReason.NotSignedIn: UgcAccessLimitedReason
UgcAccessLimitedReason.Restricted🔗
UgcAccessLimitedReason.Restricted: UgcAccessLimitedReason
UgcAccessLimitedReason.Error🔗
UgcAccessLimitedReason.Error: UgcAccessLimitedReason
UserProfile🔗
global record UserProfile
getModRep: function(UserProfile): ModRep getLanguageRep: function(UserProfile): LanguageRep getUserName: function(UserProfile): string changeLanguage: function(UserProfile, LangKey) getLanguage: function(UserProfile): LangKey subscribeMod: function(UserProfile, string) unsubscribeMod: function(UserProfile, string) getUnlockedAchievementIds: function(UserProfile): {string : boolean} getAchievementRep: function(UserProfile): AchievementRep getPlayerStatProgress: function(UserProfile, string): number getPlayerStatsProgress: function(UserProfile): {string : number} getLastMission: function(UserProfile, string): {string, SaveGameId} getLastSavegameForMission: function(UserProfile, string, string): SaveGameId getLastGame: function(UserProfile): SaveGameId | MissionCampaign isMissionCompleted: function(UserProfile, string, string): boolean isCurrentMissionCompleted: function(UserProfile): boolean noteEditorsNoteShown: function(UserProfile) isEditorsNoteShown: function(UserProfile) noteMedalState: function(UserProfile, string, boolean) getMedalsState: function(UserProfile, string, string): {string : boolean} noteStarState: function(UserProfile, string, boolean) getStarsState: function(UserProfile, string, string): {string : boolean} hasUgcAccess: function(UserProfile): boolean checkUgcRestrictions: function(UserProfile): boolean hasAgeGroupForUgc: function(UserProfile): boolean getUgcAccessLimitedReason: function(UserProfile): UgcAccessLimitedReason openUrl: function(UserProfile, string) end
UserProfile
UserProfile.getModRep🔗
function UserProfile.getModRep(UserProfile): ModRepParameters
UserProfile
ModRep
UserProfile.getLanguageRep🔗
function UserProfile.getLanguageRep(UserProfile): LanguageRepParameters
UserProfile
LanguageRep
UserProfile.getUserName🔗
function UserProfile.getUserName(UserProfile): stringParameters
UserProfile
string
UserProfile.changeLanguage🔗
function UserProfile.changeLanguage(UserProfile, LangKey)Parameters
UserProfileLangKey
UserProfile.getLanguage🔗
function UserProfile.getLanguage(UserProfile): LangKeyParameters
UserProfile
LangKey
UserProfile.subscribeMod🔗
function UserProfile.subscribeMod(UserProfile, string)Parameters
UserProfilestring
UserProfile.unsubscribeMod🔗
function UserProfile.unsubscribeMod(UserProfile, string)Parameters
UserProfilestring
UserProfile.getUnlockedAchievementIds🔗
function UserProfile.getUnlockedAchievementIds(UserProfile): {string : boolean}Parameters
UserProfile
{string : boolean}
UserProfile.getAchievementRep🔗
function UserProfile.getAchievementRep(UserProfile): AchievementRepParameters
UserProfile
AchievementRep
UserProfile.getPlayerStatProgress🔗
function UserProfile.getPlayerStatProgress(UserProfile, string): numberParameters
UserProfilestring
number
UserProfile.getPlayerStatsProgress🔗
function UserProfile.getPlayerStatsProgress(UserProfile): {string : number}Parameters
UserProfile
{string : number}
UserProfile.getLastMission🔗
function UserProfile.getLastMission(UserProfile, string): {string, SaveGameId}Parameters
UserProfilestring
{string, SaveGameId}
UserProfile.getLastSavegameForMission🔗
function UserProfile.getLastSavegameForMission(UserProfile, string, string): SaveGameIdParameters
UserProfilestringstring
SaveGameId
UserProfile.getLastGame🔗
function UserProfile.getLastGame(UserProfile): SaveGameId | MissionCampaignParameters
UserProfile
SaveGameId | MissionCampaign
UserProfile.isMissionCompleted🔗
function UserProfile.isMissionCompleted(UserProfile, string, string): booleanParameters
UserProfilestringstring
boolean
UserProfile.isCurrentMissionCompleted🔗
function UserProfile.isCurrentMissionCompleted(UserProfile): booleanParameters
UserProfile
boolean
UserProfile.noteEditorsNoteShown🔗
function UserProfile.noteEditorsNoteShown(UserProfile)Parameters
UserProfile
UserProfile.isEditorsNoteShown🔗
function UserProfile.isEditorsNoteShown(UserProfile)Parameters
UserProfile
UserProfile.noteMedalState🔗
function UserProfile.noteMedalState(UserProfile, string, boolean)Parameters
UserProfilestringboolean
UserProfile.getMedalsState🔗
function UserProfile.getMedalsState(UserProfile, string, string): {string : boolean}Parameters
UserProfilestringstring
{string : boolean}
UserProfile.noteStarState🔗
function UserProfile.noteStarState(UserProfile, string, boolean)Parameters
UserProfilestringboolean
UserProfile.getStarsState🔗
function UserProfile.getStarsState(UserProfile, string, string): {string : boolean}Parameters
UserProfilestringstring
{string : boolean}
UserProfile.hasUgcAccess🔗
function UserProfile.hasUgcAccess(UserProfile): booleanParameters
UserProfile
boolean
UserProfile.checkUgcRestrictions🔗
function UserProfile.checkUgcRestrictions(UserProfile): booleanParameters
UserProfile
boolean
UserProfile.hasAgeGroupForUgc🔗
function UserProfile.hasAgeGroupForUgc(UserProfile): booleanParameters
UserProfile
boolean
UserProfile.getUgcAccessLimitedReason🔗
function UserProfile.getUgcAccessLimitedReason(UserProfile): UgcAccessLimitedReasonParameters
UserProfile
UgcAccessLimitedReason
UserProfile.openUrl🔗
function UserProfile.openUrl(UserProfile, string)Parameters
UserProfilestring
Vec2f🔗
global record Vec2f
new: function(): Vec2f equals: function(Vec2f, Vec2f): boolean clone: function(Vec2f): Vec2f x: number y: number scale: function(s : Vec2f, number): Vec2f normalize: function(Vec2f): Vec2f length: function(Vec2f): number distance: function(a : Vec2f, b : Vec2f): number distance2: function(a : Vec2f, b : Vec2f): number lerp: function(a : Vec2f, b : Vec2f, t : number): Vec2f angle: function(a : Vec2f, b : Vec2f): number rotate: function(angle : Vec2f, number): Vec2f metamethod __add: function(Vec2f, Vec2f): Vec2f end
A 2d vector of floats
Supports array subscript with vec[i] access. Supports addition +, subtraction -, multiplication * and division /.
Vec2f.new()🔗
function Vec2f.new()(): Vec2f
Creates a new vector.
ReturnsVec2f— Vec2f(0,0)
Vec2f.new(number)🔗
function Vec2f.new(number)(v : number): Vec2f
Creates a new vector.
Parametersv:number— Single value to set both x and y (optional)
Vec2f— Vec2f(v,v)
Vec2f.new(number, number)🔗
function Vec2f.new(number, number)(x : number, y : number): Vec2f
Creates a new vector.
Parametersx:number— X coordinate (optional)y:number— Y coordinate (optional)
Vec2f— Vec2f(x,y)
Vec2f.equals🔗
function Vec2f.equals(Vec2f, Vec2f): booleanParameters
Vec2fVec2f
boolean
Vec2f.clone🔗
function Vec2f.clone(Vec2f): Vec2fParameters
Vec2f
Vec2f
Vec2f.x🔗
Vec2f.x: number
x coordinate
Vec2f.y🔗
Vec2f.y: number
y coordinate
Vec2f.scale🔗
function Vec2f.scale(s : Vec2f, number): Vec2f
Scale a vector by an amount
Parameterss:Vec2f— Scale amountnumber
Vec2f— Scaled vector
Vec2f.normalize🔗
function Vec2f.normalize(Vec2f): Vec2f
Normalize vector to unit length
ParametersVec2f
Vec2f— Normalized vector
Vec2f.length🔗
function Vec2f.length(Vec2f): number
Calculate length of a vector
ParametersVec2f
number— Length
Vec2f.distance🔗
function Vec2f.distance(a : Vec2f, b : Vec2f): number
Calculate distance between two vectors
Parametersa:Vec2f— First vectorb:Vec2f— Second vector
number— Distance
Vec2f.distance2🔗
function Vec2f.distance2(a : Vec2f, b : Vec2f): number
Calculate squared distance between two vectors
Parametersa:Vec2f— First vectorb:Vec2f— Second vector
number— Squared Distance
Vec2f.lerp🔗
function Vec2f.lerp(a : Vec2f, b : Vec2f, t : number): Vec2f
Linear interpolation between two vectors
Parametersa:Vec2f— First vectorb:Vec2f— Second vectort:number— Interpolation parameter (0 to 1)
Vec2f— Interpolated vector
Vec2f.angle🔗
function Vec2f.angle(a : Vec2f, b : Vec2f): number
Calculate angle between two vectors
Parametersa:Vec2f— First vectorb:Vec2f— Second vector
number— angle (in radians)
Vec2f.rotate🔗
function Vec2f.rotate(angle : Vec2f, number): Vec2f
Rotate vector by angle
Parametersangle:Vec2f— Rotation angle in radiansnumber
Vec2f— Rotated vector
Vec2f.$meta.__add🔗
metamethod Vec2f.$meta.__add(Vec2f, Vec2f): Vec2fParameters
Vec2fVec2f
Vec2f
Vec2f.$meta.__sub🔗
metamethod Vec2f.$meta.__sub(Vec2f, Vec2f): Vec2fParameters
Vec2fVec2f
Vec2f
Vec2f.$meta.__mul🔗
metamethod Vec2f.$meta.__mul(Vec2f, number): Vec2fParameters
Vec2fnumber
Vec2f
Vec2f.$meta.__div🔗
metamethod Vec2f.$meta.__div(Vec2f, number): Vec2fParameters
Vec2fnumber
Vec2f
Vec2i🔗
A 2d vector of integers
Supports array subscript with vec[i] access. Supports addition +, subtraction -, multiplication * and division /.
Vec2i.new()🔗
function Vec2i.new()(): Vec2i
Creates a new vector.
ReturnsVec2i— Vec2i(0,0),
Vec2i.new(integer)🔗
function Vec2i.new(integer)(v : integer): Vec2i
Creates a new vector.
Parametersv:integer— Single value to set both x and y (optional)
Vec2i— Vec2i(v,v)
Vec2i.new(integer, integer)🔗
function Vec2i.new(integer, integer)(x : integer, y : integer): Vec2i
Creates a new vector.
Parametersx:integer— X coordinatey:integer— Y coordinate
Vec2i— Vec2i(x,y)
Vec2i.equals🔗
function Vec2i.equals(Vec2i, Vec2i): booleanParameters
Vec2iVec2i
boolean
Vec2i.x🔗
Vec2i.x: integer
x coordinate
Vec2i.y🔗
Vec2i.y: integer
y coordinate
Vec2i.$meta.__add🔗
metamethod Vec2i.$meta.__add(Vec2i, Vec2i): Vec2iParameters
Vec2iVec2i
Vec2i
Vec2i.$meta.__sub🔗
metamethod Vec2i.$meta.__sub(Vec2i, Vec2i): Vec2iParameters
Vec2iVec2i
Vec2i
Vec2i.$meta.__mul🔗
metamethod Vec2i.$meta.__mul(Vec2i, Vec2i): Vec2iParameters
Vec2iVec2i
Vec2i
Vec2i.$meta.__div🔗
metamethod Vec2i.$meta.__div(Vec2i, Vec2i): Vec2iParameters
Vec2iVec2i
Vec2i
Vec3f🔗
global record Vec3f
new: function(): Vec3f equals: function(Vec3f, Vec3f): boolean clone: function(Vec3f): Vec3f x: number y: number z: number scale: function(s : Vec3f, number): Vec3f normalize: function(Vec3f): Vec3f length: function(Vec3f): number distance: function(a : Vec3f, b : Vec3f): number distance2: function(a : Vec3f, b : Vec3f): number distance2_2: function(a : Vec3f, b : Vec3f): number distance_2: function(a : Vec3f, b : Vec3f): number lerp: function(a : Vec3f, b : Vec3f, t : number): Vec3f angle: function(a : Vec3f, b : Vec3f): number dot: function(a : Vec3f, b : Vec3f): number metamethod __add: function(Vec3f, Vec3f): Vec3f end
A 3d vector of floats
Supports array subscript with vec[i] access. Supports addition +, subtraction -, multiplication * and division /.
Vec3f.new()🔗
function Vec3f.new()(): Vec3f
Creates a new vector.
ReturnsVec3f— Vec3f(0,0,0)
Vec3f.new(number)🔗
function Vec3f.new(number)(v : number): Vec3f
Creates a new vector.
Parametersv:number— Single value to set all components
Vec3f— Vec3f(v,v,v)
Vec3f.new(number, number, number)🔗
function Vec3f.new(number, number, number)(x : number, y : number, z : number): Vec3f
Creates a new vector.
Parametersx:number— X coordinatey:number— Y coordinatez:number— Z coordinate
Vec3f— Vec3f(x,y,z)
Vec3f.equals🔗
function Vec3f.equals(Vec3f, Vec3f): booleanParameters
Vec3fVec3f
boolean
Vec3f.clone🔗
function Vec3f.clone(Vec3f): Vec3f
Create a copy of the vector
ParametersVec3f
Vec3f— Cloned vector
Vec3f.x🔗
Vec3f.x: number
x coordinate
Vec3f.y🔗
Vec3f.y: number
y coordinate
Vec3f.z🔗
Vec3f.z: number
z coordinate
Vec3f.scale🔗
function Vec3f.scale(s : Vec3f, number): Vec3f
Scale vector by a factor
Parameterss:Vec3f— Scale factornumber
Vec3f— Scaled vector
Vec3f.normalize🔗
function Vec3f.normalize(Vec3f): Vec3f
Normalize vector to unit length
ParametersVec3f
Vec3f— Normalized vector
Vec3f.length🔗
function Vec3f.length(Vec3f): number
Calculate length of the vector
ParametersVec3f
number— Length
Vec3f.distance🔗
function Vec3f.distance(a : Vec3f, b : Vec3f): number
Calculate distance between two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— Distance
Vec3f.distance2🔗
function Vec3f.distance2(a : Vec3f, b : Vec3f): number
Calculate squared distance between two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— Squared distance
Vec3f.distance2_2🔗
function Vec3f.distance2_2(a : Vec3f, b : Vec3f): number
Calculate squared distance between the xy components of two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— Squared distance
Vec3f.distance_2🔗
function Vec3f.distance_2(a : Vec3f, b : Vec3f): number
Calculate distance between xy components of two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— Squared distance
Vec3f.lerp🔗
function Vec3f.lerp(a : Vec3f, b : Vec3f, t : number): Vec3f
Linear interpolation between two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vectort:number— Interpolation parameter (0 to 1)
Vec3f— Interpolated vector
Vec3f.angle🔗
function Vec3f.angle(a : Vec3f, b : Vec3f): number
Calculate angle between two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— angle (in radians)
Vec3f.dot🔗
function Vec3f.dot(a : Vec3f, b : Vec3f): number
Calculate dot product of two vectors
Parametersa:Vec3f— First vectorb:Vec3f— Second vector
number— dot product
Vec3f.$meta.__add🔗
metamethod Vec3f.$meta.__add(Vec3f, Vec3f): Vec3fParameters
Vec3fVec3f
Vec3f
Vec3f.$meta.__sub🔗
metamethod Vec3f.$meta.__sub(Vec3f, Vec3f): Vec3fParameters
Vec3fVec3f
Vec3f
Vec3f.$meta.__mul🔗
metamethod Vec3f.$meta.__mul(Vec3f, number): Vec3fParameters
Vec3fnumber
Vec3f
Vec3f.$meta.__div🔗
metamethod Vec3f.$meta.__div(Vec3f, number): Vec3fParameters
Vec3fnumber
Vec3f
Vec4f🔗
A 4d vector of floats
Supports array subscript with vec[i] access. Supports addition +, subtraction -, multiplication * and division /.
Vec4f.new()🔗
function Vec4f.new()(): Vec4f
Creates a new vector.
ReturnsVec4f— Vec4f(0,0,0,0)
Vec4f.new(number)🔗
function Vec4f.new(number)(v : number): Vec4f
Creates a new vector.
Parametersv:number— Single value to set all components
Vec4f— Vec4f(v,v,v,v)
Vec4f.new(number, number, number, number)🔗
function Vec4f.new(number, number, number, number)(x : number, y : number, z : number, w : number): Vec4f
Creates a new vector.
Parametersx:number— X coordinatey:number— Y coordinatez:number— Z coordinatew:number— W coordinate
Vec4f— Vec4f(x, y, z, w)
Vec4f.new(Vec3f, number)🔗
function Vec4f.new(Vec3f, number)(v : Vec3f, w : number): Vec4f
Creates a new vector from Vec3f and w component.
Parametersv:Vec3f— Vec3f for x, y, z componentsw:number— W coordinate
Vec4f— New Vec4f
Vec4f.equals🔗
function Vec4f.equals(Vec4f, Vec4f): booleanParameters
Vec4fVec4f
boolean
Vec4f.x🔗
Vec4f.x: number
x coordinate
Vec4f.y🔗
Vec4f.y: number
y coordinate
Vec4f.z🔗
Vec4f.z: number
z coordinate
Vec4f.w🔗
Vec4f.w: number
w coordinate
Vec4f.lerp🔗
function Vec4f.lerp(a : Vec4f, b : Vec4f, t : number): Vec4f
Linear interpolation between two vectors
Parametersa:Vec4f— First vectorb:Vec4f— Second vectort:number— Interpolation parameter (0 to 1)
Vec4f— Interpolated vector
Vec4f.$meta.__add🔗
metamethod Vec4f.$meta.__add(Vec4f, Vec4f): Vec4fParameters
Vec4fVec4f
Vec4f
Vec4f.$meta.__sub🔗
metamethod Vec4f.$meta.__sub(Vec4f, Vec4f): Vec4fParameters
Vec4fVec4f
Vec4f
Vec4f.$meta.__mul🔗
metamethod Vec4f.$meta.__mul(Vec4f, number): Vec4fParameters
Vec4fnumber
Vec4f
Vec4f.$meta.__div🔗
metamethod Vec4f.$meta.__div(Vec4f, number): Vec4fParameters
Vec4fnumber
Vec4f
Vec5f🔗
A 5d vector of floats
Supports array subscript with vec[i] access. Supports addition +, subtraction -, multiplication * and division /.
Vec5f.new()🔗
function Vec5f.new()(): Vec5f
Creates a new vector.
ReturnsVec5f— Vec5f(0, 0, 0, 0, 0)
Vec5f.new(number)🔗
function Vec5f.new(number)(v : number): Vec5f
Creates a new vector.
Parametersv:number— Single value to set all components
Vec5f— Vec5f(v, v, v, v, v)
Vec5f.new(number, number, number, number, number)🔗
function Vec5f.new(number, number, number, number, number)(x : number, y : number, z : number, w : number, q : number): Vec5f
Creates a new vector.
Parametersx:number— X coordinatey:number— Y coordinatez:number— Z coordinatew:number— W coordinateq:number— Q coordinate
Vec5f— Vec5f(x, y, z, w, q)
Vec5f.equals🔗
function Vec5f.equals(Vec5f, Vec5f): booleanParameters
Vec5fVec5f
boolean
Vec5f.x🔗
Vec5f.x: number
x coordinate
Vec5f.y🔗
Vec5f.y: number
y coordinate
Vec5f.z🔗
Vec5f.z: number
z coordinate
Vec5f.w🔗
Vec5f.w: number
w coordinate
Vec5f.q🔗
Vec5f.q: number
q coordinate
Vec5f.lerp🔗
function Vec5f.lerp(a : Vec5f, b : Vec5f, t : number): Vec5f
Linear interpolation between two vectors
Parametersa:Vec5f— First vectorb:Vec5f— Second vectort:number— Interpolation parameter (0 to 1)
Vec5f— Interpolated vector
Vec5f.$meta.__add🔗
metamethod Vec5f.$meta.__add(Vec5f, Vec5f): Vec5fParameters
Vec5fVec5f
Vec5f
Vec5f.$meta.__sub🔗
metamethod Vec5f.$meta.__sub(Vec5f, Vec5f): Vec5fParameters
Vec5fVec5f
Vec5f
Vec5f.$meta.__mul🔗
metamethod Vec5f.$meta.__mul(Vec5f, number): Vec5fParameters
Vec5fnumber
Vec5f
Vec5f.$meta.__div🔗
metamethod Vec5f.$meta.__div(Vec5f, number): Vec5fParameters
Vec5fnumber
Vec5f
Vector🔗
Type Parameters
T
Vector.new🔗
function Vector.new(): Vector<T>Returns
Vector<T>
Vector.at🔗
function Vector.at(Vector<T>, integer): T
1-base index into a standard C++ vector
ParametersVector<T>integer
T
Vector.pushBack🔗
function Vector.pushBack(Vector<T>, T)Parameters
Vector<T>T
Vector.size🔗
function Vector.size(Vector<T>): integerParameters
Vector<T>
integer
Vector.asTable🔗
function Vector.asTable(Vector<T>): {T}Parameters
Vector<T>
{T}
Vector.clone🔗
function Vector.clone(Vector<T>): Vector<T>Parameters
Vector<T>
Vector<T>
VehicleCargoInfo🔗
Information about cargo of a single compartment of a transport vehicle
VehicleCargoInfo.capacity🔗
VehicleCargoInfo.capacity: number
Capacity of this vehicle
VehicleCargoInfo.offset🔗
VehicleCargoInfo.offset: number
Sum of the cargo capacities up to this vehicle
VehicleData🔗
global record VehicleData
bounds: VehicleExtent length: number topSpeed: number brakeDeceleration: number carriages: {CarriageData} end
Information about an entire vehicle (consist of carriages)
VehicleData.CarriageData🔗
record VehicleData.CarriageData
offset: number reversed: boolean emissions: ModelMetadata.Emissions end
VehicleData.CarriageData.offset🔗
VehicleData.CarriageData.offset: number
VehicleData.CarriageData.reversed🔗
VehicleData.CarriageData.reversed: boolean
VehicleData.CarriageData.emissions🔗
VehicleData.CarriageData.emissions: ModelMetadata.Emissions
Modified amount of emission for the carrriage
VehicleData.bounds🔗
VehicleData.bounds: VehicleExtent
space in x-axis/driving direction, values for in front and behind of center
VehicleData.length🔗
VehicleData.length: number
total length (without random spacing ahead)
VehicleData.topSpeed🔗
VehicleData.topSpeed: number
minimum of all top speeds
VehicleData.brakeDeceleration🔗
VehicleData.brakeDeceleration: number
Acceleration when breaking (in m / s^2)
VehicleData.carriages🔗
VehicleData.carriages: {CarriageData}
List of carriaces for the vehicle (applies to trams and trains)
VehicleEngineType🔗
global record VehicleEngineType
HORSE: VehicleEngineType STEAM: VehicleEngineType ELECTRIC: VehicleEngineType DIESEL: VehicleEngineType end
VehicleEngineType.HORSE🔗
VehicleEngineType.HORSE: VehicleEngineType
VehicleEngineType.STEAM🔗
VehicleEngineType.STEAM: VehicleEngineType
VehicleEngineType.ELECTRIC🔗
VehicleEngineType.ELECTRIC: VehicleEngineType
VehicleEngineType.DIESEL🔗
VehicleEngineType.DIESEL: VehicleEngineType
VehicleExtent🔗
Information about travel-direction extent of an entire vehicle (consist of carriages)
VehicleExtent.back🔗
VehicleExtent.back: number
negative distance in meters from back to vehicle pin position
VehicleExtent.front🔗
VehicleExtent.front: number
positive distance in meters from vehicle pin position to front plus some random spacing ahead
VehicleIconType🔗
Icon type used to represent a vehicle.
VehicleIconType.Bus🔗
VehicleIconType.Bus: VehicleIconType
VehicleIconType.Truck🔗
VehicleIconType.Truck: VehicleIconType
VehicleIconType.TrainSteam🔗
VehicleIconType.TrainSteam: VehicleIconType
VehicleIconType.TrainElectric🔗
VehicleIconType.TrainElectric: VehicleIconType
VehicleIconType.TrainDiesel🔗
VehicleIconType.TrainDiesel: VehicleIconType
VehicleIconType.Tram🔗
VehicleIconType.Tram: VehicleIconType
VehicleIconType.Aircraft🔗
VehicleIconType.Aircraft: VehicleIconType
VehicleIconType.Helicopter🔗
VehicleIconType.Helicopter: VehicleIconType
VehicleIconType.Ship🔗
VehicleIconType.Ship: VehicleIconType
VehiclePart🔗
global record VehiclePart
new: function(): VehiclePart modelId: integer reversed: boolean compartment2loadConfig: {LoadConfig} color: Vec3f end
Configuration for a single vehicle part/unit
VehiclePart.new🔗
function VehiclePart.new(): VehiclePartReturns
VehiclePart
VehiclePart.modelId🔗
VehiclePart.modelId: integer
VehiclePart.reversed🔗
VehiclePart.reversed: boolean
Whether the vehicle part is reversed (facing backwards)
VehiclePart.compartment2loadConfig🔗
VehiclePart.compartment2loadConfig: {LoadConfig}
Cargo configuration for the model. One entry per compartment. -1 means automatic selection of load config.
VehiclePart.color🔗
VehiclePart.color: Vec3f
VehiclePartInfo🔗
Details about a vehicle part
VehiclePartInfo.Seat🔗
A single seat in a vehicle
VehiclePartInfo.Seat.occupied🔗
VehiclePartInfo.Seat.occupied: Engine.Entity
Entity occupying this seat
VehiclePartInfo.Seat.animation🔗
VehiclePartInfo.Seat.animation: string
Animation playing for this seat
VehiclePartInfo.Seat.crew🔗
VehiclePartInfo.Seat.crew: boolean
VehiclePartInfo.seats🔗
VehiclePartInfo.seats: {Seat}
List of seats in this vehicle part
VehiclePartInfo.count🔗
VehiclePartInfo.count: number
Number of occupied seats on this vehicles
VehicleProblem🔗
global record VehicleProblem
NoPathElectric: integer NoPathShip: integer NoPathAircraft: integer NoPathGeneric: integer Blocked: integer end
Information about the problem of a vehicle.
VehicleProblem.NoPathElectric🔗
VehicleProblem.NoPathElectric: integer
VehicleProblem.NoPathShip🔗
VehicleProblem.NoPathShip: integer
VehicleProblem.NoPathAircraft🔗
VehicleProblem.NoPathAircraft: integer
VehicleProblem.NoPathGeneric🔗
VehicleProblem.NoPathGeneric: integer
VehicleProblem.Blocked🔗
VehicleProblem.Blocked: integer
VehicleState🔗
global record VehicleState
RUNNING: VehicleState STOPPING: VehicleState STOPPED: VehicleState ARRIVED: VehicleState end
Current state of a vehicle's movement
VehicleState.RUNNING🔗
VehicleState.RUNNING: VehicleState
Vehicle is actively moving
VehicleState.STOPPING🔗
VehicleState.STOPPING: VehicleState
Vehicle is in the process of stopping (due to player / script interaction)
VehicleState.STOPPED🔗
VehicleState.STOPPED: VehicleState
Vehicle is completely stopped and must be un-stopped by player / script
VehicleState.ARRIVED🔗
VehicleState.ARRIVED: VehicleState
Vehicle has arrived at its destination
Vendor🔗
Vendor represents the vendor (store) type.
Vendor.Steam🔗
Vendor.Steam: Vendor
Vendor.Gog🔗
Vendor.Gog: Vendor
Vendor.Eos🔗
Vendor.Eos: Vendor
Vendor.MacAppstore🔗
Vendor.MacAppstore: Vendor
Vendor.Microsoft🔗
Vendor.Microsoft: Vendor
Vendor.Sony🔗
Vendor.Sony: Vendor
Vendor.Dev🔗
Vendor.Dev: Vendor
View🔗
Camera view information
View.getEye🔗
function View.getEye(View): Vec3f
Get the camera eye position
ParametersView
Vec3f— Eye position
View.getCenter🔗
function View.getCenter(View): Vec3f
Get the camera center position
ParametersView
Vec3f— Center position
View.getUp🔗
function View.getUp(View): Vec3f
Get the camera up vector
ParametersView
Vec3f— Up vector
View.isVisible🔗
function View.isVisible(view : View, position : Vec3f, radius : number): boolean
Check if a sphere is visible in the current view
Parametersview:View— The viewposition:Vec3f— Center of the sphereradius:number— Radius of the sphere
boolean— True if visible
Waypoint🔗
References the position of a waypoint, which is either an EdgePos or a Vec3f
Waypoint.new()🔗
function Waypoint.new()(): WaypointReturns
Waypoint
Waypoint.new(Waypoint)🔗
function Waypoint.new(Waypoint)(Waypoint): WaypointParameters
Waypoint
Waypoint
Waypoint.clone🔗
function Waypoint.clone(Waypoint): WaypointParameters
Waypoint
Waypoint
Waypoint.equals🔗
function Waypoint.equals(Waypoint, Waypoint)Parameters
WaypointWaypoint
Waypoint.edgePos🔗
Waypoint.edgePos: EdgePos
Edge position when using lanes
Waypoint.pos🔗
Waypoint.pos: Vec3f
3D position for ships and aircraft
Waypoint.tag🔗
Waypoint.tag: integer
tag to uniquely identify a waypoint even across addition/removal
WeightUnit🔗
WeightUnit represents the unit of measurement used for weight.
WeightUnit.T🔗
WeightUnit.T: WeightUnit
WeightUnit.KG🔗
WeightUnit.KG: WeightUnit
WeightUnit.TN_SH🔗
WeightUnit.TN_SH: WeightUnit
WeightUnit.LB🔗
WeightUnit.LB: WeightUnit
ipairs_native🔗
global record ipairs_native<T>
metamethod __call: function(ipairs<T>_native): function() : (integer, T) end
Type Parameters
T
ipairs_native.$meta.__call🔗
metamethod ipairs_native.$meta.__call(ipairs<T>_native): function() : (integer, T)Parameters
ipairs<T>_native
function(): (integer, T)
orderedPairs🔗
global record orderedPairs<T, V>
metamethod __call: function(orderedPairs<T, V>, any): function() : (T, V) end
Type Parameters
TV
orderedPairs.$meta.__call🔗
metamethod orderedPairs.$meta.__call(orderedPairs<T, V>, any): function() : (T, V)Parameters
orderedPairs<T, V>any
function(): (T, V)
pairs_native🔗
global record pairs_native<T, V>
metamethod __call: function(pairs<T, V>_native): function() : (T, V) end
Type Parameters
TV
pairs_native.$meta.__call🔗
metamethod pairs_native.$meta.__call(pairs<T, V>_native): function() : (T, V)Parameters
pairs<T, V>_native
function(): (T, V)
recordDef🔗
global recordDef: boolean