Search found 13 matches

by Typhaceae
Tue Apr 28, 2015 2:18 am
Forum: Ren'Py Questions and Announcements
Topic: Opening new screen with textbutton
Replies: 2
Views: 426

Re: Opening new screen with textbutton

Oh perfect, thank you! That page is just what I needed... for some reason I'd been under the impression that ShowMenu opened the main menu, not any screen. Everything works now, I appreciate the help :)
by Typhaceae
Tue Apr 28, 2015 1:48 am
Forum: Ren'Py Questions and Announcements
Topic: Opening new screen with textbutton
Replies: 2
Views: 426

Opening new screen with textbutton

I'm pretty sure this is an obvious matter of syntax confusion, but I'm having trouble getting a button to open custom menus for the player (character sheets, inventory, and so forth). First, I made a button that I always want the player to have available to them, and displayed it at start: label sta...
by Typhaceae
Tue Apr 28, 2015 12:35 am
Forum: Ren'Py Questions and Announcements
Topic: Problem interpolating dict value in text
Replies: 3
Views: 810

Re: Problem interpolating dict value in text

Alrighty, that works! Thank you :)
by Typhaceae
Mon Apr 27, 2015 5:09 am
Forum: Ren'Py Questions and Announcements
Topic: Problem interpolating dict value in text
Replies: 3
Views: 810

Problem interpolating dict value in text

In order to keep track of each character's affinity for each other character, I'm using a dict affinityDict{CharacterClass : int}. I know it's configured correctly, because I can use the Tkey to retrieve and set values successfully, but I'm having trouble concatenating it into text. This code works....
by Typhaceae
Sat Apr 25, 2015 10:00 am
Forum: Ren'Py Questions and Announcements
Topic: Python function getting extra argument from somewhere
Replies: 12
Views: 1701

Re: Python function getting extra argument from somewhere

Outstanding, thank you so much for your incredibly detailed responses- I'm learning a lot about python this morning. :)
by Typhaceae
Sat Apr 25, 2015 9:22 am
Forum: Ren'Py Questions and Announcements
Topic: Python function getting extra argument from somewhere
Replies: 12
Views: 1701

Re: Pythin function getting extra argument from somewhere

Okay wow holy cow, I had no clue about the class versus instance variable distinction, that could've sneaked up on me and delivered an unpleasant surprise... are mutable types instanced if they're declared in the __init__ block? Like, if I wanted to guaranteed that everyone had their own, personal v...
by Typhaceae
Sat Apr 25, 2015 8:30 am
Forum: Ren'Py Questions and Announcements
Topic: Python function getting extra argument from somewhere
Replies: 12
Views: 1701

Re: Pythin function getting extra argument from somewhere

I'll definitely take the class when I get some time, I know for a fact that 90% of what I'm doing is unpythonic as all get-out. I read a bit about how ren'py interacts with __init__, but I still don't entirely understand it: I know if I borrow your example, def __init__(self, name="No Name"...
by Typhaceae
Sat Apr 25, 2015 7:54 am
Forum: Ren'Py Questions and Announcements
Topic: Python function getting extra argument from somewhere
Replies: 12
Views: 1701

Re: Pythin function getting extra argument from somewhere

Oh hey, that's perfect, I didn't know that about python... thank you! In case anyone else trips over this looking at the same problem, I also had to add self to any variables I wanted ChangeApproval to modify within the class's scope, so def ChangeApproval(reactionAmount): approval += reactionAmount...
by Typhaceae
Sat Apr 25, 2015 7:02 am
Forum: Ren'Py Questions and Announcements
Topic: Python function getting extra argument from somewhere
Replies: 12
Views: 1701

Python function getting extra argument from somewhere

I'm trying to set up setters for my character data class, so I never have to change data from outside the class itself. As an example: class CharacterClass: name = "No name"; approval = 0; def ChangeApproval(reactionAmount): approval += reactionAmount; return This looks right to me, but tr...
by Typhaceae
Fri Apr 24, 2015 9:33 am
Forum: Ren'Py Questions and Announcements
Topic: Structuring story pseudo-branches
Replies: 2
Views: 455

Re: Structuring story pseudo-branches

Yea, the variation is going to lead to a completely different series of labels in many cases: "Let's go bar hopping" versus "Let's go egg that guy's house". I appreciate the feedback though- I know some level of complexity is necessary, but I wanted to be absolutely sure that ren...
by Typhaceae
Fri Apr 24, 2015 8:17 am
Forum: Ren'Py Questions and Announcements
Topic: Structuring story pseudo-branches
Replies: 2
Views: 455

Structuring story pseudo-branches

The way I'm writing my game the rough bones of the story don't change between playthroughs, but depending on how you treat people, you get side scenes with different supporting characters who fill you in regarding different things, stuff like if you're really nice to Person A, during his character s...
by Typhaceae
Thu Apr 23, 2015 7:14 pm
Forum: Ren'Py Questions and Announcements
Topic: Can ren'py use structs?
Replies: 2
Views: 338

Re: Can ren'py use structs?

Oh hey, that works- thank you :)
by Typhaceae
Thu Apr 23, 2015 6:59 pm
Forum: Ren'Py Questions and Announcements
Topic: Can ren'py use structs?
Replies: 2
Views: 338

Can ren'py use structs?

Is it at all possible to make a complicated struct in Ren'py, so I could do something like this?

Code: Select all

//pseudocode
public Character{
string name;
int health;
int approval;
//loads more data here
}

Character myChar1;
Character myChar2;

myChar1.name = Tomoko;