Документация Steamworks
Дополнительный контент (DLC)

Введение

Steam поддерживает как бесплатный, так и платный доп. контент (DLC), который пользователь может добавить с помощью цифрового ключа или приобрести в магазине Steam. В списке игр пользователя в клиенте Steam игра с доп. контентом выглядит как одно приложение, а посмотреть доп. контент можно через диалоговое окно свойств игры.

Если пользователь владеет доп. контентом, он считается составной частью игры. При установке игры Steam автоматически загружает контент и обновляет его, если становится доступно обновление.

Some examples of additional content that could be delivered as DLC include both in-game content include
  • Expansions
  • New maps or levels
  • Additional characters
DLC could be used for supplemental content that does not show up in-game such as
  • Artbooks or wallpapers
Саундтреки игр в Steam are handled with a special type of App ID that's different from DLC. Other types of in-game content such as cosmetics, consumable items or currencies may better be served by microtransactions.

Советы и рекомендации

DLC can be a great way to offer value to the customers that are interested in investing deeper in the product, it can also have non-monetary costs of customer perception that are harder to measure. It might not be a good idea to launch with a DLC on day 1 as customers may perceive that the full game was ready to release but you chose to take away content from the game to make more money through a paid DLC.

Видеоурок

This Steamworks Tutorial details the process of creating and configuring DLC for your product on Steam.
https://www.youtube.com/watch?v=Su4uuUjnm9M

Настройки

In Steam, each piece of downloadable content is identified by its own app ID. Unlike the base game, the DLC uses the app ID as the depot ID.

Creating a new DLC app ID is done by viewing the base game's "All Associated Packages, DLC, Demos And Tools" and clicking on the "Add New DLC" button.

When downloaded, the Steam client will store all downloadable content under your game's Steam directory. Your game can choose to distribute each piece of content in one of two ways:
  • The content can be included with your game files that are distributed to all game owners. Your game can then use ISteamApps::BIsDlcInstalled to determine if the user owns the content. This method is useful when all players can view the content, but a player needs to own the content to use it (such as RTS units, multiplayer skins, etc.).
  • The content can be stored in a new depot that will only be downloaded by users who own the content.

See the Хранилища documentation for more information.

Внутриигровые покупки

Steamworks games can support in-game downloadable content, which allows a user to browse, purchase, and download new content without leaving the game. Steam can display any available content to the user and conduct the entire purchase path through a web browser session that can be opened in the Steam overlay sitting on top of the game. When a user purchases downloadable content, the Steam client will automatically download the content, display an in-game Steam notification to the user when the download is complete, and notify your game that the download has completed and the user owns new content.

