index / api / type

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 end
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
global record AchievementRep getNumAchievements: function(achievementRep : AchievementRep): integer get: function(achievementRep : AchievementRep, index : integer): AchievementDesc end
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
global record AnyAxisend
global record AnyKeyend
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
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
global record AudioEffectSettings bulldozer: boolean construction: boolean end
global record AutoGroundTex new: function(): AutoGroundTex category: string gridSize: integer countFrom: integer countTo: integer groundTex: string individual: boolean individualCategory: string end
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 end
record Animal new: function(): Animal populationDensityMultiplier: number useLocalSpawning: boolean localTileSize: number notifyAnimalDespawn: boolean end
record Locations new: function(): Locations
record IndustryParamList new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number end
record TownParamList new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number end
town: TownParamList industry: IndustryParamList makeInitialStreets: boolean end
record Terrain lodErrorMultiplier: number end
record Economy new: function(): Economy
record TownDevelopment cargoNeedsPerTown: integer townGrowthMinDistrictFraction: number end
record IndustryDevelopment spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number end
cargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment end
record Settings new: function(): Settings
record GeometryQualityOption new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number end
geometryQualityOptions: {GeometryQualityOption} end
record Water
record Textures foamNormal: string foamDetail: string foam: string end
textures: Textures end
record Particles
record Textures noise0: string noise1: string smoke: string smokeNormal: string end
textures: Textures end
record Emissions noiseLowerBoundDB: number noiseUpperBoundDB: number pollutionLowerBoundDB: number pollutionUpperBoundDB: number townNoiseResidentialAffected: boolean townNoiseCommercialAffected: boolean townNoiseIndustrialAffected: boolean end
animal: 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 end
global record BaseEdgeType NORMAL: BaseEdgeType BRIDGE: BaseEdgeType TUNNEL: BaseEdgeType end
global record BoundingInfo new: function(): BoundingInfo bbMax: Vec3f bbMin: Vec3f end
global record Box2f new: function(): Box2f min: Vec3f max: Vec3f end
global record Box3f new: function(): Box3f min: Vec3f max: Vec3f end
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
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
global record BuildingType constructionFile: string params: TownBuildingParams end
global record CampaignDesc new: function(): CampaignDesc name: string description: string icon: string map: string order: number voiceOver: string requiresCompleted: string unlockingProgression: boolean end
global record CargoCategory tier: integer landUses: {LandUseType} requiredIndustryTags: {string} townConsumptionFactor: number end
global record CargoClass new: function(): CargoClass tag: string name: string description: string icon: string color: Vec3f order: integer end
global type CargoClassId = integer
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
global type CargoTypeId = integer
global record CargoTypeSet new: function(): CargoTypeSet cargoClassesIncluded: {string} cargoClassesExcluded: {string} cargoTypesIncluded: {ResName} cargoTypesExcluded: {ResName} end
global record CarriageInfo owningVehicle: Engine.Entity index: integer offset: number reversed: boolean crew: Engine.Entity end: number end
global record Carrier ROAD: Carrier RAIL: Carrier TRAM: Carrier OTHER: Carrier AIR: Carrier WATER: Carrier metamethod __index: function(Carrier, string): Carrier end
global record CatchmentArea position: Vec3f radius: number end
global record ChartConfig new: function(): ChartConfig interval: integer count: integer minCount: integer yStepScale: number end
global record ChartResult equals: function(ChartResult, ChartResult): boolean xRange: {number} yRange: {number} series: {{{number}}} xMarkers: {number} yMarkers: {number} numPotentialGroups: integer end
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
global record Clock new: function(): Clock getTime: function(Clock): integer end
global record Collider
record Type NONE: Type BOX: Type CYLINDER: Type POINT_CLOUD: Type end
record Box halfExtents: Vec3f end
record Cylinder halfExtents: Vec3f end
record PointCloud points: {Vec3f} end
transf: Mat4f type: Type box: Box cylinder: Cylinder pointCloud: PointCloud end
global record CommandProgress new: function(): CommandProgress get: function(CommandProgress): number end
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
global record ComponentCustomState new: function(): ComponentCustomState state: {<any type> : <any type>} end
global record Connection disconnect: function(Connection) end
global record ConsoleGen Gen9pro: ConsoleGen Gen9standard: ConsoleGen Gen9base: ConsoleGen PC: ConsoleGen end
global record ConstructionDesc
record SnapConfig rail: boolean road: boolean water: boolean end
record EdgeObject minDistToCrossing: number snapToStreet: boolean snapToTrack: boolean catchmentCargo: boolean catchmentPassengers: boolean catchmentAreaRadius: number end
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 end
global record ConstructionDescMetadata
record EmissionConfig noise: number pollution: number end
emissionConfig: EmissionConfig end
global type ConstructionId = integer
global record ConstructionInstanceMetadata costScaleFactor: number end
global record ConstructionResult subconstructions: {Proposal.Subconstruction} metadata: ConstructionInstanceMetadata cost: number maintenanceCost: number maintenanceCarrier: string streetTerminal: Proposal.StreetTerminal params: {<any type> : <any type>} end
global record ConstructionScriptParam
enum Type "Button" "CheckBox" "ComboBox" "IconButton" "Slider" end
enum Location "Default" "Toolbar" end
enum DisplayMode "Compact" "Default" "Horizontal" "Sparse" "Vertical" end
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
global record ConstructionTemplate availability: ModelMetadata.Availability desc: ModelMetadata.Description data: ConstructionTemplateData menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName configureHudIconsScript: ScriptRef end
global record ConstructionTemplateData initialModules: {ResName : integer} params: {ScriptParam} end
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
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
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
global record DateFormat LONG: DateFormat SHORT: DateFormat MEDIUM: DateFormat FULL: DateFormat FILENAME: DateFormat YEAR: DateFormat end
global record DistanceSpeedUnit Metric: DistanceSpeedUnit Imperial: DistanceSpeedUnit end
global record DynamicConstructionTemplate params: {ScriptParam} end
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
global record EconomyDesc
record TownCargoLevelInfo new: function(): TownCargoLevelInfo minTier: integer maxTier: integer landUseType: LandUseType end
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 end
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
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
global record EdgeGeometry
record Type ARC: Type STRAIGHT: Type CUBIC_SPLINE: Type CUBIC_OFFSET_SPLINE: Type end
record Arc new: function(): Arc center: Vec2f radius: number startAngle: number angle: number end
record Straight new: function(): Straight pos: {Vec2f} end
record CubicSpline new: function(): CubicSpline pos: {Vec2f} tangent: {Vec2f} end
record CubicOffsetSpline new: function(): CubicOffsetSpline pos: {Vec2f} tangent: {Vec2f} offset: number end
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} end
global record EdgeId new: function(): EdgeId entity: Engine.Entity index: integer end
global record EdgeIsect
record Info index: integer param: number pos: Vec3f end
infos: {Info, Info} end
global record EdgeObjectType STOP_LEFT: EdgeObjectType STOP_RIGHT: EdgeObjectType SIGNAL: EdgeObjectType end
global record EdgePos new: function(): EdgePos equals: function(EdgePos, EdgePos): boolean edgeId: EdgeId param: number end
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
global record Environment
record AthmostphereParams new: function(): AthmostphereParams cloudCoverage: number cloudBase: number cloudTop: number cloudScattering: number dayOfYear: number sunRotation: number end
new: function(): Environment atmosphere: AthmostphereParams name: string isToolEnvironment: boolean end
global record ExtPath
record ExtPathEdge range: EdgeRange link: LinkEdge
record EdgeRange edgeId: EdgeId params: {number, number} dir: boolean end
record LinkEdge points: {EdgePos, EdgePos} end
end
edges: {ExtPathEdge} end
global record Extent new: function(): Extent bbMax: Vec3f bbMin: Vec3f end
global record Failure
record Reason Unkown: Reason NoPath: Reason NoElectric: Reason NoTram: Reason NoTramButTramTrack: Reason NoTramTrackButRail: Reason NoRail: Reason NoRoad: Reason NoSmallAircraft: Reason NoSmallShip: Reason end
reason: Reason pos: Vec3f end
global type FilePath = string
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
global record FlightState Taxi0: FlightState TakeOff: FlightState Flight: FlightState Approach: FlightState Landing: FlightState Taxi1: FlightState end
global record FontScaleClass Small: FontScaleClass Medium: FontScaleClass Large: FontScaleClass end
global record ForceUnit KN: ForceUnit KGF: ForceUnit LBF: ForceUnit end
global record GPUCapabilities hasDiscreteGPU: boolean hasUnsupportedGPU: boolean end
global record GameMap
record Town new: function(): Town pos: Vec2f name: string sizeFactors: {number} landUse2CargoNeeds: {LandUseType : {{string, number}}} existing: Engine.Entity end
record Industry new: function(): Industry pos: Vec2f angle: number onWater: boolean fileName: string tag: string existing: Engine.Entity end
record MapTree add: function(category : GameMap.MapTree, position : string, Vec3f) end
record MapAsset add: function(category : GameMap.MapAsset, position : string, Mat4f) end
record Tree id: integer pos: Vec3f end
record Asset id: integer transf: Mat4f end
new: 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 end
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
global record GameScreenshot width: integer height: integer image: {integer} image_native: Vector<integer> end
global record GameScriptDesc new: function(): GameScriptDesc postUpdateScript: ScriptRef handleEventScript: ScriptRef guiUpdateScript: ScriptRef guiHandleEventScript: ScriptRef updateScript: ScriptRef end
global record GamepadType None: GamepadType XBox: GamepadType PlayStation5: GamepadType PlayStation4: GamepadType end
global record Gender FEMALE: Gender MALE: Gender end
global record GenericGameRes new: function(): GenericGameRes type: string data: {<any type> : <any type>} setData: function(GenericGameRes, {<any type> : <any type>}) end
global record GenericGameResT<T> new: function(): GenericGameResT<T> type: string data: T setData: function(GenericGameResT<T>, T) end
global GlobalType: Type
global record GridCollisionSystem getCollisionDataAt: function(GridCollisionSystem, Vec2f): integer end
global record GridVec2f new: function(): GridVec2f width: integer height: integer x0: integer y0: integer at: function(grid : GridVec2f, pos : Vec2i): Vec2f end
global record Gridf new: function(): Gridf width: integer height: integer at: function(pos : Vec2i): number end
global record GroundTexture new: function(): GroundTexture matIndexMap: {<any type> : <any type>} indices: {<any type> : <any type>} priority: integer texSize: number
record Data data: {<any type> : <any type>} size: integer end
end
global record HeighmapGenerationMode new: function(): HeighmapGenerationMode terrainGenerator: string generateTowns: boolean generateIndustries: boolean generateAssets: boolean keepHeightmap: boolean end
global record HeightmapNew getSize: function(): Vec2i at: function(x : integer, y : integer): number end
global record HudEffectMode Always: HudEffectMode CockpitOnly: HudEffectMode Never: HudEffectMode end
global record ImportExportHeightmapMode new: function(): ImportExportHeightmapMode fileName: string import: boolean generateAssets: boolean minH: number maxH: number end
global type Index = integer
global record IndustryInfo fileName: string bbox: Box2f streetPoint: Vec2i transf: Mat4f onWater: boolean end
global record IndustryResult toRemove: {Engine.Entity} toAdd: {IndustryInfo} end
global record InputActionDesc uiName: string type: integer defaultBindings: {KeyComboDef} modifierOnly: boolean uiCategory: string uiOrder: integer duplicateOf: string duplicatedKeybindings: boolean end
global record InputActionRep getAll: function(InputActionRep): {string} get: function(InputActionRep, string): InputActionDesc end
global record InputMode Undefined: InputMode KeyboardMouse: InputMode Gamepad: InputMode end
global record KeyCombo new: function(KeyComboDef): KeyCombo toString: function(KeyCombo): string isModifierOnly: function(KeyCombo): boolean relevantFor: function(KeyCombo, InputMode): boolean end
global record KeyComboDef new: function(): KeyComboDef setKeyScancode: function(KeyComboDef, integer) addModifierKey: function(KeyComboDef, integer) condition: integer end
global record LandUseType RESIDENTIAL: LandUseType COMMERCIAL: LandUseType INDUSTRIAL: LandUseType end
global record LandVehicleMoveInfo availPower: number traction: number tractiveEffort: number vehicleAvailPower: {number} end
global record LaneConfig speed: number width: number height: number forward: boolean transportModes: {TransportMode : boolean} offset: number end
global record LaneConnection segment0: Engine.Entity lane0: integer segment1: Engine.Entity lane1: integer withRoad: boolean withTram: boolean end
global record LangKey new: function(): LangKey equals: function(LangKey, LangKey): boolean code: string mod: Mod.ModId end
global record LanguageRep getAllLanguages: function(LanguageRep): {{string, LangKey}} end
global record LayerConfig new: function(): LayerConfig
record EmissionColorMap new: function(): EmissionColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} end
record VisualizationType DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType end
colors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType end
record TerrainColorMap new: function(): TerrainColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean end
colors: Colors end
record TerrainContours new: function(): TerrainContours
record Contour new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number end
contours: {Contour} end
record ColorPassFn new: function(): ColorPassFn
record BaseColor new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean end
record BaseMappedColor new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean end
record BaseRangeColor new: function(): BaseRangeColor minMax: {Vec4f} overrideColorMap: boolean end
record CargoColor new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean end
record DestinationColor new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer end
record EmissionEmitterColor new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number end
record EmissionImpactColor new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number end
record FallbackColor new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor end
record IndustryColor new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean end
record LandUseColor new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor end
record LineVehicleColor new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} end
record MaintainedTransportVehicleColor new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity end
record StationOvercrowdedColor new: function(): StationOvercrowdedColor color: BaseMappedColor end
record SpeedLimitsColor new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean end
record TrafficColor new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean end
record HappinessColor new: function(): HappinessColor normalToPoor: {BaseColor} end
terrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor end
record BuildingRenderableConfig new: function(): BuildingRenderableConfig isVisible: boolean includeTownBuildings: boolean includeTownBuildingModels: boolean includeTownBuildingMainModel: boolean includeIndustries: boolean includeWarehouses: boolean includeStations: boolean includeEdges: boolean end
record 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
record 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
record PlotsRenderableConfig new: function(): PlotsRenderableConfig triangles: {Vec2f} end
record SignConfig new: function(): SignConfig signRenderDistance: number end
record CargoEdgesRenderables new: function(): CargoEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} showPlayerTransport: boolean showPrivateTransport: boolean playerTransportColor: {Vec4f, Vec4f} privateTransportColor: {Vec4f, Vec4f} numTransportLevels: integer signConfig: SignConfig end
record SatisfactionEdgesRenderables new: function(): SatisfactionEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} colors: {Vec4f} thresholds: {number} signConfig: SignConfig end
record 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
record TrafficEdgesRenderables new: function(): TrafficEdgesRenderables trafficColor: {Vec4f, Vec4f, Vec4f} undergroundTrafficColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer discrete: boolean tunnelOutlineColor: Vec4f tunnelOutlineSize: number end
record VoronoiRenderableConfig new: function(): VoronoiRenderableConfig showTowns: boolean townsOfInterest: {Engine.Entity} showMapBorder: boolean lineWidth: number colors: {Vec4f} sectionsPerColor: integer fadingMinHeight: number fadingDeltaHeight: number end
record WindRenderableConfig new: function(): WindRenderableConfig isVisible: boolean emissionType: Engine.Component.EmissionGrid.Type end
record CargoFlowRenderableConfig new: function(): CargoFlowRenderableConfig
record FlowData new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
flowData: {FlowData} end
colorMap: 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 end
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
global record LineIssue
record Type NowhereToLoad: Type NowhereToUnload: Type NoVehicleToLoadCargo: Type VehicleUseless: Type LineCargoConfig: Type None: Type end
type: Type stopIndex: integer cargoType: CargoTypeId end
global record LineOrEdges line: Engine.Entity lineStop0: integer lineStop1: integer lineTerminal1: {Engine.Entity, integer} edges: {EdgePos} end
global record LineProblem NOTHING: integer ZERO_OR_ONE_STATION: integer DOUBLE_STATIONS: integer INCOMPATIBLE_STATIONS: integer NO_PATH: integer BAD_ALTERNATIVE_TERMINAL: integer end
global record LineStationProblem StopUseless: integer PassengerStopUseless: integer CargoStopUseless: integer AllPassengerStopUseless: integer CargoTypeUnloadUseless: integer CargoTypeLoadUseless: integer end
global record LineVehicleInfo transportModes: {TransportMode : boolean} end
global record LoadConfig new: function(): LoadConfig loadConfigIndex: integer cargoTypeId: CargoTypeId end
global record LoaderHelper useFn: function(LoaderHelper, string) end
global record LogLevel Raw: LogLevel Error: LogLevel Warning: LogLevel Message: LogLevel Verbose: LogLevel end
global 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 end
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
global record MemoryStatistics vidMemUsage: integer trackedVidMemUsage: integer vidMemMax: integer peakVidMem: integer ramUsage: integer trackedRamUsage: integer ramMax: integer peakRam: integer peakTotalMem: integer largestFreeBlock: integer end
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
global record MissionCampaign campaign: ResName mission: ResName end
global record MissionDesc
record Medal id: string name: string nameLocked: string iconLocked: string iconCompleted: string end
record Star id: string name: string description: string iconLocked: string iconCompleted: string end
record Character name: string info: string portrait: string end
name: 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}} end
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
global record Model metadata: {<any type> : <any type>} boundingInfo: BoundingInfo collider: {<any type> : <any type>} modelPath: ResName end
global record ModelInstance modelId: integer transf0: Mat4f transf: Mat4f transformator: integer end
global record ModelMetadata
record Animal
record MovementType description: string end
record Config density: number fish: boolean end
config: Config movementTypes: {MovementType} idForAchievement: string end
record 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
record Category categories: {string} end
record CategoryList categories: {string} end
record MenuCategory
record CategoryWithOrder new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} end
categories: {CategoryWithOrder} end
record Availability yearFrom: integer yearTo: integer notifyWhenAvailable: boolean notificationGroup: string notificationSortKey: integer end
record SoundConfig
record SoundSet name: string end
soundSet: SoundSet effects: {string : {string}} builderAudioRes: ResName end
record Maintenance lifespan: integer runningCosts: number runningCostScale: number maintenanceScale: number topSpeedMaintenanceFactorPenaltyPerLevel: number end
record Emission idle: number speed: number power: number score: number end
record Emissions noise: Emission pollution: Emission end
record VehicleEngine power: number tractiveEffort: number type: VehicleEngineType end
record TransportVehicle
record CargoEntry cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string end
record LoadConfig new: function(): LoadConfig cargoEntry: CargoEntry toHide: {string} end
record Compartment loadConfigs: {LoadConfig} end
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 end
record Cost priceScale: number price: integer end
record LandVehicle topSpeed: number weightEmpty: number weightMaxPayload: number engines: {VehicleEngine} friction: number end
record WaterVehicle topSpeed: number weightEmpty: number weightMaxPayload: number availPower: number maxRpm: number area: number end
record AirVehicle topSpeed: number weightEmpty: number weightMaxPayload: number maxThrust: number isHelicopter: boolean end
record Person gender: Gender end
record Tree reputationFactor: number end
end
global record Modifiers new: function(): Modifiers equals: function(Modifiers, Modifiers): boolean noiseModifier: number pollutionModifier: number maxSpeedModifier: number end
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
global record MoneyMode RAW: MoneyMode KMB: MoneyMode end
global record MoveMode WALK: MoveMode DRIVE: MoveMode LINES: MoveMode end
global record MultipleUnit new: function(): MultipleUnit vehicles: {MultipleUnit.Vehicle} name: string desc: string filterTags: {string} availabilityNotificationGroup: string availabilityNotificationSortKey: integer groupFileName: string
record Vehicle name: string forward: boolean end
end
global record NameDesc name: string personNamesScript: string townNamesScript: string streetNamesScript: string end
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
global type NativeLuaValue = string | number | boolean | nil | NativeLuaTable
global record Nodeend
global record NodeId new: function(): NodeId entity: Engine.Entity index: integer end
global record NodeViewerData new: function(): NodeViewerData clone: function(NodeViewerData): NodeViewerData edgeIdx: integer colors: {Vec4f} order: integer width: number end
global record ParcelData leftEntities: {Engine.Entity} rightParcels: {Engine.Entity} end
global record ParsedSavegameName type: SaveGameType groupName: string ingameTimestamp: string fileTimestamp: string end
global record ParticleParamCurveFloat new: function(): ParticleParamCurveFloat
record CurvePoint new: function(): CurvePoint time: number value: number easing: integer end
curve: {CurvePoint} end
global record ParticleParamCurveVec2f new: function(): ParticleParamCurveVec2f
record CurvePoint new: function(): CurvePoint time: number value: Vec2f easing: integer end
curve: {CurvePoint} end
global record ParticleParamCurveVec3f new: function(): ParticleParamCurveVec3f
record CurvePoint new: function(): CurvePoint time: number value: Vec3f easing: integer end
curve: {CurvePoint} end
global record ParticleParamFloat new: function(): ParticleParamFloat
record RandomMinMax new: function(): RandomMinMax min: number max: number end
record ComponentWiseMinMax new: function(): ComponentWiseMinMax min: number max: number end
value: any end
global record ParticleParamVec2f new: function(): ParticleParamVec2f
record RandomMinMax new: function(): RandomMinMax min: Vec2f max: Vec2f end
record ComponentWiseMinMax new: function(): ComponentWiseMinMax min: Vec2f max: Vec2f end
value: any end
global record Path new: function(): Path edges: {{EdgeId, boolean}} endOffset: integer terminalDecisionOffset: integer earlyArrivalIndices: integer end
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
global record PathFactoryOutput
record LineSection line: Engine.Entity lineStop0: integer lineStop1: integer end
line0: LineSection line1: LineSection path: ExtPath cost: number moveMode: MoveMode end
global record PathPos new: function(): PathPos edgeIndex: integer pos: number pos01: number end
global record PathPosData position: Vec3f pPrime: Vec3f pPrimePrime: Vec3f end
global record PdxAccountInfo email: string end
global record PdxCountry name: string code: integer end
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
global record PdxFuture<T> getResult: function(PdxFuture<T>): T end
global record PdxLegalDocument title: string text: string end
global record PdxLegalDocumentType UserAgreement: PdxLegalDocumentType PrivacyPolicy: PdxLegalDocumentType end
global record PdxLoginResultend
global record PdxProfileResult id: string name: string end
global interface PdxResult success: boolean errorCode: PdxErrorCodes end
global record PdxThirdPartyAutoLoginPromptState NotShown: PdxThirdPartyAutoLoginPromptState Accepted: PdxThirdPartyAutoLoginPromptState Rejected: PdxThirdPartyAutoLoginPromptState end
global record PdxThirdPartyLinkState NeitherAccountHasLink: PdxThirdPartyLinkState ParadoxAccountHasLink: PdxThirdPartyLinkState ThirdPartyAccountHasLink: PdxThirdPartyLinkState BothAccountsHaveLinks: PdxThirdPartyLinkState BothAccountsAreLinked: PdxThirdPartyLinkState end
global record PlacementParams requiredIndustryTags: {string} tags: {string} distanceWeights: {string : number} allowedOnLand: boolean allowedOnWater: boolean buildOrder: integer initWeight: integer tier: integer weights: {string : number} end
global record Platform Windows: Platform Linux: Platform Mac: Platform XBoxSeries: Platform PS5: Platform PS: Platform XBox: Platform Desktop: Platform Console: Platform end
global record PlatformDeviceSpec gen: ConsoleGen resolution: Vec2i end
global record PlayerStatDesc id: string end
global record PlayerStatProgress id: string getValue: function(PlayerStatProgress): number end
global record PlayerStatRep get: function(playerStatRep : PlayerStatRep, statId : string): PlayerStatDesc end
global record PlaylistDesc name: string tracks: {PlaylistTrack} order: integer hidden: boolean allFilter: boolean end
global record PlaylistTrack name: string fileName: string yearFrom: integer yearTo: integer end
global record PortId nodeId: NodeId port: integer end
global record PowerUnit KW: PowerUnit HP: PowerUnit end
global record PrecedencePreference YES: PrecedencePreference NO: PrecedencePreference AUTO: PrecedencePreference end
global record PreviewColoringend
global record Proposal
record EdgeObject resultEntity: Engine.Entity category: integer modelInstance: ModelInstance playerEntity: Engine.Entity left: boolean end
record NodeAndEntity new: function(): NodeAndEntity entity: Engine.Entity comp: Engine.Component.BaseNode end
record 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 end
record BaseNodeLaneConnectionAndEntity new: function(): BaseNodeLaneConnectionAndEntity comp: Engine.Component.BaseNodeConfig entity: Engine.Entity end
record 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
record TransformedModel id: string tag: integer transf: Mat4f thin: boolean end
record Subconstruction models: {TransformedModel} models_native: Vector<TransformedModel> metadata: SubconstructionInstanceMetadata station: Station colliders: {Collider} end
record 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
record StreetTerminal cargo: boolean passengers: boolean capacity: integer wantSymmetric: boolean cargoUnload: boolean cargoLoad: boolean end
record Signal type: SignalType end
record ConstructionEntity fileName: ResName hasCargoPlatform: boolean desc: ConstructionDesc construction: Construction transf: Mat4f playerEntity: Engine.Entity end
record Terrain baseHeightMod: GridVec2f end
new: 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 end
global record ProposalData
record SubconstructionData station: Engine.Component.Station end
record ConstructionData boundingVolume: Engine.Component.BoundingVolume subconstructionDatas: {SubconstructionData} subconstructionDatas_native: Vector<SubconstructionData> end
record CollisionInfo
record EntityData entity: Engine.Entity end
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} end
record ErrorState critical: boolean messages: {string} warnings: {string} infos: {string} end
record ParallelStripProposal toAdd: {Engine.Component.BaseParallelStrip} toAdd_native: Vector<Engine.Component.BaseParallelStrip> toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> end
collisionInfo: 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 end
global record ProposalEventData proposal: Proposal data: ProposalData result: {Engine.Entity} end
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
record ConfigEntry modelLeft: string modelRight: string streetWidth: number end
end
global type ResName = string
global record RoadType STREET: RoadType TRACK: RoadType end
global record Runway type: RunwayType nodeId: NodeId edgeIds: {EdgeId} end
global record RunwayType LANDING: RunwayType TAKEOFF: RunwayType end
global record SaveGameData
record SaveGameDetails new: function(SaveGameDetails): SaveGameDetails metadata: GameMetadata mods: {Mod.ModId} configDict: {{string, string}} modParams: {string : {string : integer}} campaign: string mission: string end
new: function(SaveGameData): SaveGameData errorMsg: string info: SaveGameDetails end
global record SaveGameId new: function(): SaveGameId path: string saveGameName: string saveGameNamespace: string end
global record SaveGameInfo new: function(): SaveGameInfo equals: function(SaveGameInfo, SaveGameInfo): boolean size: integer timestamp: integer path: string modId: ModId saveName: string end
global record SaveGameStorageInfo totalSpace: number usedSpace: number end
global record SaveGameType Manual: SaveGameType Autosave: SaveGameType Crash: SaveGameType Exit: SaveGameType end
global record SavegameScriptMetadataend
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
global record ScriptParamDisplayMode Default: ScriptParamDisplayMode Compact: ScriptParamDisplayMode Horizontal: ScriptParamDisplayMode Vertical: ScriptParamDisplayMode Sparse: ScriptParamDisplayMode end
global record ScriptParamLocation Default: ScriptParamLocation Toolbar: ScriptParamLocation end
global record ScriptParamType Button: ScriptParamType Slider: ScriptParamType ComboBox: ScriptParamType IconButton: ScriptParamType CheckBox: ScriptParamType end
global record ScriptRef new: function(): ScriptRef fileName: string params: {<any type> : <any type>} end
global 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} end
global record Shape subShapes: {SubShape} generator: integer end
global record ShipInfo topSpeed: number maxTractiveEffort: number availablePower: number end
global record Signal
record Type SIGNAL: Type ONE_WAY_SIGNAL: Type WAYPOINT: Type end
edgePr: {EdgeId, boolean} type: Type state: integer stateTime: integer end
global record SignalId new: function(): SignalId entity: Engine.Entity index: integer end
global record SignalType PATH_SIGNAL: SignalType WAYPOINT: SignalType ONE_WAY_PATH_SIGNAL: SignalType end
global record SimpleProposal new: function(): SimpleProposal
record ConstructionEntity new: function(): ConstructionEntity fileName: string params: {<any type> : <any type>} transf: Mat4f name: string playerEntity: Engine.Entity autoFillSlots: boolean end
constructionsToAdd: {ConstructionEntity} constructionsToRemove: {Engine.Entity} old2new: {Engine.Entity : integer} streetProposal: SimpleStreetProposal end
global record SimpleStreetProposal
record EdgeObject new: function(): EdgeObject edgeEntity: Engine.Entity param: number oneWay: boolean left: boolean model: ResName playerEntity: Engine.Entity name: string end
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} end
global record Slot autoFill: boolean id: integer type: string transf: Mat4f spacing: Vec4f height: number shape: integer alignToTerrain: boolean replaceable: boolean end
global record SlotConfig maxModules: integer message: string skipCollisionCheck: boolean end
global record SoundAttributes gain: number refDist: number rolloffFact: number hasVelocity: boolean end
global record SoundClip name: string attrs: SoundAttributes end
global record SoundClipList names: {string} attrs: SoundAttributes end
global record SoundSet tracks: {SoundClip} events: {string : SoundClipList} updateScript: ScriptRef attrs: SoundAttributes end
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
global record StaticConstructionTemplate initialModules: {ResName : integer} end
global record Station
record Pool new: function(): Pool edges: {EdgeId} capacity: integer end
new: function(): Station tag: integer terminals: {Terminal} catchmentAreas: {CatchmentArea} pool: Pool end
global record StationTerminal new: function(): StationTerminal station: integer terminal: integer end
global type StockId = integer
global record StockListType InputStock: StockListType OutputStock: StockListType StorageStock: StockListType end
global record StopState empty: boolean noPath: boolean noPathFromAlternative: boolean noPathToAlternative: boolean duplicateStop: boolean incompatibleStop: boolean noPathLocation: boolean end
global record StreetGenerationMode new: function(): StreetGenerationMode end
global record StreetStyle categoryList: ModelMetadata.CategoryList trackStraightModel: {string, string, string, string} end
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
record Emissions noise: number pollution: number radius: number end
emissions: Emissions catenaryAdd: ResName catenaryRemove: ResName builderAudioRes: ResName end
global record SubShape faces: {{Vec3f}} startRule: integer height0: number height1: number end
global record SubconstructionInstanceMetadataend
global record TargetData entries: {TargetDataEntry} edges: {EdgePos} end
global record TargetDataEntry entity: Engine.Entity freeCapacity: integer capacity: integer edgeWalk: {integer, integer} edgeDrive: {integer, integer} isIndustry: boolean end
global record TargetsByLandUse targets: {TargetData, TargetData} end
global record Terminal vehicleNodeId: NodeId personNodes: {NodeId} personEdges: {EdgeId} vehicleEdges: {EdgePos} tag: integer cargoLoad: boolean passengersLoad: boolean cargoUnload: boolean passengersUnload: boolean transportModes: {TransportMode : boolean}
record TerminalCargoTransferSpeed cargoTypeSet: CargoTypeSet loadSpeedModifier: number length: number end
cargoTransferSpeeds: {TerminalCargoTransferSpeed} comfortFactor: number capacity: integer terminalAssignmentWeight: number end
global record TerrainAlignment triangles: {{Vec3f, Vec3f, Vec3f}} weights: {{number, number, number}} type: TerrainAlignmentType bbox: Box2f end
global record TerrainAlignmentType EQUAL: TerrainAlignmentType LESS: TerrainAlignmentType GREATER: TerrainAlignmentType end
global record TerrainGeneratorDesc new: function(): TerrainGeneratorDesc desc: ModelMetadata.Description order: integer editorOnly: boolean visible: boolean climate: string nodeTree: string params: {ScriptParam} end
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
global record ThinModelInstance modelId: integer pos: Vec3f rot: number scale: number end
global record TownBuildingParams landUseType: LandUseType level: integer parcelSize: Vec2i end
global record TownIndustryGenerationMode new: function(): TownIndustryGenerationMode numTownsToAdd: integer addIndustries: boolean showExistingTowns: boolean showExistingIndustries: boolean keepExistingTowns: boolean keepExistingIndustries: boolean end
global record TownInfo name: string position: Vec2f initialLandUseCapacities: {integer} landUse2CargoNeedsCategories: {LandUseType : {string}} majorStreetAngle: number initialMajorStreetAngle: number capacityScalingFactor: number end
global record TownProblem Disconnected: TownProblem Overlength: TownProblem end
global record TownResult toRemove: {Engine.Entity} toAdd: {TownInfo} end
global record TpNetData
record NodeData
record Port edgeId: EdgeId transitions: {integer} end
ports: {Port} end
record EdgeData ports: {PortId, PortId} equidistParams: {number} end
getNodeData: function(TpNetData, NodeId): NodeData getEdgeData: function(TpNetData, EdgeId): EdgeData end
global record TpNetLinkProposal
record Data link: {EdgePos, EdgePos} end
toRemove: {Data} toAdd: {Data} end
global record TrafficLightData state2lockedLanes: {{integer}} state2redLightModelIndices: {{integer}} state2duration: {number} animatedModels: {integer} end
global record TrafficLightPreference YES: TrafficLightPreference NO: TrafficLightPreference AUTO: TrafficLightPreference end
global record TrafficLightType availability: ModelMetadata.Availability description: ModelMetadata.Description cost: number categoryList: ModelMetadata.CategoryList menuCategory: ModelMetadata.MenuCategory tryOpposite: boolean modelScript: ScriptRef relativePath: string end
global record TramTrackType NO: TramTrackType YES: TramTrackType ELECTRIC: TramTrackType end
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
global record TransportVehicleConfig new: function(): TransportVehicleConfig vehicles: {TransportVehiclePart} vehicleGroups: {integer} muFileNames: {string} end
global record TransportVehicleInfo cargoInfos: {{{VehicleCargoInfo}}} end
global record TransportVehiclePart new: function(): TransportVehiclePart part: VehiclePart purchaseTime: integer maintenanceChange: number maintenanceState: number autoLoadConfig: {boolean} end
global record TransportVehicleState IN_DEPOT: TransportVehicleState EN_ROUTE: TransportVehicleState AT_TERMINAL: TransportVehicleState GOING_TO_DEPOT: TransportVehicleState end
global record TransportationStats passengersTransported: integer cargoTransported: integer end
global record UgcAccessLimitedReason None: UgcAccessLimitedReason NotSignedIn: UgcAccessLimitedReason Restricted: UgcAccessLimitedReason Error: UgcAccessLimitedReason end
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
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
global record Vec2i new: function(): Vec2i equals: function(Vec2i, Vec2i): boolean x: integer y: integer metamethod __add: function(Vec2i, Vec2i): Vec2i end
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
global 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 end
global 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 end
global 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> end
global record VehicleCargoInfo capacity: number offset: number end
global record VehicleData
record CarriageData offset: number reversed: boolean emissions: ModelMetadata.Emissions end
bounds: VehicleExtent length: number topSpeed: number brakeDeceleration: number carriages: {CarriageData} end
global record VehicleEngineType HORSE: VehicleEngineType STEAM: VehicleEngineType ELECTRIC: VehicleEngineType DIESEL: VehicleEngineType end
global record VehicleExtent back: number front: number end
global record VehicleIconType Bus: VehicleIconType Truck: VehicleIconType TrainSteam: VehicleIconType TrainElectric: VehicleIconType TrainDiesel: VehicleIconType Tram: VehicleIconType Aircraft: VehicleIconType Helicopter: VehicleIconType Ship: VehicleIconType end
global record VehiclePart new: function(): VehiclePart modelId: integer reversed: boolean compartment2loadConfig: {LoadConfig} color: Vec3f end
global record VehiclePartInfo
record Seat occupied: Engine.Entity animation: string crew: boolean end
seats: {Seat} count: number end
global record VehicleProblem NoPathElectric: integer NoPathShip: integer NoPathAircraft: integer NoPathGeneric: integer Blocked: integer end
global record VehicleState RUNNING: VehicleState STOPPING: VehicleState STOPPED: VehicleState ARRIVED: VehicleState end
global record Vendor Steam: Vendor Gog: Vendor Eos: Vendor MacAppstore: Vendor Microsoft: Vendor Sony: Vendor Dev: Vendor end
global record View getEye: function(View): Vec3f getCenter: function(View): Vec3f getUp: function(View): Vec3f isVisible: function(view : View, position : Vec3f, radius : number): boolean end
global record Waypoint new: function(): Waypoint clone: function(Waypoint): Waypoint equals: function(Waypoint, Waypoint) edgePos: EdgePos pos: Vec3f tag: integer end
global record WeightUnit T: WeightUnit KG: WeightUnit TN_SH: WeightUnit LB: WeightUnit end
global record ipairs_native<T> metamethod __call: function(ipairs<T>_native): function() : (integer, T) end
global record orderedPairs<T, V> metamethod __call: function(orderedPairs<T, V>, any): function() : (T, V) end
global record pairs_native<T, V> metamethod __call: function(pairs<T, V>_native): function() : (T, V) end
global recordDef: boolean

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

