Module api.type.mod🔗
Contains all type definitions for the mods.
global type ModId = integerglobal record Mod
record GameModDesc
modId: ModId modSource: string modhubModId: string name: string severityRemove: integer endrecord ModDesc
severityAdd: integer severityRemove: integer params: {ScriptParam} visible: boolean cosmetic: boolean autoActivate: boolean url: string dependencies: {ModDependency} incompatibilities: {ModIncompatibility} revision: integer endendrecord ModSize
numModels: integer numTextures: integer numMeshes: integer totalEstimatedSizeMB: integer end
Category: main🔗
Mod🔗
global record Mod
record GameModDesc
modId: ModId modSource: string modhubModId: string name: string severityRemove: integer endrecord ModDesc
severityAdd: integer severityRemove: integer params: {ScriptParam} visible: boolean cosmetic: boolean autoActivate: boolean url: string dependencies: {ModDependency} incompatibilities: {ModIncompatibility} revision: integer endendrecord ModSize
numModels: integer numTextures: integer numMeshes: integer totalEstimatedSizeMB: integer end
Refer to https://wiki.transportfever3.com/doku.php?id=modding:moddefinition for more details about mod and mod interface in general
Mod.ModId🔗
Mod identifier
Mod.ModId.new🔗
function Mod.ModId.new(): ModIdReturns
ModId
Mod.ModId.equals🔗
function Mod.ModId.equals(ModId, ModId): booleanParameters
ModIdModId
boolean
Mod.ModId.name🔗
Mod.ModId.name: string
A string that identify the mod
Mod.ModRef🔗
A reference to a mod
Mod.ModRef.modId🔗
Mod.ModRef.modId: ModId
Mod id
Mod.ModRef.revisionMin🔗
Mod.ModRef.revisionMin: integer
The minimum compatible revision
Mod.ModRef.revisionMax🔗
Mod.ModRef.revisionMax: integer
The maximum compatible revision
Mod.ModRefInfo🔗
User facing mod informations
Mod.ModRefInfo.displayName🔗
Mod.ModRefInfo.displayName: string
Display name of the mod
Mod.ModRefInfo.url🔗
Mod.ModRefInfo.url: string
URL to the mod page
Mod.ModDependency🔗
Describes a dependency to another mod
Mod.ModDependency.mod🔗
Mod.ModDependency.mod: ModRef
Mod Ref of the depedency
Mod.ModDependency.optional🔗
Mod.ModDependency.optional: boolean
If the depedency is optional
Mod.ModDependency.loadBefore🔗
Mod.ModDependency.loadBefore: boolean
If this depedency needs to be loaded before the dependant
Mod.ModDependency.modInfo🔗
Mod.ModDependency.modInfo: ModRefInfo
Mod info for the depedency
Mod.ModIncompatibility🔗
Describes an incompatibility with another mod
Mod.ModIncompatibility.mod🔗
Mod.ModIncompatibility.mod: ModRef
Mod.GameModDesc🔗
record Mod.GameModDesc
modId: ModId modSource: string modhubModId: string name: string severityRemove: integer end
Contains general information about the mod
Mod.GameModDesc.modId🔗
Mod.GameModDesc.modId: ModId
Mod id
Mod.GameModDesc.modSource🔗
Mod.GameModDesc.modSource: string
The origin of the mod (eg. User Mod, Staging Area, DLC, mod.io, ...)
Mod.GameModDesc.modhubModId🔗
Mod.GameModDesc.modhubModId: string
Mod id in the modhub backend
Mod.GameModDesc.name🔗
Mod.GameModDesc.name: string
Display name of the mod (User facing)
Mod.GameModDesc.severityRemove🔗
Mod.GameModDesc.severityRemove: integer
If removing this mod could cause instability to a savegame.
Any value above 0 will trigger a message when trying to remove the mod from a savegame
0: None, 1: Warning, 2:Critical
Mod.ModDesc🔗
record Mod.ModDesc
severityAdd: integer severityRemove: integer params: {ScriptParam} visible: boolean cosmetic: boolean autoActivate: boolean url: string dependencies: {ModDependency} incompatibilities: {ModIncompatibility} revision: integer end
Mod.ModDesc.severityAdd🔗
Mod.ModDesc.severityAdd: integer
If adding this mod could cause instability to a savegame.
Any value above 0 will trigger a message when trying to add the mod to a savegame
0: None, 1: Warning, 2:Critical
Mod.ModDesc.severityRemove🔗
Mod.ModDesc.severityRemove: integer
If removing this mod could cause instability to a savegame.
Any value above 0 will trigger a message when trying to remove the mod from a savegame
0: None, 1: Warning, 2:Critical
Mod.ModDesc.params🔗
Mod.ModDesc.params: {ScriptParam}
Script parameters to dynamically configure the mod
Mod.ModDesc.visible🔗
Mod.ModDesc.visible: boolean
If if the mod is visible, hidden mod cannot auto-activate
Mod.ModDesc.cosmetic🔗
Mod.ModDesc.cosmetic: boolean
If the mod is purely cosmetic, cosmetic mods still allow achievement from being earned while playing
Mod.ModDesc.autoActivate🔗
Mod.ModDesc.autoActivate: boolean
If the mod is automatically activate by the game
Mod.ModDesc.url🔗
Mod.ModDesc.url: string
URL to the mod page
Mod.ModDesc.dependencies🔗
Mod.ModDesc.dependencies: {ModDependency}
Mods this mod depends on
Mod.ModDesc.incompatibilities🔗
Mod.ModDesc.incompatibilities: {ModIncompatibility}
Mods this mod is incompatible with
Mod.ModDesc.revision🔗
Mod.ModDesc.revision: integer
version of the mod
Mod.ModSize🔗
record Mod.ModSize
numModels: integer numTextures: integer numMeshes: integer totalEstimatedSizeMB: integer end
Information about the size of the mod
Mod.ModSize.numModels🔗
Mod.ModSize.numModels: integer
The number of models contained in the mod
Mod.ModSize.numTextures🔗
Mod.ModSize.numTextures: integer
The number of texture contained in the mod
Mod.ModSize.numMeshes🔗
Mod.ModSize.numMeshes: integer
The number of meshes contained in the mod
Mod.ModSize.totalEstimatedSizeMB🔗
Mod.ModSize.totalEstimatedSizeMB: integer
The approximate size of the mod
Category: globals🔗
ModId🔗
global type ModId = integer