Make a " trophies board" with all ends in a VN

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
Théodore la barbe
Newbie
Posts: 2
Joined: Fri Dec 07, 2018 3:22 pm
Contact:

Make a " trophies board" with all ends in a VN

#1 Post by Théodore la barbe »

Hello everyone ^^ Sorry for my bad english, i'm french and this forum is my only solution to solve my problem. I make a Vn with my high school's club, but we want make something perhaps too much dificult for us ^^ the purpose of our game is to finish all possible ends. And, after a end, there is a "trophies" unlocked, and we could see that trophies in a menu accessible from the main menu or the pause menu. But, we can't know how do that menu... I don't know if it was be clear, but, please, help us :!:
Thank you !

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Make a " trophies board" with all ends in a VN

#2 Post by Per K Grok »

Théodore la barbe wrote: Fri Dec 07, 2018 3:54 pm Hello everyone ^^ Sorry for my bad english, i'm french and this forum is my only solution to solve my problem. I make a Vn with my high school's club, but we want make something perhaps too much dificult for us ^^ the purpose of our game is to finish all possible ends. And, after a end, there is a "trophies" unlocked, and we could see that trophies in a menu accessible from the main menu or the pause menu. But, we can't know how do that menu... I don't know if it was be clear, but, please, help us :!:
Thank you !
Open screens.rpy

find 'screen navigation():'

after
textbutton _("About") action ShowMenu("about")
add a new line
textbutton _("Trophy") action ShowMenu("trophy")

Make a new screen

Code: Select all

##########################

screen trophy():
    tag menu
    use game_menu(_("Trophies"), scroll="viewport"):
        vbox:
            text "Trophy 1"
            text "Trophy 2"
            text "Trophy 3"

#########################################
You now have an trophy page that you can open from navigation.

You now need some variables to keep tabs on which trophies should be shown and which should not.

default vTrophy1=0
default vTrophy2=0
default vTrophy3=0
....

When a trophy is unlocked change the variable

$ vTrophy1=1

To make the trophies show up on the Trophy page, change the part of the script above.

instead of
'text "Trophy 1"'
do something like

Code: Select all

if vTrophy1==1:
    add "trophy1.png"
I hope this give you an idea on one way to do this.

Théodore la barbe
Newbie
Posts: 2
Joined: Fri Dec 07, 2018 3:22 pm
Contact:

Re: Make a " trophies board" with all ends in a VN

#3 Post by Théodore la barbe »

Wow! It's super fast! Thank you very much, it works great! If I have other problem later, I know I can count on this fabulous forum ^^

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]