---
# System prepended metadata

title: Structure of Information
tags: [plugin]

---

---
tags: plugin
---

# Structure of Information

### Variable

```
{
    name: "variavel1",
    description: "amount of times X happened || event Y has happened",
    type: "boolean || number",
    value: "true / false || 10 / 20.4"
}
```

### Silence 
```
{
    id: hashed_value,
    type: "silence",
    time: 4 (in seconds)
}
```

### Input

```
{
    id: hashed_value,
    name: "input test",
    type: "input",
    options: {
        en: ["option 1", "option 2", option 3"],
        pt: ["opção 1", "opção 2", "opção 3"]
    }
}
```

### Line

```
{
    id: hashed value,
    name: "line_test",
    type: "line",
    text: {
        en: "this is a line",
        pt: "esta é a fala"
    },
    char: "tim",
    audio: {
        en: en/line.ogg,
        pt: pt/line.ogg,
    },
    time (opcional, defaults para o fim do audio): 2 (tempo em segundos)
}
```

### Dialogue

```
{
    id: dialogue_hashed_value,
    lines: [id1, id2, id3],
    type: "dialogue"
}
```

### Requirement

```
{
    id: hashed_value,
    type: "requirement",
    requirements: [
        {
            variable: "variable1_id",
            operation: "== || != || > || >= || < || <=",
            target: "false"
        },
        {
            variable: "variable2_id",
            operation: "== || != || > || >= || < || <=",
            target: "20"
        }
    ]
}
```

### Effect 

```
{
    id: hashed_value,
    type: "effect",
    effects: [
        {
            variable: "variable1",
            target: "false"
        },
        {
            variable: "variable2",
            target: "10"
        },
    ]
}
```

### Conversation

The `graph_pos` element is in respect to where it is on the graph. Important to store that information, and this is the best place that also avoids replicating information in unnecessary files. On Input options, selected input leads to next that is in the same index as selected.

```
{
    id: hashed_value,
    name: "conversation1",
    type: "conversation",
    conversation: {
        <!-- go node by node -->
        {
            id: start_node_id,
            next: [r1, r2, r3],
            graph_pos: (100,100)
        },
        {
            id: r1 (requirement node),
            next: [d1]
        },
        {
            id: r2 (requirement node),
            next: [d2]
        },
        {
            id: d1,
            next: [o1]
        },
        {
            id: o1,
            next: [d3, d3, d4]
        },
        {
            id: d3,
            <!-- Transition to new conversation, maybe -->
            next: [c2]
        }
    },
}
```

