I've started playing around with Ren'Py over the last week or so, and am taking the opportunity to force myself to learn Python while I'm there. To this end - and because an idea I have for a pie-in-the-sky future project would require it - I've been extending the Character class to collate all the character-related information, mostly in terms of handling images and display for that character. It's not much, but I'm learning stuff and I figure that if I'm going to use that kind of approach in the future, it'd be best to get used to it now...
Anyway, I've come across a couple of things I'm unsure about in the process. I guess these are really just questions and/or bug reports for PyTom - I'm using 5.5.2a here:
Firstly, the way that the renpy.hide function works seems to disagree significantly with the 'hide' Ren'Py command and its reference entry, e.g.:
Code: Select all
show eileen happy
"Now you see her..."
hide eileen
"Now you don't."
$ renpy.show ( ('eileen', 'happy') )
"Now you see her..."
$ renpy.hide ( ('eileen') )
"Now you... hey, wait!"
$ renpy.hide ( ('eileen', 'something', 'else') )
"Bizarre..."
Secondly, and I guess probably a little more unlikely, is it possible at all to extend/replace/overload/add to/etc the RenPy scripting commands? Ideally (at least, for starters... I'd like to overload the 'show' and 'hide' commands to take Character instances rather than image names, but I'm thinking Python's loose typing probably precludes overloads of any kind anywhere anyway.
I've poked around the various Python scripts - the methods in /renpy/exports.py look most likely, but working on the suspicion that it probably isn't possible in a clean (by which I mean without changing existing engine classes) manner I've not looked into it too deeply.
Thirdly, and least helpfully... while I was messing around testing my class, I was inserting new stuff at the beginning of the demo script. At some point in the middle of my testing, I started to get an error from the following line:
Code: Select all
"Girl" "Hi, and welcome to the %(version)s demo program."
I figure that it was probably caused by something I was doing wrong, which I stopped doing wrong, but... anyone got any idea what? It'd be useful to know what kind of errors to look for if I ever got it again...
Anyway - all in all, aside from my various objections to Python, I'm really impressed! Hopefully I'll actually get around to finishing something rather than just messing around with the coding part...
(Oh, and if any forum-admin type people were to read this, I accidentally registered under my usual nickname, 'Sar', with an email address that's having problems. I imagine the profile has enough infomation to verify that's also me; I'll likely never get the activation mail, so feel free to delete it)