Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Modifying the Discord RPC

aflac edited this page May 3, 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'.

Using the PFNF RPC

You can use the regular RPC for your mods. You can actually request an icon be added to the RPC by simply messaging aflac#0001 on discord. (Image must be at least 512x512 or discord wont let me upload it)

Some icons you can use currently are as follows:

health icons

  • bf boyfriends neutral icon
  • bfd boyfriends danger icon
  • bfw boyfriends winning icon
  • gf girlfriends neutral icon'
  • dad daddy dearests neutral icon
  • pico pico
  • spooky spooky boys icon`
  • skid skid
  • pump pump
  • monster/lemon monster
  • mom mom
  • parents/christmas parents in week 5
  • pixelbf week 6 boyfrien
  • senpai senpai
  • senpaiangry angry senpai
  • spirit spirit
  • spiritpog spirits winning icon
  • tankman tankmans icon
  • placeholder the "Face" icon
  • bf-car oh no
  • mom-car oh no

symbols

  • dead bfs icon but its a skull

Mod Icons

  • crumb catto! :>
  • whitty whittys icon
  • ballistic whitty ballistic icon
  • tricky tricky clown man
  • aflac aflac neutral icon
  • aflacangry aflac angry icon
  • aflacpissed aflac creative mode icon
  • ruv russian man

Community submitted icons