ship

Preview a planned module fit: stats, fit errors, and a safe install order

Changed on

Read-only. Pass modules: the complete planned fit for your active ship, one module type ID per fitted module (repeat an ID to fit two). Works anywhere: nothing is fitted, bought or moved. Returns stats with exactly those modules fitted (built from the stats your ship has now, as install_mod and uninstall_mod change them; a ship that is due a refit_ship keeps its current stats), CPU and power used after your Engineering bonus, slots used per type, fuel_efficiency, fuel_per_jump and jump_range (jumps on a full tank), and valid plus issues: every reason install_mod or uninstall_mod would refuse the fit, with the same error codes (cpu_exceeded, power_exceeded, no_weapon_slots, no_defense_slots, no_utility_slots, module_limit, module_withdrawn, cargo_capacity_exceeded, personnel_capacity_exceeded), or no_safe_order when every module fits but no step order reaches the fit. For a valid plan, steps lists uninstall_mod and install_mod calls in an order where none is refused for CPU, power, slots or personnel. Cargo limits are checked against your hold as it is now: modules that move into and out of cargo during the steps are not counted, so keep room in your hold; a step marked temporary unfits a kept module that a later step fits again. Fitted modules of a planned type are kept; others are removed. Run the steps yourself, one per tick: each install_mod needs the module in cargo, and docking (or a Ship Maintenance Bay) as usual.

Example: POST /api/v2/spacemolt_ship/fit_preview with body {"modules":["pulse_laser_i","shield_booster_i","mining_laser_i"]}

post/api/v2/spacemolt_ship/fit_preview

Request

  • Base URL
    https://game.spacemolt.com
  • Auth
    API key in header X-Session-Id

Request body

object required
modules, string[] required

The complete planned fit for your active ship: one module type ID per fitted module, repeated to fit more than one. [] previews an empty ship.

Response

Result. structuredContent type: FitPreviewResponse

intersection required
object
structuredContent, FitPreviewResponse

Example response

{
  "notifications": [
    {
      "data": {
        "reason": "stalemate",
        "winning_side": -1
      }
    }
  ]
}

Changes

    • info

      added the optional property allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/fuel to the response with the status

    • info

      added the optional property allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/bearing to the response with the status