Parameters
  • achievementRep :AchievementRep — the achievement rep
Returns
  1. integer — the number of achievements

AchievementRep.get🔗

function AchievementRep.get(achievementRep : AchievementRep, index : integer): AchievementDesc

Get an achievement data by its index

Parameters
  • achievementRep :AchievementRep — the achievement rep
  • index :integer — the achievement index (use getNumAchievements to iterate over all achievement types)
Returns
  1. 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 AnyAxisend

AnyKey🔗

global record AnyKeyend

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): AppConfig
Parameters
  • AppConfig
Returns
  1. AppConfig

AppConfig.equals🔗

function AppConfig.equals(AppConfig, AppConfig): boolean
Parameters
  • AppConfig
  • AppConfig
Returns
  1. 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>): boolean
Parameters
  • Async<T>
Returns
  1. boolean

Async.get🔗

function Async.get(Async<T>): T

Block until the task is complete and then return its result

Parameters
  • Async<T>
Returns
  1. T

Async.abort🔗

function Async.abort(Async<T>)
Parameters
  • Async<T>

Async.getProgressMonitor🔗

function Async.getProgressMonitor(Async<T>): App.ProgressMonitor
Parameters
  • Async<T>
Returns
  1. App.ProgressMonitor

AudioEffectSettings🔗

