> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-shi-yun-ying/server-data.md). Agents can also search and read this documentation through its [MCP server](https://docs.decentraland.org/~gitbook/mcp).

# 服务器数据

查看和编辑你的场景的多人服务器保存的实时数据。

使用 [多人游戏服务器](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md) 的场景可以在服务器上持久化数据：排行榜、玩家进度、环境变化（例如打开的门或放置的物品）等。这些数据会随着玩家与已发布场景互动而 **实时** 更新。

你可以通过网页界面查看所有这些数据，也可以 **直接在其中修改**。所做的任何编辑都会立即应用于正在运行的场景，无需重新发布。可编辑的内容包括：

* **场景数据**：所有玩家共享的值，例如排行榜或门的状态。
* **玩家数据**：为单个玩家存储的值，例如其进度或偏好设置。
* **环境变量**：只有服务器才能读取的配置值和机密信息。

## 访问存储界面

你可以直接通过以下地址打开存储界面： [decentraland.org/storage](https://decentraland.org/storage).

对于 World，也可以通过 Creator Hub 访问：

1. 在 Creator Hub 中打开 **管理** 页面，然后选择 **Worlds** 标签页。
2. 点击 World 卡片上的 **三点菜单** 。
3. 选择 **查看存储**.

<img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a3c860404a75f8c64da5265205326632b96ba428%2Fview-storage.webp?alt=media" alt="Creator Hub 中的“查看存储”选项" width="400">

存储界面会显示所有你已发布场景或拥有操作员权限的 World 和 LAND 地点的列表。打开一个场景，即可查看其数据，这些数据分为三个标签页： **场景**, **玩家**和 **环境**.

{% hint style="info" %}
**💡 提示**：此数据仅适用于使用多人游戏服务器并通过 `Storage` API 存储数据的场景。请参阅 [多人游戏服务器](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md) ，了解如何进行设置。
{% endhint %}

## 场景数据

“ **场景** ”标签页会列出所有已存储且由所有玩家共享的变量，例如排行榜或当前环境状态。

![Scene data tab](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-bbb302fbdb29f57fdcff7bf62fc6608838a06d44%2Fscene-data.webp?alt=media)

列表中的值会随着玩家与场景互动而实时更新。你也可以点击铅笔或垃圾桶图标来编辑或删除这些变量。正在运行的场景会接收这些更改，因此你可以方便地调整实时值（例如重置排行榜），而无需重新发布。

## 玩家数据

“ **玩家** ”标签页会列出服务器上存有数据的所有玩家。你可以按钱包地址或名称搜索玩家，然后查看与其关联的所有数据。

与场景数据一样，你也可以点击铅笔或垃圾桶图标来编辑或删除任何值。

这对支持工作尤其有用：如果有玩家报告场景中出现问题，你可以查找该玩家并检查其存储的数据，以了解其情况。例如，如果他们陷入了异常状态（比如场景旧版本留下了相互矛盾的数据），你可以编辑或清除他们的记录，使其恢复到稳定状态，而无需重新部署任何内容。

## 环境变量

“ **环境** ”标签页会列出为场景定义的所有环境变量。这些配置值只能由服务器读取，因此适合存放 **机密信息** ，例如私钥或奖励领取码：这些值不会经过玩家的设备，也不会出现在已发布的场景代码中。

![Environment variables tab](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-766c8433de10c67980a737242d867ad3c4fb5948%2Fenvironment-variables.webp?alt=media)

在此标签页中，你可以添加变量，也可以使用铅笔或垃圾桶图标覆盖或删除现有变量。请注意，你无法 *读取* 变量的当前值，这是为了保护敏感数据而有意如此。你只能替换或删除该变量。

环境变量也很适合用作功能开关或游戏参数，例如对局时长或最大玩家数。你可以在场景上线后调整这些值，而无需重新发布场景。

## 了解更多

若要了解如何在场景代码中读写这些数据，包括如何随着时间推移更改已存储数据结构的最佳实践，请参阅 [多人游戏服务器](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/shi-shi-yun-ying/server-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
