Hello everyone.
I just recently started messing with Ren'py and learning to code. So far I've been able to do a few things but I'm having trouble finding a few things. Hopefully will have everything worded correctly so that I can get some help on this.
I would like to have it so that during the game it will have what day it is. How could I do that? That might not make much since so here's a picture of what I mean. On the Upper left corner it has the date plus the day of the week, this is exactly what I'm looking into doing.
How do random events work within the game and how does one put them into your project? Basically what I mean is, while playing the game how can a random encounters happen with the characters? What does the code look like for this?
How does one make a homescreen menu? I understand how to work with the main menu and game menu (where one saves, loads, and controls volume) but what about a screen for the player to go to and I guess you can say plan things out or complete things such as studying in their bedroom. How are those made?
I'm also interested in making it so that places can be explored in the game. I had the idea where a map can be pulled up and the player would simply have to click where they want to go and from there stat raising can happen or interaction with characters.
Example of a Map
I thought that this is where imagemaps and hotspots we're what I'd be working with but after looking into it more I fee confused and unsure now.
I'm sorry if my questions sound confusing, I'm not exactly sure how to phrase them so if anything needs better explaining I will do my best. I'm also very new to the forum although I've been lurking around for a while.
Dates, Maps, and Homescreen (newbie questions)
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.
- akemicchi
- Veteran
- Posts: 465
- Joined: Mon Dec 31, 2007 11:22 pm
- Projects: Magicians of Delphine, Panaderia: Ensaimada, SweetTooth!, XOXO Droplets
- Deviantart: littlebabyshoes
- Contact:
Re: Dates, Maps, and Homescreen (newbie questions)
Welcome to the forums! :D
Date:
http://lemmasoft.renai.us/forums/viewto ... 0&p=346301
http://lemmasoft.renai.us/forums/viewto ... =8&t=25098
Random events:
http://lemmasoft.renai.us/forums/viewto ... =8&t=25441
http://lemmasoft.renai.us/forums/viewto ... 9&p=353455
Search is your friend. :)
Making a homescreen menu:
You use these by making Screens. They're not that different from customizing game menus since the menus are screens themselves. If you can work with game menus, you can make your own screen. Read up on that, and if you have any specific questions, ask! :) If you need help on how to actually make the screen you have in mind, you'll have to give us more details, like what you want it to do, what it'll look like, etc. But all these can be answered if you read up on the Screen language in the Ren'Py documentation.
Same thing for the map. Imagemaps is probably your best bet for something like the image you have. The only problem with imagemaps is the clickable area will be a square/rectangle. You could also try imagebuttons, but they're a little more complicated. The clickable area will cover the whole shape of the image though, and it works with transparency. Anyway, you'll be making a screen, and then putting the imagebuttons/imagemap in it. Then all you have to do is show or hide the screen.
Example code for an imagemap would just be:
To show it, you have in your game:
Alternatively, you can use: This is better than just showing because call screen waits for input from the player, as opposed to showing the screen. Showing the screen lets you continue on with the game unless you have modal set to True. You'll need an extra line: if you're using Return() in the screen. After that, you can evaluate the variable to get it to do things.
The Documentation has all the info about things you can do with screens. Look over that, and if you still have any questions, feel free to ask!
Date:
http://lemmasoft.renai.us/forums/viewto ... 0&p=346301
http://lemmasoft.renai.us/forums/viewto ... =8&t=25098
Random events:
http://lemmasoft.renai.us/forums/viewto ... =8&t=25441
http://lemmasoft.renai.us/forums/viewto ... 9&p=353455
Search is your friend. :)
Making a homescreen menu:
You use these by making Screens. They're not that different from customizing game menus since the menus are screens themselves. If you can work with game menus, you can make your own screen. Read up on that, and if you have any specific questions, ask! :) If you need help on how to actually make the screen you have in mind, you'll have to give us more details, like what you want it to do, what it'll look like, etc. But all these can be answered if you read up on the Screen language in the Ren'Py documentation.
Same thing for the map. Imagemaps is probably your best bet for something like the image you have. The only problem with imagemaps is the clickable area will be a square/rectangle. You could also try imagebuttons, but they're a little more complicated. The clickable area will cover the whole shape of the image though, and it works with transparency. Anyway, you'll be making a screen, and then putting the imagebuttons/imagemap in it. Then all you have to do is show or hide the screen.
Example code for an imagemap would just be:
Code: Select all
screen map:
modal True
imagemap:
xalign 0.5 yalign 0.5
ground "ground_image.PNG"
hover "hover_image.PNG"
hotspot (740, 232, 75, 73) action Jump(label) # Clicking here will jump to a label.
hotspot (600, 280, 75, 73) action Hide("map") # Hides the map. You should probably have another button in another screen that'll let you show the map or something.
Code: Select all
label stuff_happens:
"Time to figure out what to do."
show screen map # Shows screen map.
$ renpy.pause()
"...."
Code: Select all
call screen map
Code: Select all
results = _return # The variable can be any name that you want, not just results
Code: Select all
label stuff_happens:
call screen map
$ result = _return
if result == "School":
jump go_to_school
elif result == "Home":
jump go_home
# ... Etc
Re: Dates, Maps, and Homescreen (newbie questions)
Thanks so much.
I had been searching for how to put the dates for so long but couldn't find it and wasn't sure what exactly to put to even find it lols. Now I can go back and work more on things.
As for the screens that might take me a little while to really figure out but now I know the first steps to take.
I had been searching for how to put the dates for so long but couldn't find it and wasn't sure what exactly to put to even find it lols. Now I can go back and work more on things.
As for the screens that might take me a little while to really figure out but now I know the first steps to take.
Who is online
Users browsing this forum: No registered users