global record AudioEffectSettings bulldozer: boolean construction: boolean end

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(): AutoGroundTex
Returns
  1. 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 end
record Animal new: function(): Animal populationDensityMultiplier: number useLocalSpawning: boolean localTileSize: number notifyAnimalDespawn: boolean end
record Locations new: function(): Locations
record IndustryParamList new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number end
record TownParamList new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number end
town: TownParamList industry: IndustryParamList makeInitialStreets: boolean end
record Terrain lodErrorMultiplier: number end
record Economy new: function(): Economy
record TownDevelopment cargoNeedsPerTown: integer townGrowthMinDistrictFraction: number end
record IndustryDevelopment spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number end
cargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment end
record Settings new: function(): Settings
record GeometryQualityOption new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number end
geometryQualityOptions: {GeometryQualityOption} end
record Water
record Textures foamNormal: string foamDetail: string foam: string end
textures: Textures end
record Particles
record Textures noise0: string noise1: string smoke: string smokeNormal: string end
textures: Textures end
record Emissions noiseLowerBoundDB: number noiseUpperBoundDB: number pollutionLowerBoundDB: number pollutionUpperBoundDB: number townNoiseResidentialAffected: boolean townNoiseCommercialAffected: boolean townNoiseIndustrialAffected: boolean end
animal: 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 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

Returns
  1. Animal

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(): Locations
record IndustryParamList new: function(): IndustryParamList absoluteMinimum: integer maxNumberPerArea: number industryDensity: number randomSize: boolean industryProductivity: number end
record TownParamList new: function(): TownParamList maxNumberPerArea: number allowInRoughTerrain: boolean townFrequency: number populationDensity: number end
town: TownParamList industry: IndustryParamList makeInitialStreets: boolean 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

Returns
  1. Locations

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

Returns
  1. IndustryParamList

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

Returns
  1. TownParamList

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(): Economy
record TownDevelopment cargoNeedsPerTown: integer townGrowthMinDistrictFraction: number end
record IndustryDevelopment spawnTargetTimeSpan: number spawnProbabilityExponent: number spawnIndustries: boolean unusedTimeSpan: number closureCountdownTimeSpan: number closureProbability: number extendTimeSpan: number end
cargoIncomeScript: ScriptRef passengerIncomeScript: ScriptRef townDevelopment: TownDevelopment industryDevelopment: IndustryDevelopment end

Configures cargo relations and industry developement for a single game

BaseConfig.Economy.new🔗

function BaseConfig.Economy.new(): Economy

Creates a new empty economy

Returns
  1. Economy

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(): Settings
record GeometryQualityOption new: function(): GeometryQualityOption viewNearFar: Vec2f fogStartEndFarPerc: Vec2f lodDistanceScaling: number end
geometryQualityOptions: {GeometryQualityOption} 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

Returns
  1. Settings

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

Returns
  1. GeometryQualityOption

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🔗

record BaseConfig.Water
record Textures foamNormal: string foamDetail: string foam: string end
textures: Textures end

Configures water look and feel

BaseConfig.Water.Textures🔗

record BaseConfig.Water.Textures foamNormal: string foamDetail: string foam: string end

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🔗

record BaseConfig.Particles
record Textures noise0: string noise1: string smoke: string smokeNormal: string end
textures: Textures end

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🔗

global record BaseEdgeType NORMAL: BaseEdgeType BRIDGE: BaseEdgeType TUNNEL: BaseEdgeType end

Base edge type

BaseEdgeType.NORMAL🔗

BaseEdgeType.NORMAL: BaseEdgeType

BaseEdgeType.BRIDGE🔗

BaseEdgeType.BRIDGE: BaseEdgeType

BaseEdgeType.TUNNEL🔗

BaseEdgeType.TUNNEL: BaseEdgeType

BoundingInfo🔗

global record BoundingInfo new: function(): BoundingInfo bbMax: Vec3f bbMin: Vec3f end

Information about the axis aligned bounding box of the model

BoundingInfo.new()🔗

function BoundingInfo.new()(): BoundingInfo

Creates a new empty bounding info

Returns
  1. BoundingInfo

BoundingInfo.new(Vec3f, Vec3f)🔗

function BoundingInfo.new(Vec3f, Vec3f)(bbMin : Vec3f, bbMax : Vec3f): BoundingInfo

Creates a new bounding info with specified bounds

Parameters
  • bbMin :Vec3f — Corner with lowest coordinates
  • bbMax :Vec3f — Corner with highest coordinates
Returns
  1. BoundingInfo

BoundingInfo.bbMax🔗

BoundingInfo.bbMax: Vec3f

Corner with lowest coordinates

BoundingInfo.bbMin🔗

BoundingInfo.bbMin: Vec3f

Corner with highest coordinates

Box2f🔗

global record Box2f new: function(): Box2f min: Vec3f max: Vec3f end

A 2d bounding box

Box2f.new()🔗

function Box2f.new()(): Box2f

Creates a new Box2f

Returns
  1. Box2f

Box2f.new(Vec2f, Vec2f)🔗

function Box2f.new(Vec2f, Vec2f)(Vec2f, Vec2f): Box2f

Creates a new Box2f

Parameters
  • Vec2f
  • Vec2f
Returns
  1. Box2f

Box2f.min🔗

Box2f.min: Vec3f

Minimum corner of the box

Box2f.max🔗

Box2f.max: Vec3f

Maximum corner of the box

Box3f🔗

global record Box3f new: function(): Box3f min: Vec3f max: Vec3f end

A 3d bounding box

Box3f.new()🔗

function Box3f.new()(): Box3f

Creates a new Box3f

Returns
  1. Box3f

Box3f.new(Vec3f, Vec3f)🔗

function Box3f.new(Vec3f, Vec3f)(Vec3f, Vec3f): Box3f

Creates a new Box3f

Parameters
  • Vec3f
  • Vec3f
Returns
  1. 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

Returns
  1. BridgeType

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🔗

global record BuildingType constructionFile: string params: TownBuildingParams end

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(): CampaignDesc
Returns
  1. 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()(): CargoClass
Returns
  1. CargoClass

CargoClass.new(CargoClass)🔗

function CargoClass.new(CargoClass)(CargoClass): CargoClass
Parameters
  • CargoClass
Returns
  1. 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()(): CargoType
Returns
  1. CargoType

CargoType.new(CargoType)🔗

function CargoType.new(CargoType)(CargoType): CargoType
Parameters
  • CargoType
Returns
  1. 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(): CargoTypeSet
Returns
  1. 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🔗

global record Carrier ROAD: Carrier RAIL: Carrier TRAM: Carrier OTHER: Carrier AIR: Carrier WATER: Carrier metamethod __index: function(Carrier, string): Carrier end

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): Carrier
Parameters
  • Carrier
  • string
Returns
  1. Carrier

CatchmentArea🔗

global record CatchmentArea position: Vec3f radius: number end

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(): ChartConfig
Returns
  1. 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): boolean
Parameters
  • ChartResult
  • ChartResult
Returns
  1. 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

Returns
  1. ClimateDesc

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🔗

global record Clock new: function(): Clock getTime: function(Clock): integer end

A very precise clock.

Clock.new🔗

function Clock.new(): Clock

Constructs a new intance of a clock and starts its timer

Returns
  1. Clock

Clock.getTime🔗

function Clock.getTime(Clock): integer

Get elapsed time since clock construction in microseconds

Parameters
  • Clock
Returns
  1. integer

Collider🔗

global record Collider
record Type NONE: Type BOX: Type CYLINDER: Type POINT_CLOUD: Type end
record Box halfExtents: Vec3f end
record Cylinder halfExtents: Vec3f end
record PointCloud points: {Vec3f} end
transf: Mat4f type: Type box: Box cylinder: Cylinder pointCloud: PointCloud end

Information about the collider of the model

Collider.Type🔗

record Collider.Type NONE: Type BOX: Type CYLINDER: Type POINT_CLOUD: Type end

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🔗

record Collider.Box halfExtents: Vec3f end

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🔗

record Collider.Cylinder halfExtents: Vec3f end

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🔗

record Collider.PointCloud points: {Vec3f} end

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(): CommandProgress
Returns
  1. CommandProgress

CommandProgress.get🔗

function CommandProgress.get(CommandProgress): number
Parameters
  • CommandProgress
Returns
  1. 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()(): ComponentCustomState
Returns
  1. ComponentCustomState

ComponentCustomState.new(ComponentCustomState)🔗

function ComponentCustomState.new(ComponentCustomState)(ComponentCustomState): Engine.Component.Line
Parameters
  • ComponentCustomState
Returns
  1. Engine.Component.Line

ComponentCustomState.state🔗

ComponentCustomState.state: {<any type> : <any type>}

Any lua table, as long as it is serializable

Connection🔗

global record Connection disconnect: function(Connection) end

An object used to disconnect callbacks.

Connection.disconnect🔗

function Connection.disconnect(Connection)

The callback will be no longer called

Parameters
  • Connection

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
record SnapConfig rail: boolean road: boolean water: boolean end
record EdgeObject minDistToCrossing: number snapToStreet: boolean snapToTrack: boolean catchmentCargo: boolean catchmentPassengers: boolean catchmentAreaRadius: number end
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 end

Describes a construction

ConstructionDesc.SnapConfig🔗

record ConstructionDesc.SnapConfig rail: boolean road: boolean water: boolean end

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): ConstructionDesc
Parameters
  • ConstructionDesc
Returns
  1. 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🔗

global record ConstructionDescMetadata
record EmissionConfig noise: number pollution: number end
emissionConfig: EmissionConfig end

ConstructionDescMetadata.EmissionConfig🔗

record ConstructionDescMetadata.EmissionConfig noise: number pollution: number end

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
enum Type "Button" "CheckBox" "ComboBox" "IconButton" "Slider" end
enum Location "Default" "Toolbar" end
enum DisplayMode "Compact" "Default" "Horizontal" "Sparse" "Vertical" end
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🔗

enum ConstructionScriptParam.Type "Button" "CheckBox" "ComboBox" "IconButton" "Slider" end

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🔗

enum ConstructionScriptParam.Location "Default" "Toolbar" end

ConstructionScriptParam.Location."Default"🔗

Default construction parameter panel

ConstructionScriptParam.Location."Toolbar"🔗

Toolbar area of construction panel

ConstructionScriptParam.DisplayMode🔗

enum ConstructionScriptParam.DisplayMode "Compact" "Default" "Horizontal" "Sparse" "Vertical" end

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🔗

global record ConstructionTemplate availability: ModelMetadata.Availability desc: ModelMetadata.Description data: ConstructionTemplateData menuCategory: ModelMetadata.MenuCategory builderAudioRes: ResName configureHudIconsScript: ScriptRef end

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(): Context
Returns
  1. 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.

Parameters
  • year :integer — Year
  • month :integer — Month (1-12)
  • day :integer — Day (1-31)
Returns
  1. Date — New Date

Date.new(integer)🔗

function Date.new(integer)(year : integer): Date

Creates a new date from year

Parameters
  • year :integer — Year
Returns
  1. Date — New Date

Date.now🔗

function Date.now(): Date

Get date of current day

Returns
  1. Date — Current date

Date.fromYear🔗

function Date.fromYear(integer : integer): Date

Create date at the first day of the given year

Parameters
  • integer :integer — year integer
Returns
  1. Date — A new Date

Date.fromString🔗

function Date.fromString(str : string): Date

Parse date from string

Parameters
  • str :string — Date string
Returns
  1. Date — Parsed date

Date.getEndOfMonth🔗

function Date.getEndOfMonth(current : Date): Date

Get the last day of the current month

Parameters
  • current :Date — Current date
Returns
  1. Date — Date representing end of month

Date.getDayOfWeek🔗

function Date.getDayOfWeek(current : Date): integer

Get the day of the week of the current date

Parameters
  • current :Date — Current date
Returns
  1. integer — The day of the week

Date.addOffsetDays🔗

function Date.addOffsetDays(date : Date, numDays : integer): Date

add offset in days

Parameters
  • date :Date — the date to offset
  • numDays :integer — number of days to add
Returns
  1. 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🔗

global record DistanceSpeedUnit Metric: DistanceSpeedUnit Imperial: DistanceSpeedUnit end

DistanceSpeedUnit represents the unit of measurement used for distance and speed.

DistanceSpeedUnit.Metric🔗

DistanceSpeedUnit.Metric: DistanceSpeedUnit

DistanceSpeedUnit.Imperial🔗

DistanceSpeedUnit.Imperial: DistanceSpeedUnit

DynamicConstructionTemplate🔗

global record DynamicConstructionTemplate params: {ScriptParam} end

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
record TownCargoLevelInfo new: function(): TownCargoLevelInfo minTier: integer maxTier: integer landUseType: LandUseType end
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 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()(): TownCargoLevelInfo
Returns
  1. TownCargoLevelInfo

EconomyDesc.TownCargoLevelInfo.new(TownCargoLevelInfo)🔗

function EconomyDesc.TownCargoLevelInfo.new(TownCargoLevelInfo)(TownCargoLevelInfo): TownCargoLevelInfo
Parameters
  • TownCargoLevelInfo
Returns
  1. 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

Returns
  1. EconomyDesc

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()(): EdgeDecoration
Returns
  1. EdgeDecoration

EdgeDecoration.new(EdgeDecoration)🔗

function EdgeDecoration.new(EdgeDecoration)(EdgeDecoration): EdgeDecoration
Parameters
  • EdgeDecoration
Returns
  1. 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
record Type ARC: Type STRAIGHT: Type CUBIC_SPLINE: Type CUBIC_OFFSET_SPLINE: Type end
record Arc new: function(): Arc center: Vec2f radius: number startAngle: number angle: number end
record Straight new: function(): Straight pos: {Vec2f} end
record CubicSpline new: function(): CubicSpline pos: {Vec2f} tangent: {Vec2f} end
record CubicOffsetSpline new: function(): CubicOffsetSpline pos: {Vec2f} tangent: {Vec2f} offset: number end
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} end

Defines the geometry (shape) of an edge

EdgeGeometry.Type🔗

record EdgeGeometry.Type ARC: Type STRAIGHT: Type CUBIC_SPLINE: Type CUBIC_OFFSET_SPLINE: Type end

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(): Arc
Returns
  1. 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🔗

record EdgeGeometry.Straight new: function(): Straight pos: {Vec2f} end

Straight line geometry parameters

EdgeGeometry.Straight.new🔗

function EdgeGeometry.Straight.new(): Straight
Returns
  1. Straight

EdgeGeometry.Straight.pos🔗

EdgeGeometry.Straight.pos: {Vec2f}

Start and end positions

EdgeGeometry.CubicSpline🔗

record EdgeGeometry.CubicSpline new: function(): CubicSpline pos: {Vec2f} tangent: {Vec2f} end

Cubic spline geometry parameters

EdgeGeometry.CubicSpline.new🔗

function EdgeGeometry.CubicSpline.new(): CubicSpline
Returns
  1. 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(): CubicOffsetSpline
Returns
  1. 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(): EdgeGeometry
Returns
  1. 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

Parameters
  • geom :EdgeGeometry — the edge geometry to sample
  • pos :Vec3f — a 3d world position to search for
  • maxSteps :integer — the maximum number of steps to perform
  • tol :number — a maximal distance for the point to be found
Returns
  1. {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]

Parameters
  • geom :EdgeGeometry — the edge geometry to sample
  • param :number — a number in [0, 1]
Returns
  1. {Vec3f, Vec3f, Vec3f} — the position, tangent and second derivative at the specified param

EdgeId🔗

global record EdgeId new: function(): EdgeId entity: Engine.Entity index: integer end

References a single transport network edge within a transport network entity

EdgeId.new()🔗

function EdgeId.new()(): EdgeId
Returns
  1. EdgeId

EdgeId.new(integer, integer)🔗

function EdgeId.new(integer, integer)(entity : integer, index : integer): EdgeId

Constructor with entity and index

Parameters
  • entity :integer — The TransportNetwork entity
  • index :integer — The zero-based index within the edges field of the TransportNetwork component
Returns
  1. 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🔗

global record EdgeIsect
record Info index: integer param: number pos: Vec3f end
infos: {Info, Info} end

Specifies the intersection of two edges, with waiting area for vehicles.

EdgeIsect.Info🔗

record EdgeIsect.Info index: integer param: number pos: Vec3f end

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🔗

global record EdgePos new: function(): EdgePos equals: function(EdgePos, EdgePos): boolean edgeId: EdgeId param: number end

References a position inside an EdgeId

EdgePos.new()🔗

function EdgePos.new()(): EdgePos
Returns
  1. EdgePos

EdgePos.new(EdgePos)🔗

function EdgePos.new(EdgePos)(EdgePos): EdgePos

Copy constructor

Parameters
  • EdgePos
Returns
  1. EdgePos

EdgePos.equals🔗

function EdgePos.equals(EdgePos, EdgePos): boolean
Parameters
  • EdgePos
  • EdgePos
Returns
  1. 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
record AthmostphereParams new: function(): AthmostphereParams cloudCoverage: number cloudBase: number cloudTop: number cloudScattering: number dayOfYear: number sunRotation: number end
new: function(): Environment atmosphere: AthmostphereParams name: string isToolEnvironment: boolean 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(): AthmostphereParams
Returns
  1. 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(): Environment
Returns
  1. Environment

Environment.atmosphere🔗

Environment.atmosphere: AthmostphereParams

Environment.name🔗

Environment.name: string

Environment.isToolEnvironment🔗

Environment.isToolEnvironment: boolean

ExtPath🔗

global record ExtPath
record ExtPathEdge range: EdgeRange link: LinkEdge
record EdgeRange edgeId: EdgeId params: {number, number} dir: boolean end
record LinkEdge points: {EdgePos, EdgePos} end
end
edges: {ExtPathEdge} end

A path comprised of EdgePathEdges that does not necessarily start/end on a Port

ExtPath.ExtPathEdge🔗

record ExtPath.ExtPathEdge range: EdgeRange link: LinkEdge
record EdgeRange edgeId: EdgeId params: {number, number} dir: boolean end
record LinkEdge points: {EdgePos, EdgePos} end
end

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🔗

record ExtPath.ExtPathEdge.EdgeRange edgeId: EdgeId params: {number, number} dir: boolean end

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🔗

record ExtPath.ExtPathEdge.LinkEdge points: {EdgePos, EdgePos} end

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🔗

global record Extent new: function(): Extent bbMax: Vec3f bbMin: Vec3f end

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

Returns
  1. Extent

Extent.new(Vec3f, Vec3f)🔗

function Extent.new(Vec3f, Vec3f)(bbMin : Vec3f, bbMax : Vec3f): Extent

Creates a new bounding info with specified bounds

Parameters
  • bbMin :Vec3f — Corner with lowest coordinates
  • bbMax :Vec3f — Corner with highest coordinates
Returns
  1. Extent

Extent.bbMax🔗

