> ## 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.

# Intelligent Delivery：自訂標記指定元

> Intelligent Delivery：自訂標記指定元

自訂標記指定元會將區塊群組標記為相關。自訂標記的主要用途是將區塊分組，以納入 [Feature](/zh-TW/build/core-features/common/packaging/intelligentdelivery-features-recipes) 中。

<a id="ID4EV" />

```xml theme={null}
<Chunk Id="7000" Tags="LevelEditor">  
```

## 將相關區塊分組

使用自訂標記指定元將區塊群組標記為相關。這可簡化檢查執行遊戲所需的所有區塊是否都存在於使用者主機上的程序。

例如，您不需要嘗試判斷關卡 1 的資產是否包含在區塊 1000、1001 和 1002 中，也不需要呼叫 [XPackageFindChunkAvailability](/zh-TW/reference/system/xpackage/functions/xpackagefindchunkavailability) 方法來判斷關卡 1 是否已完整安裝並可供遊玩，而是可以使用自訂標記 "Level 1" 來標記這三個區塊。接著，您可以使用 [XPackageChunkSelector](/zh-TW/reference/system/xpackage/structs/xpackagechunkselector) 呼叫 [XPackageFindChunkAvailability](/zh-TW/reference/system/xpackage/functions/xpackagefindchunkavailability) 方法，輕鬆取得該組資料的安裝狀態。

<a id="ID4EHB" />

## 只在多個 Feature 啟用時才安裝的區塊

您可以在一個區塊中表示多個自訂標記指定元，讓該區塊只有在兩個標記都存在於已啟用的 Feature 中時才會安裝。做法是使用 # 符號將兩個標記連接在一起。

只有在有包含 campaign 標記以及 hd 標記的作用中 Feature 時，才會安裝區塊 8000。如果使用者解除安裝 campaign Feature 或 HD Texture Feature，區塊 8000 將會與包含已移除 Feature 中標記的區塊一起移除。

```xml theme={null}
<Features>
  <Feature Id="campaign_feature_id" DisplayName="Campaign" Tags="campaign"/>
  <Feature Id="hd_feature_id" DisplayName="HD Textures" Tags="hd"/>
</Features>

<Chunk Id="8000" Tags="campaign#hd">  <!-- This chunk is only installed if both the Campaign and HD Textures Features are active -->
<Chunk Id="8001" Tags="campaign">
<Chunk Id="8002" Tags="hd">
<Chunk Id="8003" Tags="campaign;hd">  <!-- This chunk is only installed if either the Campaign or the HD Textures Features are active -->
```

## 在用於光碟製造的套件中省略內容

您可以使用標記指定元，指定某些內容不應成為光碟套件的一部分。例如，如果您的遊戲佔用 65 GB 的光碟空間，則選用內容 (例如 20 GB 的幕後花絮影片) 對單張 BD50 Blu-ray 光碟而言會太大。

使用自訂標記指定元，指定套件中的特定內容預設不會安裝。例如，您可以將區塊指定為 OnDemand，使其只有在遊戲要求時才會安裝。為了在執行階段輕鬆下載這類選用的 OnDemand 區塊，也會在 layout.xml 檔案中以自訂標記指定元標記該區塊。您的遊戲可以在傳遞給 [XPackageInstallChunks](/zh-TW/reference/system/xpackage/functions/xpackageinstallchunks) API 的 [XPackageChunkSelector](/zh-TW/reference/system/xpackage/structs/xpackagechunkselector) 中設定自訂標記，以要求從 XBOX Live 下載內容。

<a id="ID4EYB" />

## 多光碟遊戲

針對多光碟發行，請使用標記指定元來指定內容要放在哪張光碟上。例如，您可以將所有多人遊戲內容放在合輯光碟的第 2 張光碟上。

或者，當您為不同地區製作多光碟 SKU 時，可以使用此功能，只需上傳並管理單一 XVC 映像，即可將 EFIGS 放在一個 Blu-ray 光碟 SKU 上，並將日文放在另一個 SKU 上 (例如用於母版製作和複製)。

<a id="ID4E6B" />

## 參考 API 文件

* [XPackage (API 內容)](/zh-TW/reference/system/xpackage/xpackage_members)
  * 函式
    * [XPackageFindChunkAvailability](/zh-TW/reference/system/xpackage/functions/xpackagefindchunkavailability)
    * [XPackageInstallChunks](/zh-TW/reference/system/xpackage/functions/xpackageinstallchunks)
  * 結構
    * [XPackageChunkSelector](/zh-TW/reference/system/xpackage/structs/xpackagechunkselector)

## 另請參閱

[Intelligent Delivery](/zh-TW/build/core-features/common/packaging/overviews/intelligentdelivery)


## Related topics

- [Intelligent Delivery](/zh-CN/build/core-features/common/packaging/overviews/intelligentdelivery.md)
- [Intelligent Delivery: デバイス指定子](/ja-jp/build/core-features/common/packaging/intelligentdelivery-device.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [Intelligent Delivery: カスタムタグ指定子](/ja-jp/build/core-features/common/packaging/intelligentdelivery-custom.md)
- [Intelligent Delivery：features 与 recipes](/zh-CN/build/core-features/common/packaging/intelligentdelivery-features-recipes.md)
