Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/io_signatures/

An I/O signature: the named outputs a component kind fires and the inputs it accepts, each with a value type, so encounter templates link entities and the links are checked when they load (the ports exist and the value converts). A content input grants or revokes a tag, applies an effect or relays to one of the entity’s own outputs. The engine declares the signatures of its own components (manifold:io/…), and every entity has the User signature (FireUser1 to FireUser4, OnUser1 to OnUser4). One signature per component. Loaded by the server only.

Registrymanifold-ai:io-signature
Filesdata/io_signatures/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsnothing
ContractPopulation, data stage

Entry

A record, written IoSignature(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe signature’s key, <mod-id>:<name>.
componentstringyesThe component key it describes ("mymod:door").
outputslist of (string, IoType)nononeThe outputs, ("<Name>", <type>): names are letters, digits and _.
inputslist of (string, IoType, InputHandler)nononeThe inputs, ("<Name>", <type>, <handler>).

Example

No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/io_signatures/door.ron, which the data stage loads in its tests:

IoSignature(id: "dataref-fixture:io/door", component: "dataref-fixture:door")

Types

IoType

A port’s value type. An Int reaches a Fixed input, an Entity a Bool input, and anything an input that takes None.

VariantWrittenDescription
NoneNoneNo value.
BoolBooltrue or false.
IntIntA whole number.
FixedFixedA number, kept in thousandths.
EntityEntityAn entity.
TagTagA tag.
TextTextText of at most 64 bytes.

InputHandler

What an input does.

VariantWrittenDescription
NativeNativeThe engine’s own handling: only for the engine’s components.
SetTagSetTag(tag: .., value: ..)Grants (value: true) or revokes the tag on the target.
EffectEffect(string)Applies the effect (manifold:effect key) to the target, from the activator. An unknown key fails the data stage (DATA010).
OutputOutput(string)Fires one of the target’s own outputs with the value, which must be declared in outputs.

SetTag fields:

FieldTypeRequiredDefaultDescription
tagstringyesThe tag (manifold:tag key). An unknown key fails the data stage (DATA010).
valueboolnotrueGrant or revoke.