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

# 建立測試光碟

> 建立測試光碟

<Note>這些指示僅供測試之用。在零售情境中，這些資料會根據 Partner Center 中的中繼資料自動設定。建立合輯光碟流程中所選取的選項，用於控制安裝順序、自動播放等。當您提交遊戲以供擷取時，不需要直接將測試中繼資料或 JSON 設定檔提交給我們。</Note>

本主題說明如何建立測試光碟。您可以建立下列類型的測試光碟。

* [合輯](#ID4E1)
* [多光碟](#ID4EBE)

<a id="ID4E1" />

## 合輯

### 建立測試合輯光碟

若要建立及測試合輯光碟，您需要建立 catalog.js 中繼資料檔案和光碟配置，如下所述。

* [建立光碟配置](#ID4EGB)
* [Catalog.js](#ID4EMC)
* [安裝順序和通知](#ID4ELD)
* [部署](#ID4EYD)

<a id="ID4EGB" />

### 建立光碟配置

建立如下列範例所示的光碟配置。

```
- Disc Root
    - Licenses (folder) - (Not needed for Xbox One ERA Development Kits - make sure to use XVCs created with /LT flag)
        License0.xml (file) - (Not needed for Xbox One ERA dev kits - make sure to use XVCs created with /LT flag)
    - MSXC (folder)
        - Package1.xvc (file)
        - Package2.xvc (file)
        - Metadata (folder)
            - catalog.js (file)
            - Bundle (folder)
                - Bundle images (files)
            - Package1.xvc (folder)
                - Package 1 images (files)
            - Package2.xvc (folder)
                - Package 2 images (files)  
```

其中目錄包含下列內容：

* **Licenses** 包含遊戲的授權檔案。XBOX One ERA 開發套件不需要此資訊。請務必使用以 **/LT** 旗標建立的 XVC。之後即可省略這些檔案。

* **MSXC** 包含 XBOX 殼層所使用的已封裝遊戲和中繼資料。

* **Metadata** 包含殼層針對光碟上的遊戲及遊戲套件所使用的中繼資料。

* **Bundle** 包含殼層所使用的影像。

* **Package1.XVC** 包含殼層針對第一個遊戲所使用的影像。名稱必須與 MSXC 中的遊戲套件檔案名稱相符。

* **Package2.XVC** 包含殼層針對第二個遊戲所使用的影像。名稱必須與 MSXC 中的遊戲套件檔案名稱相符。

<a id="ID4EMC" />

### Catalog.js

在 Metadata 資料夾中，建立名為 catalog.js 的檔案。編輯此檔案，以反映其他資料夾中的套件和影像名稱。此檔案必須採用 UTF-16 LE 編碼。建議您使用網路上的 JSON 驗證程式。為確保 JSON 有效，請將其複製到文字編輯器中，然後以 UTF-16 LE 格式儲存檔案。

<a id="ID4ESC" />

##### 多遊戲情境的 catalog.js 檔案範例 (含註解)

```js theme={null}
{
  "version": "4.1",                                        // Don't adjust this value.
  "bundle": {
    "oneStoreProductId": "9P436MXJ71GV",                   // Replace with your bundle product id.
    "titles": [
      {
        "locale": "default",
        "title": "Bundle Title"                            // Replace with bundle title.
      }
    ],
    "images": [
      {
        "size": "100x100",                                 // Don't change the size values.
        "image": "100x100_1.png"                           // Must match the image file names in MSXC\Metadata\Bundle\
      },
      {
        "size": "208x208",
        "image": "208x208_1.png"
      },
      {
        "size": "480x480",
        "image": "480x480_1.png"
      }
    ]
  },
  "packages": [                                             // This is an array of packages.
    {
      "packageName": "Package1.xvc",                        // Match your package name in MSXC\<package name> and MSXC\Metdata\<package name>
      "oneStoreProductId": "BX38WRFV50MJ",                  // Product id for package 1.
      "contentId": "2b05043b-4043-4ba0-80ed-fd4811c4b333",  // Content id for package 1.  Must match the content id of the package file.
      "franchiseGameHubId": "47445142-3636-3036-C048-464D4E574000", // Optional; Replace with the FranchiseGameHubId. This marks the package as a game hub
      "titleId": "037C3A1D",                                // Title id for package 1.
      "titles": [
        {
          "locale": "default",
          "title": "Killer Instinct"                        // Package 1 title.
        }
      ],
      "images": [
        {
          "size": "100x100",
          "image": "100x100_1.png"                          // Match file names in MSXC\Metadata\<Package1>\
        },
        {
          "size": "208x208",
          "image": "208x208_1.png"
        },
        {
          "size": "480x480",
          "image": "480x480_1.png"
        }
      ],
      "ratings": [
        {
          "system": "OFLC",
          "value": "M"
        },
        {
          "system": "DJCTQ",
          "value": "14"
        },
        {
          "system": "PCBP",
          "value": "Unrated"
        },
        {
          "system": "USK",
          "value": "16"
        },
        {
          "system": "ESRB",
          "value": "T"
        },
        {
          "system": "CERO",
          "value": "Unrated"
        },
        {
          "system": "CSRR",
          "value": "Unrated"
        },
        {
          "system": "COB",
          "value": "M"
        },
        {
          "system": "GRB",
          "value": "Unrated"
        },
        {
          "system": "PEGI",
          "value": "16"
        },
        {
          "system": "PEGIPortugal",
          "value": "Unrated"
        }
      ],
      "type": "Game"
  },
  {
    "packageName": "Package2.xvc",
    "oneStoreProductId": "BVC818MXZ6KG",
    "contentId": "4a6cb1d0-5ad3-47b7-9583-7480098b4a26",
    "associatedFranchiseGameHubId": "47445142-3636-3036-C048-464D4E574000", // Replace with the FranchiseGameHubId of the corresponding franchise game hub that this package is launched with. Optional;
    "titleId": "669E1864",
    "titles": [
      {
        "locale": "default",
        "title": "LocoCycle"
      }
    ],
    "images": [
      {
        "size": "100x100",
        "image": "100x100_1.png"
      },
      {
        "size": "208x208",
        "image": "208x208_1.png"
      },
      {
        "size": "480x480",
        "image": "480x480_1.png"
      }
    ],
    "ratings": [
      {
        "system": "OFLC",
        "value": "PG"
      },
      {
        "system": "DJCTQ",
        "value": "10"
      },
      {
        "system": "USK",
        "value": "12"
      },
      {
        "system": "ESRB",
        "value": "T"
      },
      {
        "system": "PEGI",
        "value": "12"
      },
      {
        "system": "COB",
        "value": "PG"
      }
    ],
    "type": "Game"
    }
  ]
}  
```

<a id="ID4EAD" />

##### 遊戲和可下載內容 (DLC) 情境的 catalog.js 範例

```js theme={null}
{
  "version": "4.0",                                        // Don't adjust this value.
  "bundle": {
    "oneStoreProductId": "9P436MXJ71GV",                   // Replace with bundle product id.
    "launchPackage": "Package3.xvc",                       // Should be the package name of the game package.  This is the package that is launched when the game disc is inserted.
    "titles": [
      {
        "locale": "default",                                        
        "title": "Game + DLC Bundle Title"                 // Replace with bundle name.
      }
    ],
    "images": [
      {
        "size": "100x100",
        "image": "100x100_1.png"                           // Must match the image file names in MSXC\Metadata\Bundle\
      },
      {
        "size": "208x208",
        "image": "208x208_1.png"
      },
      {
        "size": "480x480",
        "image": "480x480_1.png"
      }
    ]
  },
  "packages": [
    {
      "packageName": "Package1.xvc",                       // Match folder name in MSXC\Metadata\<folder name>
      "oneStoreProductId": "BX38WRFV50MJ",                 // Replace with DLC 1 product id.
      "contentId": "ace6ef3b-0c5b-4f17-a651-390e75169d5c", // Replace with DLC 1 content id. This must match the content id of the package file.
      "allowedOneStoreProductIds": [
        "BVC818MXZ6KG"                                     // Should match the product id of the game that will load this DLC.
      ],
      "titles": [
        {
          "locale": "default",
          "title": "DLC Title 1"
        }
      ],
      "images": [
        {
          "size": "100x100",
          "image": "100x100_1.png"                         // Match file names in MSXC\Metadata\Package1.xvc\
        },
        {
          "size": "208x208",
          "image": "208x208_1.png"
        },
        {
          "size": "480x480",
          "image": "480x480_1.png"
        }
      ],
      "ratings": [
        {
          "system": "ESRB",
          "value": "E"
        }
      ],
      "type": "Durable"                                    // Indicates that this is a DLC package.
    },
    {
      "packageName": "Package2.xvc",
      "oneStoreProductId": "9P436MXJ71GV",
      "contentId": "b0f77189-d74c-4005-b351-955d380cb875",
      "allowedOneStoreProductIds": [
        "BVC818MXZ6KG"
      ],
      "titles": [
        {
          "locale": "en-US",
          "title": "DLC Title 2"
        }
      ],
      "images": [
        {
          "size": "100x100",
          "image": "100x100_1.png"
        },
        {
          "size": "208x208",
          "image": "208x208_1.png"
        },
        {
          "size": "480x480",
          "image": "480x480_1.png"
        }
      ],
      "ratings": [
        {
          "system": "ESRB",
          "value": "E"
        }
      ],
      "type": "Durable"
    },
    {
      "packageName": "Package3.xvc",
      "oneStoreProductId": "BVC818MXZ6KG",
      "contentId": "5519355c-bff9-40b4-92bb-b5473fd9c577",
      "titleId": "35c8f637",
      "titles": [
        {
          "locale": "default",
          "title": "Game Title"
        }
      ],
      "images": [
        {
          "size": "100x100",
          "image": "100x100_1.png"
        },
        {
          "size": "208x208",
          "image": "208x208_1.png"
        },
        {
          "size": "480x480",
          "image": "480x480_1.png"
        }
      ],
      "ratings": [
        {
          "system": "ESRB",
          "value": "E"
        }
      ],
      "type": "Game"                                       // Indicates main game package.
    }
  ]
}  
```

<a id="ID4ELD" />

### 安裝順序和通知

DLC 安裝通知通常會在 DLC 套件完成安裝時觸發。對於某些類型的遊戲光碟，有時並不希望如此，因為這會在極短的時間內產生大量通知。例如，年度遊戲版可能會在光碟上包含大量小型 DLC 套件。為了處理這種情況，只有在 DLC 所適用的遊戲已安裝時，才會觸發 DLC 的通知。

對於具有大量小型 DLC 套件的遊戲，建議您將光碟上的套件排序為先安裝 DLC，再安裝遊戲。這可確保使用者在安裝 DLC 套件時不會被大量通知淹沒。

對於具有少量大型 DLC 套件的遊戲，建議您在主要遊戲之後安裝 DLC，以確保使用者不會因為必須等到所有 DLC 套件安裝完成才能遊玩遊戲。

若要控制 DLC 和遊戲的安裝順序，只要在 catalog.js 的 *Packages* JSON 陣列中調整它們的順序即可。此陣列控制預設的安裝順序。

<a id="ID4EYD" />

### 部署

若要部署合輯光碟，請將目錄結構燒錄到光碟。當您將光碟插入開發套件時，它會像發行版本在零售主機上一樣啟動。

<a id="ID4EBE" />

## 多光碟

若要建立測試多光碟，請將現有的 XVC 分割成兩個檔案。

<Note>XVC 只能在 Layout.xml 檔案中所定義的個別區塊邊界上分割。具有極大區塊 (大於 45 GB) 的 XVC 可能無法使用多光碟功能發行。一般而言，最好讓您遊戲的區塊小於 45 GB。</Note>

若要將 XVC 分割到兩片光碟上，請建立類似下列內容的 DiscLayout.xml 檔案。

```xml theme={null}
<Packages>
  <Package Name="MultiDisc" Description="Package published on 2 discs" MaxDiscs="2">
  </Package>
</Packages>  
```

接下來，叫用 SplitPkg 以產生要燒錄到光碟的個別檔案。這會產生兩個檔案，其名稱為您的原始 XVC 檔案名稱加上 ".MultiDisc.1" 和 ".MultiDisc.2" 後綴。

```
SplitPkg /f DiscLayout.xml /p sourceXVC /s Multidisc /pd outputDir  
```

若要模擬從多片光碟安裝，請對光碟 1 使用 `xbapp install`，並對光碟 2 使用 `xbapp install`。光碟 1 上的內容安裝完成之後，主機會提示您插入光碟 2。

<a id="ID4ENF" />

### Catalog.js

若要燒錄這些測試光碟，請建立含有新的 **discNumber**、**discCount** 和 **discSetId** 欄位的 Catalog.js 檔案。請注意，*每一片*光碟都需要所有這些中繼資料。每片光碟上的 Catalog.js 檔案唯一的差異是 **discNumber** 欄位的值。例如，光碟 1 的值應為 1，光碟 2 的值應為 2。零 (0) 是保留值，不應使用。

<a id="ID4E5F" />

#### 多光碟的 Catalog.js 範例

```json theme={null}
{
  "version": "4.0",                                         // Don't adjust this value.
  "discNumber": 1,                                          // 1 for disc 1, 2 for disc 2.
  "discCount": 2,                                           // Same on all discs.
  "discSetId": "00000001",                                  // For test purposes, this can be 00000001. On retail discs, this value is unique for each published disc set. 
                                                            // Don't mix installations of test discs from different sets if they share this value. Cancel your installation before starting a new one.
  "packages": [                                             // This is an array of packages.
    {
      "packageName": "Package1.xvc",                        // Match your package name in MSXC\package-name and MSXC\Metdata\package-name
      "oneStoreProductId": "BX38WRFV50MJ",                  // Product id for package 1.
      "contentId": "2b05043b-4043-4ba0-80ed-fd4811c4b333",  // Content id for package 1. Must match the content id of the package file.
      "titleId": "037C3A1D",                                // Title id for package 1.
      "titles": [
      {
        "locale": "default",
        "title": "Killer Instinct"                          // Package 1 title.
      }
    ],
    "images": [
      {
        "size": "100x100",
        "image": "100x100_1.png"                            // Match file names in MSXC\Metadata\Package1\
      },
      {
        "size": "208x208",
        "image": "208x208_1.png"
      },
      {
        "size": "480x480",
        "image": "480x480_1.png"
      }
    ],
    "ratings": [
      {
        "system": "OFLC",
        "value": "M"
      },
      {
        "system": "DJCTQ",
        "value": "14"
      },
      {
        "system": "PCBP",
        "value": "Unrated"
      },
      {
        "system": "USK",
        "value": "16"
      },
      {
        "system": "ESRB",
        "value": "T"
      },
      {
        "system": "CERO",
        "value": "Unrated"
      },
      {
        "system": "CSRR",
        "value": "Unrated"
      },
      {
        "system": "COB",
        "value": "M"
      },
      {
        "system": "GRB",
        "value": "Unrated"
      },
        {
        "system": "PEGI",
        "value": "16"
      },
      {
        "system": "PEGIPortugal",
        "value": "Unrated"
      }
    ],
      "type": "Game"
    }
  ]
}  
```

## 另請參閱

* [建立跨世代測試光碟](/zh-TW/build/core-features/common/packaging/creating-cross-gen-test-discs)
* [建立光碟](/zh-TW/build/core-features/common/packaging/creating-discs)
* [多光碟功能](/zh-TW/build/core-features/common/packaging/packaging-multi-disc)
* [Franchise Game Hubs](https://learn.microsoft.com/build/store/franchise-game-hubs)


## Related topics

- [認證逐步指南](/zh-TW/publishing/game-publishing/concepts/certification/certification-guide.md)
- [使用 GDKX 建置並執行你的第一個主機遊戲](/zh-TW/home/build-first-title/first-console-title-walkthrough.md)
- [媒體驗證測試步驟](/zh-TW/publishing/game-publishing/concepts/certification/certification-media-validation-test-steps.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [最常失敗的測試案例](/zh-TW/publishing/certification/xr-top-failing.md)
