Unknown problem in History menu

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
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Unknown problem in History menu

#1 Post by scharlakenrose » Thu Apr 12, 2018 7:48 pm

Hello,
I'm fairly new to Renpy still, so I'm unsure how to fix this.
I'm not sure what I changed to cause this, but any dialogue in History is smashed together within two lines at the top of the window.
https://cdn.discordapp.com/attachments/ ... nknown.png <- Screenshot of the problem


There is no traceback appearing, so it doesn't break everything. It might be in the History screen section of screens.rpy, but I'm unsure what to look for.

Code: Select all

## History screen ##############################################################
##
## This is a screen that displays the dialogue history to the player. While
## there isn't anything special about this screen, it does have to access the
## dialogue history stored in _history_list.
##
## https://www.renpy.org/doc/html/history.html

screen history():

    tag menu

    ## Avoid predicting this screen, as it can be very large.
    predict False

    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):

        style_prefix "history"

        for h in _history_list:

            window:

                ## This lays things out properly if history_height is None.
                has fixed:
                    yfit True

                if h.who:

                    label h.who:
                        style "history_name"

                        ## Take the color of the who text from the Character, if
                        ## set.
                        if "color" in h.who_args:
                            text_color h.who_args["color"]

                $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
                text what

        if not _history_list:
            label _("The dialogue history is empty.")


## This determines what tags are allowed to be displayed on the history screen.

define gui.history_allow_tags = set()


style history_window is empty

style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text

style history_text is gui_text

style history_label is gui_label
style history_label_text is gui_label_text

style history_window:
    xfill True
    ysize gui.history_height

style history_name:
    xpos gui.history_name_xpos
    xanchor gui.history_name_xalign
    ypos gui.history_name_ypos
    xsize gui.history_name_width

style history_name_text:
    min_width gui.history_name_width
    text_align gui.history_name_xalign

style history_text:
    xpos gui.history_text_xpos
    ypos gui.history_text_ypos
    xanchor gui.history_text_xalign
    xsize gui.history_text_width
    min_width gui.history_text_width
    text_align gui.history_text_xalign
    layout ("subtitle" if gui.history_text_xalign else "tex")

style history_label:
    xfill True

style history_label_text:
    xalign 0.5
If anyone could help with this, I would greatly appreciate it! if I posted the wrong code let me know what is actually needed and I'll post it right away.

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

Re: Unknown problem in History menu

#2 Post by Imperf3kt » Thu Apr 12, 2018 8:08 pm

The history screen only lays out the elements, the actual sizing and positioning is done in gui.rpy
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter

User avatar
rayminator
Veteran
Posts: 310
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Unknown problem in History menu

#3 Post by rayminator » Thu Apr 12, 2018 8:13 pm

have you played around with the gui.rpy

here is a default sets in my test game when i was trying renpy for my first time haven't changed anything for the history screen

don't know if this might help or not

Code: Select all

## History #####################################################################
##
## The history screen displays dialogue that the player has already dismissed.

## The number of blocks of dialogue history Ren'Py will keep.
define config.history_length = 250

## The height of a history screen entry, or None to make the height variable at
## the cost of performance.
define gui.history_height = 140

## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 155
define gui.history_name_ypos = 0
define gui.history_name_width = 155
define gui.history_name_xalign = 1.0

## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 170
define gui.history_text_ypos = 2
define gui.history_text_width = 740
define gui.history_text_xalign = 0.0

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#4 Post by scharlakenrose » Thu Apr 12, 2018 9:53 pm

rayminator wrote:
Thu Apr 12, 2018 8:13 pm
have you played around with the gui.rpy

here is a default sets in my test game when i was trying renpy for my first time haven't changed anything for the history screen

don't know if this might help or not

Code: Select all

## History #####################################################################
##
## The history screen displays dialogue that the player has already dismissed.

## The number of blocks of dialogue history Ren'Py will keep.
define config.history_length = 250

## The height of a history screen entry, or None to make the height variable at
## the cost of performance.
define gui.history_height = 140

## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 155
define gui.history_name_ypos = 0
define gui.history_name_width = 155
define gui.history_name_xalign = 1.0

## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 170
define gui.history_text_ypos = 2
define gui.history_text_width = 740
define gui.history_text_xalign = 0.0
I just looked at mine and there seems to be no difference. I never actually played with that part of gui.rpy. Is there something else that would affect the history menu?

User avatar
rayminator
Veteran
Posts: 310
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Unknown problem in History menu

#5 Post by rayminator » Thu Apr 12, 2018 10:14 pm

here some more to look at can you post your screen.rpy and gui.rpy so someone can help better

Code: Select all

gui.history_height = 190
        gui.history_text_width = 690

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#6 Post by scharlakenrose » Thu Apr 12, 2018 10:22 pm

rayminator wrote:
Thu Apr 12, 2018 10:14 pm
here some more to look at can you post your screen.rpy and gui.rpy so someone can help better

Code: Select all

gui.history_height = 190
        gui.history_text_width = 690
screens.rpy - http://grandmaster.club/scarlet/scarlet ... creens.rpy
gui.rpy - http://grandmaster.club/scarlet/scarlet ... ry/gui.rpy

Here they are. Hopefully I haven't just totally broken something.

User avatar
rayminator
Veteran
Posts: 310
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Unknown problem in History menu

#7 Post by rayminator » Fri Apr 13, 2018 11:30 am

ok I only can suggest that you adjust these in the gui.rpy

Code: Select all

this for the character name
define gui.history_name_xpos = 155
define gui.history_name_ypos = 0


this for the dialogue text.
define gui.history_text_xpos = 170
define gui.history_text_ypos = 2

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#8 Post by scharlakenrose » Fri Apr 13, 2018 11:47 pm

rayminator wrote:
Fri Apr 13, 2018 11:30 am
ok I only can suggest that you adjust these in the gui.rpy

Code: Select all

this for the character name
define gui.history_name_xpos = 155
define gui.history_name_ypos = 0


this for the dialogue text.
define gui.history_text_xpos = 170
define gui.history_text_ypos = 2
At this point it's looking like I'll need to replace the screens.rpy and gui.rpy files with defaults from a new project and then re-add all of my buttons

User avatar
ISAWHIM
Veteran
Posts: 284
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Unknown problem in History menu

#9 Post by ISAWHIM » Sat Apr 14, 2018 7:18 pm

Everything is all intertwined together... (Some things undocumented, and some without any code in the files, that can be altered. They use internal defaults and you have to guess what things are missing.)

When you get to the point that you need to make adjustments, modifying the core-code is rather dangerous. Change one thing, and everything in the entire game changes, but only one thing will actually look right. (Whatever it was that you thought was the only thing you were changing.)

Figure-out what SPECIFIC thing you want to change (that is a challenge too), then only create code/settings that alter ONLY that specific thing, which may be impossible at times, as the settings of other things, are based off other things. It's an ugly set of cross-groped and cross-nested values, that honestly is impossible to control with the default code they setup.

