Is there a way to copy & paste ren'py code, then instantly see the compiled results after the paste?

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Is there a way to copy & paste ren'py code, then instantly see the compiled results after the paste?

#1 Post by henvu50 »

Imagine you have a window where you can paste in ren'py code. As soon as you paste your ren'py code, it instantly compiles and shows you the results.

Imagine I just copy & paste this code into the hypothetical window:

Code: Select all

screen vbox_test():
    vbox:
         text "Top."
         text "Bottom."
It would instantly show me that screen with the text showing:

Top
Bottom

Does anything like this exist?

Basically I want to be able to create screens faster, really fast. If I could visually see the results of the code, even immediately after typing the code, that would help a lot. It's the next best thing after a gui.

I'm sure after all these years someone created something like this? Or perhaps this functionality already exists in ren'py somehow?

I wonder if this can be done with the developer console? Copy & paste like 30 lines of ren'py code that would output a screen/window/frame to the game, with buttons, labels, images, etc?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Is there a way to copy & paste ren'py code, then instantly see the compiled results after the paste?

#2 Post by Imperf3kt »

Generally I just use the auto reload feature.
While it's not exactly what you're after, pressing shift+r will reload your game and show you the changes almost instantly.

Alternatively, simply save your file and it'll reload shortly after, although in my experience this only works about half the time.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Re: Is there a way to copy & paste ren'py code, then instantly see the compiled results after the paste?

#3 Post by henvu50 »

Imperf3kt wrote: Mon Apr 19, 2021 12:47 am Generally I just use the auto reload feature.
While it's not exactly what you're after, pressing shift+r will reload your game and show you the changes almost instantly.

Alternatively, simply save your file and it'll reload shortly after, although in my experience this only works about half the time.
You're saying I don't need to restart my ren'py application once it's started. I should keep it active to the point where the screen I'm working on is visible. Then I make the code changes I want in script, save, then switch back to the running instance of my ren'py game, and hit SHIFT R. That will reload the new script I just saved, which should then instantly show the new changes I made to the screen I'm working on? That would totally suffice. I'll try it, thanks!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Is there a way to copy & paste ren'py code, then instantly see the compiled results after the paste?

#4 Post by Imperf3kt »

For a screen, you may need to Rollback (if in-game) and rerun the interaction depending on how it was shown, but in general yes.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users