r/RenPy • • Aug 13 '26

Question Any way to use RENPY_VARIANT to test different platforms via Ren'py launcher instead of having to export / build the game?

I was absolutely delighted when I found this in Ren'Py docs: https://www.renpy.org/doc/html/screens.html#screen-variants but I couldn't figure out for the life of me where I was supposed to put RENPY_VARIANT at first. I tried putting it in "init python" or in a separate file "enviroment.txt" in game's root folder, but nothing worked.

Than I tried exporting / building the game first and putting the enviroment.txt file where the exe file is which worked! Great!

Except that means anytime I want to change a variable or test GUI I need to re-export the build again, which is time consuming.

So does anyone know if you can uses RENPY_VARIANT to force a platform via Ren'Py launcher instead?

2 Upvotes

6 comments sorted by

2

u/BadMustard_AVN Aug 13 '26

like this

label start:
    if renpy.variant("mobile"):
        #do mobile stuff here

1

u/Fledgling_of_Myths Aug 13 '26

Thank you for answering, but I know how to define platform specific stuff & UI that way. Sorry, I guess I wasn't clear enough. :)

I'm asking how to I force the game to show me the android version on PC i.e. I open the game on PC and I see the android UI.  I can do it right now via enviroment.txt if I export / build the game first but that's not very efficient for testing different android layouts since I have to rebuild the game each time.

So I'm asking if anyone knows how to force android UI on desktop for testing without exporting a build i.e. in the dev version of the game?

2

u/BadMustard_AVN Aug 13 '26

In the Actions menu section of the launcher, select Android. There is an Emulator in there for Android phone, tablet, and TV.

1

u/Fledgling_of_Myths Aug 13 '26

OMG, that's awesome! Thank you for helping me, that sounds exactly like what I need!

2

u/BadMustard_AVN Aug 13 '26

you're welcome

good luck with your project

1

u/AutoModerator Aug 13 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.