ashexplained/roblox-skills

roblox-datastore-persistence

Design, implement, and review Roblox DataStore persistence.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/ashexplained/roblox-skills --skill roblox-datastore-persistence

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Roblox DataStore Persistence

Goal

Save player progress reliably without corrupting or losing valuable state.

Schema Rules

  • Store compact canonical state, not UI state.
  • Include schemaVersion.
  • Keep defaults centralized.
  • Validate loaded data before using it.
  • Write migrations that can handle old, missing, or partial data.
  • Keep transient match/session state separate from permanent profile state.

Save Strategy

  • Load once when the player joins.
  • Keep an in-memory authoritative profile on the server.
  • Save on meaningful intervals and player leave.
  • Save on server shutdown with a bounded timeout.
  • Debounce rapid save requests.
  • Retry transient failures with backoff.
  • Mark dirty profiles and avoid unnecessary writes.

Valuable State

Treat these carefully:

  • Currency and premium currency.
  • Inventory, pets, cosmetics, boosts, quest progress, achievements.
  • Purchases and receipt-granted items.
  • Trading or gifting results.
  • Daily streaks and time-gated rewards.

MCP Review Workflow

  1. Use script_grep for DataStore, UpdateAsync, SetAsync, GetAsync, profile, save, and load.
  2. Read all persistence scripts with script_read.
  3. Map load, mutation, save, and shutdown flow.
  4. Patch with multi_edit.
  5. Playtest join/change/leave-like paths where possible and check get_console_output.

Output

Return:

  • Profile schema.
  • Save/load flow.
  • Migration plan.
  • Failure modes handled.
  • Manual tests still needed in published or multi-server conditions.

Next

Harden the save path against exploits with roblox-security-economy, then verify saves survive rejoin and shutdown with roblox-playtest-qa.

タスクに関連する項目

同じリポジトリから

関連する Skills

すべての Skills