Difference between revisions of "Sorter"
From Unofficial Stationeers Wiki
(→Item Classes: + 4:filter) |
m (ic10 edit) |
||
| (23 intermediate revisions by 12 users not shown) | |||
| Line 1: | Line 1: | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{{Structurebox | {{Structurebox | ||
| − | + | | name = Sorter | |
| − | + | | image = [[File:StructureSorter.png]] | |
| − | + | | prefab_hash = -1009150565 | |
| − | + | | prefab_name = StructureSorter | |
| − | + | | power_usage = 5W | |
| − | + | | placed_on_grid = Small Grid | |
| + | | decon_with_tool1 = [[Hand Drill]] | ||
| + | | placed_with_item = [[Kit (Sorter)]] | ||
| + | | item_rec1 = [[Kit (Sorter)]] | ||
}} | }} | ||
| + | {{Distinguish|Logic Sorter}} | ||
==Description== | ==Description== | ||
| − | + | <blockquote><q>No amount of automation is complete without some way of moving different items to different parts of a system. The [[Xigo (Faction)|Xigo]] A2B sorter can be programmed via a computer with a [[Sorter Motherboard]] to direct various items into different chute networks. Filtered items are always passed out the righthand side of the sorter, while non filtered items continue straight through.</q><br> | |
| + | '''- Stationpedia'''</blockquote> | ||
| + | |||
| + | '''Mode 0 (Split):''' Items alternate between output lanes automatically. The Output property switches between 0 and 1 after each item. | ||
| + | |||
| + | '''Mode 1 (Filter):''' Requires a [[computer]] with a [[Motherboard|Motherboard (Sorter)]]. Whitelisted items exit one lane, all others exit the alternate lane. When facing the output side (power switch on your right), whitelisted items exit left, rejected items exit right. '''Note:''' Some players report issues with the Motherboard (Sorter) interface. Consider using Mode 2 (Logic) with [[IC10]] as a more reliable alternative. | ||
| − | + | '''Mode 2 (Logic):''' The sorter waits for [[IC10]] or logic chips to set the Output parameter (0 or 1) before releasing each item. After the item exits, Output resets to -1 automatically. Your controller must set Output for every item - this is intended behavior, not a bug. See [[#Example IC10 sorting script|Example IC10 sorting script]] below for a working implementation. | |
| − | + | '''Output orientation:''' When facing outputs with power switch on your right: Output 0 exits right (near power switch), Output 1 exits left. | |
{{Data Network Header}} | {{Data Network Header}} | ||
| − | {{Data Parameters | + | {{Data Parameters| |
| − | {| | + | {{Data Parameters/row|Power|Boolean|w=0|Can be read to return if the Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not|multiple=2|0|Unpowered|1|Powered}} |
| − | | | + | {{Data Parameters/row|Mode|Integer|The mode of the Sorter, '''Split''' does alternate outputs, '''Filter''' decides output via [[Motherboard (Sorter)]], '''Logic''' determines output via parameter '''Output'''|multiple=3|0|Split|1|Filter|2|Logic}} |
| − | + | {{Data Parameters/row|Error|Boolean|w=0|1 if device is in error state, otherwise 0|multiple=2|0|<p></p>|1|Error}} | |
| − | + | {{Data Parameters/row|Lock|Boolean|Disable manual operation of the Sorter.|multiple=2|0|Unlocked|1|Locked}} | |
| − | | Mode | + | {{Data Parameters/row|On|Boolean|The current state of the Sorter.|multiple=2|0|Off|1|On}} |
| − | | | + | {{Data Parameters/row|RequiredPower|Integer|w=0|Idle operating power quantity, does not necessarily include extra demand power}} |
| − | | Lock | + | {{Data Parameters/row|ClearMemory|Integer|r=0|When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned}} |
| − | | | + | {{Data Parameters/row|ExportCount|Integer|w=0|How many items exported since last ClearMemory}} |
| − | | On || | + | {{Data Parameters/row|ImportCount|Integer|w=0|How many items imported since last ClearMemory}} |
| − | | | + | {{Data Parameters/row|Output|Integer|<div>Decides which side the next item will be sent to.<br> |
| − | | ClearMemory || | + | In '''Logic''' mode, defaults to -1 after action. In '''Split''' mode, alternates between 0 and 1 after action. Does nothing in '''Filter''' mode.<br> |
| − | | | + | When set to 0 the item will exit the output slot closest to the power switch. When set to 1, the item will exit the slot furthest from the power switch.</div>|multiple=3|-1|Unset|0|Straight (Near Power Switch)|1|Side}} |
| − | | Output | + | {{Data Parameters/row|PrefabHash|Integer|w=0|The hash of the structure}} |
| − | | | + | {{Data Parameters/row|ReferenceId|Integer|w=0|Unique Reference Identifier for this object}} |
| − | |} | + | {{Data Parameters/row|NameHash|Integer|w=0|Provides the hash value for the name of the object as a 32 bit integer.}} |
| + | }} | ||
| − | + | === Data Slots === | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader's "VAR" setting cycles through them. | These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader's "VAR" setting cycles through them. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 105: | Line 80: | ||
|} | |} | ||
| − | + | == Item Slot Classes / Types == | |
| − | + | Reading the ''class'' attribute of the input slot will give one of the following values: | |
| − | + | Note that you can use <pre style="display: inline">SlotClass.<Item></pre> directly in IC code instead of the numeric value | |
| + | *NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class. | ||
{| class="wikitable" | {| class="wikitable" | ||
| + | |+ Item values and descriptions | ||
| + | ! Item !! Value !! Description !! Item !! Value !! Description !! Item !! Value !! Description | ||
| + | |- | ||
| + | | None || 0 || || Helmet || 1 || || Suit || 2 || | ||
| + | |- | ||
| + | | Back || 3 || || GasFilter || 4 || || GasCanister || 5 || | ||
| + | |- | ||
| + | | Motherboard || 6 || || Circuitboard || 7 || || DataDisk || 8 || | ||
| + | |- | ||
| + | | Organ || 9 || || Ore || 10 || Includes reagent mixes from recycler and ices || Plant || 11 || | ||
| + | |- | ||
| + | | Uniform || 12 || || Entity || 13 || || Battery || 14 || | ||
|- | |- | ||
| − | + | | Egg || 15 || || Belt || 16 || || Tool || 17 || | |
|- | |- | ||
| − | | | + | | Appliance || 18 || || Ingot || 19 || || Torpedo || 20 || |
|- | |- | ||
| − | | | + | | Cartridge || 21 || || AccessCard || 22 || || Magazine || 23 || |
|- | |- | ||
| − | | | + | | Circuit || 24 || || Bottle || 25 || This refers to Paint Can || ProgrammableChip || 26 || |
|- | |- | ||
| − | | | + | | Glasses || 27 || || CreditCard || 28 || || DirtCanister || 29 || |
|- | |- | ||
| + | | SensorProcessingUnit || 30 || || LiquidCanister || 31 || || LiquidBottle || 32 || | ||
| + | |- | ||
| + | | Wreckage || 33 || || SoundCartridge || 34 || || DrillHead || 35 || | ||
| + | |- | ||
| + | | ScanningHead || 36 || || Flare || 37 || || Blocked || 38 || | ||
| + | |- | ||
| + | | SuitMod || 39 || || Crate || 40 || || Portables || 41 || | ||
|} | |} | ||
| + | |||
| + | === Example IC10 sorting script === | ||
| + | |||
| + | Basic ingot sorter - filters one item type to the left output, rejects everything else to the right. | ||
| + | |||
| + | <pre> | ||
| + | # Ingot Sorter Controller | ||
| + | # When facing outputs (power switch on right): matched items exit left, rejected exit right | ||
| + | # Setup: | ||
| + | # 1. Connect d0 to the sorter | ||
| + | # 2. Change hTarget to match your desired ingot | ||
| + | |||
| + | define hTarget HASH("ItemIronIngot") | ||
| + | |||
| + | alias dSorter d0 | ||
| + | alias vHash r0 | ||
| + | alias vOutput r1 | ||
| + | |||
| + | s dSorter Mode 2 # Logic mode | ||
| + | s dSorter On 1 # Turn on | ||
| + | |||
| + | main: | ||
| + | ls vHash dSorter 0 OccupantHash # Read import slot | ||
| + | beqz vHash skip # Empty - skip processing | ||
| + | |||
| + | seq vOutput vHash hTarget # 1=match, 0=reject | ||
| + | s dSorter Output vOutput | ||
| + | |||
| + | skip: | ||
| + | yield | ||
| + | j main | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | [[Category:Machines]] | ||
| + | [[Category:Import/Export]] | ||
Latest revision as of 06:10, 4 January 2026
![]() | |
| Operation | |
|---|---|
| Power Usage | 5W |
| Prefab Hash | -1009150565 |
| Prefab Name | StructureSorter |
| Construction | |
| Placed with | Kit (Sorter) |
| Placed on | Small Grid |
| Stage 1 | |
| Deconstruction | |
| Deconstructed with | Hand Drill |
| Item received | Kit (Sorter) |
Contents
Description[edit]
No amount of automation is complete without some way of moving different items to different parts of a system. The Xigo A2B sorter can be programmed via a computer with a Sorter Motherboard to direct various items into different chute networks. Filtered items are always passed out the righthand side of the sorter, while non filtered items continue straight through.
- Stationpedia
Mode 0 (Split): Items alternate between output lanes automatically. The Output property switches between 0 and 1 after each item.
Mode 1 (Filter): Requires a computer with a Motherboard (Sorter). Whitelisted items exit one lane, all others exit the alternate lane. When facing the output side (power switch on your right), whitelisted items exit left, rejected items exit right. Note: Some players report issues with the Motherboard (Sorter) interface. Consider using Mode 2 (Logic) with IC10 as a more reliable alternative.
Mode 2 (Logic): The sorter waits for IC10 or logic chips to set the Output parameter (0 or 1) before releasing each item. After the item exits, Output resets to -1 automatically. Your controller must set Output for every item - this is intended behavior, not a bug. See Example IC10 sorting script below for a working implementation.
Output orientation: When facing outputs with power switch on your right: Output 0 exits right (near power switch), Output 1 exits left.
Data Network Properties[edit]
These are all Data Network properties of this device.
Data Parameters[edit]
These are all parameters that can be written with a Logic Writer, Batch Writer, or Integrated Circuit (IC10), and can be read with a Logic Reader, Batch Reader, or Integrated Circuit (IC10).
| Parameter Name | Data Type | Access | Value | Description | ||
|---|---|---|---|---|---|---|
| Power | Boolean | Read
|
0 | Unpowered | Can be read to return if the Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not | |
| 1 | Powered | |||||
| Mode | Integer | Read Write
|
0 | Split | The mode of the Sorter, Split does alternate outputs, Filter decides output via Motherboard (Sorter), Logic determines output via parameter Output | |
| 1 | Filter | |||||
| 2 | Logic | |||||
| Error | Boolean | Read
|
0 | 1 if device is in error state, otherwise 0 | ||
| 1 | Error | |||||
| Lock | Boolean | Read Write
|
0 | Unlocked | Disable manual operation of the Sorter. | |
| 1 | Locked | |||||
| On | Boolean | Read Write
|
0 | Off | The current state of the Sorter. | |
| 1 | On | |||||
| RequiredPower | Integer | Read
|
||||
| ClearMemory | Integer | Write
|
||||
| ExportCount | Integer | Read
|
||||
| ImportCount | Integer | Read
|
||||
| Output | Integer | Read Write
|
-1 | Unset | Decides which side the next item will be sent to.
In Logic mode, defaults to -1 after action. In Split mode, alternates between 0 and 1 after action. Does nothing in Filter mode. | |
| 0 | Straight (Near Power Switch) | |||||
| 1 | Side | |||||
| PrefabHash | Integer | Read
|
||||
| ReferenceId | Integer | Read
|
||||
| NameHash | Integer | Read
|
||||
Data Slots[edit]
These are all parameters, that can be read with a Slots Reader. The outputs are listed in the order a Slots Reader's "VAR" setting cycles through them.
| Number | Name | Description |
|---|---|---|
| 0 | Import | Import slot. |
| 1 | Export (accept) | Export slot. |
| 2 | Export (reject) | Export slot. |
| 3 | Data Disk | Diskslot |
| Name | Data Type | Description |
|---|---|---|
| MaxQuantity | Integer | Returns maximum stacksize. |
| Damage | Integer | Item durability in percent. |
| Class | Integer | Item class ID. |
| Quantity | Integer | Size of stack. |
| PrefabHash | Integer | Returns ItemHash of item in slot. |
| Occupied | Boolean | Returns whether the slot occupied. (0 for no, 1 for yes). |
| OccupantHash | Integer | Returns ItemHash of item in slot. |
Item Slot Classes / Types[edit]
Reading the class attribute of the input slot will give one of the following values:
Note that you can useSlotClass.<Item>directly in IC code instead of the numeric value
- NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class.
| Item | Value | Description | Item | Value | Description | Item | Value | Description |
|---|---|---|---|---|---|---|---|---|
| None | 0 | Helmet | 1 | Suit | 2 | |||
| Back | 3 | GasFilter | 4 | GasCanister | 5 | |||
| Motherboard | 6 | Circuitboard | 7 | DataDisk | 8 | |||
| Organ | 9 | Ore | 10 | Includes reagent mixes from recycler and ices | Plant | 11 | ||
| Uniform | 12 | Entity | 13 | Battery | 14 | |||
| Egg | 15 | Belt | 16 | Tool | 17 | |||
| Appliance | 18 | Ingot | 19 | Torpedo | 20 | |||
| Cartridge | 21 | AccessCard | 22 | Magazine | 23 | |||
| Circuit | 24 | Bottle | 25 | This refers to Paint Can | ProgrammableChip | 26 | ||
| Glasses | 27 | CreditCard | 28 | DirtCanister | 29 | |||
| SensorProcessingUnit | 30 | LiquidCanister | 31 | LiquidBottle | 32 | |||
| Wreckage | 33 | SoundCartridge | 34 | DrillHead | 35 | |||
| ScanningHead | 36 | Flare | 37 | Blocked | 38 | |||
| SuitMod | 39 | Crate | 40 | Portables | 41 |
Example IC10 sorting script[edit]
Basic ingot sorter - filters one item type to the left output, rejects everything else to the right.
# Ingot Sorter Controller
# When facing outputs (power switch on right): matched items exit left, rejected exit right
# Setup:
# 1. Connect d0 to the sorter
# 2. Change hTarget to match your desired ingot
define hTarget HASH("ItemIronIngot")
alias dSorter d0
alias vHash r0
alias vOutput r1
s dSorter Mode 2 # Logic mode
s dSorter On 1 # Turn on
main:
ls vHash dSorter 0 OccupantHash # Read import slot
beqz vHash skip # Empty - skip processing
seq vOutput vHash hTarget # 1=match, 0=reject
s dSorter Output vOutput
skip:
yield
j main

