# Globals Config Syntax and Examples

## Example Scripting File
```
WITH config(globals)
    set(paths).key(tmat0).value(tic_materials[0]);
    set(constants).key(iron).value(shield/iron);
END
```
## Example JSON File
```json
{
  "paths": {
    "sgmats": "SGear_Data{}.Construction{}.Parts[].Item{}.tag{}.Materials[].ID",
    "tmat3": "tic_materials[3]",
    "tmat2": "tic_materials[2]",
    "tmat1": "tic_materials[1]",
    "tmat0": "tic_materials[0]"
  },
  "constants": {
    "example": "value"
  },
  "type": "GLOBALS"
}
```

## Syntax
Each configuration uses a combination of `set(config_keyword).value(some_value);`.  The table below lists each configuration node's keyword, purpose and the value node format.

| set node key | setting function                         | special nodes                                                      | value node                             |
|:------------:|:-----------------------------------------|:-------------------------------------------------------------------|:---------------------------------------|
|   `paths`    | defines a path with the key provided     | `key(string)` sets the subsequent value to the string key provided | `value(path string)` an NBT path value |
| `constants`  | defines a constant with the key provided | `key(string)` sets the subsequent value to the string key provided | `value(path string)` an NBT path value |