Обзор
In addition to using the Steam Workshop for hosting configurations, game can also choose to bundle their configurations directly with the game depots. There's a number of benefits to bundling configuration in your game depots:
- Official configurations can be checked into Perforce or other revision control tools
- Managing configurations between different branches of your game or between a public and private AppID is easier
- Updates are atomic rather than being done via two publishing steps in Steamworks
Формат
The action manifest file is an extension of the
Файл с игрални действия which includes an extra section containing a list of official configurations broken out by type:
"Action Manifest"
{
"configurations"
{
}
"actions"
{
}
"localization"
{
}
}
For information about the action and localization sections please see the
Файл с игрални действия documentation.
Configuration List
In the controller configuration section the configurations are listed by controller type, then by priority for loading. The "path" value is listed relative to the Action Manifest file's location on-disk.
"Action Manifest"
{
"configurations"
{
"controller_xboxone"
{
"0"
{
"path" "xbox_controller.vdf"
}
}
"controller_steamcontroller_gordon"
{
"0"
{
"path" "steam_controller.vdf"
}
"1"
{
"path" "steam_controller_motion_controls.vdf"
}
}
}
"actions"
{
}
"localization"
{
}
}
Низове за поддържани контролери:
Steam Deck контролер | controller_neptune |
Steam контролер | controller_steamcontroller_gordon |
Xbox 360 контролер | controller_xbox360 |
Xbox One контролер | controller_xboxone |
Xbox One Elite контролер | controller_xboxelite |
PlayStation 4 контролер | controller_ps4 |
PlayStation 5 контролер | controller_ps5 |
Nintendo Switch Pro контролер | controller_switch_pro |
Общи геймпадове | controller_generic |
Setting up an Action Manifest File
There are two main ways to setup your action manifest file, either starting from scratch or using an existing IGA file.
Starting with an In-Game Actions file
Step 1 - Setting up Dev-mode for Steam Input
Before editing the Action Manifest File, we need to enable Steam Input dev-mode so that we can export configurations as a developer and receive error messages if we make mistakes when editing the actions manifest.
1) Go to Steam Big PIcture Mode ->Settings->System and turn on Dev mode for Steam
2) Go to the developer section and turn on "Steam Input Layout Dev Mode"
Step 2 - Save a configuration
If you have an existing IGA file you can save your current configuration out in the controller configuration screen.
1) Select the Gear Icon
2) Изберете „Изнасяне на оформление“;
3) Select a Title and Description for you game and export the configuration.
Reminder: you will want to double check that you've setup localization tokens in the action manifest for each language supported by your game
Стъпка 3 — Намерете Вашата конфигурация
Next you will run the following Steam URL to dump the configuration into your OS-specific documents folder, ex: My Documents on Windows. Адрес:
Windows команден ред
start steam://dumpcontrollerconfig?appid=X
Linux команден ред
xdg-open steam://dumpcontrollerconfig?appid=X
Copy both the configuration and your existing IGA file into the desired location inside the game folder.
Стъпка 4 — Конвертирайте IGA файла (файла за управление и администриране на идентичността) във файл с манифест за действие
To convert your IGA file to an Action Manifest edit the file and add a "configuration" section including a listing for the controller configuration you just exported. This is an example from the Steamworks SDK:
"configurations"
{
"controller_xboxone"
{
"0"
{
"path" "xbox_controller.vdf"
}
}
"controller_steamcontroller_gordon"
{
"0"
{
"path" "steam_controller.vdf"
}
}
}
Step 5 - Set the Steamworks settings
To set your Steamworks settings in the partner site, navigate to the Steam Input settings. Next set the dropdown to "Custom Configuration (Bundled with game)" and enter the path where the action manifest is located:
Debugging a game that uses an Action Manifest File
When running the game through Steam the Action Manifest file will automatically be pulled from your game depots. If you're running via the IDE and have the game installed Steam will also use the Action Manifest file from your Steam depots. However if you're running without the game installed in Steam or have local changes you need to make then you can override the Action Manifest path with the SetInputActionManifestPath API call. This override will be remembered for the rest of the Steam session. There's an example of it's use in the Steamworks SDK:
char rgchCWD[1024];
if ( !_getcwd( rgchCWD, sizeof( rgchCWD ) ) )
{
strcpy( rgchCWD, "." );
}
char rgchFullPath[1024];
#if defined(_WIN32)
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s\\%s", rgchCWD, "steam_input_manifest.vdf" );
#elif defined(OSX)
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/steamworksexample.app/Contents/Resources/%s", rgchCWD, "steam_input_manifest.vdf" );
#else
_snprintf( rgchFullPath, sizeof( rgchFullPath ), "%s/%s", rgchCWD, "steam_input_manifest.vdf" );
#endif
SteamInput()->SetInputActionManifestFilePath( rgchFullPath );