Extent.bbMax: Vec3f

Corner with lowest coordinates

Extent.bbMin🔗

Extent.bbMin: Vec3f

Corner with highest coordinates

Failure🔗

global record Failure
record Reason Unkown: Reason NoPath: Reason NoElectric: Reason NoTram: Reason NoTramButTramTrack: Reason NoTramTrackButRail: Reason NoRail: Reason NoRoad: Reason NoSmallAircraft: Reason NoSmallShip: Reason end
reason: Reason pos: Vec3f end

Failure.Reason🔗

record Failure.Reason Unkown: Reason NoPath: Reason NoElectric: Reason NoTram: Reason NoTramButTramTrack: Reason NoTramTrackButRail: Reason NoRail: Reason NoRoad: Reason NoSmallAircraft: Reason NoSmallShip: Reason end

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): boolean
Parameters
  • FinanceData
  • FinanceData
Returns
  1. 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
  • FinanceData
  • integer
Returns
  1. {JournalEntry.Type, JournalEntry.Maintenance, JournalEntry.Construction}

FinanceData.foreach_carrier🔗

function FinanceData.foreach_carrier(FinanceData, function(JournalEntry.Carrier, {integer : {integer}}))
Parameters
  • FinanceData
  • function(JournalEntry.Carrier, {integer : {integer}})

FinanceData.foreach_transport🔗

function FinanceData.foreach_transport(FinanceData, function(integer, {integer}), JournalEntry.Carrier)
Parameters
  • FinanceData
  • function(integer, {integer})
  • JournalEntry.Carrier

FinanceData.foreach_investment🔗

function FinanceData.foreach_investment(FinanceData, function(integer, {integer}))
Parameters
  • FinanceData
  • function(integer, {integer})

FinanceData.foreach_other🔗

function FinanceData.foreach_other(FinanceData, function(JournalEntry.Other, {integer}))
Parameters
  • FinanceData
  • function(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🔗

global record FontScaleClass Small: FontScaleClass Medium: FontScaleClass Large: FontScaleClass end

FontScaleClass represents the current UI font scaling factor.

FontScaleClass.Small🔗

FontScaleClass.Small: FontScaleClass

FontScaleClass.Medium🔗

FontScaleClass.Medium: FontScaleClass

FontScaleClass.Large🔗

FontScaleClass.Large: FontScaleClass

ForceUnit🔗

global record ForceUnit KN: ForceUnit KGF: ForceUnit LBF: ForceUnit end

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🔗

global record GPUCapabilities hasDiscreteGPU: boolean hasUnsupportedGPU: boolean end

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 end
record Industry new: function(): Industry pos: Vec2f angle: number onWater: boolean fileName: string tag: string existing: Engine.Entity end
record MapTree add: function(category : GameMap.MapTree, position : string, Vec3f) end
record MapAsset add: function(category : GameMap.MapAsset, position : string, Mat4f) end
record Tree id: integer pos: Vec3f end
record Asset id: integer transf: Mat4f end
new: 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 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(): Town
Returns
  1. 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🔗

record GameMap.Industry new: function(): Industry pos: Vec2f angle: number onWater: boolean fileName: string tag: string existing: Engine.Entity end

Information about industries on a map

GameMap.Industry.new🔗

function GameMap.Industry.new(): Industry
Returns
  1. 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🔗

record GameMap.MapTree add: function(category : GameMap.MapTree, position : string, Vec3f) end

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

Parameters
  • category :GameMap.MapTree — The tree category
  • position :string — The world position
  • Vec3f

GameMap.MapAsset🔗

record GameMap.MapAsset add: function(category : GameMap.MapAsset, position : string, Mat4f) end

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

Parameters
  • category :GameMap.MapAsset — The asset category
  • position :string — The world transform
  • Mat4f

GameMap.Tree🔗

record GameMap.Tree id: integer pos: Vec3f end

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🔗

record GameMap.Asset id: integer transf: Mat4f end

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()(): GameMap
Returns
  1. GameMap

GameMap.new(GameMap)🔗

function GameMap.new(GameMap)(GameMap): GameMap

Copy constructor

Parameters
  • GameMap
Returns
  1. GameMap

GameMap.setHeightMap🔗

function GameMap.setHeightMap(GameMap, integer, number)
Parameters
  • GameMap
  • integer
  • number

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()(): GameScriptDesc
Returns
  1. GameScriptDesc

GameScriptDesc.new(GameScriptDesc)🔗

function GameScriptDesc.new(GameScriptDesc)(GameScriptDesc): GameScriptDesc
Parameters
  • GameScriptDesc
Returns
  1. 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🔗

global record Gender FEMALE: Gender MALE: Gender end

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

Returns
  1. GenericGameRes

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

Parameters
  • GenericGameRes
  • {<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

Returns
  1. GenericGameResT<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

Parameters
  • GenericGameResT<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

Parameters
  • GridCollisionSystem
  • Vec2f
Returns
  1. integer

GridVec2f🔗

global record GridVec2f new: function(): GridVec2f width: integer height: integer x0: integer y0: integer at: function(grid : GridVec2f, pos : Vec2i): Vec2f end

A 2D grid of Vec2f values

GridVec2f.new()🔗

function GridVec2f.new()(): GridVec2f

Creates a new empty grid.

Returns
  1. GridVec2f — 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.

Parameters
  • x0 :integer — X offset of the grid
  • y0 :integer — Y offset of the grid
  • width :integer — Grid width
  • height :integer — Grid height
Returns
  1. 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.

Parameters
  • x0 :integer — X offset of the grid
  • y0 :integer — Y offset of the grid
  • width :integer — Grid width
  • height :integer — Grid height
  • value :number — Initial value for all cells
Returns
  1. 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

Parameters
  • grid :GridVec2f — Grid to query
  • pos :Vec2i — Grid position
Returns
  1. Vec2f — Vec2f value at position

Gridf🔗

global record Gridf new: function(): Gridf width: integer height: integer at: function(pos : Vec2i): number end

A 2D grid of float values

Gridf.new()🔗

function Gridf.new()(): Gridf

Creates a new empty grid.

Returns
  1. Gridf — 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.

Parameters
  • x0 :integer — X offset of the grid
  • y0 :integer — Y offset of the grid
  • width :integer — Grid width
  • height :integer — Grid height
Returns
  1. 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.

Parameters
  • x0 :integer — X offset of the grid
  • y0 :integer — Y offset of the grid
  • width :integer — Grid width
  • height :integer — Grid height
  • value :number — Initial value for all cells
Returns
  1. 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.

Parameters
  • pos :Vec2i — Grid position
Returns
  1. 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
record Data data: {<any type> : <any type>} size: integer end
end

Specification for ground textures

GroundTexture.new()🔗

function GroundTexture.new()(): GroundTexture
Returns
  1. GroundTexture

GroundTexture.new(GroundTexture)🔗

function GroundTexture.new(GroundTexture)(GroundTexture): GroundTexture
Parameters
  • GroundTexture
Returns
  1. 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🔗

record GroundTexture.Data data: {<any type> : <any type>} size: integer end

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(): HeighmapGenerationMode
Returns
  1. 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)

Returns
  1. Vec2i

HeightmapNew.at🔗

function HeightmapNew.at(x : integer, y : integer): number

Get the value of the heightmap at the given x, y coordinate

Parameters
  • x :integer — x coordinate
  • y :integer — y coordinate
Returns
  1. 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(): ImportExportHeightmapMode
Returns
  1. 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🔗

global record IndustryResult toRemove: {Engine.Entity} toAdd: {IndustryInfo} end

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: Simple
1: AxisLinear
2: 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
Returns
  1. {string}

InputActionRep.get🔗

function InputActionRep.get(InputActionRep, string): InputActionDesc
Parameters
  • InputActionRep
  • string
Returns
  1. InputActionDesc

InputMode🔗

global record InputMode Undefined: InputMode KeyboardMouse: InputMode Gamepad: InputMode end

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): KeyCombo
Parameters
  • KeyComboDef
Returns
  1. KeyCombo

KeyCombo.toString🔗

function KeyCombo.toString(KeyCombo): string
Parameters
  • KeyCombo
Returns
  1. string

KeyCombo.isModifierOnly🔗

function KeyCombo.isModifierOnly(KeyCombo): boolean
Parameters
  • KeyCombo
Returns
  1. boolean

KeyCombo.relevantFor🔗

function KeyCombo.relevantFor(KeyCombo, InputMode): boolean
Parameters
  • KeyCombo
  • InputMode
Returns
  1. 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()(): KeyComboDef
Returns
  1. KeyComboDef

KeyComboDef.new(KeyComboDef)🔗

function KeyComboDef.new(KeyComboDef)(KeyComboDef): KeyComboDef
Parameters
  • KeyComboDef
Returns
  1. KeyComboDef

KeyComboDef.setKeyScancode🔗

function KeyComboDef.setKeyScancode(KeyComboDef, integer)

Set the trigger key to this scancode (ignored if scancode is a modifier key)

Parameters
  • KeyComboDef
  • integer

KeyComboDef.addModifierKey🔗

function KeyComboDef.addModifierKey(KeyComboDef, integer)

Add a modifier scancode to this combination (ignored if scancode is not a modifier key)

Parameters
  • KeyComboDef
  • integer

KeyComboDef.condition🔗

KeyComboDef.condition: integer

Trigger condition for the key combination


0: Initial trigger on keydown or when conflicting longpress is rejected

1: 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🔗

global record LangKey new: function(): LangKey equals: function(LangKey, LangKey): boolean code: string mod: Mod.ModId end

Localization information

LangKey.new🔗

function LangKey.new(): LangKey
Returns
  1. LangKey

LangKey.equals🔗

function LangKey.equals(LangKey, LangKey): boolean
Parameters
  • LangKey
  • LangKey
Returns
  1. 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🔗

global record LanguageRep getAllLanguages: function(LanguageRep): {{string, LangKey}} end

Contains all available languages of the application, including languages added by mods

LanguageRep.getAllLanguages🔗

function LanguageRep.getAllLanguages(LanguageRep): {{string, LangKey}}
Parameters
  • LanguageRep
Returns
  1. {{string, LangKey}}

LayerConfig🔗

global record LayerConfig new: function(): LayerConfig
record EmissionColorMap new: function(): EmissionColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} end
record VisualizationType DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType end
colors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType end
record TerrainColorMap new: function(): TerrainColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean end
colors: Colors end
record TerrainContours new: function(): TerrainContours
record Contour new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number end
contours: {Contour} end
record ColorPassFn new: function(): ColorPassFn
record BaseColor new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean end
record BaseMappedColor new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean end
record BaseRangeColor new: function(): BaseRangeColor minMax: {Vec4f} overrideColorMap: boolean end
record CargoColor new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean end
record DestinationColor new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer end
record EmissionEmitterColor new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number end
record EmissionImpactColor new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number end
record FallbackColor new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor end
record IndustryColor new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean end
record LandUseColor new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor end
record LineVehicleColor new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} end
record MaintainedTransportVehicleColor new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity end
record StationOvercrowdedColor new: function(): StationOvercrowdedColor color: BaseMappedColor end
record SpeedLimitsColor new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean end
record TrafficColor new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean end
record HappinessColor new: function(): HappinessColor normalToPoor: {BaseColor} end
terrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor end
record BuildingRenderableConfig new: function(): BuildingRenderableConfig isVisible: boolean includeTownBuildings: boolean includeTownBuildingModels: boolean includeTownBuildingMainModel: boolean includeIndustries: boolean includeWarehouses: boolean includeStations: boolean includeEdges: boolean end
record 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
record 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
record PlotsRenderableConfig new: function(): PlotsRenderableConfig triangles: {Vec2f} end
record SignConfig new: function(): SignConfig signRenderDistance: number end
record CargoEdgesRenderables new: function(): CargoEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} showPlayerTransport: boolean showPrivateTransport: boolean playerTransportColor: {Vec4f, Vec4f} privateTransportColor: {Vec4f, Vec4f} numTransportLevels: integer signConfig: SignConfig end
record SatisfactionEdgesRenderables new: function(): SatisfactionEdgesRenderables town: Engine.Entity cargoTypes: {CargoTypeId} colors: {Vec4f} thresholds: {number} signConfig: SignConfig end
record 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
record TrafficEdgesRenderables new: function(): TrafficEdgesRenderables trafficColor: {Vec4f, Vec4f, Vec4f} undergroundTrafficColor: {Vec4f, Vec4f, Vec4f} numberOfLevels: integer discrete: boolean tunnelOutlineColor: Vec4f tunnelOutlineSize: number end
record VoronoiRenderableConfig new: function(): VoronoiRenderableConfig showTowns: boolean townsOfInterest: {Engine.Entity} showMapBorder: boolean lineWidth: number colors: {Vec4f} sectionsPerColor: integer fadingMinHeight: number fadingDeltaHeight: number end
record WindRenderableConfig new: function(): WindRenderableConfig isVisible: boolean emissionType: Engine.Component.EmissionGrid.Type end
record CargoFlowRenderableConfig new: function(): CargoFlowRenderableConfig
record FlowData new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
flowData: {FlowData} end
colorMap: 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 end

Describes configuration for 3d layers that can be enabled with the react interface

LayerConfig.new()🔗

function LayerConfig.new()(): LayerConfig
Returns
  1. LayerConfig

LayerConfig.new(LayerConfig)🔗

function LayerConfig.new(LayerConfig)(LayerConfig): LayerConfig
Parameters
  • LayerConfig
Returns
  1. LayerConfig

LayerConfig.EmissionColorMap🔗

record LayerConfig.EmissionColorMap new: function(): EmissionColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} end
record VisualizationType DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType end
colors: Colors currentEmissionId: Engine.Component.EmissionGrid.Type visualizationType: VisualizationType end

Colors entities and terrain based on

LayerConfig.EmissionColorMap.new()🔗

function LayerConfig.EmissionColorMap.new()(): EmissionColorMap
Returns
  1. EmissionColorMap

LayerConfig.EmissionColorMap.new(EmissionColorMap)🔗

function LayerConfig.EmissionColorMap.new(EmissionColorMap)(EmissionColorMap): EmissionColorMap
Parameters
  • EmissionColorMap
Returns
  1. 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()(): Colors
Returns
  1. Colors

LayerConfig.EmissionColorMap.Colors.new(Colors)🔗

function LayerConfig.EmissionColorMap.Colors.new(Colors)(Colors): Colors
Parameters
  • Colors
Returns
  1. 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🔗

record LayerConfig.EmissionColorMap.VisualizationType DecibelCurrent: VisualizationType DecibelAverage: VisualizationType Combined: VisualizationType end

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(): TerrainColorMap
record Colors new: function(): Colors numberOfLevels: integer colors: {Vec4f} thresholds: {number} water: Vec4f navigableWater: Vec4f interpolateNavigableWater: boolean end
colors: Colors 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

Returns
  1. TerrainColorMap

LayerConfig.TerrainColorMap.new(TerrainColorMap)🔗

function LayerConfig.TerrainColorMap.new(TerrainColorMap)(TerrainColorMap): TerrainColorMap

Copy constructs a TerrainColorMap

Parameters
  • TerrainColorMap
Returns
  1. 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()(): Colors
Returns
  1. Colors

LayerConfig.TerrainColorMap.Colors.new(Colors)🔗

function LayerConfig.TerrainColorMap.Colors.new(Colors)(Colors): Colors
Parameters
  • Colors
Returns
  1. 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(): TerrainContours
record Contour new: function(): Contour color: Vec4f level: number thickness: number fadeDistance: number end
contours: {Contour} end

Configuration for contour lines

LayerConfig.TerrainContours.new()🔗

function LayerConfig.TerrainContours.new()(): TerrainContours
Returns
  1. TerrainContours

LayerConfig.TerrainContours.new(TerrainContours)🔗

function LayerConfig.TerrainContours.new(TerrainContours)(TerrainContours): TerrainContours
Parameters
  • TerrainContours
Returns
  1. 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()(): Contour
Returns
  1. Contour

LayerConfig.TerrainContours.Contour.new(Contour)🔗

function LayerConfig.TerrainContours.Contour.new(Contour)(Contour): Contour
Parameters
  • Contour
Returns
  1. 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(): ColorPassFn
record BaseColor new: function(BaseColor): BaseColor fromColor: function(Vec4f, boolean): BaseColor value: Vec4f overrideColorMap: boolean end
record BaseMappedColor new: function(): BaseMappedColor thresholds: {number} colors: {Vec4f} nearest: boolean overrideColorMap: boolean end
record BaseRangeColor new: function(): BaseRangeColor minMax: {Vec4f} overrideColorMap: boolean end
record CargoColor new: function(): CargoColor clone: function(CargoColor): CargoColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer includePassengers: boolean end
record DestinationColor new: function(): DestinationColor town: Engine.Entity showPlayerTransport: boolean showPrivateTransport: boolean residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor numBuildingLevels: integer end
record EmissionEmitterColor new: function(): EmissionEmitterColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type lowerBound: number upperBound: number goodColor: BaseRangeColor goodColorLowerBound: number goodColorUpperBound: number end
record EmissionImpactColor new: function(): EmissionImpactColor color: BaseRangeColor currentEmissionId: Engine.Component.EmissionGrid.Type useAverage: boolean lowerBoundDB: number upperBoundDB: number end
record FallbackColor new: function(): FallbackColor terrain: BaseColor water: BaseColor edge: BaseColor node: BaseColor parallelStrip: BaseColor whatever: BaseColor end
record IndustryColor new: function(): IndustryColor industry: BaseColor onlyWithPersonCapacity: boolean end
record LandUseColor new: function(): LandUseColor residential: BaseRangeColor industrial: BaseRangeColor commercial: BaseRangeColor end
record LineVehicleColor new: function(): LineVehicleColor highlightedEntities: {Engine.Entity} carriers: {Carrier} end
record MaintainedTransportVehicleColor new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity end
record StationOvercrowdedColor new: function(): StationOvercrowdedColor color: BaseMappedColor end
record SpeedLimitsColor new: function(): SpeedLimitsColor slowToFast: {BaseColor} numberOfLevels: integer hideNonPlayerOwned: boolean hideNonLocked: boolean end
record TrafficColor new: function(): TrafficColor poorToGood: {BaseColor} numberOfLevels: integer discrete: boolean end
record HappinessColor new: function(): HappinessColor normalToPoor: {BaseColor} end
terrainPainter: any waterPainter: any townBuildingPainter: any industryPainter: any emissionEmitterPainter: any stationPainter: any warehousePainter: any transportNetworkPainter: any transportVehiclePainter: any landVehiclePainter: any simAtTerminalPainter: any fallbackColor: FallbackColor 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

Returns
  1. ColorPassFn

LayerConfig.ColorPassFn.new(ColorPassFn)🔗

function LayerConfig.ColorPassFn.new(ColorPassFn)(ColorPassFn): ColorPassFn

Copy the color pass function

Parameters
  • ColorPassFn
Returns
  1. 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

Parameters
  • BaseColor
Returns
  1. BaseColor

LayerConfig.ColorPassFn.BaseColor.fromColor🔗

function LayerConfig.ColorPassFn.BaseColor.fromColor(Vec4f, boolean): BaseColor

Create an instance of base color from a color

