Mother DocsMother Docs
Buy me a Coffee
Steam Workshop
Discord
  • Cheatsheet
  • Mother OS (Ingame Script)
  • Mother GUI
  • Mother Autopilot System (MAPS)
  • Mother Core (Script Framework)
  • Mother Dev Tools
  • Motherland
  • Powered by Mother
  • Brand Guidelines
Buy me a Coffee
Steam Workshop
Discord
  • Cheatsheet
  • Mother OS (Ingame Script)
  • Mother GUI
  • Mother Autopilot System (MAPS)
  • Mother Core (Script Framework)
  • Mother Dev Tools
  • Motherland
  • Powered by Mother
  • Brand Guidelines
  • Cheatsheet
  • Mother OS (Ingame Script)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Command Line Interface (CLI)
      • Configuration
      • Modules
    • Core Modules

      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Intergrid Message Service
      • Local Storage
      • Merge Block Module
    • Extension Modules

      • Air Vent Module
      • AutoLCD Module
      • Battery Module
      • Terminal Block Module
      • Cockpit Module
      • Connector Module
      • Display Module
      • Door Module
      • Gas Tank Module
      • Hinge Module
      • Landing Gear Module
      • Light Module
      • Piston Module
      • Programmable Block Module
      • Rotor Module
      • Screen Module
      • Sensor Module
      • Sorter Module
      • Sound Block Module
      • Thruster Module
      • Timer Block Module
      • Wheel Module
    • Compatibility
    • Troubleshooting
    • Examples
  • Mother GUI
    • Getting Started

      • Installation
      • Configuration
    • Commands
    • Menus
    • Views
    • Examples
  • Mother Autopilot System (MAPS)
    • Getting Started

      • Upgrade Guide
      • Installation
    • Modules

      • Flight Planning Module
      • Map Module
      • Flight Control Module
      • Attitude Module
      • Docking Module
  • Mother Core (Script Framework)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Architecture Overview
      • Managing Script Size & Complexity
    • Building A Module
    • Mother CLI (Console)
    • Core Modules
      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Clock
      • Command Bus
      • Configuration
      • Event Bus
      • Intergrid Message Service
      • Local Storage
      • Log
      • Terminal
    • Utilities

      • Color Helper
      • Number Helper
      • Security
      • Serializer
    • Testing
    • Tutorials
  • Mother Dev Tools
  • Motherland
  • Powered By Mother
  • Brand Guidelines

Sorter Module

The sorter module allows the user to control conveyor sorters on the grid, including their drain state, mode and item filters.

  • Commands
    • sorter/drain
    • sorter/mode
    • sorter/add
    • sorter/remove
    • sorter/clear
  • Items

Commands

All commands accept a block name, group, or tag as the sorter selector. Blocks that are not sorters are ignored.

sorter/drain

Set the drain all state of the sorter or group of sorters.

sorter/drain <Sorter|Group> true|false

Example

Turn on DrainAll

Terminal
sorter/drain "Gravel Exhaust" true

Turn off DrainAll

Terminal
sorter/drain VerticalFarmHarvester false

sorter/mode

Set the mode of the sorter or group of sorters to whitelist or blacklist. Existing filters are kept. Mode names are not case-sensitive.

sorter/mode <Sorter|Group> <whitelist|blacklist>

Example

Terminal
sorter/mode "Cargo Sorter" blacklist

sorter/add

Add items to the filter list of the sorter or group of sorters.

sorter/add <Sorter|Group> <Item> [<Item>...] [--options]

Options

OptionValuesDescription
freshtrue, falseClear the existing filter list before adding the items.
modewhitelist, blacklistSet the sorter mode in the same command. If omitted, the mode is unchanged.

At least one item is required unless --fresh or --mode is given. All items and options are validated before anything is applied, so an invalid item or option leaves the sorter unchanged.

Example

Terminal
; Add specific items
sorter/add "Cargo Sorter" Ore/Iron Ore/Stone

; Add every item of a type
sorter/add "Cargo Sorter" Ore

; Replace the filters and switch to a blacklist
sorter/add "Cargo Sorter" Ore/Stone Ore/Ice --fresh --mode=blacklist

; Reset the sorter to an empty blacklist
sorter/add "Cargo Sorter" --fresh --mode=blacklist

sorter/remove

Remove items from the filter list of the sorter or group of sorters.

sorter/remove <Sorter|Group> <Item> [<Item>...]

Example

Terminal
sorter/remove "Cargo Sorter" Ore/Stone

sorter/clear

Remove all items from the filter list of the sorter or group of sorters. The mode is kept.

sorter/clear <Sorter|Group>

Example

Terminal
sorter/clear "Cargo Sorter"

Items

Items are written as Type/Subtype, for example Ore/Iron, Ingot/Iron or Component/SteelPlate. You may also use only a type to match every item of that type, for example Ore.

Supported types: Ore, Ingot, Component, AmmoMagazine, PhysicalGunObject, ConsumableItem, PhysicalObject, GasContainerObject, OxygenContainerObject, Datapad.

Tips

You can view a complete list of item types and subtypes in the MDK2 docs.

Last Updated: 10/19/26, 3:04 PM
Contributors: Luke Morrison, lukejamesmorrison
Prev
Sensor Module
Next
Sound Block Module