Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Tue Jun 18, 2013 2:44 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Nov 10, 2011 3:29 pm 
Eileen-Class Veteran
User avatar

Joined: Sat Oct 20, 2007 7:38 pm
Posts: 1434
Location: Chile
Projects: http://deji.ishtera.net/blog/?page_id=724#projects
Organization: Sakevisual, Mystery Parfait
I've seen this before, that when you play for the second/nth time, when a menu shows up, the menu option(s) you've picked on previous playthrough(s) appears greyed-out or on a duller color, making it easier for ending/variation scenes hunting.

My logic tells me I'd have to establish persistent variables for every menu choice in the game and check their value, like what people do with the CG galleries.

Code:
menu:
    "choice1":
        $persistent.d1m1_choice1 = True
        jump choice1_stuff
    "choice2":
        $persistent.d1m1_choice2 = True
        jump choice2_stuff
    "choice3":
        $persistent.d1m1_choice3 = True
        jump choice3_stuff


...But then I have no idea how to make an if for the menu button appearance/style, using that persistent variable data.

Is there a way to do this?

_________________
Image
When drawing something, anything, USE REFERENCES!! Use your Google-fu!

Don't trust your memory, and don't blindly trust what other people teaches you either.

Research, observation, analysis, experimentation and practice is the key! (:



Last edited by Deji on Fri Nov 11, 2011 6:12 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Thu Nov 10, 2011 11:25 pm 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10848
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Style menu_choice_chosen and menu_choice_chosen_button. There's no need to maintain the persistent variables yourself - Ren'Py does it for you.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
PostPosted: Fri Nov 11, 2011 10:47 am 
Eileen-Class Veteran
User avatar

Joined: Sat Oct 20, 2007 7:38 pm
Posts: 1434
Location: Chile
Projects: http://deji.ishtera.net/blog/?page_id=724#projects
Organization: Sakevisual, Mystery Parfait
Awesome! Thank you, I'll give it a try <3

_________________
Image
When drawing something, anything, USE REFERENCES!! Use your Google-fu!

Don't trust your memory, and don't blindly trust what other people teaches you either.

Research, observation, analysis, experimentation and practice is the key! (:



Top
 Profile Send private message  
 
PostPosted: Fri Nov 11, 2011 6:08 pm 
Eileen-Class Veteran
User avatar

Joined: Sat Oct 20, 2007 7:38 pm
Posts: 1434
Location: Chile
Projects: http://deji.ishtera.net/blog/?page_id=724#projects
Organization: Sakevisual, Mystery Parfait
So...
I styled the chosen menus as you said, like this:

Code:
    style.menu_choice_button.background = "#33271C"
    style.menu_choice_button.hover_background =  "#ECE7C4"
    style.menu_choice_chosen_button.background = "#333"
    style.menu_choice_chosen_button.hover_background =  "#888"
       
    ##Modifies the Menu Choice's Text
    style.menu_choice.color = "#B99D83"
    style.menu_choice_chosen.color = "#000"


But nothing happened =/

I went to investigate the choice screen then. For some reason, it stroke me as if it wasn't really considering the "chosen" part, or at least there was no condition that would instruct it to change the style if the button was chosen. I didn't really know how would that work, though, so I couldn't figure out how to put that myself.

Then I exercised search and research-fu for a couple of hours and found out that I was right, that the choice screen had to be modified.

I hope this helps other people that want to do the same as well, and save them some time too! ^^

_________________
Image
When drawing something, anything, USE REFERENCES!! Use your Google-fu!

Don't trust your memory, and don't blindly trust what other people teaches you either.

Research, observation, analysis, experimentation and practice is the key! (:



Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: trooper6


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group