Xbox Downloadable Content

Downloadable content (DLC) is optional content that can be downloaded by Xbox One console users through Xbox Live Services. Downloadable content can be free or it can be Purchasable/Premium DLC (PDLC). DLC made available for the Xbox One console may be related to specific titles, such as a map-pack for multiplayer, or consumable content such as power ups or in-game currency.

Xbox One DLC scenarios are facilitated by the same packaging system as full titles, with changes to the AppxManifest.xml file to indicate that it is a DLC package. Packages are protected by unique license keys that differ from the base application package.

The following subjects are discussed in this topic.

User DLC Scenarios

The following examples are common user DLC scenarios.

Note
Forced update is not supported for DLC at this time.

DLC Creation and Download

This section outlines the steps title developers must follow to create, publish, and ultimately download their DLC packages.

1. Package Creation

  1. Title developers use the Make Package (makepkg.exe) tool to package desired content into a DLC XVC.

      Makepkg.exe /v /l /f chunk.xml /d inputFolder /pd outXVDFolder
    
    • The following is an example of an AppxManifest.xml file for DLC.
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"
         xmlns:mx="http://schemas.microsoft.com/appx/2013/xbox/manifest"
         IgnorableNamespaces="mx">

  <Identity Name="MarbleMaze.DLC.Eyeball"
            Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
            Version="1.0.0.0" />

  <Properties>
    <DisplayName>Eyeball Marble DLC</DisplayName>
    <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
    <Logo>logo.png</Logo>
    <Description>Eyeball Marble DLC for MarbleMaze</Description>
    <mx:ContentPackage>true</mx:ContentPackage>
  </Properties>

  <Prerequisites>
    <OSMinVersion>6.2</OSMinVersion>
    <OSMaxVersionTested>6.2</OSMaxVersionTested>
    <mx:ApplicationEnvironment>title</mx:ApplicationEnvironment>
    <mx:OSName>era</mx:OSName>
  </Prerequisites>

  <Resources>
    <Resource Language="en-US" />
  </Resources>

  <Extensions>
    <mx:PackageExtension Category="xbox.contentpackage">
      <mx:ContentPackage>
        <mx:AllowedProduct Id="0eafd21d-2911-4be5-95fb-6dc0b50b6152" />
        <mx:ContentPackageVisualElements
            DisplayName="ATG Sample Durable DLC 1"
            Logo="Logo.png"
            SmallLogo="Logo.png"
            WideLogo="Logo.png"
            Description="ATG Sample Durable DLC 1"
            ForegroundText="dark"
            BackgroundColor="#000040" />
      </mx:ContentPackage>
    </mx:PackageExtension>
  </Extensions>
</Package>

There are several important things to note about the AppxManifest.xml file that are specifically related to DLC.

Note
Only those packages marked as exclusive partition DLC are able to have code executed from them, such as a DLL for example.
            <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"
                     xmlns:mx="http://schemas.microsoft.com/appx/2013/xbox/manifest"
                     IgnorableNamespaces="mx">
            <Extensions>
              <mx:PackageExtension Category="xbox.store">
                <mx:XboxStore>
                  <mx:RelatedProducts>
                    <mx:RelatedProduct Id="0eafd21d-2911-4be5-95fb-6dc0b50b6152" />
                    <mx:RelatedProduct Id="00000000-0000-0000-0000-000000000000" />
                  </mx:RelatedProducts>
                </mx:XboxStore>
              </mx:PackageExtension>
            </Extensions>

Note that each product you want to be related would need to be listed here. The above sample would make Marble Maze and the Visual Studio F5 default app deployment (all zeros) related products. The ERA using these nodes in its AppxManifest.xml would then be able to enumerate packages that belong to either product.

2. Sideloading

Once you have created the package, you can deploy it to the console with the Application Management (xbapp.exe) tool, using the same command prompt:

    xbapp install [DestinationOutputDirectory]\[package name]

To delete the package use the following command:

    xbapp uninstall [package name]

To view all installed DLC on the console use the following command:

    xbapp listdlc

3. Ingestion

  1. Developer goes to Xbox Developer Portal (XDP) and creates a new DLC item.

  2. Durables:
    • Adds art assets, title, and other metadata to the portal.
    • Sets price in XDP, and may mark titles as related.
      • Linking your title/DLC and other titles, so that your titles and DLC will show up in Xbox One marketplace pages for related content.
    • Uploads the XVC from Package Creation and publishes the DLC.
  3. Certification does basic package validation to ensure that the package is well-formed and developer-signed.