Parameters
  • Vec4f
  • boolean
Returns
  1. 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()(): BaseMappedColor
Returns
  1. BaseMappedColor

LayerConfig.ColorPassFn.BaseMappedColor.new(BaseMappedColor)🔗

function LayerConfig.ColorPassFn.BaseMappedColor.new(BaseMappedColor)(BaseMappedColor): BaseMappedColor
Parameters
  • BaseMappedColor
Returns
  1. BaseMappedColor

LayerConfig.ColorPassFn.BaseMappedColor.new({number}, {Vec4f}, boolean, boolean)🔗

function LayerConfig.ColorPassFn.BaseMappedColor.new({number}, {Vec4f}, boolean, boolean)({number}, {Vec4f}, boolean, boolean): BaseRangeColor
Parameters
  • {number}
  • {Vec4f}
  • boolean
  • boolean
Returns
  1. 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

Returns
  1. BaseRangeColor

LayerConfig.ColorPassFn.BaseRangeColor.new(BaseRangeColor)🔗

function LayerConfig.ColorPassFn.BaseRangeColor.new(BaseRangeColor)(BaseRangeColor): BaseRangeColor

Constructs a copy of the input color range

Parameters
  • BaseRangeColor
Returns
  1. 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
Returns
  1. 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

Returns
  1. CargoColor

LayerConfig.ColorPassFn.CargoColor.clone🔗

function LayerConfig.ColorPassFn.CargoColor.clone(CargoColor): CargoColor

Constructs a copy of the input cargo color

Parameters
  • CargoColor
Returns
  1. 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

Returns
  1. DestinationColor

LayerConfig.ColorPassFn.DestinationColor.new(DestinationColor)🔗

function LayerConfig.ColorPassFn.DestinationColor.new(DestinationColor)(DestinationColor): DestinationColor

Copies a given destination color

Parameters
  • DestinationColor
Returns
  1. 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

Returns
  1. EmissionEmitterColor

LayerConfig.ColorPassFn.EmissionEmitterColor.new(EmissionEmitterColor)🔗

function LayerConfig.ColorPassFn.EmissionEmitterColor.new(EmissionEmitterColor)(EmissionEmitterColor): EmissionImpactColor

Creates a new copy of an instance of EmissionEmitterColor

Parameters
  • EmissionEmitterColor
Returns
  1. 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()(): EmissionImpactColor
Returns
  1. EmissionImpactColor

LayerConfig.ColorPassFn.EmissionImpactColor.new(EmissionImpactColor)🔗

function LayerConfig.ColorPassFn.EmissionImpactColor.new(EmissionImpactColor)(EmissionImpactColor): EmissionImpactColor
Parameters
  • EmissionImpactColor
Returns
  1. 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

Returns
  1. FallbackColor

LayerConfig.ColorPassFn.FallbackColor.new(FallbackColor)🔗

function LayerConfig.ColorPassFn.FallbackColor.new(FallbackColor)(FallbackColor): FallbackColor

Creates a copy of FallbackColor

Parameters
  • FallbackColor
Returns
  1. 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

Returns
  1. IndustryColor

LayerConfig.ColorPassFn.IndustryColor.new(IndustryColor)🔗

function LayerConfig.ColorPassFn.IndustryColor.new(IndustryColor)(IndustryColor): IndustryColor

Creates a copy of an existing IndustryColor

Parameters
  • IndustryColor
Returns
  1. 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

Returns
  1. LandUseColor

LayerConfig.ColorPassFn.LandUseColor.new(LandUseColor)🔗

function LayerConfig.ColorPassFn.LandUseColor.new(LandUseColor)(LandUseColor): LandUseColor

Creates a copy of an existing LandUseColor

Parameters
  • LandUseColor
Returns
  1. 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

Returns
  1. LineVehicleColor

LayerConfig.ColorPassFn.LineVehicleColor.new(LineVehicleColor)🔗

function LayerConfig.ColorPassFn.LineVehicleColor.new(LineVehicleColor)(LineVehicleColor): LandUseColor

Creates a copy of an existing LineVehicleColor

Parameters
  • LineVehicleColor
Returns
  1. 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🔗

record LayerConfig.ColorPassFn.MaintainedTransportVehicleColor new: function(): MaintainedTransportVehicleColor color: BaseColor maintenanceStationEntity: Engine.Entity end

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

Returns
  1. MaintainedTransportVehicleColor

LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new(MaintainedTransportVehicleColor)🔗

function LayerConfig.ColorPassFn.MaintainedTransportVehicleColor.new(MaintainedTransportVehicleColor)(MaintainedTransportVehicleColor): MaintainedTransportVehicleColor

Creates a copy of an existing MaintainedTransportVehicleColor

Parameters
  • MaintainedTransportVehicleColor
Returns
  1. 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

Returns
  1. StationOvercrowdedColor

LayerConfig.ColorPassFn.StationOvercrowdedColor.new(StationOvercrowdedColor)🔗

function LayerConfig.ColorPassFn.StationOvercrowdedColor.new(StationOvercrowdedColor)(StationOvercrowdedColor): StationOvercrowdedColor

Creates a copy of an existing StationOvercrowdedColor

Parameters
  • StationOvercrowdedColor
Returns
  1. 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

Returns
  1. SpeedLimitsColor

LayerConfig.ColorPassFn.SpeedLimitsColor.new(SpeedLimitsColor)🔗

function LayerConfig.ColorPassFn.SpeedLimitsColor.new(SpeedLimitsColor)(SpeedLimitsColor): SpeedLimitsColor

Creates a copy of an existing SpeedLimitsColor

Parameters
  • SpeedLimitsColor
Returns
  1. 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

Returns
  1. TrafficColor

LayerConfig.ColorPassFn.TrafficColor.new(TrafficColor)🔗

function LayerConfig.ColorPassFn.TrafficColor.new(TrafficColor)(TrafficColor): TrafficColor

Creates a copy of an existing TrafficColor

Parameters
  • TrafficColor
Returns
  1. 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

Returns
  1. HappinessColor

LayerConfig.ColorPassFn.HappinessColor.new(HappinessColor)🔗

function LayerConfig.ColorPassFn.HappinessColor.new(HappinessColor)(HappinessColor): HappinessColor

Creates a copy of an existing HappinessColor

Parameters
  • HappinessColor
Returns
  1. 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

Returns
  1. BuildingRenderableConfig

LayerConfig.BuildingRenderableConfig.new(BuildingRenderableConfig)🔗

function LayerConfig.BuildingRenderableConfig.new(BuildingRenderableConfig)(BuildingRenderableConfig): BuildingRenderableConfig

Creates a copy of BuildingRenderableConfig object

Parameters
  • BuildingRenderableConfig
Returns
  1. 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

Returns
  1. CatchmentAreaDisplaySettings

LayerConfig.CatchmentAreaDisplaySettings.new(CatchmentAreaDisplaySettings)🔗

function LayerConfig.CatchmentAreaDisplaySettings.new(CatchmentAreaDisplaySettings)(CatchmentAreaDisplaySettings): CatchmentAreaDisplaySettings

Creates a copy of CatchmentAreaDisplaySettings object

Parameters
  • CatchmentAreaDisplaySettings
Returns
  1. 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()(): CatchmentAreaRenderableConfig
Returns
  1. CatchmentAreaRenderableConfig

LayerConfig.CatchmentAreaRenderableConfig.new(CatchmentAreaRenderableConfig)🔗

function LayerConfig.CatchmentAreaRenderableConfig.new(CatchmentAreaRenderableConfig)(CatchmentAreaRenderableConfig): VoronoiRenderableConfig
Parameters
  • CatchmentAreaRenderableConfig
Returns
  1. 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()(): PlotsRenderableConfig
Returns
  1. PlotsRenderableConfig

LayerConfig.PlotsRenderableConfig.new(PlotsRenderableConfig)🔗

function LayerConfig.PlotsRenderableConfig.new(PlotsRenderableConfig)(PlotsRenderableConfig): PlotsRenderableConfig
Parameters
  • PlotsRenderableConfig
Returns
  1. PlotsRenderableConfig

LayerConfig.PlotsRenderableConfig.triangles🔗

LayerConfig.PlotsRenderableConfig.triangles: {Vec2f}

LayerConfig.SignConfig🔗

record LayerConfig.SignConfig new: function(): SignConfig signRenderDistance: number end

Configures the texttual display on edges

LayerConfig.SignConfig.new()🔗

function LayerConfig.SignConfig.new()(): SignConfig

Creates an empty SignConfig object

Returns
  1. SignConfig

LayerConfig.SignConfig.new(SignConfig)🔗

function LayerConfig.SignConfig.new(SignConfig)(SignConfig): SignConfig

Copies a given SignConfig object

Parameters
  • SignConfig
Returns
  1. 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

Returns
  1. CargoEdgesRenderables

LayerConfig.CargoEdgesRenderables.new(CargoEdgesRenderables)🔗

function LayerConfig.CargoEdgesRenderables.new(CargoEdgesRenderables)(CargoEdgesRenderables): CargoEdgesRenderables

Creates a copy of an object of type CargoEdgesRenderables

Parameters
  • CargoEdgesRenderables
Returns
  1. 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

Returns
  1. SatisfactionEdgesRenderables

LayerConfig.SatisfactionEdgesRenderables.new(SatisfactionEdgesRenderables)🔗

function LayerConfig.SatisfactionEdgesRenderables.new(SatisfactionEdgesRenderables)(SatisfactionEdgesRenderables): SatisfactionEdgesRenderables

Creates a copy of an object of type SatisfactionEdgesRenderables

Parameters
  • SatisfactionEdgesRenderables
Returns
  1. 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

Returns
  1. SpeedLimitsEdgesRenderables

LayerConfig.SpeedLimitsEdgesRenderables.new(SpeedLimitsEdgesRenderables)🔗

function LayerConfig.SpeedLimitsEdgesRenderables.new(SpeedLimitsEdgesRenderables)(SpeedLimitsEdgesRenderables): SpeedLimitsEdgesRenderables

Creates a copy of an object of type SpeedLimitsEdgesRenderables

Parameters
  • SpeedLimitsEdgesRenderables
Returns
  1. 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

Returns
  1. TrafficEdgesRenderables

LayerConfig.TrafficEdgesRenderables.new(TrafficEdgesRenderables)🔗

function LayerConfig.TrafficEdgesRenderables.new(TrafficEdgesRenderables)(TrafficEdgesRenderables): TrafficEdgesRenderables

Creates a copy of an object of type TrafficEdgesRenderables

Parameters
  • TrafficEdgesRenderables
Returns
  1. 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

Returns
  1. VoronoiRenderableConfig

LayerConfig.VoronoiRenderableConfig.new(VoronoiRenderableConfig)🔗

function LayerConfig.VoronoiRenderableConfig.new(VoronoiRenderableConfig)(VoronoiRenderableConfig): VoronoiRenderableConfig

Creates a copy of an object of type VoronoiRenderableConfig

Parameters
  • VoronoiRenderableConfig
Returns
  1. 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

Returns
  1. WindRenderableConfig

LayerConfig.WindRenderableConfig.new(WindRenderableConfig)🔗

function LayerConfig.WindRenderableConfig.new(WindRenderableConfig)(WindRenderableConfig): WindRenderableConfig

Creates a copy of an object of type WindRenderableConfig

Parameters
  • WindRenderableConfig
Returns
  1. 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(): CargoFlowRenderableConfig
record FlowData new: function(): FlowData from: Vec3f to: Vec3f speed: number arrowColors: {Vec4f} cargoIconAlpha: number cargoTypes: {CargoTypeId} end
flowData: {FlowData} end

Configure 3d cargo flow arrows

LayerConfig.CargoFlowRenderableConfig.new()🔗

function LayerConfig.CargoFlowRenderableConfig.new()(): CargoFlowRenderableConfig

Creates a new empty object of type CargoFlowRenderableConfig

Returns
  1. CargoFlowRenderableConfig

LayerConfig.CargoFlowRenderableConfig.new(CargoFlowRenderableConfig)🔗

function LayerConfig.CargoFlowRenderableConfig.new(CargoFlowRenderableConfig)(CargoFlowRenderableConfig): CargoFlowRenderableConfig

Creates a copy of an object of type CargoFlowRenderableConfig

Parameters
  • CargoFlowRenderableConfig
Returns
  1. 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()(): FlowData
Returns
  1. FlowData

LayerConfig.CargoFlowRenderableConfig.FlowData.new(FlowData)🔗

function LayerConfig.CargoFlowRenderableConfig.FlowData.new(FlowData)(FlowData): FlowData
Parameters
  • FlowData
Returns
  1. 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
record Type NowhereToLoad: Type NowhereToUnload: Type NoVehicleToLoadCargo: Type VehicleUseless: Type LineCargoConfig: Type None: Type end
type: Type stopIndex: integer cargoType: CargoTypeId end

LineIssue.Type🔗

record LineIssue.Type NowhereToLoad: Type NowhereToUnload: Type NoVehicleToLoadCargo: Type VehicleUseless: Type LineCargoConfig: Type None: Type end

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🔗

global record LineVehicleInfo transportModes: {TransportMode : boolean} end

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(): LoadConfig
Returns
  1. LoadConfig

LoadConfig.loadConfigIndex🔗

LoadConfig.loadConfigIndex: integer

Index of the load configuration

LoadConfig.cargoTypeId🔗

LoadConfig.cargoTypeId: CargoTypeId

Type of cargo to load

LoaderHelper🔗

global record LoaderHelper useFn: function(LoaderHelper, string) end

Helper class that allows loading and calling files in other modules

LoaderHelper.useFn🔗

function LoaderHelper.useFn(LoaderHelper, string)
Parameters
  • LoaderHelper
  • string

LogLevel🔗

global record LogLevel Raw: LogLevel Error: LogLevel Warning: LogLevel Message: LogLevel Verbose: LogLevel end

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🔗

global 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 end
Type Parameters
  • K
  • V

Map.find🔗

function Map.find(Map<K, V>, K): V
Parameters
  • Map<K, V>
  • K
Returns
  1. V

Map.insert🔗

function Map.insert(Map<K, V>, K, V)
Parameters
  • Map<K, V>
  • K
  • V

Map.size🔗

function Map.size(Map<K, V>): integer
Parameters
  • Map<K, V>
Returns
  1. integer

Map.asTable🔗

function Map.asTable(Map<K, V>): {K : V}
Parameters
  • Map<K, V>
Returns
  1. {K : V}

Map.next🔗

function Map.next(K): K
Parameters
  • K
Returns
  1. 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.

Returns
  1. Mat4f — Identity matrix

Mat4f.new(Vec4f)🔗

function Mat4f.new(Vec4f)(v : Vec4f): Mat4f

Creates a new matrix from Vec4f.

Parameters
  • v :Vec4f — Vec4f to initialize all columns
Returns
  1. 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.

Parameters
  • col1 :Vec4f — First column
  • col2 :Vec4f — Second column
  • col3 :Vec4f — Third column
  • col4 :Vec4f — Fourth column
Returns
  1. Mat4f — New Mat4f

Mat4f.clone🔗

function Mat4f.clone(Mat4f): Mat4f

Create a copy of the matrix

Parameters
  • Mat4f
Returns
  1. Mat4f — Cloned matrix

Mat4f.cols🔗

function Mat4f.cols(matrix : Mat4f, colIndex : integer): Vec4f

Get column vector at index

Parameters
  • matrix :Mat4f — the matrix
  • colIndex :integer — Column index (1-4)
Returns
  1. Vec4f — Column vector

Mat4f.getTransl🔗

function Mat4f.getTransl(Mat4f): Vec3f

Get translation component of the matrix

Parameters
  • Mat4f
Returns
  1. Vec3f — Translation vector

Mat4f.setTransl🔗

function Mat4f.setTransl(v : Mat4f, Vec3f): Mat4f

Set translation component of the matrix

Parameters
  • v :Mat4f — Translation vector
  • Vec3f
Returns
  1. Mat4f — Modified matrix

Mat4f.transformPosition🔗

function Mat4f.transformPosition(v : Mat4f, Vec3f): Vec3f

Transform a position by the matrix

Parameters
  • v :Mat4f — Position to transform
  • Vec3f
Returns
  1. Vec3f — Transformed position

Mat4f.transformDirection🔗

function Mat4f.transformDirection(v : Mat4f, Vec3f): Vec3f

Transform a direction by the matrix

Parameters
  • v :Mat4f — Direction to transform
  • Vec3f
Returns
  1. Vec3f — Transformed direction

Mat4f.rotZ🔗

function Mat4f.rotZ(angle : number): Mat4f

Creates a new Z-axis rotation

Parameters
  • angle :number — Rotation angle in radians
Returns
  1. Mat4f — Rotation matrix

Mat4f.rotY🔗

function Mat4f.rotY(angle : number): Mat4f

Creates a new Y-axis rotation

Parameters
  • angle :number — Rotation angle in radians
Returns
  1. Mat4f — Rotation matrix

Mat4f.rotX🔗

function Mat4f.rotX(angle : number): Mat4f

Creates a new X-axis rotation

Parameters
  • angle :number — Rotation angle in radians
Returns
  1. Mat4f — Rotation matrix

Mat4f.rotZTransl🔗

function Mat4f.rotZTransl(angle : number, transl : Vec3f): Mat4f

Creates a new Z-axis rotation matrix plus translation

Parameters
  • angle :number — Rotation angle in radians
  • transl :Vec3f — Translation vector
Returns
  1. 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

Parameters
  • angles :Vec2f — Rotation angles (x: Z angle, y: Y angle)
  • transl :Vec3f — Translation vector
Returns
  1. Mat4f — Transformation matrix

Mat4f.scale🔗

function Mat4f.scale(scale : Vec3f): Mat4f

Create scale matrix

Parameters
  • scale :Vec3f — Scale factors
Returns
  1. 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

Parameters
  • scale :Vec3f — Scale factors
  • angle :number — Rotation angle in radians
  • transl :Vec3f — Translation vector
Returns
  1. Mat4f — Transformation matrix

Mat4f.scaleTransl🔗

function Mat4f.scaleTransl(scale : Vec3f, transl : Vec3f): Mat4f

Creates a new translation and scaling matrix

Parameters
  • scale :Vec3f — Scale factors
  • transl :Vec3f — Translation vector
Returns
  1. Mat4f — Transformation matrix

Mat4f.transl🔗

function Mat4f.transl(transl : Vec3f): Mat4f

Creates a new translation matrix

Parameters
  • transl :Vec3f — Translation vector
Returns
  1. Mat4f — Translation matrix

Mat4f.$meta.__index🔗

metamethod Mat4f.$meta.__index(Mat4f, integer): number
Parameters
  • Mat4f
  • integer
Returns
  1. number

Mat4f.$meta.__add🔗

metamethod Mat4f.$meta.__add(Mat4f, Mat4f): Mat4f
Parameters
  • Mat4f
  • Mat4f
Returns
  1. Mat4f

Mat4f.$meta.__sub🔗

metamethod Mat4f.$meta.__sub(Mat4f, Mat4f): Mat4f
Parameters
  • Mat4f
  • Mat4f
Returns
  1. Mat4f

Mat4f.$meta.__mul🔗

metamethod Mat4f.$meta.__mul(Mat4f, Mat4f): Mat4f
Parameters
  • Mat4f
  • Mat4f
