> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 在試玩測試中使用 XBOX services

> 為試玩測試準備遊戲的 XBOX services 組態，從完整 XBOX services 和成就，到禁運和 RETAIL 發佈。

試玩測試會在 RETAIL 沙箱中執行，這是玩家使用的即時環境。當組建使用 XBOX 登入、成就、目前狀態或其他 XBOX services 時，遊戲需要完整 XBOX services，而且其 XBOX services 組態必須發佈至 RETAIL。測試人員接著會使用與已發行遊戲之玩家相同的即時 XBOX services。請參閱 [XBOX services 和 Playtest](https://docs.xbox.com/publishing/game-publishing/concepts/playtest-preview.md#xbox-services-and-playtest)。

在您[建立試玩測試](https://docs.xbox.com/zh-TW/tools/xbox-cli/first-playtest.md)之前，執行一次下列步驟：

1. [取得完整 XBOX services](#1-get-full-xbox-services)。
2. [選擇成就的處理方式](#2-choose-what-happens-to-achievements)。
3. [設定禁運](#3-set-the-embargo)。
4. [將組態發佈至 RETAIL](#4-publish-the-configuration-to-retail)。

範例使用 XBOX 遊戲 ID `1234ABCD`，以及保存組建測試所用組態的開發沙箱 `XDKS.1`。

## 1. 取得完整 XBOX services

新遊戲一開始時會停用 XBOX services。有限 XBOX services 只能在開發沙箱中運作，且不包括成就或統計資料。在您的遊戲概念獲得核准後，請將遊戲的 Store ID 傳送給您的 XBOX 代表，並要求他們將產品上線。然後在 Partner Center 中遊戲的 **Game setup** 頁面上，選取 **Enable full XBOX services**。請參閱[啟用 XBOX services](https://docs.xbox.com/publishing/game-publishing/concepts/xbox-services.md#enable-xbox-services)。

在此之前，含有成就的組態將無法通過驗證：

```text theme={null}
XblLimited products do not support achievements or stats2013/stats2015 configuration.
```

## 2. 選擇成就的處理方式

發佈至 RETAIL 的成就是永久的。您仍然可以變更其名稱、描述和美術圖，但無法移除它們，也無法變更其解鎖規則或玩家分數。發佈至 RETAIL 的統計資料也無法刪除。遊戲的成就系統 (由遊戲管理或以事件為基礎) 會在第一次 RETAIL 發佈時固定。在該次發佈之前，請選擇下列其中一項：

| 選擇 | 使用時機 | 方法 |
| - | - | - |
| 發佈最終成就 | 成就已定案。 | 照常發佈。對於尚未發行的遊戲，下一個步驟中的禁運會對其他玩家隱藏這些成就。 |
| 要求驗證覆寫 | 成就設計需要在試玩測試期間變更。 | 向您的 XBOX 代表要求開發期間的驗證覆寫。在提交遊戲進行認證之前將其移除。 |

適用於 PC 或 XBOX 主機的遊戲無法略過將其成就發佈至 RETAIL。在 Partner Center 中，對 **Publish Achievements to Retail?** 回答 **No** 會失敗並顯示：

```text theme={null}
The specified Platform:Windows can be used only when game is configured to Publish Achievements.
```

所有已發佈的成就都必須符合成就和玩家分數的 XBOX 需求。請參閱[成就](https://docs.xbox.com/publishing/game-publishing/concepts/playtest-preview.md#achievements)。

## 3. 設定禁運

禁運會在您選擇的日期之前，於 XBOX 應用程式和主機 UI 中對玩家隱藏遊戲的成就、目前狀態和其他 XBOX services 資料，並封鎖螢幕擷取畫面和影片擷取。若未設定禁運，試玩測試以外的玩家可以看到遊戲的組態。

只對尚未發行的遊戲設定禁運。在已發行的遊戲上，新的禁運會對其玩家隱藏其 XBOX services 資料。

在 Partner Center 中，開啟 **XBOX services** > **XBOX settings**，前往 **Embargo date**，並設定晚於試玩測試結束時間、且不晚於遊戲公開發行的 UTC 日期和時間。如果試玩測試持續到發行之後，請在發行時結束禁運。如果測試人員會互相邀請加入多人遊戲工作階段，請選取 **Allow Multiplayer Invites in Embargo**。請參閱[設定禁運日期](https://docs.xbox.com/publishing/game-publishing/tutorial-xbox-managed/how-to-configure-xbox-services.md#configure-embargo-date)。

禁運是遊戲範圍的設定，儲存在 `ALL` 沙箱中，並套用至每個沙箱。若要檢查它，請下載 `ALL`：

```bash theme={null}
xbox xbl config download --title-id 1234ABCD --sandbox-id ALL --view draft --dest xbox-config-all
```

`productdeveloper.xml` 保存禁運設定：

```xml theme={null}
<XboxLiveEmbargoDate>2027-03-01T17:00:00Z</XboxLiveEmbargoDate>
<EmbargoInvitesEnabled>true</EmbargoInvitesEnabled>
```

禁運會在遊戲範圍的組態發佈時生效。如果 Partner Center 顯示未發佈的變更，請在該處發佈，或使用 `--sandbox-id HIDDEN` 發佈：

> [!WARNING]
>
> 遊戲範圍的發佈會發佈每個待處理的遊戲範圍變更，而不只是禁運，且這些變更也會套用至 RETAIL。請先檢閱待處理的變更。

```bash theme={null}
xbox xbl config publish --title-id 1234ABCD --sandbox-id HIDDEN
```

此命令在發佈之前會先詢問。請參閱[來源選取](https://docs.xbox.com/zh-TW/tools/xbox-cli/commands/xbl.md#source-selection)。

發佈是非同步的。在發佈至 RETAIL 之前，請確認 `lastPublish` 顯示遊戲範圍的發佈已成功：

```bash theme={null}
xbox xbl config status --title-id 1234ABCD --sandbox-id HIDDEN
```

## 4. 將組態發佈至 RETAIL

將開發沙箱的組態直接發佈至 RETAIL。RETAIL 不需要先發佈至 CERT，也不需要認證。

> [!WARNING]
>
> RETAIL 發佈一完成，就會立即對玩家生效，而且已發佈的成就無法移除。請參閱[安全性和破壞性作業](https://docs.xbox.com/zh-TW/tools/xbox-cli/safety.md)。

請先驗證。驗證不會變更任何內容，並會列出發佈所新增的成就：

```bash theme={null}
xbox xbl config publish --title-id 1234ABCD \
  --source-sandbox-id XDKS.1 --sandbox-id RETAIL --validate-only
```

如果驗證顯示 `FirstRetailPublishWithoutEffectiveEmbargo` 警告，表示目前尚無生效的禁運。請完成[步驟 3](#3-set-the-embargo)，包括遊戲範圍的發佈。

從 `XDKS.1` 發佈會取代 RETAIL 中同名的工作文件，以及 RETAIL 的全域遊戲儲存體檔案，並刪除只有 RETAIL 才有的任何檔案。請參閱[跨沙箱發佈](https://docs.xbox.com/zh-TW/tools/xbox-cli/commands/xbl.md#cross-sandbox-publishing-replaces-global-title-storage-files)。

驗證沒有問題時，即可發佈。此命令會描述發佈內容並先詢問：

```bash theme={null}
xbox xbl config publish --title-id 1234ABCD --source-sandbox-id XDKS.1 --sandbox-id RETAIL
```

檢查 `lastPublish`，直到發佈完成：

```bash theme={null}
xbox xbl config status --title-id 1234ABCD --sandbox-id RETAIL
```

然後[建立並發佈試玩測試](https://docs.xbox.com/zh-TW/tools/xbox-cli/first-playtest.md)。


## Related topics

- [您的第一個試玩測試](https://docs.xbox.com/zh-TW/tools/xbox-cli/first-playtest.md)
- [XBOX CLI](https://docs.xbox.com/zh-TW/tools/xbox-cli/index.md)
- [Playtest](https://docs.xbox.com/zh-TW/tools/xbox-cli/commands/playtest.md)
- [設定 XBOX services](https://docs.xbox.com/zh-TW/publishing/game-publishing/concepts/xbox-services.md)
- [使用 Playtest](https://docs.xbox.com/zh-TW/publishing/game-publishing/concepts/playtest-preview.md)
