**This is an old revision of the document!**

Nanomachines

Nanomachines are a configurable buff system. Using energy as a resource, they are able to apply various positive and negative effects to the player.

Basic Usage

The player has to “eat” them before they can be used. Once ingested, a power indicator in the HUD, positioned left of the item bar, will indicate how much energy the nanomachines have left. Their energy can be recharged by standing close to a Charger.

They provide a certain number of “inputs” that can be toggled, causing many different effects on the player, ranging from visual effects such as particles spawning near the player, to select potion effects and some more rare and special behaviors.

Which input triggers what effect depends on the current configuration of the nanomachines, the actual “connections” being random per configuration. Which input does what is not clear to the player until they try it. The configuration can be changed by ingesting a new batch of nanomachines. Additionally, enabling too many inputs at a time has severe negative effects.

To dispose of nanomachines, the player has to drink Grog.

Crafting

Nanomachines are crafted using the following recipe:

Programming

Programming the machines happens through wireless messages. The range nanomachines are able to receive messages from is only about two meters, though this can be circumvented easily by using a tablet to send the messages. However, the nanomachines do not check which device sent the messages they receive.

A simple protocol is used to control the machines: each packet consists of multiple parts, the first of which must equal the string “nanomachines”. The second part is the command name. Additional parts are parameters for the command. The following commands are available:

  • setResponsePort(port:number)
    Set the port nanomachines should send response messages to, for commands that have a response.
  • getTotalInputCount()
    Request a message with the total number of available inputs.
  • getSafeInputCount()
    Request a message with the number of safe inputs.
  • getInput(index:number)
    Request a message with the current state of the input with the specified index.
  • setInput(index:number, value:boolean)
    Set the state of the input with the specified index to the specified value.
  • getActiveEffects()
    Request a list of active effects. Note that some effects may not show up in this list.
  • getPowerState()
    Request a message with the currently stored and maximum stored energy of the nanomachines.

For example, in OpenOS:

  • component.modem.broadcast(1, "nanomachines", "setInput", 1, true) will enable the first input.
  • component.modem.broadcast(1, "nanomachines", "reconfigure") will reconfigure the nanomachines.

See also

Nanomachines Preview (slightly outdated)

Contents