# Protocol: tuning

The `tuning` commands a program sends to a running game, as the engine describes them: what each takes, what it answers and what it does. Back to [all commands](../protocol-commands.md).

## tuning.set

`tuning.set {name: text, value: number} -> {name: text, value: number, step: integer, applies: text}` · write

Sets one number of the project's [tuning] table without touching a file: what a script reads as tuning.NAME from now on. It stays set through game.reset and game.seek, which load the game with it in place, so a script that reads it as it loads reads the new value; a local that copied the old one keeps it until then. A snapshot holds the values, and game.restore puts them back.

| Parameters | Type | Meaning |
| --- | --- | --- |
| `name` | text | The value's name under [tuning], as game.info lists them. |
| `value` | number | What it is to be, inside the entry's min and max when it has them. |

| Result | Type | Meaning |
| --- | --- | --- |
| `name` | text | The name. |
| `value` | number | The value now. |
| `step` | integer | How many fixed steps have run. |
| `applies` | text | When the game sees it, in words: at once where a script reads tuning.NAME as it uses it, and at the next load (game.reset, game.seek) where a script copied it into a variable of its own. |
