Bonjour
BartekB vient de sortie l'extension pour l' inséré dans votre jeux.
voici les info en ENG
[quote]
DRPC, Discord Rich Presence
Display a player's current status within your game so they can show it off on Discord
Let players invite people from their Discord client*
An ask to join button lets players partner up outside the game*
A spectate button lets users spectate a player outside the game (Discord's verification required per game)*
Unicode! Supports a wide range of characters. Not limited to English-only.
* Feature usually for a multiplayer game or an app with an online aspect
Find more information about rich presence here: https://discordapp.com/rich-presence
Download & Examples:
1.2.2: Moving file to ClickStore, pending
Example file: Discord Rich Presence Examples.mfa (I wanted to make a few more, but it was running late so I had to wrap up. I will most likely come back with more examples)
You can use Discord's Rich Presence Visualiser to quickly see how the status would look like here:
https://discordapp.com/developers/applications/<Insert your Client ID here>/rich-presence/visualizer
Setting up:
Create an application within https://discordapp.com/developers/applications/ (Requires login)
Upon creation, save Client ID on the page for later (Found here)
Upload assets such as invite splash art and icons in the Rich Presence tab
Unpack zip download into your Clickteam Fusion 2.5 Folder
Restart Fusion or refresh Object list
Place DRPC Object on all frames you'd like to communicate with Discord in
Using DRPC:
Here is a list of all conditions, actions and expressions within the Extension, and their basic uses:
Conditions: States
Conditions here either return false or true every frame (Normal/Black event)
Has Rich Presence Initialised?
Returns true if Initialise actions have been executed and DRPC is running.
You should use this if there is more than one chance you can initialise DRPC.
Is Rich Presence ready?
Returns true if extension is connected with the Discord Client.
You should check for this before sending Presence Updates.
Compare Instance IDs
Deprecated feature
Conditions: Triggers
Conditions here are trigger conditions (Green Event) which require to be the first condition
On Error
Triggered when an error has been encountered. Returns error information.
Both Fusion-made errors and DRPC errors are reported here.
On Ready
Triggered when DRPC is ready to receive Presence Updates.
On Disconnect
Triggered when DRPC lost connection to the internet or Discord Client.
On User Join Request
Triggered when another user asks to join this user. Returns User ID, User Name, User Discriminator and User Avatar URL. Waits for Accept, Decline or Ignore
On Join Button click/Request success
Triggered on successfully joining another user's game, either through ask to join or game invite. Returns On Join Secret.
You should use the Join Secret to determine how this player is going to connect to the other player's game. With Lacewing, this can be a string containing the server IP and/or channel.
On Spectate Button clicked
Similar to On Join Button click/Request success, but the user spectates what the user is currently doing. Returns On Spectate Secret.
You should use the Spectate Secret to determine how this player is going to connect to the other player's game. With Lacewing, this can be a string containing the server IP and/or channel.
Actions: Session
Actions related to the current DRPC session
Initialise
Starts up DRPC. Due to it needing to connect with the client, it will not instantly trigger On Ready.
Parameters: Client/Application ID, Instance (deprecated)
Initialise with Steam ID
Same as Initialise but with an additional Steam ID parameter, used to let Discord know it is a game on Steam
Set Instance ID
Deprecated
Shutdown
Safely turn off DRPC. Call this when you are about to close the application.
Actions: Presence Data (Text, Time, Images, Party, Secrets)
Actions related to presence data. This will be used to determine what is displayed on the player's status. Additionally, if they can invite other users or let them spectate.
Text
Set Details
Sets the first line in presence, the details. e.g. "Currently in game" or "In main menu"
Set Status
Sets the second line in presence, the state. e.g. "Forming Group" or "In Group", the size of the party will be to the right of the state.
Time
Clear Time
Gets rid of the "Elapsed/Remaining" time in the presence
Set Elapsed Time
Turns the "Elapsed/Remaining" time line visible and sets the current elapsed time to the given seconds.
The time will increment by itself from this point onward.
Set Remaining Time
Turns the "Elapsed/Remaining" time line visible and sets the current remaining time to the given seconds.
The time will decrement by itself from this point onward.
Large Image
Set Key
Displays a large image based on a key. This key is the name of the asset you have uploaded in the Setup
Set Tooltip
Sets text that appears upon hovering the mouse cursor on the large image.
Small Image
Set Key
Displays a small image based on a key. This key is the name of the asset you have uploaded in the Setup
Set Tooltip
Sets text that appears upon hovering the mouse cursor on the small image.
Party
Set Unique ID
Set the Unique string for this party.
A party/group is used to determine who should be displayed in the invite link card.
Set Current Size
Sets how many slots in a party/group are taken.
Set Max Size
Sets the maximum amount of slots there is in a party/group. The invite link will be unavailable if all slots are taken.
Secrets
Set Match Secret
Deprecated
Set Join Secret
Sets the secret the current player gives out to other players (Through invite or ask to join) to join their game.
Set Spectate Secret
Sets the secret other players get when they click to spectate the current player.
Reset Presence Data
Resets all current data to defaults (Nothing displayed).
Send Presence Update
Sends all current data to the Discord Client.
Note: Updates are sent every 15 seconds. If you send more frequently than 15 seconds, updates will queue up and send much later.
Actions: Join Request
Actions related to other players asking to join the current player.
Accept
Accept the request.
Parameters: User ID (This was given on the On Join Request event)
Decline
Deny the request.
Parameters: User ID (This was given on the On Join Request event)
Ignore
Ignore the request. Use this action if the player did not pick any within the time the prompt was available.
Parameters: User ID (This was given on the On Join Request event)
Note: This options defaults after 30 seconds.
Expressions
Anything set using actions will not be included here.
Errors
Error Code
Returns the error code from DRPC. Fusion-made errors have no code.
Error Message
Returns details of what happened wrong.
Join Requests
User ID
Returns the ID of the user that made the join request to this player.
Username
Returns the name of the user that made the join request to this player.
Discriminator
Returns the discriminator (4 numbers) of the user that made the join request to this player.
Avatar
Returns the URL that locates the avatar of the user that made the join request to this player. You will need to make your own download events to use this in-game.
Invitations
On Join Secret
Returns the secret that the current player received on the On Join event.
On Spectate Secret
Returns the secret that the current player received on the On Spectate event.
[/quote]