Hi I have a quick question about Ren'Py. I'm new to Ren'Py and I don't really know if this question has been answered before, but I couldn't find the answer after searching through the forum for an hour or so. If this question has been answered, please redirect me there.
My question is if I've written a long script in script.rpy. How can I test specific parts of the script without just launching the game and starting from the beginning?
I've tested using the Save and Load option and you would have to do a play through and save then you can load at that screen to test the script again.
I was just wondering if it was possible to start at a specific screen if you know the previous screens already function correctly.
It's not a problem for me to do the save and load option. I was curious if there was another or easier way to get to the specific screen I desire quicker.
I know this question may be trivial but it's been on my mind and I have no idea who to ask this question to.
Thank you for you'r time!
[SOLVED] How to test your project effectively?
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.
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.
[SOLVED] How to test your project effectively?
Last edited by xxjes6 on Sun Dec 24, 2017 1:50 pm, edited 1 time in total.
Thank you~ <3
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: How to test your project effectively?
Code: Select all
##temporary screen
screen debugscreen():
frame:
align(.95, .01)
has vbox
textbutton "test 01" action Jump('myscene01')
textbutton "test 02" action Jump('myscene02')
textbutton "test end" action Jump('finalend')
init python:
config.overlay_screens.append("debugscreen")
##temporary screen
label start:
"Bla bla"
label myscene01:
"This is scene 01"
"Bla......"
label myscene02:
"This is scene 02"
"Bla..Bla...."
label finalend:
"The end"
return
Re: How to test your project effectively?
Yes! Thank you so much for this debug screen. This is exactly what I was looking for.
Thank you~ <3
Re: How to test your project effectively?
Out of curiosity, do you have a tool to auto-generate debugscreen with all game labels?IrinaLazareva wrote: ↑Sun Dec 24, 2017 6:03 amCode: Select all
##temporary screen screen debugscreen():
I guess, you can do it "on the fly" and even add a condition (a regex) which labels to include, right?
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: [SOLVED] How to test your project effectively?
Well, this is very very very 'crude' code. Use on own risk
Press "ALT+ Q" for activation.
Press "ALT+ Q" for activation.
Code: Select all
default debugon = False
screen debugscreen():
default seeenlabel = renpy.get_all_labels()
default bugxz = .01
if debugon:
zorder 100
frame:
background "#000a"
align(bugxz, .01)
xysize(300, 270)
viewport id 'debugg':
draggable True
mousewheel True
has vbox
text "labels:" color "#0f0"
for i in seeenlabel:
if not "_" in i[:2] and not "screen" in i and not "main_menu" in i:
textbutton "[i]" action Jump(str(i)) background None
label "_________"
grid 2 2:
textbutton "top left" action SetScreenVariable('bugxz', .01)
textbutton "top right" action SetScreenVariable('bugxz', .99)
textbutton "Hide()" action SetVariable('debugon', False)
textbutton "Stop Game()" action Quit(False)
init python:
config.overlay_screens.append("debugscreen")
def overd():
ui.keymap(alt_K_q=SetVariable("debugon", (not debugon)))
config.overlay_functions.append(overd)
Re: [SOLVED] How to test your project effectively?
I’ve moved labels definition to the top and changed it list comprehension.
If I need to change label filter criteria, it’s better to change definition, then code, IMO.
Thanks a lot for your code sample, it’s neat, really!
If I need to change label filter criteria, it’s better to change definition, then code, IMO.
Thanks a lot for your code sample, it’s neat, really!
Code: Select all
default debugon = False
screen debugscreen():
default labels = [i for i in renpy.get_all_labels()
if not ("_" in i[:2] or "screen" in i or "main_menu" in i)]
default bugxz = .01
if debugon:
zorder 100
frame:
background "#000a"
align(bugxz, .01)
xysize(300, 270)
viewport id 'debugg':
draggable True
mousewheel True
has vbox
text "labels:" color "#0f0"
for i in labels:
textbutton "[i]" action Jump(str(i)) background None
label "_________"
grid 2 2:
textbutton "top left" action SetScreenVariable('bugxz', .01)
textbutton "top right" action SetScreenVariable('bugxz', .99)
textbutton "Hide()" action SetVariable('debugon', False)
textbutton "Stop Game()" action Quit(False)
init python:
config.overlay_screens.append("debugscreen")
def overd():
ui.keymap(alt_K_q=SetVariable("debugon", (not debugon)))
config.overlay_functions.append(overd)
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Who is online
Users browsing this forum: Google [Bot]