Version 2.4 Is Live


Version 2.4 of the template is live now. This is a very minor update that adds the total read percentage of the game to the Achievements screen along with other small changes. Please add the following lines to your screens.

### APPROXIMATELY LINE 1960 
## Our actual achievements screen
screen achievements():

    tag menu

    ## This use statement includes the extras_menu screen inside this one. The
    ## vbox child is then included inside the viewport inside the extras_menu
    ## screen.
    use extras_menu(_("Achievements"), scroll="viewport"):

        ## This screen doesn't need anything fancy, so we borrow the style
        ## from the About screen, which just displays text.
        style_prefix "about"

        vbox:

            ## This auto-populates our list of simple achievements that will appear
            ## in the screen, so we don't have to manually type each one out.
            for aname, lockdesc, unlockdesc in simple_achievement_list:

                if achievement.has(aname):

                    text "[aname]: [unlockdesc]"

                else:

                    text "[aname]: [lockdesc]"

            ## We have to type each integer based achievement however
            hbox:
                text "Point Collector:"

                null width 10

                bar value persistent.points range 100 xsize 525

            text "[persistent.readtotal]% of the game read"

### APPROXIMATELY LINE 2180
# This creates a percentage based on how much of the game the player has seen. 
init python:

    numblocks = renpy.count_dialogue_blocks()

    def percent():

        global readtotal
        readtotal = renpy.count_seen_dialogue_blocks()* 100 / numblocks
        persistent.readtotal = readtotal
        ## This is displayed in our Achievements screen.

Files

GUI Template 2.4.zip 14 MB
Feb 09, 2020

Get Ren'Py All-In-One GUI Template

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Thank you very much for this!