Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

Modifying the Discord RPC

aflac edited this page Apr 2, 2021 · 3 revisions

The Discord RPC can be modified via the code at some parts, for things like text. But if you want to add icons, or change the Rich Presence name, you will have to create a Application at the Developer Portal.

Creating an Application

Go to this page, and then select applications. Create a new one, and name with whatever you want.

There is a ID assigned to every application, you must copy this ID and then inside discord.hx on line 14. Paste the string of numbers there.

Adding images

Once you have your application set up, navigate to the Rich Presence category of the App. You can upload images to here and then use those in the Engine. Just for demonstration, upload any image to the Application, and name it "icon". Then compile the game and you should see that your discord rich presence has that image on it!

Characters

If you didn't notice, when someone is playing a level with the Rich Presence enabled, you can see the icon of that character they are fighting. This is done in playstate.hx. At about line 263 (as of v0.1-c), you should see the following:

switch (iconRPC)
		{
			case 'bf':
				iconRPC = 'bf';
			case 'gf':
				iconRPC = 'gf';
			case 'spooky':
				iconRPC = 'spooky';
			case 'pico':
				iconRPC = 'pico';
			case 'senpai':
				iconRPC = 'senpai';
			case 'senpai-angry':
				iconRPC = 'senpaipissed';
			case 'monster-christmas':
				iconRPC = 'lemon';
			case 'monster':
				iconRPC = 'lemon';
			case 'mom-car':
				iconRPC = 'mom';
			case 'mom':
				iconRPC = 'mom';
			case 'dad':
				iconRPC = 'dad';
			case 'parents-christmas':
				iconRPC = 'mom_and_dad';
			case 'spirit':
				iconRPC = 'spirit';
		}

This is the code for the character icons. There is a folder (as of v0.1-c) located inside assets that contains the assets ProjectFNF uses. You can upload any images you want to the Application, and then you can have a character have that as their icon by setting it to whatever you named the Image. You can do this by using the following code:

case 'character name here':
	iconRPC = 'image name here'; // From the Application

So, if you added a character named "lime-monster" or something, and you upload an image to the Application as say, "LimeMonster", you would set 'character name here' to "lime-monster" and the Image to 'LimeMonster'.

Clone this wiki locally