Steamworks games can use ISteamFriends::ActivateGameOverlayToStore to display downloadable content in the Steam overlay. ISteamFriends::ActivateGameOverlayToStore can display all downloadable content for your game (pass in your game's app ID), or information about a specific piece of downloadable content (pass in the app ID of the downloadable content). Before directing a user to the store, Steamworks games should call ISteamUtils::IsOverlayEnabled to determine if the user has disabled the Steam overlay through the Steam client settings.

Note: To prevent version incompatibilities with the executing version of a game and downloadable content, Steam will only download new content if the user is running the newest version of the game.

Настройка дополнительных хранилищ доп. контента

After following the depot documentation you should have one DLC Depot added to your Base App. If you need to add additional DLC depots to support alternate languages, OS's, or architectures, follow the steps below:
  1. Откройте страницу управления приложением основного приложения (все хранилища управляются со страницы основного приложения, а не доп. контента).
  2. Под SteamPipe выберите пункт «Хранилища».
  3. Нажмите кнопку «Добавить новое хранилище», назовите его и нажмите OK. Рекомендуется дать ему название, схожее с названием существующего хранилища доп. контента, чтобы было проще его опознать.
  4. Установите верные настройки языка, ОС и/или архитектуру.
  5. Выберите нужный элемент доп. контента из выпадающего списка, чтобы привязать это хранилище к доп. контенту.
  6. Нажмите «Сохранить». Обратите внимание, что клиент Steam не узнает о новых хранилищах, пока вы не опубликуете изменения во вкладке «Опубликовать».
  7. Добавьте хранилища во все комплекты, которые должны содержать эти хранилища (к примеру, комплект разработчика Developer Comp).
  8. На своём компьютере добавьте скрипт сборки хранилищ для новых хранилищ доп. контента.
  9. Добавьте этот новый скрипт сборки хранилищ в скрипт сборки основного приложения.
  10. Завершите оставшиеся действия по загрузке новых файлов в новые хранилища, опубликуйте сборку и т. д.

Note: All DLC depots reside within the Base App Depot list. There is no way to have Depots reside within your DLC App directly.

Программная загрузка и установка доп. контента

DLC is typically downloaded and installed as soon as it is purchased by a Steam user. However DLC can be marked to not download automatically so that the game has control of when the DLC download occurs. This can be useful for supporting streaming installs or downloads based on game logic.

You can configure DLC to be downloaded and installed on-demand by following the steps below.
  1. Создайте до 10 элементов доп. контента, которые будут являться отдельными порциями для скачивания.
    • На главной странице управления приложением нажмите на «Все связанные комплекты, инструменты, демоверсии и дополнительный контент», а затем «Добавить доп. контент».
  2. Настройте каждый элемент доп. контента так, чтобы он не загружался автоматически.
    • Для каждого элемента доп. контента войдите в Технические инструменты > Изменить настройки приложения > Общие.
    • Поставьте галочку напротив «Отключить автоматическую загрузку этого дополнительного контента».

  3. Добавьте элементы доп. контента в подходящие комплекты (в комплект для магазина Steam, для розничной продажи, в бета-версию, в комплект разработчика Developer Comp и т. д.); таким образом, они будут доступны при покупке основного приложения.
    • Перейдите на главную страницу управления приложением и нажмите «Все связанные комплекты, инструменты, демоверсии и дополнительный контент».
    • В разделе «Комплекты» нажмите на комплект, в который вы хотите добавить элемент доп. контента.
    • Нажмите «+ Добавить приложения», найдите нужные элементы доп. контента, поставьте галочки напротив них, после чего нажмите «Продолжить», а затем «Сохранить».
  4. Добавьте соответствующие файлы каждого элемента доп. контента в связанные с ними хранилища в процессе построения сборки в Steampipe.
    • Дополнительная информация доступна в разделе Хранилища.
  5. В соответствующих местах кода добавьте следующие функции API для загрузки и установки доп. контента.
    • ISteamApps::BIsDlcInstalled для проверки, загружен ли элемент доп. контента.
    • ISteamApps::InstallDLC для запуска загрузки и обработки обратного вызова ISteamApps::DlcInstalled_t.
    • Запущенные подобным образом загрузки переводятся в начало очереди загрузок и начинаются немедленно.
    • ISteamApps::GetDlcDownloadProgress можно использовать для отслеживания хода загрузки необязательного доп. контента.

Additional Notes:
  • If you check the box “Disable Steam automatically downloading this DLC,” a player who owns the DLC can manually choose to install it from their library, even if your game does not make use of the ISteamApps:InstallDLC API.
  • It is possible for a user to initiate the download of the DLC from the Steam Client UI via the Properties ->DLC tab.
  • You can also use ISteamApps::UninstallDLC to remove the DLC content if needed.

Тестирование

Before you begin testing downloadable content, check that you own the DLC by selecting your game in the Steam client's games list, then selecting 'Properties', and finally selecting the 'DLC' tab. If the DLC does not appear there, you do not own it.

You can simulate gaining ownership of downloadable content through the Steam client. When your new content is added to Steam, you will be given you a package that grants your publisher group access to the content. Usually this package will have a name which contains "Developer Comp".

You can temporarily disable owning the "Developer Comp" package, and then enable it again to simulate a purchase of your DLC. To do this, follow these steps:
  • Launch steam.exe with the command -console (or run steam://nav/console)
  • Navigate to the Console tab in the client
  • Enter the command licenses_for_app <appID>. This will tell you the packageID for how you own the DLC appID
  • Enter the command disable_license <packageID>, using the packageID from above

At this point, your account should no longer own your DLC automatically. You can test running your game and verify that any ownership APIs return false for the DLC. Going back to the Steam console, you can use enable_license <packageID> to re-enable owning the DLC. Restarting Steam will also grant you automatic ownership again.

Предотвращение мошенничества

You run a risk of fraud any time you offer something of value that can be purchased.

DLC fraud involves a user purchasing high-value DLC with a stolen payment method (such as a credit card). The fraudsters’ goal is to move the any available contents of the DLC to another account, either owned by the fraudster or a player who is paying for those goods outside of the system. Alternatively, fraudsters may attempt to sell the entire account, again while being paid outside of the system.

As such, we do not recommend including in-game currency or tradable items in DLC. Those sales are better served by Microtransactions and the suggestions outlined in that document.

Steam catches most fraudulent transactions within 48 hours of the initial purchase. A DLC ownership check at launch or after 48 hours will reconcile changes to transactions according to their updated status.