Returns
  1. 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

Parameters
  • MetaConstructionDesc
Returns
  1. 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🔗

global record MissionCampaign campaign: ResName mission: ResName end

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 end
record Star id: string name: string description: string iconLocked: string iconCompleted: string end
record Character name: string info: string portrait: string end
name: 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}} 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🔗

record MissionDesc.Character name: string info: string portrait: string end

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
Returns
  1. {Mod.ModId}

ModRep.exists(ModRep, Mod.ModId)🔗

function ModRep.exists(ModRep, Mod.ModId)(ModRep, Mod.ModId): boolean
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. boolean

ModRep.exists(ModRep, Mod.ModId)🔗

function ModRep.exists(ModRep, Mod.ModId)(ModRep, Mod.ModId): boolean
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. boolean

ModRep.getModDesc🔗

function ModRep.getModDesc(ModRep, Mod.ModId): Mod.ModDesc
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. Mod.ModDesc

ModRep.getModSize🔗

function ModRep.getModSize(ModRep, Mod.ModId): Mod.ModSize
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. Mod.ModSize

ModRep.getGameModDesc🔗

function ModRep.getGameModDesc(ModRep, Mod.ModId): Mod.GameModDesc
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. Mod.GameModDesc

ModRep.getModSource🔗

function ModRep.getModSource(ModRep, Mod.ModId): string
Parameters
  • ModRep
  • Mod.ModId
Returns
  1. string

ModRep.wouldForceActivateAchievements🔗

function ModRep.wouldForceActivateAchievements(ModRep, {Mod.ModId}): boolean
Parameters
  • ModRep
  • {Mod.ModId}
Returns
  1. boolean

ModRep.couldAchievementsBeEarned🔗

function ModRep.couldAchievementsBeEarned(ModRep, {Mod.ModId}): boolean
Parameters
  • ModRep
  • {Mod.ModId}
Returns
  1. 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
record MovementType description: string end
record Config density: number fish: boolean end
config: Config movementTypes: {MovementType} idForAchievement: string end
record 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
record Category categories: {string} end
record CategoryList categories: {string} end
record MenuCategory
record CategoryWithOrder new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} end
categories: {CategoryWithOrder} end
record Availability yearFrom: integer yearTo: integer notifyWhenAvailable: boolean notificationGroup: string notificationSortKey: integer end
record SoundConfig
record SoundSet name: string end
soundSet: SoundSet effects: {string : {string}} builderAudioRes: ResName end
record Maintenance lifespan: integer runningCosts: number runningCostScale: number maintenanceScale: number topSpeedMaintenanceFactorPenaltyPerLevel: number end
record Emission idle: number speed: number power: number score: number end
record Emissions noise: Emission pollution: Emission end
record VehicleEngine power: number tractiveEffort: number type: VehicleEngineType end
record TransportVehicle
record CargoEntry cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string end
record LoadConfig new: function(): LoadConfig cargoEntry: CargoEntry toHide: {string} end
record Compartment loadConfigs: {LoadConfig} end
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 end
record Cost priceScale: number price: integer end
record LandVehicle topSpeed: number weightEmpty: number weightMaxPayload: number engines: {VehicleEngine} friction: number end
record WaterVehicle topSpeed: number weightEmpty: number weightMaxPayload: number availPower: number maxRpm: number area: number end
record AirVehicle topSpeed: number weightEmpty: number weightMaxPayload: number maxThrust: number isHelicopter: boolean end
record Person gender: Gender end
record Tree reputationFactor: number end
end

Contains all metadata of a model. A specific metadata might be nil.

ModelMetadata.Animal🔗

record ModelMetadata.Animal
record MovementType description: string end
record Config density: number fish: boolean end
config: Config movementTypes: {MovementType} idForAchievement: string end

ModelMetadata.Animal.MovementType🔗

record ModelMetadata.Animal.MovementType description: string end

ModelMetadata.Animal.MovementType.description🔗

ModelMetadata.Animal.MovementType.description: string

ModelMetadata.Animal.Config🔗

record ModelMetadata.Animal.Config density: number fish: boolean end

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
record CategoryWithOrder new: function(): CategoryWithOrder category: string order: integer filterCategories: {string} end
categories: {CategoryWithOrder} 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(): CategoryWithOrder
Returns
  1. 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
record SoundSet name: string end
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🔗

record ModelMetadata.Emission idle: number speed: number power: number score: number end

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🔗

record ModelMetadata.Emissions noise: Emission pollution: Emission end

ModelMetadata.Emissions.noise🔗

ModelMetadata.Emissions.noise: Emission

ModelMetadata.Emissions.pollution🔗

ModelMetadata.Emissions.pollution: Emission

ModelMetadata.VehicleEngine🔗

record ModelMetadata.VehicleEngine power: number tractiveEffort: number type: VehicleEngineType end

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
record CargoEntry cargoTypeSet: CargoTypeSet capacity: integer seats: {integer} loadIndicator: string end
record LoadConfig new: function(): LoadConfig cargoEntry: CargoEntry toHide: {string} end
record Compartment loadConfigs: {LoadConfig} end
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 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(): LoadConfig
Returns
  1. LoadConfig

ModelMetadata.TransportVehicle.LoadConfig.cargoEntry🔗

ModelMetadata.TransportVehicle.LoadConfig.cargoEntry: CargoEntry

ModelMetadata.TransportVehicle.LoadConfig.toHide🔗

ModelMetadata.TransportVehicle.LoadConfig.toHide: {string}

ModelMetadata.TransportVehicle.Compartment🔗

record ModelMetadata.TransportVehicle.Compartment loadConfigs: {LoadConfig} end

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🔗

record ModelMetadata.Cost priceScale: number price: integer end

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🔗

record ModelMetadata.Person gender: Gender end

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

Returns
  1. Modifiers

Modifiers.new(Modifiers)🔗

function Modifiers.new(Modifiers)(Modifiers): Modifiers

Create a copy of a Modifier object

Parameters
  • Modifiers
Returns
  1. Modifiers

Modifiers.equals🔗

function Modifiers.equals(Modifiers, Modifiers): boolean

Compare Modifier for equality

Parameters
  • Modifiers
  • Modifiers
Returns
  1. 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(): ModuleDesc
Returns
  1. 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🔗

global record MoneyMode RAW: MoneyMode KMB: MoneyMode end

MoneyMode represents the money mode.

MoneyMode.RAW🔗

MoneyMode.RAW: MoneyMode

MoneyMode.KMB🔗

MoneyMode.KMB: MoneyMode

MoveMode🔗

global record MoveMode WALK: MoveMode DRIVE: MoveMode LINES: MoveMode end

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
record Vehicle name: string forward: boolean end
end

Specification for multiple units

MultipleUnit.new()🔗

function MultipleUnit.new()(): MultipleUnit

Create a new MultipleUnit object

Returns
  1. MultipleUnit

MultipleUnit.new(MultipleUnit)🔗

function MultipleUnit.new(MultipleUnit)(MultipleUnit): MultipleUnit

Create a copy of a MultiplUnit object

Parameters
  • MultipleUnit
Returns
  1. 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🔗

record MultipleUnit.Vehicle name: string forward: boolean end

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): NativeLuaValue
Parameters
  • NativeLuaTable
  • NativeLuaValue
Returns
  1. NativeLuaValue

NativeLuaTable.findPath🔗

function NativeLuaTable.findPath(NativeLuaTable, {NativeLuaValue}): NativeLuaValue
Parameters
  • NativeLuaTable
  • {NativeLuaValue}
Returns
  1. NativeLuaValue

NativeLuaTable.insert🔗

function NativeLuaTable.insert(NativeLuaTable, NativeLuaValue, any)
Parameters
  • NativeLuaTable
  • NativeLuaValue
  • any

NativeLuaTable.insert_native🔗

function NativeLuaTable.insert_native(NativeLuaTable, NativeLuaValue, NativeLuaValue)
Parameters
  • NativeLuaTable
  • NativeLuaValue
  • NativeLuaValue

NativeLuaTable.remove🔗

function NativeLuaTable.remove(NativeLuaTable, NativeLuaValue)
Parameters
  • NativeLuaTable
  • NativeLuaValue

NativeLuaTable.size🔗

function NativeLuaTable.size(NativeLuaTable): integer
Parameters
  • NativeLuaTable
Returns
  1. integer

NativeLuaTable.asTable🔗

function NativeLuaTable.asTable(NativeLuaTable): {<any type> : <any type>}
Parameters
  • NativeLuaTable
Returns
  1. {<any type> : <any type>}

NativeLuaTable.clone🔗

function NativeLuaTable.clone(NativeLuaTable): NativeLuaTable
Parameters
  • NativeLuaTable
Returns
  1. NativeLuaTable

NativeLuaTable.next🔗

function NativeLuaTable.next(NativeLuaTable, NativeLuaValue): NativeLuaValue
Parameters
  • NativeLuaTable
  • NativeLuaValue
Returns
  1. NativeLuaValue

NativeLuaValue🔗

global type NativeLuaValue = string | number | boolean | nil | NativeLuaTable

Node🔗

global record Nodeend

A single node within a TRANSPORT_NETWORK component.

NodeId🔗

global record NodeId new: function(): NodeId entity: Engine.Entity index: integer end

References a single transport network node within a transport network entity

NodeId.new()🔗

function NodeId.new()(): NodeId
Returns
  1. NodeId

NodeId.new(Engine.Entity, integer)🔗

function NodeId.new(Engine.Entity, integer)(entity : Engine.Entity, index : integer): NodeId

Constructor

Parameters
  • entity :Engine.Entity — The TransportNetwork entity
  • index :integer — The zero-based index within the nodes field of the TransportNetwork component
Returns
  1. 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(): NodeViewerData
Returns
  1. NodeViewerData

NodeViewerData.clone🔗

function NodeViewerData.clone(NodeViewerData): NodeViewerData
Parameters
  • NodeViewerData
Returns
  1. 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🔗

global record ParcelData leftEntities: {Engine.Entity} rightParcels: {Engine.Entity} end

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
record CurvePoint new: function(): CurvePoint time: number value: number easing: integer end
curve: {CurvePoint} end

Particle system parameter curve for float values

ParticleParamCurveFloat.new()🔗

function ParticleParamCurveFloat.new()(): ParticleParamCurveFloat

Creates a new particle parameter curve

Returns
  1. ParticleParamCurveFloat

ParticleParamCurveFloat.new({CurvePoint})🔗

function ParticleParamCurveFloat.new({CurvePoint})({CurvePoint}): ParticleParamCurveFloat

Creates a new particle parameter curve with curve points

Parameters
  • {CurvePoint}
Returns
  1. 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()(): CurvePoint
Returns
  1. CurvePoint

ParticleParamCurveFloat.CurvePoint.new(number, number, integer)🔗

function ParticleParamCurveFloat.CurvePoint.new(number, number, integer)(number, number, integer): CurvePoint
Parameters
  • number
  • number
  • integer
Returns
  1. 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
record CurvePoint new: function(): CurvePoint time: number value: Vec2f easing: integer end
curve: {CurvePoint} end

Particle system parameter curve for vec2f values

ParticleParamCurveVec2f.new()🔗

function ParticleParamCurveVec2f.new()(): ParticleParamCurveVec2f

Creates a new particle parameter curve

Returns
  1. ParticleParamCurveVec2f

ParticleParamCurveVec2f.new({CurvePoint})🔗

function ParticleParamCurveVec2f.new({CurvePoint})({CurvePoint}): ParticleParamCurveVec2f

Creates a new particle parameter curve with curve points

Parameters
  • {CurvePoint}
Returns
  1. 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()(): CurvePoint
Returns
  1. CurvePoint

ParticleParamCurveVec2f.CurvePoint.new(number, Vec2f, integer)🔗

function ParticleParamCurveVec2f.CurvePoint.new(number, Vec2f, integer)(number, Vec2f, integer): CurvePoint
Parameters
  • number
  • Vec2f
  • integer
Returns
  1. 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
record CurvePoint new: function(): CurvePoint time: number value: Vec3f easing: integer end
curve: {CurvePoint} end

Particle system parameter curve for vec3f values

ParticleParamCurveVec3f.new()🔗

function ParticleParamCurveVec3f.new()(): ParticleParamCurveVec3f

Creates a new particle parameter curve

Returns
  1. ParticleParamCurveVec3f

ParticleParamCurveVec3f.new({CurvePoint})🔗

function ParticleParamCurveVec3f.new({CurvePoint})({CurvePoint}): ParticleParamCurveVec3f

Creates a new particle parameter curve with curve points

Parameters
  • {CurvePoint}
Returns
  1. 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()(): CurvePoint
Returns
  1. CurvePoint

ParticleParamCurveVec3f.CurvePoint.new(number, Vec3f, integer)🔗

function ParticleParamCurveVec3f.CurvePoint.new(number, Vec3f, integer)(number, Vec3f, integer): CurvePoint
Parameters
  • number
  • Vec3f
  • integer
Returns
  1. 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🔗

global record ParticleParamFloat new: function(): ParticleParamFloat
record RandomMinMax new: function(): RandomMinMax min: number max: number end
record ComponentWiseMinMax new: function(): ComponentWiseMinMax min: number max: number end
value: any end

Particle system parameter for float values

ParticleParamFloat.new()🔗

function ParticleParamFloat.new()(): ParticleParamFloat

Creates a new particle parameter

Returns
  1. ParticleParamFloat

ParticleParamFloat.new(number)🔗

function ParticleParamFloat.new(number)(number): ParticleParamFloat

Creates a new particle parameter with a value

Parameters
  • number
Returns
  1. ParticleParamFloat

ParticleParamFloat.new(RandomMinMax)🔗

function ParticleParamFloat.new(RandomMinMax)(RandomMinMax): ParticleParamFloat

Creates a new particle parameter with a range

Parameters
  • RandomMinMax
Returns
  1. ParticleParamFloat

ParticleParamFloat.new(ComponentWiseMinMax)🔗

function ParticleParamFloat.new(ComponentWiseMinMax)(ComponentWiseMinMax): ParticleParamFloat

Creates a new particle parameter with a component-wise range

Parameters
  • ComponentWiseMinMax
Returns
  1. ParticleParamFloat

ParticleParamFloat.RandomMinMax🔗

record ParticleParamFloat.RandomMinMax new: function(): RandomMinMax min: number max: number end

Random min/max range for particle parameters

ParticleParamFloat.RandomMinMax.new()🔗

function ParticleParamFloat.RandomMinMax.new()(): RandomMinMax
Returns
  1. RandomMinMax

ParticleParamFloat.RandomMinMax.new(number, number)🔗

function ParticleParamFloat.RandomMinMax.new(number, number)(number, number): RandomMinMax
Parameters
  • number
  • number
Returns
  1. 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()(): ComponentWiseMinMax
Returns
  1. ComponentWiseMinMax

ParticleParamFloat.ComponentWiseMinMax.new(number, number)🔗

function ParticleParamFloat.ComponentWiseMinMax.new(number, number)(number, number): ComponentWiseMinMax
Parameters
  • number
  • number
Returns
  1. 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🔗

global record ParticleParamVec2f new: function(): ParticleParamVec2f
record RandomMinMax new: function(): RandomMinMax min: Vec2f max: Vec2f end
record ComponentWiseMinMax new: function(): ComponentWiseMinMax min: Vec2f max: Vec2f end
value: any end

Particle system parameter for vec2f values

ParticleParamVec2f.new()🔗

function ParticleParamVec2f.new()(): ParticleParamVec2f

Creates a new particle parameter

Returns
  1. ParticleParamVec2f

ParticleParamVec2f.new(Vec2f)🔗

function ParticleParamVec2f.new(Vec2f)(Vec2f): ParticleParamVec2f

Creates a new particle parameter with a value

Parameters
  • Vec2f
Returns
  1. ParticleParamVec2f

ParticleParamVec2f.new(RandomMinMax)🔗

function ParticleParamVec2f.new(RandomMinMax)(RandomMinMax): ParticleParamVec2f

Creates a new particle parameter with a range

Parameters
  • RandomMinMax
Returns
  1. ParticleParamVec2f

ParticleParamVec2f.new(ComponentWiseMinMax)🔗

function ParticleParamVec2f.new(ComponentWiseMinMax)(ComponentWiseMinMax): ParticleParamVec2f

Creates a new particle parameter with a component-wise range

Parameters
  • ComponentWiseMinMax
Returns
  1. ParticleParamVec2f

ParticleParamVec2f.RandomMinMax🔗

record ParticleParamVec2f.RandomMinMax new: function(): RandomMinMax min: Vec2f max: Vec2f end

Random min/max range for particle parameters

ParticleParamVec2f.RandomMinMax.new()🔗

function ParticleParamVec2f.RandomMinMax.new()(): RandomMinMax
Returns
  1. RandomMinMax

ParticleParamVec2f.RandomMinMax.new(Vec2f, Vec2f)🔗

function ParticleParamVec2f.RandomMinMax.new(Vec2f, Vec2f)(Vec2f, Vec2f): RandomMinMax
Parameters
  • Vec2f
  • Vec2f
Returns
  1. 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()(): ComponentWiseMinMax
Returns
  1. ComponentWiseMinMax

ParticleParamVec2f.ComponentWiseMinMax.new(Vec2f, Vec2f)🔗

function ParticleParamVec2f.ComponentWiseMinMax.new(Vec2f, Vec2f)(Vec2f, Vec2f): ComponentWiseMinMax
Parameters
  • Vec2f
  • Vec2f
Returns
  1. 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

Returns
  1. Path

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
record LineSection line: Engine.Entity lineStop0: integer lineStop1: integer end
line0: LineSection line1: LineSection path: ExtPath cost: number moveMode: MoveMode end

Output result from pathfinding

PathFactoryOutput.LineSection🔗

record PathFactoryOutput.LineSection line: Engine.Entity lineStop0: integer lineStop1: integer end

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🔗

global record PathPos new: function(): PathPos edgeIndex: integer pos: number pos01: number end

The position on a Path

PathPos.new🔗

function PathPos.new(): PathPos

Create a new instance of a PathPos object

Returns
  1. PathPos

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🔗

global record PathPosData position: Vec3f pPrime: Vec3f pPrimePrime: Vec3f end

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🔗

global record PdxCountry name: string code: integer end

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🔗

global record PdxFuture<T> getResult: function(PdxFuture<T>): T end
Type Parameters
  • T

PdxFuture.getResult🔗

function PdxFuture.getResult(PdxFuture<T>): T
Parameters
  • PdxFuture<T>
Returns
  1. T

PdxLegalDocument🔗

global record PdxLegalDocument title: string text: string end

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 PdxLoginResultend

PdxProfileResult🔗

global record PdxProfileResult id: string name: string end

PdxProfileResult.id🔗

PdxProfileResult.id: string

PdxProfileResult.name🔗

PdxProfileResult.name: string

PdxResult🔗

global interface PdxResult success: boolean errorCode: PdxErrorCodes end

PdxResult.success🔗

PdxResult.success: boolean

PdxResult.errorCode🔗

PdxResult.errorCode: PdxErrorCodes

PdxThirdPartyAutoLoginPromptState🔗

global record PdxThirdPartyAutoLoginPromptState NotShown: PdxThirdPartyAutoLoginPromptState Accepted: PdxThirdPartyAutoLoginPromptState Rejected: PdxThirdPartyAutoLoginPromptState end

