Search found 132 matches
- Tue May 24, 2016 6:11 am
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
Dark One/Two: If you understand the things about persistence, then what remains is applying it to the choices and buttons. So if you have $ persistent.darkOneActive = false somewhere, then back at the main menu you should have $ darkonebutton.active = true if not persistent.darkOneActive: $ darkOneb...
- Mon May 23, 2016 8:53 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
>= Sorry, missed this one in your post the first time around. It's a greater-than-or-equal operator. True for 7 >= 2, true for 7 >= 7. I used it because if I didn't and Shuu, Reiji and Ayato had somehow managed to score the exact same numbers.. ..then the if would finish without anything happening....
- Mon May 23, 2016 8:44 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
Errata:
That last example on persistence should be
That last example on persistence should be
Code: Select all
if persistent.shuuSecretScene == "unlocked":
# show the scene
- Mon May 23, 2016 8:42 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
As for the function that I mention.. yes, I described the principle rather than go into detail. If you want, you can go through a beginner python tutorial or two; after that you'll understand my explanation better. Learning a bit of python will help you with not only this issue, but also a lot of ot...
- Mon May 23, 2016 8:02 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
To your example with Ayato, Shuu and Reiji, I covered it in the "label ending" section before. if attractionMaddy > attractionEve: narrator "You and Maddy will be very happy together." else: narrator "You and Eve will be very happy together." With Ayato, Shuu and Reiji ...
- Mon May 23, 2016 7:45 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
More on the use of data structures; you can use a dict to keep a list of all your characters, and their scoring data. Since the scoring data consists of two values we need another structure for those. I'm using a class with its attributes since they're easy to access that way. python: # Class with a...
- Mon May 23, 2016 7:02 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
Ps:
I think the above code is more or less correct.
However, it *has* been a while since last I used Ren'Py, and I haven't checked anything.
I think the above code is more or less correct.
However, it *has* been a while since last I used Ren'Py, and I haven't checked anything.
- Mon May 23, 2016 7:00 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
A dict is a dictionary - it's a python data structure. It looks like this: (python) eveStats = { 'looks': 'pretty', 'preferences': 'sadistic', 'favourite_gift': 'chocolate'} And would be used something like (python) print "People say that Eve is " + eveStats['looks'] + " and that she ...
- Mon May 23, 2016 5:51 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Coding for Endings/Disable/Enable Options
- Replies: 15
- Views: 1021
Re: Coding for Endings/Disable/Enable Options
Hello, that sounds like an interesting game :) I'm half-tempted to watch diabolik lovers now, actually :> Anyway, I don't know about the unlocking. I suspect there's some general functionality implemented for it somewhere in Ren'Py. About the masochistic/sadistic point tracking though, couldn't you ...
- Mon May 23, 2016 6:15 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
(read http://stackoverflow.com/questions/7180212/why-cant-generators-be-pickled in addition to xela's helpful link) Huh. Okay - Admittedly that's a problem, yes :] I'll have to see when I get there what makes sense. If states for what I want done can be made explicit, or if something can be rewritte...
- Sun May 22, 2016 4:43 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
TLDR is that I copied python 2.7.11's modules and no longer get complains about modules missing. On the other hand it complains about unicode. Which the guy looking to install lua also seemed to encounter. That wasn't what I did first though. I looked around for that module name, and couldn't find o...
- Sun May 22, 2016 5:16 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
I don't know how much trouble it will be or whether there's c dependencies or not - I don't know much about the internal workings of python, I just searched around for a while, found out that the standard python modules seemed to be placed in /modules, and looked what was there. In the source versio...
- Sat May 21, 2016 6:01 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
Yeap, Ren'Py doesn't come with the full Python 2.7.10. Well, that explains it :] You can find the module files in official distribution and copy them into renpy/your project. Does this mean getting 2.7.10, installing it, then copying /module from python to renpy[platform]/lib? I assume the c files ...
- Sat May 21, 2016 10:43 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
https://www.renpy.org/doc/html/python.html for the curious by the way.
Waaay down at the end, "First and Third Party Python Modules and Packages".
Waaay down at the end, "First and Third Party Python Modules and Packages".
- Sat May 21, 2016 10:40 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to import python libraries?
- Replies: 15
- Views: 13307
Re: How to import python libraries?
Actually, something I did worked. I'd copied networkx into the /game directory, and that worked. Except that it failed, which let me on to the notion that I needed some sort of compilation, especially since what I'd done wasn't any sort of recommended install method. I've managed to find a reference...