I started using ren'py recently.
So far things look easy enough to do on my own.
Having actual python knowledge is helping a bit
Images are another story though xD
Anyway, 2 problems came up.
I like having things neatly organized in different folders.
How can I split the .rpy files across folders (different story chapther)?
Same with resources. Not having to put everything together in the "game" folder.
I want to display health values (current/maximum). I can do it with text but with a "ui.bar" nothing shows up.
What code do I need?
I wanted it to look like a button basically (the frame around).
Thanks.
(I hope I was clear enough)
Setup different folders / Using bars or textboxes
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.
-
- Newbie
- Posts: 2
- Joined: Mon Jun 18, 2012 3:21 pm
- Projects: Zombie Adventure (placeholder name)
- Contact:
-
- Regular
- Posts: 40
- Joined: Fri Jan 27, 2012 4:18 pm
- Projects: My Secret Spring (Co-writer & Proofreader), [Secret]
- Contact:
Re: Setup different folders / Using bars or textboxes
For the first problem, all you have to do is put the location of where you've stored the resources. e.g. If you put it in the bg folder, in the game folder, you would put:
Also, for splitting the .rpy files all you have to do is do what you do as normal. e.g.
Make sure to save them as .rpy or it won't work. To make a new .rpy in jEdit just press CTRL+N.
Code: Select all
"bg/bgname.jpg"
Code: Select all
# This is in the script.rpy
c "blah blah blah"
jump day1
#In the day1.rpy
c "today is a nice day blah blah blah."
TOPofBB♥
All my life, my heart has yearned for a thing I cannot name.
- Andre Breton
- Andre Breton
-
- Newbie
- Posts: 2
- Joined: Mon Jun 18, 2012 3:21 pm
- Projects: Zombie Adventure (placeholder name)
- Contact:
Re: Setup different folders / Using bars or textboxes
Every folder has to be inside "game" then?
I tried doing "game" and "res" folders. That's why it didnt work probably.
What I said about splitting the script was not the .rpy files but where to put them.
Can I do:
"game/chapter1/day1.rpy"
"game/chapter1/day2.rpy"
...
"game/chapter2/day10.rpy"
And type:
[/s]
This works too. I just tested it.
Options, screens and script have to stay in the "game" but the rest can be in any sub-folder.
All I need is my 2nd problem solved now
I tried doing "game" and "res" folders. That's why it didnt work probably.
Can I do:
"game/chapter1/day1.rpy"
"game/chapter1/day2.rpy"
...
"game/chapter2/day10.rpy"
And type:
Code: Select all
# This is in the script.rpy
c "blah blah blah"
jump chapter1/day1
This works too. I just tested it.
Options, screens and script have to stay in the "game" but the rest can be in any sub-folder.
All I need is my 2nd problem solved now
Re: Setup different folders / Using bars or textboxes
You could make a screen to show the bar on. Something like:Rocketballs wrote:I started using ren'py recently.
I want to display health values (current/maximum). I can do it with text but with a "ui.bar" nothing shows up.
What code do I need?
I wanted it to look like a button basically (the frame around).
Thanks.
(I hope I was clear enough)
Code: Select all
screen healthbar:
frame:
xmaximum 250
xalign 1.0
yalign 0.0
hbox:
text "HP"
bar value currenthp range maxhp
Who is online
Users browsing this forum: Semrush [Bot]