PdxThirdPartyAutoLoginPromptState.NotShown🔗

PdxThirdPartyAutoLoginPromptState.NotShown: PdxThirdPartyAutoLoginPromptState

PdxThirdPartyAutoLoginPromptState.Accepted🔗

PdxThirdPartyAutoLoginPromptState.Accepted: PdxThirdPartyAutoLoginPromptState

PdxThirdPartyAutoLoginPromptState.Rejected🔗

PdxThirdPartyAutoLoginPromptState.Rejected: PdxThirdPartyAutoLoginPromptState

PdxThirdPartyLinkState🔗

global record PdxThirdPartyLinkState NeitherAccountHasLink: PdxThirdPartyLinkState ParadoxAccountHasLink: PdxThirdPartyLinkState ThirdPartyAccountHasLink: PdxThirdPartyLinkState BothAccountsHaveLinks: PdxThirdPartyLinkState BothAccountsAreLinked: PdxThirdPartyLinkState end

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🔗

global record Platform Windows: Platform Linux: Platform Mac: Platform XBoxSeries: Platform PS5: Platform PS: Platform XBox: Platform Desktop: Platform Console: Platform end

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🔗

global record PlatformDeviceSpec gen: ConsoleGen resolution: Vec2i end

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🔗

global record PlayerStatProgress id: string getValue: function(PlayerStatProgress): number end

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)

Parameters
  • PlayerStatProgress
Returns
  1. 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

Parameters
  • playerStatRep :PlayerStatRep — the player start rep
  • statId :string — the player stat id
Returns
  1. 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🔗

global record PlaylistTrack name: string fileName: string yearFrom: integer yearTo: integer end

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🔗

global record PortId nodeId: NodeId port: integer end

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🔗

global record PowerUnit KW: PowerUnit HP: PowerUnit end

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 PreviewColoringend

Proposal🔗

global record Proposal
record EdgeObject resultEntity: Engine.Entity category: integer modelInstance: ModelInstance playerEntity: Engine.Entity left: boolean end
record NodeAndEntity new: function(): NodeAndEntity entity: Engine.Entity comp: Engine.Component.BaseNode end
record 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 end
record BaseNodeLaneConnectionAndEntity new: function(): BaseNodeLaneConnectionAndEntity comp: Engine.Component.BaseNodeConfig entity: Engine.Entity end
record 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
record TransformedModel id: string tag: integer transf: Mat4f thin: boolean end
record Subconstruction models: {TransformedModel} models_native: Vector<TransformedModel> metadata: SubconstructionInstanceMetadata station: Station colliders: {Collider} end
record 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
record StreetTerminal cargo: boolean passengers: boolean capacity: integer wantSymmetric: boolean cargoUnload: boolean cargoLoad: boolean end
record Signal type: SignalType end
record ConstructionEntity fileName: ResName hasCargoPlatform: boolean desc: ConstructionDesc construction: Construction transf: Mat4f playerEntity: Engine.Entity end
record Terrain baseHeightMod: GridVec2f end
new: 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 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(): NodeAndEntity
Returns
  1. NodeAndEntity

Proposal.NodeAndEntity.entity🔗

Proposal.NodeAndEntity.entity: Engine.Entity

Proposal.NodeAndEntity.comp🔗

Proposal.NodeAndEntity.comp: Engine.Component.BaseNode

Proposal.SegmentAndEntity🔗

record Proposal.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 end

An entity with a BaseEdge component and extra information.

Proposal.SegmentAndEntity.new🔗

function Proposal.SegmentAndEntity.new(): SegmentAndEntity
Returns
  1. 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(): BaseNodeLaneConnectionAndEntity
Returns
  1. 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🔗

record Proposal.TransformedModel id: string tag: integer transf: Mat4f thin: boolean end

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🔗

record Proposal.Subconstruction models: {TransformedModel} models_native: Vector<TransformedModel> metadata: SubconstructionInstanceMetadata station: Station colliders: {Collider} end

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🔗

record Proposal.Signal type: SignalType end

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🔗

record Proposal.Terrain baseHeightMod: GridVec2f end

Contains proposal terrain modifications.

Proposal.Terrain.baseHeightMod🔗

Proposal.Terrain.baseHeightMod: GridVec2f

Proposal.new🔗

function Proposal.new(): Proposal
Returns
  1. Proposal

Proposal.clone🔗

function Proposal.clone(Proposal): Proposal
Parameters
  • Proposal
Returns
  1. 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 SubconstructionData station: Engine.Component.Station end
record ConstructionData boundingVolume: Engine.Component.BoundingVolume subconstructionDatas: {SubconstructionData} subconstructionDatas_native: Vector<SubconstructionData> end
record CollisionInfo
record EntityData entity: Engine.Entity end
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} end
record ErrorState critical: boolean messages: {string} warnings: {string} infos: {string} end
record ParallelStripProposal toAdd: {Engine.Component.BaseParallelStrip} toAdd_native: Vector<Engine.Component.BaseParallelStrip> toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> end
collisionInfo: 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 end

Contains the processed result of a Proposal.

ProposalData.SubconstructionData🔗

record ProposalData.SubconstructionData station: Engine.Component.Station end

ProposalData.SubconstructionData.station🔗

ProposalData.SubconstructionData.station: Engine.Component.Station

ProposalData.ConstructionData🔗

record ProposalData.ConstructionData boundingVolume: Engine.Component.BoundingVolume subconstructionDatas: {SubconstructionData} subconstructionDatas_native: Vector<SubconstructionData> end

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
record EntityData entity: Engine.Entity end
collisionEntities: {EntityData} autoRemovalEntity2models: {Engine.Entity : {{integer, integer}}} buildingEntities: {Engine.Entity} removableModules: {Engine.Entity} end

ProposalData.CollisionInfo.EntityData🔗

record ProposalData.CollisionInfo.EntityData entity: Engine.Entity end

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🔗

record ProposalData.ParallelStripProposal toAdd: {Engine.Component.BaseParallelStrip} toAdd_native: Vector<Engine.Component.BaseParallelStrip> toRemove: {Engine.Entity} toRemove_native: Vector<Engine.Entity> end

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🔗

global record ProposalEventData proposal: Proposal data: ProposalData result: {Engine.Entity} end

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
record ConfigEntry modelLeft: string modelRight: string streetWidth: number end
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

Returns
  1. RailroadCrossingType

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🔗

global record RoadType STREET: RoadType TRACK: RoadType end

Road vs Track type.

RoadType.STREET🔗

RoadType.STREET: RoadType

RoadType.TRACK🔗

RoadType.TRACK: RoadType

Runway🔗

global record Runway type: RunwayType nodeId: NodeId edgeIds: {EdgeId} end

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🔗

global record RunwayType LANDING: RunwayType TAKEOFF: RunwayType end

Runway type enumeration

RunwayType.LANDING🔗

RunwayType.LANDING: RunwayType

Landing runway

RunwayType.TAKEOFF🔗

RunwayType.TAKEOFF: RunwayType

Takeoff runway

SaveGameData🔗

global record SaveGameData
record SaveGameDetails new: function(SaveGameDetails): SaveGameDetails metadata: GameMetadata mods: {Mod.ModId} configDict: {{string, string}} modParams: {string : {string : integer}} campaign: string mission: string end
new: function(SaveGameData): SaveGameData errorMsg: string info: SaveGameDetails 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): SaveGameDetails
Parameters
  • SaveGameDetails
Returns
  1. 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): SaveGameData
Parameters
  • SaveGameData
Returns
  1. 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(): SaveGameId
Returns
  1. 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.

Returns
  1. SaveGameInfo — New SaveGameInfo

SaveGameInfo.equals🔗

function SaveGameInfo.equals(SaveGameInfo, SaveGameInfo): boolean
Parameters
  • SaveGameInfo
  • SaveGameInfo
Returns
  1. 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🔗

global record SaveGameStorageInfo totalSpace: number usedSpace: number end

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 SavegameScriptMetadataend

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(): ScriptParam
Returns
  1. 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🔗

global record ScriptParamDisplayMode Default: ScriptParamDisplayMode Compact: ScriptParamDisplayMode Horizontal: ScriptParamDisplayMode Vertical: ScriptParamDisplayMode Sparse: ScriptParamDisplayMode end

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🔗

global record ScriptParamLocation Default: ScriptParamLocation Toolbar: ScriptParamLocation end

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🔗

global record ScriptRef new: function(): ScriptRef fileName: string params: {<any type> : <any type>} end

References a function in a lua script file with ".script" extension.

ScriptRef.new🔗

function ScriptRef.new(): ScriptRef
Returns
  1. 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🔗

global 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} end
Type Parameters
  • T

Set.contains🔗

function Set.contains(Set<T>, T): boolean
Parameters
  • Set<T>
  • T
Returns
  1. boolean

Set.insert🔗

function Set.insert(Set<T>, T): boolean
Parameters
  • Set<T>
  • T
Returns
  1. boolean

Set.size🔗

function Set.size(Set<T>): integer
Parameters
  • Set<T>
Returns
  1. integer

Set.asTable🔗

function Set.asTable(Set<T>): {T : boolean}
Parameters
  • Set<T>
Returns
  1. {T : boolean}

Shape🔗

global record Shape subShapes: {SubShape} generator: integer end

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🔗

global record ShipInfo topSpeed: number maxTractiveEffort: number availablePower: number end

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🔗

global record Signal
record Type SIGNAL: Type ONE_WAY_SIGNAL: Type WAYPOINT: Type end
edgePr: {EdgeId, boolean} type: Type state: integer stateTime: integer end

Contains information about a street/track signal

Signal.Type🔗

record Signal.Type SIGNAL: Type ONE_WAY_SIGNAL: Type WAYPOINT: Type end

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🔗

global record SignalId new: function(): SignalId entity: Engine.Entity index: integer end

Identifies a street/track signal

SignalId.new()🔗

function SignalId.new()(): SignalId
Returns
  1. SignalId

SignalId.new(SignalId)🔗

function SignalId.new(SignalId)(SignalId): SignalId
Parameters
  • SignalId
Returns
  1. 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(): SimpleProposal
record ConstructionEntity new: function(): ConstructionEntity fileName: string params: {<any type> : <any type>} transf: Mat4f name: string playerEntity: Engine.Entity autoFillSlots: boolean end
constructionsToAdd: {ConstructionEntity} constructionsToRemove: {Engine.Entity} old2new: {Engine.Entity : integer} streetProposal: SimpleStreetProposal 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(): SimpleProposal
Returns
  1. 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(): ConstructionEntity
Returns
  1. 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
record EdgeObject new: function(): EdgeObject edgeEntity: Engine.Entity param: number oneWay: boolean left: boolean model: ResName playerEntity: Engine.Entity name: string end
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} 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

Returns
  1. EdgeObject

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(): SimpleStreetProposal
Returns
  1. 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🔗

global record Slot autoFill: boolean id: integer type: string transf: Mat4f spacing: Vec4f height: number shape: integer alignToTerrain: boolean replaceable: boolean end

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🔗

global record SlotConfig maxModules: integer message: string skipCollisionCheck: boolean end

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🔗

global record SoundClip name: string attrs: SoundAttributes end

SoundClip for SoundSet, BuilderAudioSet, ...

SoundClip.name🔗

SoundClip.name: string

SoundClip.attrs🔗

SoundClip.attrs: SoundAttributes

SoundClipList🔗

global record SoundClipList names: {string} attrs: SoundAttributes end

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

Returns
  1. StartGameParams

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🔗

global record StaticConstructionTemplate initialModules: {ResName : integer} end

Static construction template configuration

StaticConstructionTemplate.initialModules🔗

StaticConstructionTemplate.initialModules: {ResName : integer}

Station🔗

global record Station
record Pool new: function(): Pool edges: {EdgeId} capacity: integer end
new: function(): Station tag: integer terminals: {Terminal} catchmentAreas: {CatchmentArea} pool: Pool end

Data for a Station

Station.Pool🔗

record Station.Pool new: function(): Pool edges: {EdgeId} capacity: integer end

Defines a common pool in a station for overflowing terminal capacities

Station.Pool.new🔗

function Station.Pool.new(): Pool
Returns
  1. 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(): Station
Returns
  1. 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

Returns
  1. StationTerminal

StationTerminal.new(StationTerminal)🔗

function StationTerminal.new(StationTerminal)(StationTerminal): StationTerminal

Copy constructor

Parameters
  • StationTerminal
Returns
  1. StationTerminal

StationTerminal.new(integer, integer)🔗

function StationTerminal.new(integer, integer)(station : integer, terminal : integer): StationTerminal

Constructor with station and terminal indices

Parameters
  • station :integer — The zero-based station index in the StationGroup
  • terminal :integer — The zero-based terminal index in the Station
Returns
  1. 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🔗

global record StreetGenerationMode new: function(): StreetGenerationMode end

Map generation mode for street generation

StreetGenerationMode.new🔗

function StreetGenerationMode.new(): StreetGenerationMode
Returns
  1. 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
record Emissions noise: number pollution: number radius: number end
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

Parameters
  • string
Returns
  1. 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🔗

record StreetTemplate.Emissions noise: number pollution: number radius: number end

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🔗

global record SubShape faces: {{Vec3f}} startRule: integer height0: number height1: number end

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 SubconstructionInstanceMetadataend

TargetData🔗

global record TargetData entries: {TargetDataEntry} edges: {EdgePos} end

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🔗

global record TargetsByLandUse targets: {TargetData, TargetData} end

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}
record TerminalCargoTransferSpeed cargoTypeSet: CargoTypeSet loadSpeedModifier: number length: number end
cargoTransferSpeeds: {TerminalCargoTransferSpeed} comfortFactor: number capacity: integer terminalAssignmentWeight: 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(): TerrainGeneratorDesc
Returns
  1. 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()(): TerrainMaterialType
Returns
  1. TerrainMaterialType

TerrainMaterialType.new(TerrainMaterialType)🔗

function TerrainMaterialType.new(TerrainMaterialType)(TerrainMaterialType): TerrainMaterialType
Parameters
  • TerrainMaterialType
Returns
  1. 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🔗

global record ThinModelInstance modelId: integer pos: Vec3f rot: number scale: number end

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🔗

global record TownBuildingParams landUseType: LandUseType level: integer parcelSize: Vec2i end

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(): TownIndustryGenerationMode
Returns
  1. 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🔗

global record TownProblem Disconnected: TownProblem Overlength: TownProblem end

Town connection problem.

TownProblem.Disconnected🔗

TownProblem.Disconnected: TownProblem

TownProblem.Overlength🔗

TownProblem.Overlength: TownProblem

TownResult🔗

global record TownResult toRemove: {Engine.Entity} toAdd: {TownInfo} end

Results of town generation operations

TownResult.toRemove🔗

TownResult.toRemove: {Engine.Entity}

TownResult.toAdd🔗

TownResult.toAdd: {TownInfo}

TpNetData🔗

global record TpNetData
record NodeData
record Port edgeId: EdgeId transitions: {integer} end
ports: {Port} end
record EdgeData ports: {PortId, PortId} equidistParams: {number} end
getNodeData: function(TpNetData, NodeId): NodeData getEdgeData: function(TpNetData, EdgeId): EdgeData end

Contains additional data about the transport network

TpNetData.NodeData🔗

record TpNetData.NodeData
record Port edgeId: EdgeId transitions: {integer} end
ports: {Port} end

Data attached to a transport network node.

TpNetData.NodeData.Port🔗

record TpNetData.NodeData.Port edgeId: EdgeId transitions: {integer} end

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🔗

record TpNetData.EdgeData ports: {PortId, PortId} equidistParams: {number} end

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

Parameters
  • TpNetData
  • NodeId
Returns
  1. NodeData

TpNetData.getEdgeData🔗

function TpNetData.getEdgeData(TpNetData, EdgeId): EdgeData

Get edge data for a specific edge

Parameters
  • TpNetData
  • EdgeId
Returns
  1. EdgeData

TpNetLinkProposal🔗

global record TpNetLinkProposal
record Data link: {EdgePos, EdgePos} end
toRemove: {Data} toAdd: {Data} end

Contains the processed result with all edge links.

TpNetLinkProposal.Data🔗

record TpNetLinkProposal.Data link: {EdgePos, EdgePos} end

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🔗

global record TramTrackType NO: TramTrackType YES: TramTrackType ELECTRIC: TramTrackType end

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()(): TransportVehicleConfig
Returns
  1. TransportVehicleConfig

TransportVehicleConfig.new(TransportVehicleConfig)🔗

function TransportVehicleConfig.new(TransportVehicleConfig)(TransportVehicleConfig): TransportVehicleConfig
Parameters
  • TransportVehicleConfig
Returns
  1. 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.

Example:
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🔗

global record TransportVehicleInfo cargoInfos: {{{VehicleCargoInfo}}} end

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.

Returns
  1. TransportVehiclePart — 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🔗

global record TransportVehicleState IN_DEPOT: TransportVehicleState EN_ROUTE: TransportVehicleState AT_TERMINAL: TransportVehicleState GOING_TO_DEPOT: TransportVehicleState end

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🔗

global record TransportationStats passengersTransported: integer cargoTransported: integer end

A structure that holds information about the transportation data statistics.

TransportationStats.passengersTransported🔗

TransportationStats.passengersTransported: integer

TransportationStats.cargoTransported🔗

TransportationStats.cargoTransported: integer

UgcAccessLimitedReason🔗

global record UgcAccessLimitedReason None: UgcAccessLimitedReason NotSignedIn: UgcAccessLimitedReason Restricted: UgcAccessLimitedReason Error: UgcAccessLimitedReason end

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): ModRep
Parameters
  • UserProfile
Returns
  1. ModRep

UserProfile.getLanguageRep🔗

function UserProfile.getLanguageRep(UserProfile): LanguageRep
Parameters
  • UserProfile
Returns
  1. LanguageRep

UserProfile.getUserName🔗

function UserProfile.getUserName(UserProfile): string
Parameters
  • UserProfile
Returns
  1. string

UserProfile.changeLanguage🔗

function UserProfile.changeLanguage(UserProfile, LangKey)
Parameters
  • UserProfile
  • LangKey

UserProfile.getLanguage🔗

function UserProfile.getLanguage(UserProfile): LangKey
Parameters
  • UserProfile
Returns
  1. LangKey

UserProfile.subscribeMod🔗

function UserProfile.subscribeMod(UserProfile, string)
Parameters
  • UserProfile
  • string

UserProfile.unsubscribeMod🔗

function UserProfile.unsubscribeMod(UserProfile, string)
Parameters
  • UserProfile
  • string

UserProfile.getUnlockedAchievementIds🔗

function UserProfile.getUnlockedAchievementIds(UserProfile): {string : boolean}
Parameters
  • UserProfile
Returns
  1. {string : boolean}

UserProfile.getAchievementRep🔗

function UserProfile.getAchievementRep(UserProfile): AchievementRep
Parameters
  • UserProfile
Returns
  1. AchievementRep

UserProfile.getPlayerStatProgress🔗

function UserProfile.getPlayerStatProgress(UserProfile, string): number
Parameters
  • UserProfile
  • string
Returns
  1. number

UserProfile.getPlayerStatsProgress🔗

