ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
ODUE_discord

A plug-in for integrating your game with Discord Rich Presence (A.K.A Game SDK)





Please check the Github readme for an updated guide:
https://github.com/00due/Discord-RPC-for-RMMZ/

It's easier for me to just update one page for both MV and MZ than editing the two posts on RPG Maker forums.
Issues should be primarily submitted to Github too! It makes them easier for me to fix that way. If you don't have a Github account, then you can submit them here too.



FEATURES:
- The only Discord RPC plugin for MV/MZ available currently
- Highly customizable
- Edit the details in-game

TODO:
- Allow replacing text temporarily while in battle

GUIDE:

Requirements:

You have to use nwjs 0.49.2 or higher for this to work!
If you don't know how to update nwjs, check this awesome guide!

Download:
https://github.com/00due/Discord-RPC-for-RMMZ/ (Yes, the link is the same for MV version)

After downloading, extract the `ODUE_discord_MV.js` file into `<your project's folder>/js/plugins`

Initial setup:

0.If you don't have Node.js installed, install it from https://nodejs.org/en/download

1.Open the folder of your game (where you have your game.rpgproject in) and open CMD or powershell there.

2.Run the command `npm install discord-rpc`
---If you're getting an error Command not found or something like that, make sure you have Node.js installed!---

3.Go to https://discord.com/developers/applications and create your application. Click 'New application' and give it your game's name.
After creating it, open the Rich Presence --> Art assets tab, and upload the large and small images.
---Recommendation: The large image is typically the logo of your game.---
---WARNING: The art assets have about 10-15 minutes delay until they become visible.---

4.Copy the Application ID from the 'General information' tab, and paste it into the 'Discord application ID on this plugin.

5.Fill the other plugin parameters with anything you want.
REQUIRED TO FILL:
Application ID, Large picture, Large picture text, Row 1


Plugin commands for MV:
Code:
rpc_replaceRow1 <text to replace with>
- Replaces row 1
Code:
rpc_replaceRow2 <text to replace with>
- Replaces row 2
Code:
rpc_saveRows
- Save both rows for later use
Code:
rpc_restore <row1 / row2>
– Restores a saved row
Code:
rpc_enable row2
- Enables the second row
Code:
rpc_disable row2
- Disables the second row



Examples:

Code:
// On battle start
rpc_saveRows
rpc_replaceRow1 Fighting a monster
rpc_disable row2


// On battle end
rpc_restore row1
rpc_enable row2


WARNING: After exporting for MV:​

Move the folder node_modules from www/ folder to the folder where the executable is. Otherwise it can't find the node module.


Terms of use:

1. You must give credit to ODUE
2. You can freely edit this plugin to your needs. However, you must still credit me.
3. This plugin is free for commercial and non-commercial projects.
4. This plugin is provided as is. I'm not responsible for anything you make with this plugin.
5. You can send feature requests to me on platforms such as Reddit (to u/SanttuPOIKA----).
However, I have no obligation to fulfill your requests.
 
Last edited:

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
I have a question : (I'm on RMMV)

- Does the rich presence display when you test the game without exporting it ?

Moreover, I did everything in order. All seems to be done, but for some reasons when I launch the exported game without forgetting to move node modules, nothing happens on Discord, it detects nothing at all
 
Last edited:

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
It should show up on playtest.

Can you show me your plugin parameters? I don't believe there are any issues with the status displaying on the current stable version of the plugin.
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
test.PNG
Here are my plugin parameters, note that the large image used is imported in the assets of the discord application, the name is correct as well as the application number
 

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
View attachment 278657
Here are my plugin parameters, note that the large image used is imported in the assets of the discord application, the name is correct as well as the application number
The only thing I can think that may break it is the ' symbol. Not sure if it's causing it, but it might be worth a shot to try to remove that and try if it works then.

However if not, can you send me a screenshot of the console when playtesting (F8)?
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
I removed every unconvenient symbol, it's still not working, here is the console extract :
I only have the length fail error.
test.PNG
 

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
I removed every unconvenient symbol, it's still not working, here is the console extract :
I only have the length fail error.
View attachment 278708
Do you get that error (in red) if you're not using this plugin?

What you can also try is disabling other plugins to check if there are any conflicts. If you do find one, I'll make sure to fix it as soon as possible.
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
Okay, I have feedbacks. My problem was that I forgot to update nw to 49.2. However, now that I did everything, when I test launch the game, the test windows appear briefly and then disappear. If I deactivate your plugin the problem disappear and the windows doesn't close itself. Do you any ideas to fix this ?
 

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
Okay, I have feedbacks. My problem was that I forgot to update nw to 49.2. However, now that I did everything, when I test launch the game, the test windows appear briefly and then disappear. If I deactivate your plugin the problem disappear and the windows doesn't close itself. Do you any ideas to fix this ?
Hmm, I haven't heard of anything like that before, nor I have any idea what's causing it. That's pretty difficult to debug from your end too.

Just to make sure, are you using Windows and you have Discord open when doing this?
(Even if not, the window shouldn't just close...)
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
Yeah I'm on windows and Discord is open. I'm sure it's coming from somewhere in the plugin or how the plugin works because without the plugin the play test starts as normal.
 

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
Yeah I'm on windows and Discord is open. I'm sure it's coming from somewhere in the plugin or how the plugin works because without the plugin the play test starts as normal.
I've updated it to make it run inside its own function, so that it shouldn't cause any issues with other plugins. Please try this: https://github.com/00due/Discord-RPC-for-RMMZ/archive/refs/heads/next.zip
(This is a beta branch, and thus the MZ version is broken. MV should work, though.)

If that doesn't fix it either, try this older version: https://github.com/00due/Discord-RP...25c709a15df50c4b657bf9f967/ODUE_discord_MV.js
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
Thank you for your time, i'll try it in a few hours when I come home and update you !
 

Waip0n

Villager
Member
Joined
Jul 6, 2023
Messages
7
Reaction score
1
First Language
French
Primarily Uses
RMMZ
I tried it, none of the versions works. I think the problem is coming from my end. To clear things up when you updated nw did you put it to version 0.49.2 or higher ? Also did you update only the windows files for nw ?
 

ODUE

Villager
Member
Joined
Aug 7, 2023
Messages
10
Reaction score
8
First Language
Finnish
Primarily Uses
RMMZ
I tried it, none of the versions works. I think the problem is coming from my end. To clear things up when you updated nw did you put it to version 0.49.2 or higher ? Also did you update only the windows files for nw ?

I'm personally using 0.64.1 (for now, planning to upgrade in the future) on MZ and it works fine. I've been in contact with other people using the older MV version that I linked to you that are using 0.49.2, and they've had no problems.

I'm using the Linux version of nw myself, but if you're on Windows, that's the only version you'll need.
 

Latest Threads

Latest Profile Posts

linkedin - Instagram 1 - Instagram 2 [OFF] - Tumblr texts [IN PORTUGUES]
"Understanding others is the greatest life lesson we can learn."
Tfw I was too slow to post in the latest AI art thread :'(

I had a doozy lined up, too
Updated my game's development post with the first video of it in action!


'Milestone Get!' :p
Heh, heh. I've been experimenting with a naughty word detector Common Event and using scripts to check certain strings. I never thought I would see such language in computer code. I would post a screen shot, but it probably wouldn't be appropriate, even with a Spoiler. But it certainly makes me laugh and it works great.

Forum statistics

Threads
136,810
Messages
1,270,283
Members
180,567
Latest member
CaptainAwf
Top