Skip to end of metadata
Go to start of metadata

Overview

Discord Rich Presence provides a new layout that lets users show what they are doing in-game and it makes it possible for players to join their friends, send requests and spectate them.

Games that have been created with CRYENGINE can also support this feature. However, even though the Discord Rich Presence plugin is already implemented in CRYENGINE, it is not enabled automatically, nor it can be enabled by using an external tool; users need to enable the plugin manually in the .cryproject file.

In order to enable the Discord Rich Presence plugin in CRYENGINE, you will need a game specific Discord App ID. This ID can be received after a new application has been created on Discord. For more information about how to create an application, please refer to the Discord Developer Portal and the Discord Rich Presence page.

If the game is expected to be released on Steam, you will also need a Steam App ID for Discord to recognize it.

Enabling Discord Rich Presence

After creating an application and getting a Discord App ID that is specific to your game, follow the next steps to enable the Discord Rich Presence plugin.

  1. First, right click on the .cryproject file, which can be found in the project folder, and run it with a text editor such as Notepad ++.
  2. Then add;
    { "type": "EPluginType::Native", "path": "CryGamePlatformDiscord", "platforms": [ "Windows" ] },

    This should be added after the following line:

    { "type": "EPluginType::Native", "path": "CryGamePlatformPSN", "platforms": [ "PS4" ] },

When this code is added, the text should look like this:

"require": {
		"engine": ".",
		"plugins": [
			{ "type": "EPluginType::Native", "path": "CryDefaultEntities" },
			{ "type": "EPluginType::Native", "path": "CrySensorSystem" },
			{ "type": "EPluginType::Native", "path": "CryPerceptionSystem" },
			{ "type": "EPluginType::Native", "path": "CryUQS_Core" },
			{
				"type": "EPluginType::Native",
				"path": "CryGamePlatform",
				"platforms": [ "Windows", "PS4" ]
			},
			{ "type": "EPluginType::Native", "path": "CryGamePlatformSteam", "platforms": [ "Windows" ] },
			{ "type": "EPluginType::Native", "path": "CryGamePlatformPSN", "platforms": [ "PS4" ] },
			{ "type": "EPluginType::Native", "path": "CryGamePlatformDiscord", "platforms": [ "PS4" ] },
			{ "type": "EPluginType::Native", "path": "CryLobby" }

This step will make sure that the plugin is activated and can be used in the current project. However, as mentioned above, each game also needs a specific discord_appId and steam_appId, the latter being necessary if the game is released on Steam.

The following game specific ID codes should also be added to the .cryproject file, in the console_variables section:

"console_variables": {
		"discord_appId": "YOUR DISCORD APP ID",
		"steam_appId": "YOUR STEAM APP ID",
		"sys_target_platforms": "pc,ps4,xboxone,linux"

After these IDs are added to the code block, the Discord Rich Presence plugin can be used and developers/players can show player activities on Discord.

For more information about the Discord Rich Presence features or the implementation/initialization processes, please refer to Discord Developer Portal.

  • No labels