function UserProfile.getPlayerStatsProgress(UserProfile): {string : number}
Parameters
  • UserProfile
Returns
  1. {string : number}

UserProfile.getLastMission🔗

function UserProfile.getLastMission(UserProfile, string): {string, SaveGameId}
Parameters
  • UserProfile
  • string
Returns
  1. {string, SaveGameId}

UserProfile.getLastSavegameForMission🔗

function UserProfile.getLastSavegameForMission(UserProfile, string, string): SaveGameId
Parameters
  • UserProfile
  • string
  • string
Returns
  1. SaveGameId

UserProfile.getLastGame🔗

function UserProfile.getLastGame(UserProfile): SaveGameId | MissionCampaign
Parameters
  • UserProfile
Returns
  1. SaveGameId | MissionCampaign

UserProfile.isMissionCompleted🔗

function UserProfile.isMissionCompleted(UserProfile, string, string): boolean
Parameters
  • UserProfile
  • string
  • string
Returns
  1. boolean

UserProfile.isCurrentMissionCompleted🔗

function UserProfile.isCurrentMissionCompleted(UserProfile): boolean
Parameters
  • UserProfile
Returns
  1. 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
  • UserProfile
  • string
  • boolean

UserProfile.getMedalsState🔗

function UserProfile.getMedalsState(UserProfile, string, string): {string : boolean}
Parameters
  • UserProfile
  • string
  • string
Returns
  1. {string : boolean}

UserProfile.noteStarState🔗

function UserProfile.noteStarState(UserProfile, string, boolean)
Parameters
  • UserProfile
  • string
  • boolean

UserProfile.getStarsState🔗

function UserProfile.getStarsState(UserProfile, string, string): {string : boolean}
Parameters
  • UserProfile
  • string
  • string
Returns
  1. {string : boolean}

UserProfile.hasUgcAccess🔗

function UserProfile.hasUgcAccess(UserProfile): boolean
Parameters
  • UserProfile
Returns
  1. boolean

UserProfile.checkUgcRestrictions🔗

function UserProfile.checkUgcRestrictions(UserProfile): boolean
Parameters
  • UserProfile
Returns
  1. boolean

UserProfile.hasAgeGroupForUgc🔗

function UserProfile.hasAgeGroupForUgc(UserProfile): boolean
Parameters
  • UserProfile
Returns
  1. boolean

UserProfile.getUgcAccessLimitedReason🔗

function UserProfile.getUgcAccessLimitedReason(UserProfile): UgcAccessLimitedReason
Parameters
  • UserProfile
Returns
  1. UgcAccessLimitedReason

UserProfile.openUrl🔗

function UserProfile.openUrl(UserProfile, string)
Parameters
  • UserProfile
  • string

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.

Returns
  1. Vec2f — Vec2f(0,0)

Vec2f.new(number)🔗

function Vec2f.new(number)(v : number): Vec2f

Creates a new vector.

Parameters
  • v :number — Single value to set both x and y (optional)
Returns
  1. Vec2f — Vec2f(v,v)

Vec2f.new(number, number)🔗

function Vec2f.new(number, number)(x : number, y : number): Vec2f

Creates a new vector.

Parameters
  • x :number — X coordinate (optional)
  • y :number — Y coordinate (optional)
Returns
  1. Vec2f — Vec2f(x,y)

Vec2f.equals🔗

function Vec2f.equals(Vec2f, Vec2f): boolean
Parameters
  • Vec2f
  • Vec2f
Returns
  1. boolean

Vec2f.clone🔗

function Vec2f.clone(Vec2f): Vec2f
Parameters
  • Vec2f
Returns
  1. 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

Parameters
  • s :Vec2f — Scale amount
  • number
Returns
  1. Vec2f — Scaled vector

Vec2f.normalize🔗

function Vec2f.normalize(Vec2f): Vec2f

Normalize vector to unit length

Parameters
  • Vec2f
Returns
  1. Vec2f — Normalized vector

Vec2f.length🔗

function Vec2f.length(Vec2f): number

Calculate length of a vector

Parameters
  • Vec2f
Returns
  1. number — Length

Vec2f.distance🔗

function Vec2f.distance(a : Vec2f, b : Vec2f): number

Calculate distance between two vectors

Parameters
  • a :Vec2f — First vector
  • b :Vec2f — Second vector
Returns
  1. number — Distance

Vec2f.distance2🔗

function Vec2f.distance2(a : Vec2f, b : Vec2f): number

Calculate squared distance between two vectors

Parameters
  • a :Vec2f — First vector
  • b :Vec2f — Second vector
Returns
  1. number — Squared Distance

Vec2f.lerp🔗

function Vec2f.lerp(a : Vec2f, b : Vec2f, t : number): Vec2f

Linear interpolation between two vectors

Parameters
  • a :Vec2f — First vector
  • b :Vec2f — Second vector
  • t :number — Interpolation parameter (0 to 1)
Returns
  1. Vec2f — Interpolated vector

Vec2f.angle🔗

function Vec2f.angle(a : Vec2f, b : Vec2f): number

Calculate angle between two vectors

Parameters
  • a :Vec2f — First vector
  • b :Vec2f — Second vector
Returns
  1. number — angle (in radians)

Vec2f.rotate🔗

function Vec2f.rotate(angle : Vec2f, number): Vec2f

Rotate vector by angle

Parameters
  • angle :Vec2f — Rotation angle in radians
  • number
Returns
  1. Vec2f — Rotated vector

Vec2f.$meta.__add🔗

metamethod Vec2f.$meta.__add(Vec2f, Vec2f): Vec2f
Parameters
  • Vec2f
  • Vec2f
Returns
  1. Vec2f

Vec2f.$meta.__sub🔗

metamethod Vec2f.$meta.__sub(Vec2f, Vec2f): Vec2f
Parameters
  • Vec2f
  • Vec2f
Returns
  1. Vec2f

Vec2f.$meta.__mul🔗

metamethod Vec2f.$meta.__mul(Vec2f, number): Vec2f
Parameters
  • Vec2f
  • number
Returns
  1. Vec2f

Vec2f.$meta.__div🔗

metamethod Vec2f.$meta.__div(Vec2f, number): Vec2f
Parameters
  • Vec2f
  • number
Returns
  1. Vec2f

Vec2i🔗

global record Vec2i new: function(): Vec2i equals: function(Vec2i, Vec2i): boolean x: integer y: integer metamethod __add: function(Vec2i, Vec2i): Vec2i end

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.

Returns
  1. Vec2i — Vec2i(0,0),

Vec2i.new(integer)🔗

function Vec2i.new(integer)(v : integer): Vec2i

Creates a new vector.

Parameters
  • v :integer — Single value to set both x and y (optional)
Returns
  1. Vec2i — Vec2i(v,v)

Vec2i.new(integer, integer)🔗

function Vec2i.new(integer, integer)(x : integer, y : integer): Vec2i

Creates a new vector.

Parameters
  • x :integer — X coordinate
  • y :integer — Y coordinate
Returns
  1. Vec2i — Vec2i(x,y)

Vec2i.equals🔗

function Vec2i.equals(Vec2i, Vec2i): boolean
Parameters
  • Vec2i
  • Vec2i
Returns
  1. boolean

Vec2i.x🔗

Vec2i.x: integer

x coordinate

Vec2i.y🔗

Vec2i.y: integer

y coordinate

Vec2i.$meta.__add🔗

metamethod Vec2i.$meta.__add(Vec2i, Vec2i): Vec2i
Parameters
  • Vec2i
  • Vec2i
Returns
  1. Vec2i

Vec2i.$meta.__sub🔗

metamethod Vec2i.$meta.__sub(Vec2i, Vec2i): Vec2i
Parameters
  • Vec2i
  • Vec2i
Returns
  1. Vec2i

Vec2i.$meta.__mul🔗

metamethod Vec2i.$meta.__mul(Vec2i, Vec2i): Vec2i
Parameters
  • Vec2i
  • Vec2i
Returns
  1. Vec2i

Vec2i.$meta.__div🔗

metamethod Vec2i.$meta.__div(Vec2i, Vec2i): Vec2i
Parameters
  • Vec2i
  • Vec2i
Returns
  1. 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.

Returns
  1. Vec3f — Vec3f(0,0,0)

Vec3f.new(number)🔗

function Vec3f.new(number)(v : number): Vec3f

Creates a new vector.

Parameters
  • v :number — Single value to set all components
Returns
  1. 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.

Parameters
  • x :number — X coordinate
  • y :number — Y coordinate
  • z :number — Z coordinate
Returns
  1. Vec3f — Vec3f(x,y,z)

Vec3f.equals🔗

function Vec3f.equals(Vec3f, Vec3f): boolean
Parameters
  • Vec3f
  • Vec3f
Returns
  1. boolean

Vec3f.clone🔗

function Vec3f.clone(Vec3f): Vec3f

Create a copy of the vector

Parameters
  • Vec3f
Returns
  1. 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

Parameters
  • s :Vec3f — Scale factor
  • number
Returns
  1. Vec3f — Scaled vector

Vec3f.normalize🔗

function Vec3f.normalize(Vec3f): Vec3f

Normalize vector to unit length

Parameters
  • Vec3f
Returns
  1. Vec3f — Normalized vector

Vec3f.length🔗

function Vec3f.length(Vec3f): number

Calculate length of the vector

Parameters
  • Vec3f
Returns
  1. number — Length

Vec3f.distance🔗

function Vec3f.distance(a : Vec3f, b : Vec3f): number

Calculate distance between two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. number — Distance

Vec3f.distance2🔗

function Vec3f.distance2(a : Vec3f, b : Vec3f): number

Calculate squared distance between two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. 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

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. number — Squared distance

Vec3f.distance_2🔗

function Vec3f.distance_2(a : Vec3f, b : Vec3f): number

Calculate distance between xy components of two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. number — Squared distance

Vec3f.lerp🔗

function Vec3f.lerp(a : Vec3f, b : Vec3f, t : number): Vec3f

Linear interpolation between two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
  • t :number — Interpolation parameter (0 to 1)
Returns
  1. Vec3f — Interpolated vector

Vec3f.angle🔗

function Vec3f.angle(a : Vec3f, b : Vec3f): number

Calculate angle between two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. number — angle (in radians)

Vec3f.dot🔗

function Vec3f.dot(a : Vec3f, b : Vec3f): number

Calculate dot product of two vectors

Parameters
  • a :Vec3f — First vector
  • b :Vec3f — Second vector
Returns
  1. number — dot product

Vec3f.$meta.__add🔗

metamethod Vec3f.$meta.__add(Vec3f, Vec3f): Vec3f
Parameters
  • Vec3f
  • Vec3f
Returns
  1. Vec3f

Vec3f.$meta.__sub🔗

metamethod Vec3f.$meta.__sub(Vec3f, Vec3f): Vec3f
Parameters
  • Vec3f
  • Vec3f
Returns
  1. Vec3f

Vec3f.$meta.__mul🔗

metamethod Vec3f.$meta.__mul(Vec3f, number): Vec3f
Parameters
  • Vec3f
  • number
Returns
  1. Vec3f

Vec3f.$meta.__div🔗

metamethod Vec3f.$meta.__div(Vec3f, number): Vec3f
Parameters
  • Vec3f
  • number
Returns
  1. Vec3f

Vec4f🔗

global 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 end

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.

Returns
  1. Vec4f — Vec4f(0,0,0,0)

Vec4f.new(number)🔗

function Vec4f.new(number)(v : number): Vec4f

Creates a new vector.

Parameters
  • v :number — Single value to set all components
Returns
  1. 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.

Parameters
  • x :number — X coordinate
  • y :number — Y coordinate
  • z :number — Z coordinate
  • w :number — W coordinate
Returns
  1. 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.

Parameters
  • v :Vec3f — Vec3f for x, y, z components
  • w :number — W coordinate
Returns
  1. Vec4f — New Vec4f

Vec4f.equals🔗

function Vec4f.equals(Vec4f, Vec4f): boolean
Parameters
  • Vec4f
  • Vec4f
Returns
  1. 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

Parameters
  • a :Vec4f — First vector
  • b :Vec4f — Second vector
  • t :number — Interpolation parameter (0 to 1)
Returns
  1. Vec4f — Interpolated vector

Vec4f.$meta.__add🔗

metamethod Vec4f.$meta.__add(Vec4f, Vec4f): Vec4f
Parameters
  • Vec4f
  • Vec4f
Returns
  1. Vec4f

Vec4f.$meta.__sub🔗

metamethod Vec4f.$meta.__sub(Vec4f, Vec4f): Vec4f
Parameters
  • Vec4f
  • Vec4f
Returns
  1. Vec4f

Vec4f.$meta.__mul🔗

metamethod Vec4f.$meta.__mul(Vec4f, number): Vec4f
Parameters
  • Vec4f
  • number
Returns
  1. Vec4f

Vec4f.$meta.__div🔗

metamethod Vec4f.$meta.__div(Vec4f, number): Vec4f
Parameters
  • Vec4f
  • number
Returns
  1. Vec4f

Vec5f🔗

global 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 end

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.

Returns
  1. Vec5f — Vec5f(0, 0, 0, 0, 0)

Vec5f.new(number)🔗

function Vec5f.new(number)(v : number): Vec5f

Creates a new vector.

Parameters
  • v :number — Single value to set all components
Returns
  1. 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.

Parameters
  • x :number — X coordinate
  • y :number — Y coordinate
  • z :number — Z coordinate
  • w :number — W coordinate
  • q :number — Q coordinate
Returns
  1. Vec5f — Vec5f(x, y, z, w, q)

Vec5f.equals🔗

function Vec5f.equals(Vec5f, Vec5f): boolean
Parameters
  • Vec5f
  • Vec5f
Returns
  1. 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

Parameters
  • a :Vec5f — First vector
  • b :Vec5f — Second vector
  • t :number — Interpolation parameter (0 to 1)
Returns
  1. Vec5f — Interpolated vector

Vec5f.$meta.__add🔗

metamethod Vec5f.$meta.__add(Vec5f, Vec5f): Vec5f
Parameters
  • Vec5f
  • Vec5f
Returns
  1. Vec5f

Vec5f.$meta.__sub🔗

metamethod Vec5f.$meta.__sub(Vec5f, Vec5f): Vec5f
Parameters
  • Vec5f
  • Vec5f
Returns
  1. Vec5f

Vec5f.$meta.__mul🔗

metamethod Vec5f.$meta.__mul(Vec5f, number): Vec5f
Parameters
  • Vec5f
  • number
Returns
  1. Vec5f

Vec5f.$meta.__div🔗

metamethod Vec5f.$meta.__div(Vec5f, number): Vec5f
Parameters
  • Vec5f
  • number
Returns
  1. Vec5f

Vector🔗

global 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> end
Type Parameters
  • T

Vector.new🔗

function Vector.new(): Vector<T>
Returns
  1. Vector<T>

Vector.at🔗

function Vector.at(Vector<T>, integer): T

1-base index into a standard C++ vector

Parameters
  • Vector<T>
  • integer
Returns
  1. T

Vector.pushBack🔗

function Vector.pushBack(Vector<T>, T)
Parameters
  • Vector<T>
  • T

Vector.size🔗

function Vector.size(Vector<T>): integer
Parameters
  • Vector<T>
Returns
  1. integer

Vector.asTable🔗

function Vector.asTable(Vector<T>): {T}
Parameters
  • Vector<T>
Returns
  1. {T}

Vector.clone🔗

function Vector.clone(Vector<T>): Vector<T>
Parameters
  • Vector<T>
Returns
  1. Vector<T>

VehicleCargoInfo🔗

global record VehicleCargoInfo capacity: number offset: number end

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
record CarriageData offset: number reversed: boolean emissions: ModelMetadata.Emissions end
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🔗

global record VehicleExtent back: number front: number end

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🔗

global record VehicleIconType Bus: VehicleIconType Truck: VehicleIconType TrainSteam: VehicleIconType TrainElectric: VehicleIconType TrainDiesel: VehicleIconType Tram: VehicleIconType Aircraft: VehicleIconType Helicopter: VehicleIconType Ship: VehicleIconType end

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(): VehiclePart
Returns
  1. 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🔗

global record VehiclePartInfo
record Seat occupied: Engine.Entity animation: string crew: boolean end
seats: {Seat} count: number end

Details about a vehicle part

VehiclePartInfo.Seat🔗

record VehiclePartInfo.Seat occupied: Engine.Entity animation: string crew: boolean end

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🔗

global record Vendor Steam: Vendor Gog: Vendor Eos: Vendor MacAppstore: Vendor Microsoft: Vendor Sony: Vendor Dev: Vendor end

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🔗

global record View getEye: function(View): Vec3f getCenter: function(View): Vec3f getUp: function(View): Vec3f isVisible: function(view : View, position : Vec3f, radius : number): boolean end

Camera view information

View.getEye🔗

function View.getEye(View): Vec3f

Get the camera eye position

Parameters
  • View
Returns
  1. Vec3f — Eye position

View.getCenter🔗

function View.getCenter(View): Vec3f

Get the camera center position

Parameters
  • View
Returns
  1. Vec3f — Center position

View.getUp🔗

function View.getUp(View): Vec3f

Get the camera up vector

Parameters
  • View
Returns
  1. 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

Parameters
  • view :View — The view
  • position :Vec3f — Center of the sphere
  • radius :number — Radius of the sphere
Returns
  1. boolean — True if visible

Waypoint🔗

global record Waypoint new: function(): Waypoint clone: function(Waypoint): Waypoint equals: function(Waypoint, Waypoint) edgePos: EdgePos pos: Vec3f tag: integer end

References the position of a waypoint, which is either an EdgePos or a Vec3f

Waypoint.new()🔗

function Waypoint.new()(): Waypoint
Returns
  1. Waypoint

Waypoint.new(Waypoint)🔗

function Waypoint.new(Waypoint)(Waypoint): Waypoint
Parameters
  • Waypoint
Returns
  1. Waypoint

Waypoint.clone🔗

function Waypoint.clone(Waypoint): Waypoint
Parameters
  • Waypoint
Returns
  1. Waypoint

Waypoint.equals🔗

function Waypoint.equals(Waypoint, Waypoint)
Parameters
  • Waypoint
  • Waypoint

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🔗

global record WeightUnit T: WeightUnit KG: WeightUnit TN_SH: WeightUnit LB: WeightUnit end

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
Returns
  1. function(): (integer, T)

orderedPairs🔗

global record orderedPairs<T, V> metamethod __call: function(orderedPairs<T, V>, any): function() : (T, V) end
Type Parameters
  • T
  • V

orderedPairs.$meta.__call🔗

metamethod orderedPairs.$meta.__call(orderedPairs<T, V>, any): function() : (T, V)
Parameters
  • orderedPairs<T, V>
  • any
Returns
  1. function(): (T, V)

pairs_native🔗

global record pairs_native<T, V> metamethod __call: function(pairs<T, V>_native): function() : (T, V) end
Type Parameters
  • T
  • V

pairs_native.$meta.__call🔗

metamethod pairs_native.$meta.__call(pairs<T, V>_native): function() : (T, V)
Parameters
  • pairs<T, V>_native
Returns
  1. function(): (T, V)

recordDef🔗

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

Generated 19-08-2026

Transport Fever 3 ● Urban Games © 2026