Bug / typo reporting tool for RenPy

Bug reports and spelling/grammar feedback is critical to polishing projects. Sometimes it’s hard to solicit feedback, and it can be a pain in the ass to give feedback. With renpy, what? Am I supposed to screenshot every typo? Or retype it for the dev? Who has time for that?

I’m going into a polishing phase for my project and this problem has been on my mind for awhile? How can I get feedback in a way that doesn’t require the person giving feedback to do a bunch of extra work on top of what i’m already asking of them? (shameless plug): Myre’s Massive Mealtime - development (v0.57 - 10/24 dinner done!) - #130 by Juxtaterrestrial

This is a solution I came up with.

Tool is probably not the right word. But, when enabled the menu in the top left appears. When they find a typo they hit the corresponding button and it logs the current text, plus the file and line number into typo_report.txt . When they’re done they just send you that file. I even added an option to submit a comment in case the end user wants to provide more details.

For me, often just knowing a line has a typo is enough for me to easily fix it. If that doesn’t come as easily to you, then at least you have the specific line of code to run through a more detailed spell check.

And as I hinted at, I hope this will reduce the burden someone may feel towards reporting typos or bugs. All you have to do is turn it on, and press the button when you see something.

Example:

Here is the code/script for you to use freely - please credit.

#Init stuff

#debug toggle
#toggle to True to enable
define debug_toggle = True

#Variable to toggle the bug report screen
#Set to "True" to have it always on. Set to "True" here just to save time
default show_typo_reporter = "True"

#Variable for user comment input
default user_comment = ""
#snakes
init python:

    #By Juxtaterrestrial
    #called from typo_report_screen, writes things to a file
    def typo_bug(button_name):
        global user_comment
        # Filepath for the bug report
        filepath = renpy.config.basedir + "/typo_report.txt"

        # Get the current dialogue and its location
        #Pop.whaaaaat?
        dialogue = _history_list.pop().what
        filename, line_number = renpy.get_filename_line()

        # Write to the typo report file
        with open(filepath, "a") as f:
            f.write(f"{button_name} at: ")
            f.write(f"{filename}:{line_number}")
            f.write(f" in: '{dialogue}'")
            if user_comment != "":
                f.write(f" #USER COMMENT#: '{user_comment}'")

            f.write("\n")
        #clears comment so it doesn't linger between flags.
        user_comment = ""

#In screens.rpy

#This first bit should be nested in a menu somewhere. Preferences would work.

#By Juxtaterrestrial
        vbox:
            #if debug_toggle:
            label _("\n\nDebug options\n")
            box_wrap True

            label _("Typo/bug report menu\n")

            vbox:
                text _("Adds a menu to the game with buttons to flag typos or errors.\n\n")

                text _("Instructions:\n")

                text _("1: Play the visual novel. When you find a typo or bug press one of the relevant buttons.\n")

                text _("This saves a line 'typo_report.txt' in the main directory of the visual novel.\n\n")

                text _("2: Send this file to the developer to report the typos.\n")



                hbox:
                    style_prefix "radio"
                    textbutton _("Enable") action ToggleVariable("show_typo_reporter", true_value="True")

                    textbutton _("Disable") action ToggleVariable("show_typo_reporter", true_value="False")


#next two are their own screens.

#By Juxtaterrestrial
#A screen for flagging typos. User hits a button and the current dialogue + the line of script is printed to a txt file. The user can then send that to the developer as a typo report.
screen typo_report_screen():
    if show_typo_reporter == "True":
        fixed:
            xalign 1.0
            yalign 0.0
            frame:
                background Solid("#7c9c94")
                vbox:
                    text _("Press button")
                    text _("to log current")
                    text _("dialogue")

                    #Would be trivial to customize the buttons to suit your need
                    textbutton "Spelling" action Function(typo_bug, "Spelling error")
                    textbutton "Grammar" action Function(typo_bug, "Grammar error")
                    textbutton "Image Error" action Function(typo_bug, "Image error")
                    textbutton "Comment" action Show('comment_screen')




#By Juxtaterrestrial
screen comment_screen():
    modal True
    #to prevent accidental advance of story
    add "gui/overlay/confirm.png"
    vbox:
        xalign 0.5
        yalign 0.5

        label "Please enter your comment:"
        input value VariableInputValue("user_comment")
        hbox:
            textbutton "Submit" action [Function(typo_bug,"Comment"), Hide('comment_screen'), Return()]
            textbutton "Cancel" action [Hide('comment_screen'), Return()]

#In the actual script
label start:

    show screen typo_report_screen

10 Likes

Jesus, that is an amazing add-on. I once went through the entirety of a fairly large project documenting every typo and bug I came across using screenshots and typing out the entire correct sentence afterwards. It took me about a month because I did it in my free time and it was the most tedious task ever. I really hope developers will use this. It would make everything a lot less tedious.

3 Likes

That’s exactly the motivation for this. I’ve offered spell checks as stuff on occasion and it’s just like "Don’t mind me flooding your discord PMs (with permission) with screenshots. Which is time consuming to do and also difficult to actually handle typo’s with (cause if there is a search function, the dev still have to type the line in to search for it).

I might alter the code to add a content feedback variant as well. “I like this part a lot” or “This part is boring”

4 Likes

Well, I just collected every screenshot in a Word document, wrote the correct sentence beneath that and sorted them in a smart way. The document ended up being several GBs, but I think it was more appreciated to receive that than hundreds of individual messages.

I don’t know about the feedback tool. I think most developers have a somewhat good idea of what works and what doesn’t. I doubt that individual people’s feedback on a certain part of their game is going to be that helpful. I think they are better off by making a poll about stuff like that on their Discord, Patreon, etc.

Going to depend on the dev, the game, and the feedback but individual feedback can be very valuable to a dev. I think it’s most common that people don’t speak up enough within the community but actually have valuable feedback for a dev or project. So giving them another avenue in which to provide feedback seems great to me.

1 Like

In my personal case, I intend to do spell checking myself first, then roll this tool out for people who like to spell check privately.

But in the case of content feedback - I guess i have a different perspective coming from a writing perspective. Getting a wide section of opinions with a poll is definitely useful, but when there is a lot of write it can be super valuable to get more granular feedback. If when writing a book, i could know exactly the moment when readers typically start getting bored? Or when they start getting excited? GOD that level of feedback would be incredible. Because then I can tailor around it.

Plus, from the psychology direction, lots of people don’t want to tell the writer or developer that their game is boring in places. My hope is that for a content feedback version of this, is that it would be cognitively less difficult to provide negative (but valuable) feedback.

2 Likes

I really like this idea! Reporting bugs on Ren’Py games (especially archived ones) is a PITA.

I’d be tempted to put the “Report Bug” button in the quick menu though, capture the file/line/say-box then, and throw up a screen for the other information.

1 Like

That’d be a good thing to add once I get polishing stuff done (as a general maintenance version)