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.
Hi, I'm pretty new to Python, so I'm sorry if this may seem like a dumb question.
I want to create a custom class for each character so I can keep track of certain attributes. How would I go about doing that? This was my first guess, but I know it's not right.
python:
class Person:
def __init__(self, rank=0, backstory=0, festival=0):
self.rank = rank
self.backstory = backstory
self.festival = festival
default Sam = Person(rank=1) #The rest of arguments are assigned by default
label start:
"Sam is Rank [Sam.rank]."
You may want to check this new tutorial here for a deeper and better explanation of how classes work: viewtopic.php?f=51&t=44730
The silent voice within one's heart whispers the most profound wisdom.