Actual guides?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Message
Author
Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Actual guides?

#1 Post by Zherot » Fri Aug 11, 2017 3:56 pm

I mean, you can point me all day to the documentation but you will not find in there how to IMPLEMENT things, like for example right now i want to put some buttons in a scene to jump to another scene, for example i'm on the entrance to the MC house and want to put some buttons to go to other places of the house, the problem is i don't know how to implement this buttons... like i said point me out to the documentation page or the wiki (which says it is outdated) and i will still not know how to do it.

So... are there actual guides that explains how to create buttons?, how to code them? and all the other features of Renpy and not just mentions they exist and expect us to already know how to do it by means of omnipotence or divination?

User avatar
Pyr0
Newbie
Posts: 20
Joined: Mon Aug 07, 2017 4:34 pm
Contact:

Re: Actual guides?

#2 Post by Pyr0 » Fri Aug 11, 2017 4:15 pm

The documentation can be a bit vague at times, but once you start to understand the basics of it, it's a great resource. Anyway, the basic idea behind ren'py is that most of the gui is done through screens. You can either "call screen" or "show screen". Calling a screen hides all already shown screens until that screen is exited. Showing a screen instead shows a new screen above the ones that are already there. As such, if you want a menu you use call, if you want an overlay you use show. If you want an overlayed menu you use "show" along a "modal" screen (you make a screen modal by setting its "modal" property to true).
In the case of a call screen, you exit it by using a Return() action. In case of show screen, you can just hide the screen. To make screens actually execute stuff, you use Actions. Actions are executed by buttons, etc etc. You can also execute your own python functions.

Then it's just a matter of layouting and all layout elements are clearly described in the documentation.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#3 Post by Zherot » Fri Aug 11, 2017 4:46 pm

I appreciate your response but it doesn't really solve my problem HOW to implement the stuff that is in the documentation, it is not "a bit vague at times" it is completely vague and never cares to explain how to actually code or how to implement the features, the documentation is just like a person bragging on how much they can do without actually explaining how they do it.

Right now i am blank on how to put some damn buttons on a screen not because i'm stupid but because i am not omnipotent or have divination skills to know how to code them because no one cared to explain that in the documentation, i know they exist but who knows how to use them and that can be said for pretty much anything in the documentation.

User avatar
carrot
Regular
Posts: 28
Joined: Fri Jul 28, 2017 7:43 am
Contact:

Re: Actual guides?

#4 Post by carrot » Fri Aug 11, 2017 5:35 pm

Have you looked at the Screens and Screen Language section in the documentation? Specifically, textbuttons.

If you haven't already, it might be a good idea to learn some basic Python, and go through the cookbook to get an idea of how certain things are done.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#5 Post by Zherot » Fri Aug 11, 2017 6:24 pm

carrot wrote:
Fri Aug 11, 2017 5:35 pm
Have you looked at the Screens and Screen Language section in the documentation? Specifically, textbuttons.

If you haven't already, it might be a good idea to learn some basic Python, and go through the cookbook to get an idea of how certain things are done.
Dude... you are doing the exact same thing everyone does, point out to the shitty documentation that does not give any instructions whatsoever on HOW to do things, there is no code examples there is nothing but "here you can do text buttons and image buttons and this and that!!!" but no actual code on how to do it HOW AM I SUPPOSED TO KNOW HOW TO DO IT????

JESUS...

I currently downloaded the example on this post:

viewtopic.php?f=51&t=22565&p=462455#p462455

And tried it but it doesn't work, probably because even this example doesn't explain how to actually do things... AGAIN.

This is what i wrote in my script to try to make 1 button appear:

screen home_menu1:
hbox:
style_group "quick"
xpos 650
ypos 410
textbutton _("Kitchen") action ShowMenu('save'

Aaaaand... it doesnt' work and i have no idea why because all the guides are literally shit.

User avatar
carrot
Regular
Posts: 28
Joined: Fri Jul 28, 2017 7:43 am
Contact:

Re: Actual guides?

#6 Post by carrot » Fri Aug 11, 2017 6:42 pm

I'm assuming that the code just isn't formatted properly on here. If it's not and you don't have any indentation, I wouldn't be surprised it didn't work.

Code: Select all

screen myscreen:
    textbutton "MyTextButton" action Jump("mylabel")

label mylabel:
    "The button worked."
Put this into the 'start' block (indented):

Code: Select all

show screen myscreen
That's a basic screen with one button in it, being shown once the game starts, and jumping to a label when you click the button. It's all also in the documentation, in the screens and quick start sections, with code examples for all of that.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#7 Post by Zherot » Fri Aug 11, 2017 6:58 pm

carrot wrote:
Fri Aug 11, 2017 6:42 pm
I'm assuming that the code just isn't formatted properly on here. If it's not and you don't have any indentation, I wouldn't be surprised it didn't work.

Code: Select all

screen myscreen:
    textbutton "MyTextButton" action Jump("mylabel")

label mylabel:
    "The button worked."
Put this into the 'start' block (indented):

Code: Select all

show screen myscreen
That's a basic screen with one button in it, being shown once the game starts, and jumping to a label when you click the button. It's all also in the documentation, in the screens and quick start sections, with code examples for all of that.
Doesn't work and beofre you assume anything, i do use indentation but i just don't even know if im putting things correctly seriously, is like you people give half the insturctions or not even half and i need to get the other half or the other 99% from divination or by omnipotency.

User avatar
carrot
Regular
Posts: 28
Joined: Fri Jul 28, 2017 7:43 am
Contact:

Re: Actual guides?

#8 Post by carrot » Fri Aug 11, 2017 7:52 pm

Clear everything from scripts.rpy on a new project. Put in this:

Code: Select all

label start:
    show screen myscreen
    pause
    return

screen myscreen:
    textbutton "MyTextButton" action Jump("mylabel")

label mylabel:
    "The button worked."

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#9 Post by Zherot » Fri Aug 11, 2017 8:02 pm

I tried everything, even started a new proyect and it doesn't work:

Image

What i get is the menu of the game and when i hit start nothing happens...

So can you give me the complete instructions please?

EDIT: I was getting desperate and commented before seeing your new response i will try with what you said.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#10 Post by Zherot » Fri Aug 11, 2017 8:08 pm

LOL how i was supposed to know about the PAUSE function? i mean i have literally the same thing in the code that i put minus the pause instruction...

And now that the button "magically" appeared how can i edit position and all of that hassle?, do the other buttons are called the same way?

User avatar
Remix
Eileen-Class Veteran
Posts: 1311
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Actual guides?

#11 Post by Remix » Fri Aug 11, 2017 8:27 pm

One semi major problem with the documentation and inline code examples is that they are 'presumably' mostly written by PyTom who is a programmer rather than an artist/storyteller (debatable)/composer/singer (cough - we do not talk about that - see the ToS - some say the Egyptians pouring molten lead into ear canals was more humane...)

What I mean to say is:
For Ren'py to exist takes some proper programming skills (aka, no singing)
To write a book on how to use Ren'py mostly takes knowledge from those skills...
To keep advancing Ren'py takes time which pushes the 'book about *not* singing' to the back of the queue
Goto 10 <--- basic humour

Plus there is the imminent arrival of Ren'py 7 point 0 which might put all the documentation in the 'archives' anyway.

In my experience... search the forum, read threads and answers, there are some clever people here and you undoubtedly will learn some stuff just through reading other people's problems...
Just never let it become an audio-forum... cough, say no more
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Develop Cartoon Speech Bubble dialogue
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

User avatar
xavimat
Eileen-Class Veteran
Posts: 1433
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: xavimat
Location: Italy
Contact:

Re: Actual guides?

#12 Post by xavimat » Fri Aug 11, 2017 8:40 pm

Hi Zherot!
It's not "divination" (sorry, I lol at the idea), but please be aware that this forum about Ren'Py is always a "guess" work, for you who ask and for us who try to understand you and give an appropriate answer.
When somebody asks something, it's hard to know hoy much they know, and how many instructions they need. So we usually point to the documentation (as you say, is minimal, with little examples), and then we expect to receive more detailed questions of exactly what parts of the doc don't you understand; and so, we build a thread with questions/answers/more (related) questions/more answers that can be helpful for other people in the future.

Going to your question,
i want to put some buttons in a scene to jump to another scene, for example i'm on the entrance to the MC house and want to put some buttons to go to other places of the house, the problem is i don't know how to implement this buttons...
Well, there are a lot of things needed to know here, not only how to implement the buttons.
We don't know if you know:
- how the flow of the game works
- what variables are, to store info form one jump to another
- the difference between "show screen" and "call screen"
We didn't know even that you didn't know the "pause" statement (thats pretty basic ren'py)

See? You have asked, we have provided some initial information, not resolving everything, but that info has guided the conversation so you now know the "pause" statement.

Now, thanks to previous questions and answers, I'm going to tell you some info that I guess will be useful to you. And then you can learn that, step by step.

Three types of Ren'Py code:
I'm not a pro, so my wording of things maybe is not accurate, but I like to think of the Ren'Py code as three types:
1. The code that executes at the very beginning, and only at the beginning. When a player executes your game and is waiting to something to appear on the screen. It's call the "init" time. Here all blocks starting with "init" execute. And also every line starting with: define, default.
2. The "screens". Defining a screen does not make it appear on the screen, it simply is defined and waits patiently the order to appear.
3. "labels" These control the actual flow of the game. They can jump from one to another with "jump NAMEOFLABEL" of can be called with "call NAMEOFLABEL". The call is used when you want to "return" to that line that called the label and go on from there. the jump, instead, will never return (so, the lines of code after a jump, will never be read, if there is no a new "label" defined).

showing and calling screens
The defined screens do noting unless you "show" or "call" them.
- With "show screen NAMEOFSCREEN" the screen "is prepared to be showed in the next interaction" (we'll get there), and does not stop the flow of the game. We use "show screen" when we want to present some information to the player, but not want to use that screen to jump to another labels (it could mess with the flow of the game).
- with "call screen" the screen in presented immediately and the game stops until the screen returns or jumps. (So, if you call a screen that contains only texts and images but no buttons, the game will be frozen).

why "show" does not "shows"
This is a little tricky at the beginning, but has a meaning.
The doc is somewhat difficult to understand:
The show statement does not cause an interaction to occur. For the image to actually be displayed to the user, a statement that causes an interaction (like the say, menu, pause, and with statements) must be run.
(From the doc: https://www.renpy.org/doc/html/displayi ... -statement
When, in a label, there is "show eileen happy" (to show an image) or "show screen myscreen" (to show a screen), Ren'Py does not show anything but prepares that image or screen to be shown. This way, you can combine several images and show all of the at once, or decide which ones will be shown first and which ones later.
So after "show myimage" or "show screen myscreen" you need an "interaction" to occur, to actually see the image or screen. An interaction occurs when some character says something, or with "menu", "pause" or "with" statements.
This is the reason why your test hasn't work the first time, the flow of the game started in the "label start:" line, went to your "show screen ..." line and prepared to show the screen, then arrived the end of the game and returned to the main menu, discarding the screen that has been prepared but not yet shown.

(Sorry about my English, I hope some of this helps you. Please, ask more, and step by step we will answer you).
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#13 Post by Zherot » Fri Aug 11, 2017 8:42 pm

Remix wrote:
Fri Aug 11, 2017 8:27 pm
One semi major problem with the documentation and inline code examples is that they are 'presumably' mostly written by PyTom who is a programmer rather than an artist/storyteller (debatable)/composer/singer (cough - we do not talk about that - see the ToS - some say the Egyptians pouring molten lead into ear canals was more humane...)

What I mean to say is:
For Ren'py to exist takes some proper programming skills (aka, no singing)
To write a book on how to use Ren'py mostly takes knowledge from those skills...
To keep advancing Ren'py takes time which pushes the 'book about *not* singing' to the back of the queue
Goto 10 <--- basic humour

Plus there is the imminent arrival of Ren'py 7 point 0 which might put all the documentation in the 'archives' anyway.

In my experience... search the forum, read threads and answers, there are some clever people here and you undoubtedly will learn some stuff just through reading other people's problems...
Just never let it become an audio-forum... cough, say no more
Yeah no kidding, most people that know a lot programming and math or whatever can't explain themselves correctly to others and the only people that understand them is people with programming/math experience. This is not the first time i notice this, most of the time this is true...

The problem i see is that Renpy no doubt is a great piece of software but it is terribad explained to people like me... like we seriously need an step by step of all the functions and how to code them, yeah, a lot of people will jump into the "you are lazy" bandwagon and that is not true at all, just because you understand things in some way because you already have epxerience and know what you are talking about doesn't mean others are the same as you.

Like i said, i see the documentation and i see a lot of "i can do this i can do that and this too!!!" but nothing is explained correctly.

Now for example i can do this stupid button that carrot helped me to do... but now how am i supposed to know how to edit this button in other ways or to try other types of buttons? THERE IS NO WAY but to ask again, and this is really stupid that i have to bother other people so they can tell me how to do this things because the documentation or "guides" are terrible... i don't want to bother other people but there is no choice in this situation.

Zherot
Regular
Posts: 91
Joined: Tue Aug 08, 2017 9:10 pm
Contact:

Re: Actual guides?

#14 Post by Zherot » Fri Aug 11, 2017 8:52 pm

xavimat wrote:
Fri Aug 11, 2017 8:40 pm
Hi Zherot!
It's not "divination" (sorry, I lol at the idea), but please be aware that this forum about Ren'Py is always a "guess" work, for you who ask and for us who try to understand you and give an appropriate answer.
When somebody asks something, it's hard to know hoy much they know, and how many instructions they need. So we usually point to the documentation (as you say, is minimal, with little examples), and then we expect to receive more detailed questions of exactly what parts of the doc don't you understand; and so, we build a thread with questions/answers/more (related) questions/more answers that can be helpful for other people in the future.

Going to your question,
i want to put some buttons in a scene to jump to another scene, for example i'm on the entrance to the MC house and want to put some buttons to go to other places of the house, the problem is i don't know how to implement this buttons...
Well, there are a lot of things needed to know here, not only how to implement the buttons.
We don't know if you know:
- how the flow of the game works
- what variables are, to store info form one jump to another
- the difference between "show screen" and "call screen"
We didn't know even that you didn't know the "pause" statement (thats pretty basic ren'py)

See? You have asked, we have provided some initial information, not resolving everything, but that info has guided the conversation so you now know the "pause" statement.

Now, thanks to previous questions and answers, I'm going to tell you some info that I guess will be useful to you. And then you can learn that, step by step.

Three types of Ren'Py code:
I'm not a pro, so my wording of things maybe is not accurate, but I like to think of the Ren'Py code as three types:
1. The code that executes at the very beginning, and only at the beginning. When a player executes your game and is waiting to something to appear on the screen. It's call the "init" time. Here all blocks starting with "init" execute. And also every line starting with: define, default.
2. The "screens". Defining a screen does not make it appear on the screen, it simply is defined and waits patiently the order to appear.
3. "labels" These control the actual flow of the game. They can jump from one to another with "jump NAMEOFLABEL" of can be called with "call NAMEOFLABEL". The call is used when you want to "return" to that line that called the label and go on from there. the jump, instead, will never return (so, the lines of code after a jump, will never be read, if there is no a new "label" defined).

showing and calling screens
The defined screens do noting unless you "show" or "call" them.
- With "show screen NAMEOFSCREEN" the screen "is prepared to be showed in the next interaction" (we'll get there), and does not stop the flow of the game. We use "show screen" when we want to present some information to the player, but not want to use that screen to jump to another labels (it could mess with the flow of the game).
- with "call screen" the screen in presented immediately and the game stops until the screen returns or jumps. (So, if you call a screen that contains only texts and images but no buttons, the game will be frozen).

why "show" does not "shows"
This is a little tricky at the beginning, but has a meaning.
The doc is somewhat difficult to understand:
The show statement does not cause an interaction to occur. For the image to actually be displayed to the user, a statement that causes an interaction (like the say, menu, pause, and with statements) must be run.
(From the doc: https://www.renpy.org/doc/html/displayi ... -statement
When, in a label, there is "show eileen happy" (to show an image) or "show screen myscreen" (to show a screen), Ren'Py does not show anything but prepares that image or screen to be shown. This way, you can combine several images and show all of the at once, or decide which ones will be shown first and which ones later.
So after "show myimage" or "show screen myscreen" you need an "interaction" to occur, to actually see the image or screen. An interaction occurs when some character says something, or with "menu", "pause" or "with" statements.
This is the reason why your test hasn't work the first time, the flow of the game started in the "label start:" line, went to your "show screen ..." line and prepared to show the screen, then arrived the end of the game and returned to the main menu, discarding the screen that has been prepared but not yet shown.

(Sorry about my English, I hope some of this helps you. Please, ask more, and step by step we will answer you).

Thank you very much, yeah, funnyly enough i reached the conclusion about the difference between call and show because after implementing the new button (that i still have no idea how to modify) the game suddenly ended if i clicked anywhere but the button... so i saw that i was using "show" for the button screen and switched it to call since i have an imagemap that does not go back to the main menu if i press anything but the imagemap coordinates and yeah the game stopped going to the main menu.

About the game not showing anything yeah, no kidding that is why i didn't saw the button! and about the 3 types of code, yeah i kind of understand basically after all of this and your explanation.

Would it be too much to ask you about the buttons? like how to change positions or change size or about the other types of buttons and how to code them?

User avatar
xavimat
Eileen-Class Veteran
Posts: 1433
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: xavimat
Location: Italy
Contact:

Re: Actual guides?

#15 Post by xavimat » Fri Aug 11, 2017 8:57 pm

Zherot wrote:
Fri Aug 11, 2017 8:42 pm
Now for example i can do this stupid button that carrot helped me to do... but now how am i supposed to know how to edit this button in other ways or to try other types of buttons? THERE IS NO WAY but to ask again, and this is really stupid that i have to bother other people so they can tell me how to do this things because the documentation or "guides" are terrible... i don't want to bother other people but there is no choice in this situation.
Well, I understand you a little bit more now. You don't want to bother us and I appreciate that. But you ask for a general Guide that anyone could use to learn Ren'Py step by step. I don't think (IMHO) that's even possible because of the reason I've given you above: we don't now how much the person who wants to learn knows.
In any case, somebody should be bothered to write that guide. I absolutely couldn't write it, but I can humbly answer some questions (sometimes in pretty advanced Ren'py). A lot of us here are fine to be bothered with your (and anybody's) questions.
And one more thing, Ren'Py evolves so fast, and is capable of so many things, that a comprehensive guide to all-Ren'Py would turn outdated in a few months.

I really think the Forum solution is way more useful. But it's only my opinion. :D
Last edited by xavimat on Fri Aug 11, 2017 9:06 pm, edited 1 time in total.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Cops&Robbers A two-player experiment
Fear&Love Why can’t we simply express our feelings? Why am I afraid to say ‘I love you’?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: deltadidirac, Google [Bot], Majestic-12 [Bot], rayminator