The Stationeers HASH("...") instruction turns a string into a number, using a predictable CRC-32. This means that if we can generate sequential collisions, then we can reference devices dynamically.
This tool will show you that HASH("led0171GJ0j")
is 10000
, and HASH("led0233wVe9")
is 10001
.
For example, name the first LED led0171GJ0j
, and the next as led0233wVe9
, etc.
Then we can increment HASH("led0171GJ0j") for the next LED.
Example code:
define firstled HASH("led0171GJ0j")
add r0 firstled 1
sbn HASH("StructureDiode") r0 On 1