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.
-
rabcor
- Regular
- Posts: 81
- Joined: Sun Mar 17, 2013 3:07 pm
- Projects: None (Need a programmer?)
- Organization: Cestarian Games
-
Contact:
#1
Post
by rabcor » Sun Dec 15, 2013 1:12 pm
I need to create an interface mostly for debugging purposes which will basically consist of a handful of buttons, many strings and many variables.
My goal with this currently is to test out different scenarios to see how my attributes/skills/stats code for an RPG will work out under different scenarios, and if i made any errors in my formulas, and i'm sure i'll find more uses for this in the future.
Here's an example of what i mean (roughly):
How should i do this?
-
Tsapas
- Regular
- Posts: 69
- Joined: Mon Oct 14, 2013 8:18 am
-
Contact:
#2
Post
by Tsapas » Sun Dec 15, 2013 1:59 pm
A very crude and quick screen is the following
Code: Select all
screen debug_screen:
frame:
vbox:
hbox:
textbutton "button" action SetVariable("variable", value)
textbutton "button" action #some other action
#etc.
hbox:
text "[variable]" #will show the variable value
text "variable name : [variable]" #if you want to have a variable name as well
#etc.
textbutton "button" action SetVariable("variable", value)
textbutton "button" action #some other action
hbox:
text "[variable]" #will show the variable value
text "[variable]"
#etc.
textbutton "button" action SetVariable("variable", value)
textbutton "button" action #some other action
hbox:
text "[variable]" #will show the variable value
text "[variable]"
#etc.
textbutton "button" action SetVariable("variable", value)
textbutton "button" action #some other action
hbox:
xalign 0.95
yalign 0.95
textbutton _("Return") action Return() # to go back
Then you just need to make a button in your game that calls that screen and you're done.
-
rabcor
- Regular
- Posts: 81
- Joined: Sun Mar 17, 2013 3:07 pm
- Projects: None (Need a programmer?)
- Organization: Cestarian Games
-
Contact:
#3
Post
by rabcor » Sun Dec 15, 2013 4:24 pm
Thanks a lot! that was exactly what i needed

-
xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
-
Contact:
#4
Post
by xavimat » Thu Dec 19, 2013 6:39 am
While this screen serves your specific needs, you can also use the built-in console. Just press shift+O and you'll gain access to the console where you can check for variables, change them and use functions.
-
rabcor
- Regular
- Posts: 81
- Joined: Sun Mar 17, 2013 3:07 pm
- Projects: None (Need a programmer?)
- Organization: Cestarian Games
-
Contact:
#5
Post
by rabcor » Thu Dec 19, 2013 12:38 pm
:O i had such a thing from the start?
Well still though, i think building a debugger is worth it for what i'm trying to make (which is an entire leveling system mechanic, it'll be a lot easier to test it out with buttons/gui than just raw code)
Users browsing this forum: No registered users