Platform specific build settings

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Posts: 2
Joined: Thu Nov 16, 2017 1:25 pm

Platform specific build settings

#1 Post by unsatiable » Thu Nov 16, 2017 1:38 pm

Is there any way of having different settings defined for different build platforms? For example if I wanted to increase button size only on my android build without manually changing variables between builds.


Code: Select all

if build_platform == "Android":
    define gui.button_height = 70
    define gui.button_height = 36
Thanks for any help

User avatar
Posts: 120
Joined: Thu Aug 31, 2017 11:47 am

Re: Platform specific build settings

#2 Post by RicharDann » Thu Nov 16, 2017 1:47 pm

There are Platform detection functions to check what platform is currently being used.

Also you might want to look into Screen Variants.

User avatar
Eileen-Class Veteran
Posts: 1910
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor

Re: Platform specific build settings

#3 Post by Imperf3kt » Thu Nov 16, 2017 3:00 pm

Yes you can do that but you might need to use it differently.

I haven't got enough time to give you an example, sorry.
The link above should help though.
A very quick idea would be the following:

if renpy.variant("pc"):

I imagine you need to define both sizes and then select between the two via the styling property of each screen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Post Reply

Who is online

Users browsing this forum: Remix