Can we draw Renpy Scripts to Class Diagram?

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.
Post Reply
Message
Author
tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Can we draw Renpy Scripts to Class Diagram?

#1 Post by tofuuu »

Hi! I wonder can we draw renpy scripts to a class diagram? I use the basic renpy code (i don't add my own class in the script with python). But when I read renpy documentation, it has Classes and Functions (https://www.renpy.org/doc/html/py-funct ... index.html). So, back to my first question, can we draw renpy scripts to a class diagram?

And oh! Are the texts that started with a capital letter in https://www.renpy.org/doc/html/py-funct ... index.html mean class? Thank you! I hope you can help me ><

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can we draw Renpy Scripts to Class Diagram?

#2 Post by trooper6 »

I don't understand your use of the verb draw or the noun diagram.

Anyhow, Renpy is based in Python, and you can use Python in Renpy.
Every time you type: $gold = 10 you have just used Python.
You can create a python block and create a class and then use it. There are lots of examples of this in the forums and cookbook.
As for the question about capital letter meaning class. Yes, that would be general Python naming convention. You can read up on Python naming conventions here:
https://www.python.org/dev/peps/pep-000 ... onventions

Also, I know you are taking a game creation class right now, a lot of these questions you should be asking your professor.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Re: Can we draw Renpy Scripts to Class Diagram?

#3 Post by tofuuu »

Yes, i know that renpy used python and we can create a block of class using python. But, as i stated above that i didn't create any classes by myself. I just used the basic renpy script for my game.

However, thank you for your answer trooper6 :)

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can we draw Renpy Scripts to Class Diagram?

#4 Post by trooper6 »

So if you know that you can create a class using a python block....I don't understand your question: "I wonder can we draw renpy scripts to a class diagram?"
What does this question mean? Can you rephrase it?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Re: Can we draw Renpy Scripts to Class Diagram?

#5 Post by tofuuu »

Um... Okay i'll try to explain as clear as i can. Let me know if it's not clear enough 😅

So, in screen.rpy there's some renpy classes that we used, like Frame(), Preference(), FileAction() and manymore. To use it, we don't need to make an object so we can call it. We just stated out in the script like

Code: Select all

 action FileAction(slot)
not

Code: Select all

 a = FileAction(slot)
and we use those classes directly in script, not in another class.
that's what made me asking, if i want to make a class diagram (the uml diagram for oop) how can i put those classes? How should i represent/draw those classes in to a class diagram?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can we draw Renpy Scripts to Class Diagram?

#6 Post by trooper6 »

So, I still don't understand what you mean by "if i want to make a class diagram (the uml diagram for oop) how can i put those classes? How should i represent/draw those classes in to a class diagram?" Maybe others who understand the vocabulary hack help you out. Or your professor.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: No registered users