I was curious. Is it possible to change the main menu image when a certain point of the story is passed? An example I noticed of this is if a person had played through Umineko Ep. 1 completely and the main menu image changes or if a person completes Fate/Stay and it changes to a brighter image.
What I was hoping to try out is having the main menu image change after each chapter was done. And each chapter, as well as the button, would be unlocked when the reader finishes a chapter.
To put it simpler:
1. Prologue
2. Finished chapter so return to main menu
3. The main menu image is changed
4. Chapter 1 appears and is available to click
Also, I don't remember the code for making another button appear to be clickable so if someone can help me with that too, that would be much appreciated.
Changing main menu image through a variable: Is it possible?
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.
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.
-
- Regular
- Posts: 132
- Joined: Wed Aug 19, 2009 12:42 am
- Projects: 軽い夏, The Aces
- Contact:
Changing main menu image through a variable: Is it possible?
a.k.a. DragonfaeryYume on dA
The Vault in the Sky (Dev Blog)
Projects:
WIP The Aces
WIP (Head Artist) 軽い夏: The Sun Will Shine Through (tentative title)
The Vault in the Sky (Dev Blog)
Projects:
WIP The Aces
WIP (Head Artist) 軽い夏: The Sun Will Shine Through (tentative title)
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Changing main menu image through a variable: Is it possi
The answer is... not yet.CaesMRaenes wrote:I was curious. Is it possible to change the main menu image when a certain point of the story is passed? An example I noticed of this is if a person had played through Umineko Ep. 1 completely and the main menu image changes or if a person completes Fate/Stay and it changes to a brighter image.
Oh, you can certainly do it with Ren'Py, using a layout. But that's overkill for something like this. I'm currently redoing the way people will design screens in Ren'Py, and when I'm done with that, things should work a bit more nicely.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Miko-Class Veteran
- Posts: 546
- Joined: Wed Sep 21, 2005 10:49 pm
- Projects: Winter Shard, EVE, Hyperion
- Contact:
Re: Changing main menu image through a variable: Is it possi
Don't think it is workable with a variable, but a persistent will do.CaesMRaenes wrote:I was curious. Is it possible to change the main menu image when a certain point of the story is passed? An example I noticed of this is if a person had played through Umineko Ep. 1 completely and the main menu image changes or if a person completes Fate/Stay and it changes to a brighter image.
What I was hoping to try out is having the main menu image change after each chapter was done. And each chapter, as well as the button, would be unlocked when the reader finishes a chapter.
To put it simpler:
1. Prologue
2. Finished chapter so return to main menu
3. The main menu image is changed
4. Chapter 1 appears and is available to click
Also, I don't remember the code for making another button appear to be clickable so if someone can help me with that too, that would be much appreciated.
Extracted from EVE, tested on 6.10.0a...
Code: Select all
# The first column is the persistent value and the second column is the images for the main menu. By giving a value to the persistent.ending, you can choose which image to be displayed.
$ mm_root = ConditionSwitch(
"persistent.ending == 3", "image03.png",
"persistent.ending == 2", "image02.png",
"persistent.ending == 1", "image01.png",
"persistent.ending == 0", "image01.png",
),
-
- Regular
- Posts: 132
- Joined: Wed Aug 19, 2009 12:42 am
- Projects: 軽い夏, The Aces
- Contact:
Re: Changing main menu image through a variable: Is it possi
Pretty cool. Thanks for the code, F.I.A.
I also read over my initial post and noticed that I didn't clarify my second question so if anyone can help, much appreciated. I wanted to ask: was there a code to unlock another button on the main menu (unlocking a new chapter, in my case) much like the case of the CG Gallery?
I also read over my initial post and noticed that I didn't clarify my second question so if anyone can help, much appreciated. I wanted to ask: was there a code to unlock another button on the main menu (unlocking a new chapter, in my case) much like the case of the CG Gallery?
a.k.a. DragonfaeryYume on dA
The Vault in the Sky (Dev Blog)
Projects:
WIP The Aces
WIP (Head Artist) 軽い夏: The Sun Will Shine Through (tentative title)
The Vault in the Sky (Dev Blog)
Projects:
WIP The Aces
WIP (Head Artist) 軽い夏: The Sun Will Shine Through (tentative title)
Re: Changing main menu image through a variable: Is it possi
Something like this works:CaesMRaenes wrote:I also read over my initial post and noticed that I didn't clarify my second question so if anyone can help, much appreciated. I wanted to ask: was there a code to unlock another button on the main menu (unlocking a new chapter, in my case) much like the case of the CG Gallery?
Code: Select all
init python:
# To see the intro again...
config.main_menu = [(u"Prologue", "prologue", "True", "persistent.seen_intro")] + config.main_menu
label start:
if not persistent.seen_intro:
call prologue
call chapter1
label prologue:
# Do whatever. When it's done:
$ persistent.seen_intro = True
return
label chapter1:
# That's where the actual story starts, and where you would start if you 'start game' after having seen the prologue.
return
You may need a more complex menu definition line, possibly requiring you to redefine all buttons from scratch, but every button can be shown or hidden and working or not working depending on Python expressions, and 'persistent.variablename' is an expression which is not 'True' until the persistent variable is set.
Who is online
Users browsing this forum: No registered users