Search found 4 matches

by moonae
Wed Jun 09, 2021 2:47 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to make a dictionary or list of classes to pull char and character stats?
Replies: 6
Views: 846

Re: How to make a dictionary or list of classes to pull char and character stats? (solved)

I'm more familiar with python than renpy, tbh, but as I understand it I don't think it technically matters where in the file you put the default statement because they're always initiated at runtime, like you said. Both of these will execute the same: label start: $ charStats = characterPerson.class...
by moonae
Tue Jun 08, 2021 1:47 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to make a dictionary or list of classes to pull char and character stats?
Replies: 6
Views: 846

Re: How to make a dictionary or list of classes to pull char and character stats? (solved)

You can add a dictionary or list directly to a class and then update it via the __init__ method: init python: class characterPerson() : class_dict = { } def __init__ (self, namestr, strength): self.name = namestr self.strength = strength characterPerson.class_dict.update( { namestr : self } ) defaul...
by moonae
Mon Jun 07, 2021 8:24 am
Forum: Ren'Py Questions and Announcements
Topic: Dynamically nested loop function on screen
Replies: 5
Views: 780

Re: Dynamically nested loop function on screen

Well, that's just an ugly workaround... But if you could create screens programmatically... You actually can. https://www.renpy.org/doc/html/screen_python.html Using combination of renpy.define_screen and ui functions you can define your own screen (page does warn that they will be slower than norm...
by moonae
Sun Jun 06, 2021 9:11 am
Forum: Ren'Py Questions and Announcements
Topic: Dynamically nested loop function on screen
Replies: 5
Views: 780

Dynamically nested loop function on screen

(I've tried searching the forums but haven't found an answer to this. If there's already a thread about it somewhere, I apologize) I have several dictionaries that contain "results". They are all of different lengths and sometimes they include nested dicionaries. Here's an example of what ...