4. Propagation

  1. XDP posts the package (XVC) to a Content Delivery Network (CDN), and adds the metadata to XMS (the XDP database) to be exposed to all Xbox Live services.
  2. Other Xbox Live services access XMS to read and expose metadata to clients.

5. Title Shows Marketplace and Purchase

  1. Show Marketplace. It is also possible to enter this point from the Marketplace in the Xbox One shell.
  2. There are three paths for the title:
    • Call Entertainment Discovery Services (EDS) directly for enumeration of related content and entitlements for ‘own it’. Title renders its own marketplace and details UI. When ready to do purchase, call Product.ShowPurchaseAsync Method.
    • Render its own marketplace through calls to Entertainment Discovery Services (EDS) to get content; Leverage Xbox One shell Marketplace’s details page, call Product.ShowDetailsAsync Method.
    • Give all control to Marketplace by calling Product.ShowMarketplaceAsync Method, which shows all related content for the application. This will show Marketplace Title Callable UI (TCUI) that will offer all related items to your product, including DLC.
  3. When a user chooses to purchase content, the confirmation dialog is shown. This user experience is managed by the Xbox One shell.

6. Download, Installation, and Notification

Note
This is also the path for content that people already own, but that hasn’t been downloaded to the Xbox One. The marketplace details are shown, but the content is re-downloaded where the user would normally be prompted to buy the content. To detect whether the user owns something that is not currently installed, a title may query the inventory service using GET (/users/me/inventory). This call will return all things the user owns related to your title. Your title can then compare owned (inventory) items to installed (enumerated) items and detect gaps.
Note
Your title must have completed downloading before your DLC downloads.
        void OnPackageInstallCompleted() {
          wcout << L"PackageInstalled " << endl; }

        void MyAppMethod() {
          _manager = ref new DownloadableContentPackageManager();
          _manager->DownloadableContentPackageInstallCompleted += ref new DownloadableContentPackageInstallCompletedEventHandler ( &OnPackageInstallCompleted );
          return; }

See the DownloadableContentPackageManager Events section for more information.

Note
Previewing (using the IDownloadableContentPackage.CheckLicense Method) and enumerating (using the DownloadableContentPackageManager.FindPackages Method) are ‘fast and lightweight’ operations. Mounting and unmounting are ‘heavyweight’ operations. Until a DLC package has finished downloading, it will not be returned from enumeration, and will not be mountable.

7. Enumeration, Mounting, and Unmounting

  1. Your title enumerates packages installed on the system by calling the DownloadableContentPackageManager.FindPackages Method.
    • Packages returned will be those related to the current running app; either they have the running application as their parent, or they are a related application/DLC item.
    • The packages are returned as strongly-typed IDownloadableContentPackage Members objects.
    • Treat this as a view into what’s installed; this does not represent what the user owns, but what is installed on the box.
    • The process for enumeration and mounting is identical offline.
  2. From the packages installed, the title picks the one(s) it wants to mount, and calls IDownloadableContentPackage.Mount Method on a given package item.
    • Think of the package XVC as a mounted virtual hard drive.
    • Mounting only succeeds if the license state is valid. Determination that the license state is invalid can be due to any number of reasons, which are abstracted by the DLC APIs.
    • Mounting may fail if the package is insufficiently downloaded.
  3. The title opens file handles into the mounted package and reads the contents. IDownloadableContentPackage.Mount Method returns the path to the package, which can then be used to open the file and read the contents.
  4. To determine if a package is mounted, check the IDownloadableContentPackage.IsMounted Property. To unmount a package, call IDownloadableContentPackage.Unmount Method.

8. Licensing and License Changes

Important
Using this event in August 2013 XDK QFE 3 or earlier may result in either a title crash or DLC packages being left in an unmountable state. Contact your DAM if you need to use this event.
Note
A DLC package will not be forcibly unmounted, once mounted. So, if a package goes unlicensed, it is left to the title’s business policy to dictate when a package is unmounted. This is to ensure we never remove a mounted package from a running title.

Additional Resources

The following additional resources are available for working with DLC on Xbox One.

Sample Code

For sample code related to DLC, see the “Downloadable Content” sample located on the XGD site.

Whitepaper

For more information about DLC, see the “Creating and Using Downloadable Content on Xbox One” whitepaper located on the Xbox Game Developer (XGD) site.

Localization

For details on localization of DLC metadata, see the Localizing Exclusive App DLC topic.