Function Load Wagons

Discussion in 'PC Editor Discussion' started by Lokomotiv, Sep 22, 2026 at 4:56 PM.

Tags:
  1. Lokomotiv

    Lokomotiv Active Member

    Joined:
    Jul 30, 2022
    Messages:
    100
    Likes Received:
    143
    Is it possible to load a wagon with the TSW HTTP API? The "Function.UnloadAll" request works which makes me think the opposite is possible with a "Function.Load" request?

    Here's a successful "Function.UnloadAll" request response:
    Code:
    {
        "ReturnValue": true,
        "OutCargoUnloaded": {
            "cargo":"CargoAsset'/RuhrSiegNord/Scenarios/Common/Lumber.Lumber'",
            "numberOfUnits": 1
        }
    }
    
    I've tried to pass these values back in various formats with a "Function.Load" request without luck e.g.
    Code:
    ?Value={"cargo":"CargoAsset'/RuhrSiegNord/Scenarios/Common/Lumber.Lumber'","numberOfUnits":1}
    
    For reference the "Cargo (CargoModel)" component had these end points:
    Code:
    • Function.GetComponentTickInterval
    • Function.GetCurrentMass
    • Function.GetFillLevel
    • Function.GetMaxCapacityInUnits
    • Function.GetNumberOfUnits
    • Function.IsActive
    • Function.IsBeingDestroyed
    • Function.IsComponentTickEnabled
    • Function.IsEmpty
    • Function.IsFull
    • Function.Load
    • Function.UnloadAll
    • Function.UnloadSelection
    • ObjectClass
    • ObjectName
    • Property.InLoadingRange
    • Property.bAutoActivate
    • Property.bIsEditorOnly
    • Property.bReplicates
    
    The official TSW HTTP API pdf can be found here: https://forums.dovetailgames.com/threads/train-sim-world-api-support.94488/
     
    Last edited: Sep 23, 2026 at 7:20 AM

Share This Page