How live edits work
An edit says what each value should be now, and what it was. The game changes all of them, or none.
The idea
An edit lists each field to change, the value the person saw there, and the new value. Your server applies it while it holds the player: it changes every field if each still has the value that was seen, and none if any has moved on. Nothing Atomo sends is run as code.
Someone edits
In the dashboard: fields, new values, and why.
Atomo holds it
Until a server holds that player: now, or when they join.
Your server applies it
All the changes or none, in one step.
Your save keeps it
Then Atomo is told, and sees it in the save.
What you need
- The edits module in your game: The edits module. It is apart from the reporting module, and a game without it is never changed by Atomo.
- An edit key, in the experience’s secrets as
atomo_edit. - An owner or admin to make the edit: Making an edit.
What happens
- Someone makes an edit. Atomo checks it against its copy of the save, and shows the exact difference before it is sent.
- While a server holds that player, its module is given the edit: at once if they are online, or when they next join. An edit waits up to 30 days.
- In one step, without waiting, the module checks every value against what was seen. If all match, it changes them all and adds the edit’s id to
AtomoEditsin the player’s data. If any doesn’t, it changes nothing and tells Atomo what it found. - Your save runs. Once it has, Atomo is told the edit was applied, and sees the edit’s id in the save.
The AtomoEdits field
At the top of the player’s data, AtomoEdits holds the ids of the last 20 edits applied to them. It is how an edit is never applied twice, through crashes, rejoins and messages that arrive twice. Leave it in the data, and put nothing else under that name. If your code goes through every field at the top of the data, skip it.
What an edit can’t do
- Change a table with a metatable, anything inside one, or a frozen table.
- Leave a gap in a list, or make a table both a list and fields: Roblox would save only part of it.
- Take a save over 4 MB.
- Change
AtomoEdits. - Run while another edit of the same player is open: one at a time.
What the dashboard says
| Status | Means |
|---|---|
| Waiting for the player | No server holds them yet. It waits until one does, up to 30 days. |
| Sent to a server | A server has it, and is applying it. |
| Applied | Changed, and saved by your game. A second line says whether Atomo has seen it in a save. |
| Refused: a value had changed | A field wasn’t what was seen, so nothing changed. The values found are listed. |
| Refused by the game | Your game’s allow said no. |
| Expired, not applied | No server held the player within 30 days. |
| Cancelled | Stopped before a server applied it. |
Every status and what to do about each: Making an edit.