Skip to content
forked from FUFSoB/renpy_rpc

Ren'Py Discord Rich Presence, using python 3.6.

License

Notifications You must be signed in to change notification settings

nxahjs/renpy_rpc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ren'Py RPC

pypresence

Download python.zip

Originally created by FUFSoB.

Instructions:

  1. Put discord.py, setupRPC.rpy and python.zip in your game folder.
  2. Edit your splash.rpy [all labels currently exist, you just need to add code] (code below)
  3. Create your own Rich Presence application on Discord API page, Video Guide (till 0:58)
  4. Edit discord.py, using your application id; adding assets and text you wanted.
  5. In discord.py add your own new states (make sure the names are memorable).
  6. Add $ state = "state name" everywhere you wanted status to change.
  7. 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 run discord.py.
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

About

Ren'Py Discord Rich Presence, using python 3.6.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ren'Py 53.2%
  • Python 46.8%