Discord Rich Presence Extension?

Posted by AouabAdYT
Hey guys.

I'm just wondering if you guys need a "FREE" extension for GM8 , GM8.1 , GMS 1.X -> GMS2 for discord's rich presence ^^

If you do , comment this post so that I can make one for you guys.

The only one available in the internet is Dissonance and it's worth 10$ in the marketplace.

EDIT: Hey , since lot of people are requesting it , I made it here a link for it:

http://www.mediafire.com/file/syhiktn8avb4bs1/Discord%20Rich%20Presence%20Extension%20By%20Aouab.zip

The package has the files that you need to include , the scripts with a simple doc and a GM8 example so you can test it anywhere.

If you want i'm going to explain how to use it in the comments of this post.

Replies (12)

Last message on 25 Jun 2018

Walt on 24 Jun 2018, 12:58:59
Hi! I'm getting an error.

___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object DRP:

Error defining an external function.
at gml_Script_discord_init_dll
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_discord_init_dll (line -1)
gml_Object_DRP_Create_0
Walt on 24 Jun 2018, 13:04:39
I also seem to get this, even with the example project


___________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object object0:

Error defining an external function.
at gml_Script_discord_init_dll (line 21) - global.__d_init = external_define(dll,"InitDiscord",dll_cdecl,ty_real,1,ty_string)
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_discord_init_dll (line 21)
called from - gml_Object_object0_CreateEvent_1 (line 1) - discord_init_dll()
Walt on 24 Jun 2018, 13:05:38
(Using Gamemaker 1.4.1804)
AouabAdYT (Topicstarter) on 25 Jun 2018, 03:30:06
Weird..
AouabAdYT (Topicstarter) on 25 Jun 2018, 03:31:12
Are you sure to have included both files and they are in the same directory of the game?
Walt on 25 Jun 2018, 08:19:52
Well yes, the example doesn't even work and I've tried this on 2 computers.
AouabAdYT (Topicstarter) on 25 Jun 2018, 16:31:46
Can I have your discord?
Walt on 25 Jun 2018, 16:53:09
Gladly, Walt#4873
AouabAdYT (Topicstarter) on 18 Jun 2018, 14:30:31
Here's how it works:

First you'll need to init the dll files , using :
discord_init_dll()

Then you'll have to init your discord app to communicate with the dll using
discord_init_app(app_id)

The "app_id" a.k.a Application ID or Client ID , is found in your discord developer applications.

That's it , when you want to change the status of the player , use
discord_update_presence(details,status,large_image_key,small_image_key)

large_image_key and small_image_key are used to represent the images in your app, you can register them in your discord application page , for example like this : https://goo.gl/GwiMq3 And they'll be displayed as the green and yellow image in this image:https://goo.gl/Fk4bn2 Don't leave so soon!

You need to call
discord_free_app()
before leaving ! That's what makes the game stop communicating with Discord , or there may be some bugs.

Then you can call
discord_free_dll()
to free the memory of the dll file.
Walt on 18 Jun 2018, 19:06:51
Works with GM1.4 or GM2?
AouabAdYT (Topicstarter) on 19 Jun 2018, 00:03:21
Sure, Aaron (The Founder of Project Amaranth) tried it on GMS2 and it worked well ^^ ! Be sure to try it too and give feedback.
Walt on 17 Jun 2018, 01:39:52
That'd be cool.