Search found 446 matches

by Anima
Fri Jan 10, 2014 4:12 pm
Forum: Ren'Py Questions and Announcements
Topic: comparing three variables at once(?)
Replies: 7
Views: 2682

Re: comparing three variables at once(?)

Sorting is a way that scales very well. First you create a list like this: options = [("code1", 3,variable1),("code2", 2,variable2),("code3", 1,variable3)] The first element in the tuple is the name, the second the priority and the last the value. Then we sort twice. op...
by Anima
Fri Jan 10, 2014 3:25 pm
Forum: Ren'Py Questions and Announcements
Topic: comparing three variables at once(?)
Replies: 7
Views: 2682

Re: comparing three variables at once(?)

That will work, but won't scale very well if you have more than three variables. You don't really need the elif statements, else will work fine in this case. (If a >= b is false then b > a is always true.) Just make sure that the behaviour you get if two variables have the same amount of points is t...
by Anima
Thu Jan 02, 2014 3:15 pm
Forum: Creator Discussion
Topic: Copyright?
Replies: 8
Views: 1393

Re: Copyright?

Yomuchan wrote:As long as you don't earn anything from it, and credit the original authors properly (Inspired by XXXXXXXYYYYYX, by ZZZZZZ), you can do whatever you like with it. That's what I think.
This is wrong. Copyright law doesn't care about commercial or not.
by Anima
Sun Dec 29, 2013 8:28 pm
Forum: Ren'Py Questions and Announcements
Topic: question about where to best define classes
Replies: 2
Views: 385

Re: question about where to best define classes

Define classes in an init block and instances of classes in a label. Also, classes should inherit from store.object instead of directly from object.
That way saving will work just fine.
by Anima
Fri Dec 27, 2013 8:19 am
Forum: Ren'Py Questions and Announcements
Topic: How do you deal with persistent data?
Replies: 12
Views: 1305

Re: How do you deal with persistent data?

Appending a list is an in place operation. If you didn't declare the list variable in a label the changes won't be saved.
You should always declare variables in a label.
by Anima
Mon Dec 23, 2013 12:13 am
Forum: Ren'Py Questions and Announcements
Topic: Need help saving a Runtime Init Block Variable
Replies: 7
Views: 1228

Re: Need help saving a Runtime Init Block Variable

No, that's all that needs to be done.
Can you detail a bit more what goes wrong and where.
For example, you haven't shown where you actually increase the variable.
by Anima
Sun Dec 22, 2013 11:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Need help saving a Runtime Init Block Variable
Replies: 7
Views: 1228

Re: Need help saving a Runtime Init Block Variable

A class is just a class, not an object. You define the class (with the class statement) in an init python block and then you create an object of that class in the start label. That object will be saved. It also a good idea to subclass you object from store.object to have it participate in rollback. ...
by Anima
Fri Dec 06, 2013 11:31 am
Forum: Ren'Py Questions and Announcements
Topic: ValueError: invalid literal for int() with base 16: '#'
Replies: 8
Views: 2400

Re: ValueError: invalid literal for int() with base 16: '#'

That's a reserved character in python for string interpolation. You need to escape it (with a backslash, so \%) if you want to use it normally.
by Anima
Fri Dec 06, 2013 10:40 am
Forum: Ren'Py Questions and Announcements
Topic: ValueError: invalid literal for int() with base 16: '#'
Replies: 8
Views: 2400

Re: ValueError: invalid literal for int() with base 16: '#'

http://www.farb-tabelle.de/de/farbtabelle.htm
It's in German, but the colours are displayed so it should still make sense. Otherwise just google it, it's not Ren'Py specific.
by Anima
Fri Dec 06, 2013 10:31 am
Forum: Ren'Py Questions and Announcements
Topic: ValueError: invalid literal for int() with base 16: '#'
Replies: 8
Views: 2400

Re: ValueError: invalid literal for int() with base 16: '#'

Is there any reason why you made the text colour white? As for your problem, you have incorrect colour values: define e = Character('Sebastian', color="##f00", what_slow_cps=20) define a = Character('Ciel', color="#0ff", what_slow_cps=20) A colour string has seven character (9 wi...
by Anima
Thu Dec 05, 2013 3:01 pm
Forum: Ren'Py Questions and Announcements
Topic: bunch of ugly $PYTHONHOME warnings, linux
Replies: 3
Views: 887

Re: bunch of ugly $PYTHONHOME warnings, linux

Ren'Py is intended to use it's bundled python, which is invoked through renpy.sh. I don't think it gives warnings in that case. I get these warnings as well and I'm certainly using renpy.sh. It also comes up for distributed games. anima@anima-desktop:~$ sh renpy-6.15.5-sdk/renpy.sh Could not find p...
by Anima
Tue Dec 03, 2013 3:07 pm
Forum: Ren'Py Questions and Announcements
Topic: NameError: name 'Skill' is not defined
Replies: 3
Views: 1232

Re: NameError: name 'Skill' is not defined

Skill is a class that is defined somewhere in the "Time Labyrinth" code. You need to define it as well.
by Anima
Mon Nov 25, 2013 5:58 am
Forum: Ren'Py Questions and Announcements
Topic: On button press two actions
Replies: 2
Views: 593

Re: On button press two actions

Code: Select all

action (Hide ("element_one"),Hide ("element_two"))