Discord server, ℱŮℱṦøℬ#1337
- Put
discord.py
,setupRPC.rpy
andpython.zip
in yourgame
folder. - Edit your splash.rpy [all labels are currently exist, you just need to add code] (code's below)
- Create your own Rich Presence application on Discord API page, Video Guide (till 0:58)
- Edit
discord.py
for your own, using yourapplication id
; addingassets
andtext
you wanted. - Add
$ state = "something"
everywhere you wanted status to change. - Just run your game. First of all - it'll unzip
python.zip
and delete it after that. Then it will rewrite status to "Loading" and rundiscord.py
. After you've tested that, you can public your project withrpc
(including all 3.py
,.rpy(c)
and.zip
files).
splash.rpy
label after_load:
# ...
if discordrun:
python:
try:
import io
import os
io.open("game/state.txt", 'w+', encoding = "utf-8").write(state)
except:
import io
open("game/state.txt", 'w+')
io.open("game/state.txt", 'w+', encoding = "utf-8").write("err3")
state = "err3"
# ...
return
label before_main_menu:
# ...
if discordrun:
python:
import io
state = "mm"
io.open("game/state.txt", 'w+', encoding = "utf-8").write(state)
# ...
return
label quit:
# ...
if discordrun:
python:
import os
os.popen('taskkill /f /im python.exe')
# ...
return
Doki Doki Literature Club
As first big example I've chosen DDLC, 'cause it's my first VN (in particular - Ren'Py) game.
Edited files: script.rpy
, screens.rpy
, splash.rpy
, script-ch*.rpy
, script-exclusives*.rpy
, script-poemresponses.rpy
Added files: discord.py
, setupRPC.rpy
To check how it works you just need to add all these files in DDLC "game" folder.
- Incorrect text in "small image" when you have to choose in game.