Or, you can just do like I do, and delete all the prefabricated code, and start from scratch. (Once you figure-out what actual code is still needed. Like screen-size and some minor critical "defaults" that don't actually have any internal defaults in code. Then you will sort-of be in control of what it looks like.)

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#10 Post by scharlakenrose » Sat Apr 14, 2018 11:40 pm

ISAWHIM wrote:
Sat Apr 14, 2018 7:18 pm
Everything is all intertwined together... (Some things undocumented, and some without any code in the files, that can be altered. They use internal defaults and you have to guess what things are missing.)

When you get to the point that you need to make adjustments, modifying the core-code is rather dangerous. Change one thing, and everything in the entire game changes, but only one thing will actually look right. (Whatever it was that you thought was the only thing you were changing.)

Figure-out what SPECIFIC thing you want to change (that is a challenge too), then only create code/settings that alter ONLY that specific thing, which may be impossible at times, as the settings of other things, are based off other things. It's an ugly set of cross-groped and cross-nested values, that honestly is impossible to control with the default code they setup.

Or, you can just do like I do, and delete all the prefabricated code, and start from scratch. (Once you figure-out what actual code is still needed. Like screen-size and some minor critical "defaults" that don't actually have any internal defaults in code. Then you will sort-of be in control of what it looks like.)
See, the trouble is, I don't recall changing anything aside from the textbuttons on the menus into imagebuttons. Restoring screens and gui to new ones should clear up any problems caused by something i may have forgotten

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#11 Post by scharlakenrose » Sun Apr 15, 2018 12:39 am

That did indeed fix the problem. that was quite an odd situation

User avatar
ISAWHIM
Veteran
Posts: 284
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Unknown problem in History menu

#12 Post by ISAWHIM » Sun Apr 15, 2018 1:01 am

I have begged for an "empty" project, for years... Instead, it just continues to get more complex, as a prefab-project.

The nightmare... (Direct code from RenPy, in the screens.rpy file... from ???)

It is a whole lot of ??? and redundancy, and confusion going on here... for no apparent reason...

This is why, changing one thing, alters EVERYTHING. :P

Code: Select all

style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text

style pref_label is gui_label
style pref_label_text is gui_label_text
style pref_vbox is vbox

style radio_label is pref_label
style radio_label_text is pref_label_text
style radio_button is gui_button
style radio_button_text is gui_button_text
style radio_vbox is pref_vbox

style check_label is pref_label
style check_label_text is pref_label_text
style check_button is gui_button
style check_button_text is gui_button_text
style check_vbox is pref_vbox

style slider_label is pref_label
style slider_label_text is pref_label_text
style slider_slider is gui_slider
style slider_button is gui_button
style slider_button_text is gui_button_text
style slider_pref_vbox is pref_vbox
You can format any specific window/displayable... etc... by locating the area where it is actually coded, and removing things that say "default" or "is something", and actually define those things there.

I just deleted all the "history code" and windows, and anything related to history. It doesn't record everything correctly, and makes it an unintelligible mess for anything other than using raw-text dialogue with all the prefabricated stuff.

It has a use, just not in my games. It should honestly be an option to include, or not. More honestly, it shouldn't be in the default project setup at all, and should be a set of add-on code. If only for less clutter and less posts about how to disable it and "fix it", and "get it to work right". When few even use it at all, in a game. :P

User avatar
scharlakenrose
Newbie
Posts: 7
Joined: Thu Apr 12, 2018 7:35 pm
Projects: Raverant Chronicles: Scarlet Harvest
Organization: WG
Contact:

Re: Unknown problem in History menu

#13 Post by scharlakenrose » Sun Apr 15, 2018 2:16 am

ISAWHIM wrote:
Sun Apr 15, 2018 1:01 am
I have begged for an "empty" project, for years... Instead, it just continues to get more complex, as a prefab-project.

The nightmare... (Direct code from RenPy, in the screens.rpy file... from ???)

It is a whole lot of ??? and redundancy, and confusion going on here... for no apparent reason...

This is why, changing one thing, alters EVERYTHING. :P

Code: Select all

style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text

style pref_label is gui_label
style pref_label_text is gui_label_text
style pref_vbox is vbox

style radio_label is pref_label
style radio_label_text is pref_label_text
style radio_button is gui_button
style radio_button_text is gui_button_text
style radio_vbox is pref_vbox

style check_label is pref_label
style check_label_text is pref_label_text
style check_button is gui_button
style check_button_text is gui_button_text
style check_vbox is pref_vbox

style slider_label is pref_label
style slider_label_text is pref_label_text
style slider_slider is gui_slider
style slider_button is gui_button
style slider_button_text is gui_button_text
style slider_pref_vbox is pref_vbox
You can format any specific window/displayable... etc... by locating the area where it is actually coded, and removing things that say "default" or "is something", and actually define those things there.

I just deleted all the "history code" and windows, and anything related to history. It doesn't record everything correctly, and makes it an unintelligible mess for anything other than using raw-text dialogue with all the prefabricated stuff.

It has a use, just not in my games. It should honestly be an option to include, or not. More honestly, it shouldn't be in the default project setup at all, and should be a set of add-on code. If only for less clutter and less posts about how to disable it and "fix it", and "get it to work right". When few even use it at all, in a game. :P
Well my problem was taken care of, but for what you're after (it seems you want to remove the History screen completely), just remove any textbutton or imagebutton that references the history screen

Post Reply

Who is online

Users browsing this forum: Dascadi