[Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainMenu
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
- Zelika
- Newbie
- Posts: 7
- Joined: Mon Nov 04, 2013 11:01 pm
- Projects: Blind
- IRC Nick: ValerieXarichi
- Location: Philippines
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank you sooo much for this tutorial!! It really helped me in my game
But I have a question, can I use a video as the background on my main menu? because I really love to use that on my game.
But I have a question, can I use a video as the background on my main menu? because I really love to use that on my game.
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Zelika wrote:Thank you sooo much for this tutorial!! It really helped me in my game
Excellent! I love being helpful.
Yes!Zelika wrote:...can I use a video as the background on my main menu? because I really love to use that on my game.
-- http://lemmasoft.renai.us/forums/viewto ... 65#p292740
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- Zelika
- Newbie
- Posts: 7
- Joined: Mon Nov 04, 2013 11:01 pm
- Projects: Blind
- IRC Nick: ValerieXarichi
- Location: Philippines
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank youuuuuuuuuuuuuu !!OokamiKasumi wrote:Zelika wrote:Thank you sooo much for this tutorial!! It really helped me in my game
Excellent! I love being helpful.Yes!Zelika wrote:...can I use a video as the background on my main menu? because I really love to use that on my game.
-- http://lemmasoft.renai.us/forums/viewto ... 65#p292740
I didn't knew this topic was there, anyways thanks as always ^^
- Sensata
- Newbie
- Posts: 11
- Joined: Mon Oct 28, 2013 1:48 am
- Projects: Mark of the goddess
- Location: Doomlands
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank you, i'll take a look to that topic again.(:OokamiKasumi wrote: You didn't do anything wrong.
-- This tutorial only covers changing the Backgrounds.
If you want to change the buttons and other stuff, check out this tutorial:
[Tutorial] Customizing Menus It comes with a sample game with fully working code too!
And this tutorial:
[Tutorial] Crash course in screen language/UI design
- Pinlin
- Regular
- Posts: 98
- Joined: Fri Feb 08, 2013 9:33 am
- Projects: Dark nights
- Tumblr: darknightsblog
- Deviantart: Pinlin
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank you for this helpful tutorial! ^^
I got a little problem: I'm using an image map for the Yes/No menu and the hover image doesn't work for some reason.
This is my code:
I want all 6 menu's be the same. Do you know what I did wrong? >_<
I got a little problem: I'm using an image map for the Yes/No menu and the hover image doesn't work for some reason.
This is my code:
Code: Select all
screen yesno_prompt:
modal True
on "show" action With(fade)
modal True
imagemap:
ground "library/GUI/Blank.png"
idle "library/GUI/menu_yes_no.png"
hover "library/GUI/menu_yes_no_hover.png"
hotspot (413,425,160,82) action yes_action
hotspot (672,425,155,84) action no_action
#text _(message):
#xalign 0.5
#yalign 0.5
if message == layout.ARE_YOU_SURE:
add "library/GUI/menu_yes_no.png"
elif message == layout.DELETE_SAVE:
add "library/GUI/menu_yes_no.png"
elif message == layout.OVERWRITE_SAVE:
add "library/GUI/menu_yes_no.png"
elif message == layout.LOADING:
add "library/GUI/menu_yes_no.png"
elif message == layout.QUIT:
add "library/GUI/menu_yes_no.png"
elif message == layout.MAIN_MENU:
add "library/GUI/menu_yes_no.png"
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
First, Check your Hover Image: menu_yes_no_hover.pngPinlin wrote:Thank you for this helpful tutorial! ^^
I got a little problem: I'm using an image map for the Yes/No menu and the hover image doesn't work for some reason.
This is my code:I want all 6 menu's be the same. Do you know what I did wrong? >_<Code: Select all
imagemap: ground "library/GUI/Blank.png" idle "library/GUI/menu_yes_no.png" hover "library/GUI/menu_yes_no_hover.png" hotspot (413, 425,160, 82) action yes_action hotspot (672, 425,155, 84) action no_action
-- Is the image in the right folder? (GUI > inside of library > inside of GAME?)
-- Is the name of your hover image, and the name of the image in the above code -- the Same? One tiny space in the wrong place is enough.
Next, check your Hotspot codes:
-- Are you sure these coordinates are right?
Since it's a case of a missing graphic, the problem should be in one of the things listed above,.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- Pinlin
- Regular
- Posts: 98
- Joined: Fri Feb 08, 2013 9:33 am
- Projects: Dark nights
- Tumblr: darknightsblog
- Deviantart: Pinlin
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank you for the help, I'm sorry for the late reply.OokamiKasumi wrote:First, Check your Hover Image: menu_yes_no_hover.pngPinlin wrote:Thank you for this helpful tutorial! ^^
I got a little problem: I'm using an image map for the Yes/No menu and the hover image doesn't work for some reason.
This is my code:I want all 6 menu's be the same. Do you know what I did wrong? >_<Code: Select all
imagemap: ground "library/GUI/Blank.png" idle "library/GUI/menu_yes_no.png" hover "library/GUI/menu_yes_no_hover.png" hotspot (413, 425,160, 82) action yes_action hotspot (672, 425,155, 84) action no_action
-- Is the image in the right folder? (GUI > inside of library > inside of GAME?)
-- Is the name of your hover image, and the name of the image in the above code -- the Same? One tiny space in the wrong place is enough.
Next, check your Hotspot codes:
-- Are you sure these coordinates are right?
Since it's a case of a missing graphic, the problem should be in one of the things listed above,.
The image is in the right folder and the naming is right. I tested them by replacing
Code: Select all
add "library/GUI/menu_yes_no.png"
Code: Select all
add "library/GUI/menu_yes_no_hover.png"
The hotspots are correct, because the buttons do work when I hit them.
I tried:
Code: Select all
screen yesno_prompt:
modal True
on "show"
modal True
imagemap:
ground "library/GUI/Blank.png"
idle "library/GUI/menu_yes_no.png"
hover "library/GUI/menu_yes_no_hover.png"
hotspot (413,425,160,82) action yes_action
hotspot (672,425,155,84) action no_action
#text _(message):
#xalign 0.5
#yalign 0.5
if message == layout.ARE_YOU_SURE:
add "library/GUI/menu_yes_no.png"
elif message == layout.DELETE_SAVE:
add "library/GUI/menu_yes_no.png"
elif message == layout.OVERWRITE_SAVE:
add "library/GUI/menu_yes_no.png"
elif message == layout.LOADING:
add "library/GUI/menu_yes_no.png"
elif message == layout.QUIT:
add "library/GUI/menu_yes_no.png"
elif message == layout.MAIN_MENU:
add "library/GUI/menu_yes_no.png"
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
That top part should look like this:Pinlin wrote:...The image just shows up. Though the problem is, when I hover it, it doesn't change. It is a indentation mismatch?
The hotspots are correct, because the buttons do work when I hit them.
I tried:but the hover image still doesnt show up.Code: Select all
screen yesno_prompt: modal True on "show" modal True imagemap: ground "library/GUI/Blank.png" idle "library/GUI/menu_yes_no.png" hover "library/GUI/menu_yes_no_hover.png" hotspot (413,425,160,82) action yes_action hotspot (672,425,155,84) action no_action
Code: Select all
screen yesno_prompt:
on "show" action With(dissolve)
modal True
imagemap:
ground "library/GUI/Blank.png"
idle "library/GUI/menu_yes_no.png"
hover "library/GUI/menu_yes_no_hover.png"
hotspot (413,425,160,82) action yes_action
hotspot (672,425,155,84) action no_action
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- Pinlin
- Regular
- Posts: 98
- Joined: Fri Feb 08, 2013 9:33 am
- Projects: Dark nights
- Tumblr: darknightsblog
- Deviantart: Pinlin
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thanks for the help, but it didn't really work heh ^^''
I tried something else by deleting the "if and elif" statements. Also replacing the ground with the same image used in idle:
This code works perfectly, the buttons do highlight when I hover it. I have no idea what was wrong with the previous code though...
Using this code displays the same "yes/no" screen in all options.
I tried something else by deleting the "if and elif" statements. Also replacing the ground with the same image used in idle:
Code: Select all
# Yes/No Prompt
#
# Screen that asks the user a yes or no question.
# http://www.renpy.org/doc/html/screen_special.html#yesno-prompt
screen yesno_prompt:
on "show" action With(dissolve)
modal True
imagemap:
ground "library/GUI/menu_yes_no.png"
idle "library/GUI/menu_yes_no.png"
hover "library/GUI/menu_yes_no_hover.png"
hotspot (413,425,160,82) action yes_action
hotspot (672,425,155,84) action no_action
Using this code displays the same "yes/no" screen in all options.
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
If changing an image did the trick, then that image was somehow covering the Hover image. Even if it's transparent an image can still block out another image by rendering it invisible.Pinlin wrote:...Also replacing the ground with the same image used in idle...Code: Select all
imagemap: ground "library/GUI/menu_yes_no.png" idle "library/GUI/menu_yes_no.png" hover "library/GUI/menu_yes_no_hover.png" hotspot (413,425,160,82) action yes_action hotspot (672,425,155,84) action no_action
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- Ri Eaharuto
- Newbie
- Posts: 6
- Joined: Thu Apr 17, 2014 7:59 am
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Thank you very much^^ This really helps me out.
But I have a little problem. I did everything correct, but when I start the game I can only see the upper left corner of the background and can´t do anything.
What did I wrong?
Ri Eaharuto
But I have a little problem. I did everything correct, but when I start the game I can only see the upper left corner of the background and can´t do anything.
What did I wrong?
Ri Eaharuto
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Can you show me a screenshot?Ri Eaharuto wrote:Thank you very much^^ This really helps me out.
But I have a little problem. I did everything correct, but when I start the game I can only see the upper left corner of the background and can´t do anything.
What did I wrong?
Ri Eaharuto
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
- Clover0Project
- Newbie
- Posts: 15
- Joined: Tue Jul 22, 2014 4:04 am
- Location: Bandung, Indonesia
- Contact:
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Hello. Thank you so much for making this tutorial.
But I have a problem. I tried everything I can but it's no use.
First, I want to ask, for the yes/no text messages only, where to put the codes in the screen yes/no prompt? I'm afraid I put the codes in the wrong place. Also, it's suitable for the newest version of ren'py (6.18+) right? (some people has problems after updating.)
If I don't get it wrong...I copied the yes/no text messages only, it's all the same.
But, when I open my game, I got (I just wrote it here, it simple) this error:
label expects a non-empty block.
label _("Are you really sure?"):<-
I wonder what is wrong...
EDIT: solved I don't know how just trying. Thanks!
But I have a problem. I tried everything I can but it's no use.
First, I want to ask, for the yes/no text messages only, where to put the codes in the screen yes/no prompt? I'm afraid I put the codes in the wrong place. Also, it's suitable for the newest version of ren'py (6.18+) right? (some people has problems after updating.)
If I don't get it wrong...I copied the yes/no text messages only, it's all the same.
But, when I open my game, I got (I just wrote it here, it simple) this error:
label expects a non-empty block.
label _("Are you really sure?"):<-
I wonder what is wrong...
EDIT: solved I don't know how just trying. Thanks!
Last edited by Clover0Project on Thu Dec 25, 2014 8:49 pm, edited 1 time in total.
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
You need to fix the indentation in your script - http://www.renpy.org/wiki/renpy/FAQ#How ... _blocks.3F
Re: [Tutorial]Custom Backgrounds:Save/Load/Pref/Yes-No/MainM
Whoa, dude. ;_; Took me two freakin' years to actually find this. Either I'm blind and I never knew it, or I'm just lazier than I thought I was. xD Thanks.
Who is online
Users browsing this forum: No registered users