Skip to main content

SaveSlotCmdrService

This item only works when running on the server. Server

Save slot admin commands.

Command What it does
saveslot-list Lists every slot with its playtime, timestamps and summary
saveslot-get-active Reports the slot being played, or the one that would resume
saveslot-select Switches onto a slot
saveslot-deselect Returns to the no-slot state
saveslot-create Creates slots, defaulting to the lowest free index
saveslot-delete Deletes slots
saveslot-copy Copies one player's slot onto other players', overwriting an occupied destination
saveslot-persist Turns the ephemeral session into a save and switches onto it
saveslot-reset Empties slots, keeping their index and name
saveslot-export / saveslot-import Moves a slot through the shared store as a code
saveslot-read-json / saveslot-write-json Moves a slot as raw JSON, no shared store
saveslot-import-ephemeral Loads a code into a throwaway session

Commands take players as ids, so they reach a player who is not in this server as readily as one who is: a player here is acted on through their bound HasSaveSlots, and an absent player through an OfflineSaveSlots opened over their datastore. Both hand back the same HasSaveSlotsDataStore, so the command bodies below never branch on which it was. saveslot-import-ephemeral is the one exception, and refuses an absent player outright -- an ephemeral session only exists while it is being played.

WARNING

Acting on an absent player steals their session lock, kicking them from wherever they are playing. That is accepted for admin tooling -- the session is released again as soon as the command finishes, so they can rejoin -- but it is why these are admin commands.

Functions

SetReplyConfig

SaveSlotCmdrService.SetReplyConfig() → ()

Sets how long a command may run before it tells the executor it is still working, and how that line is colored.

Show raw api
{
    "functions": [
        {
            "name": "SetReplyConfig",
            "desc": "Sets how long a command may run before it tells the executor it is still working, and how that\nline is colored.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "SaveSlotCmdrService"
                },
                {
                    "name": "replyConfig",
                    "desc": "see [CmdrReplyUtils.createConfig]",
                    "lua_type": "CmdrReplyConfig"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 95,
                "path": "src/saveslot/src/Server/Cmdr/SaveSlotCmdrService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "SaveSlotCmdrService",
    "desc": "Save slot admin commands.\n\n| Command | What it does |\n| --- | --- |\n| `saveslot-list` | Lists every slot with its playtime, timestamps and summary |\n| `saveslot-get-active` | Reports the slot being played, or the one that would resume |\n| `saveslot-select` | Switches onto a slot |\n| `saveslot-deselect` | Returns to the no-slot state |\n| `saveslot-create` | Creates slots, defaulting to the lowest free index |\n| `saveslot-delete` | Deletes slots |\n| `saveslot-copy` | Copies one player's slot onto other players', **overwriting an occupied destination** |\n| `saveslot-persist` | Turns the ephemeral session into a save and switches onto it |\n| `saveslot-reset` | Empties slots, keeping their index and name |\n| `saveslot-export` / `saveslot-import` | Moves a slot through the shared store as a code |\n| `saveslot-read-json` / `saveslot-write-json` | Moves a slot as raw JSON, no shared store |\n| `saveslot-import-ephemeral` | Loads a code into a throwaway session |\n\nCommands take players as ids, so they reach a player who is not in this server as readily as one who\nis: a player here is acted on through their bound [HasSaveSlots], and an absent player through an\n[OfflineSaveSlots] opened over their datastore. Both hand back the same [HasSaveSlotsDataStore], so\nthe command bodies below never branch on which it was. `saveslot-import-ephemeral` is the one\nexception, and refuses an absent player outright -- an ephemeral session only exists while it is\nbeing played.\n\n:::warning\nActing on an absent player **steals their session lock**, kicking them from wherever they are\nplaying. That is accepted for admin tooling -- the session is released again as soon as the command\nfinishes, so they can rejoin -- but it is why these are admin commands.\n:::",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 36,
        "path": "src/saveslot/src/Server/Cmdr/SaveSlotCmdrService.lua"
    }
}