Page 1 of 1

Readback Text History

Posted: Sat Sep 08, 2018 10:20 am
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)

Re: Readback Text History

Posted: Sat Sep 08, 2018 8:33 pm
by PyTom
Readback is now built into the new GUI.

Re: Readback Text History

Posted: Sat Sep 08, 2018 10:13 pm
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.

Re: Readback Text History

Posted: Sun Sep 09, 2018 4:25 am
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)

Re: Readback Text History

Posted: Sun Sep 09, 2018 6:34 am
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

Re: Readback Text History

Posted: Sun Sep 09, 2018 1:45 pm
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.

Re: Readback Text History

Posted: Sun Sep 09, 2018 5:58 pm
by Donmai
Have you tried this recipe?
viewtopic.php?f=51&t=48322