Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
What it results in though, is that it re-splits body/eyes/mouth into separate files, hahah. But it keeps the code itself simple, so you still only need to specify a single line for each (Renpy) image.
As for the other stuff - like different closed frames used outside of closed/mid/open cycles - I'll have to look about implementing them.
If you want to show closed eyes specifically, it would probably require showing the base sprite + a slice of the closed eyes.
Only thing I'm not sure about is if I should update this thread or create a separate thread, as I kinda changed the design approach while having the same end-goal.
I'm not really sure, since I haven't seen how different the new system is, but I think the best option would be to keep it in this thread, at least for now.
So as I mentioned, I was working on an improved version of this script. I sent a message to ChocoKeki but as I have not heard back, I have decided to go ahead and release it to the public anyway.
There are some major design direction changes from v1.X - most notably, images are no longer single files, but separate ones for the base, eyes, and mouth. I originally grouped them as one as I felt it would be more convenient, but it immediately became a problem when I wanted to make subtle expression changes. Thus an important difference with v2.0 is it separates portraits into separate files for base, eyes, and mouth. This version also does away with the restraints caused by height limitations and simplifies some arguments.
You can read more about it and download it here, but the following is any extra useful information.
Code: Select all
image tamati neutral = Portrait("tamati", "neutral", (298, 209), (339, 277))
You can also add a third argument to the eyes and mouth to define a different expression for them:
Code: Select all
image tamati scowl = Portrait("tamati", "neutral", (298, 209, "scowl"), (339, 277))
This is a fairly drastic rejigging compared to v1.X I feel, but I will keep it in the same thread, as was suggested, eheh.
So this release is "v2.0 b0.9". The reason I call it that is there's one bug I ran into that, while solved, doesn't feel a graceful solution. I had to create a DynamicDisplayable for a static frame. In the portrait script, underneath the eyes_idle argument, you will see renpy.render(DynamicDisplayable(self.static, self.eyes_idle), width, height, 0, 0). This calls def static() further down that'll render self.eyes_idle with 0.05sec of redraw timing.
The thing I found is that if I just straight specified, say, renpy.render(Image(self.eyes_idle), width, height, 0, 0), the portrait would stop animating if it had certain static frames displayed, after a message pause. I could replicate this behaviour with the DynamicDisplayable if the redraw was None.
I don't feel this solution is particularly correct, nor does it make much sense when the base portrait doesn't have redraw timing either, but it's the current fix for now. If anyone can provide a fix or explanation, that would be swell.
First off, the tutorial is very clear. Second, I tested the script with my own sprites and everything went smoothly. It could do everything I said I wanted to do in my first post and more. I haven't had any problems with it, and I love that this version is much more streamlined and less time-consuming. Thank you so much.
(By the way, I think this is how they animated sprites in Tokimeki Memorial Girl's Side 3 (DS version), which is great, this method seems very versatile.)
Users browsing this forum: No registered users