Readback Text History

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
Message
Author
User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Readback Text History

#1 Post by XxrenxX »

So I have found the old readback code online but it doesn't work with the new .gui

now I'm having 2 issues. I can't search the forums for similar posts, the site become unloadable and I'm forced to manually go through each individual subforum to look for shit and google aint helpin either.

So the code in question that causes the issue is this tidbit, I'm sure there are other sections that need replacing as well but has anyone found a replacement for this issue yet?

Code: Select all

rv = ui.interact(roll_forward=roll_forward)
renpy.checkpoint(rv)

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Readback Text History

#2 Post by PyTom »

Readback is now built into the new GUI.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Readback Text History

#3 Post by XxrenxX »

Is there any alternative? Still can't search the forums.
I want a seperate screen to show the text like on a webage, newest at the bottom, old at the top and scroll. I don't like how the new GUI you physically scroll backwards through the game.

User avatar
Tayruu
Regular
Posts: 141
Joined: Sat Jul 05, 2014 7:57 pm

Re: Readback Text History

#4 Post by Tayruu »

You mean you want to replace the "rewind" function with just a text history? You can still do that. Here's a quick slimmed down version of the code I use in my own project. I'm not completely confident about it, but it seems to work in a fresh project.

What it does is make the scrollwheel bring up the history screen, instead of rollback.

Code: Select all

init -2 python:
    # Override Keymap
    def readback_catcher():
        if _game_menu_screen != None:
            ui.add(renpy.Keymap(rollback=[renpy.curried_call_in_new_context("call_subscreen")]))
        else:
            pass
    config.overlay_functions.append(readback_catcher) 
                       
       
# Entry points from the game into menu-space.
label call_subscreen(screen="history"):
    # Transition
    $ _enter_menu()
    $ renpy.transition(config.intra_transition)
    # Show and interact
    $ renpy.show_screen(screen)
    $ ui.interact()
    #
    # On close
    $ renpy.transition(config.intra_transition)

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Readback Text History

#5 Post by MaydohMaydoh »

If you mean, you want history and don't want rollback, then disable rollback with

Code: Select all

define config.rollback_enabled = False
and add

Code: Select all

key 'rollback' action ShowMenu('history')
to the say screen or make a new screen and add it to overlay screens or something.
History screen should already exist in screens.rpy

User avatar
XxrenxX
Veteran
Posts: 267
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Readback Text History

#6 Post by XxrenxX »

Tayruu wrote: Sun Sep 09, 2018 4:25 am You mean you want to replace the "rewind" function with just a text history? You can still do that. Here's a quick slimmed down version of the code I use in my own project. I'm not completely confident about it, but it seems to work in a fresh project.

What it does is make the scrollwheel bring up the history screen, instead of rollback.

Code: Select all

init -2 python:
    # Override Keymap
    def readback_catcher():
        if _game_menu_screen != None:
            ui.add(renpy.Keymap(rollback=[renpy.curried_call_in_new_context("call_subscreen")]))
        else:
            pass
    config.overlay_functions.append(readback_catcher) 
                       
       
# Entry points from the game into menu-space.
label call_subscreen(screen="history"):
    # Transition
    $ _enter_menu()
    $ renpy.transition(config.intra_transition)
    # Show and interact
    $ renpy.show_screen(screen)
    $ ui.interact()
    #
    # On close
    $ renpy.transition(config.intra_transition)
This works for the most part but I'll have to play around more to get it to how I want.
MaydohMaydoh wrote: Sun Sep 09, 2018 6:34 am If you mean, you want history and don't want rollback, then disable rollback with

Code: Select all

define config.rollback_enabled = False
and add

Code: Select all

key 'rollback' action ShowMenu('history')
to the say screen or make a new screen and add it to overlay screens or something.
History screen should already exist in screens.rpy
keymap functions don't seem to work for me but I've kind of left that on the backburner. As for the history screen, my file was started well before the gui was implemented so most of the code for the old history screen no longer worked.

I have gotten the new one via making a "test" new game and getting it from that but frankly I hate the whole gui and don't want to use it if needed. So this essentially means I'm deleting screens and gui and replacing it with something else cause I like being a pain in my own ass apparently.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Readback Text History

#7 Post by Donmai »

Have you tried this recipe?
viewtopic.php?f=51&t=48322
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: No registered users