Author Topic: Adding a fourth loop to talker portraits?  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline amcparty

Adding a fourth loop to talker portraits?
« on: December 11, 2024, 12:27:29 PM »
https://scicompanion.com/Documentation/talkers.html?highlight=bust

Is it possible to add a fourth (or even fifth) loop to animate in portraits along with blinking eyes and moving mouths? Say for example I wanted to have a character's ears flop around as well. Is this possible? I've tried adding it to the tail end of something like this "(super init: characterBust characterEyes characterMouth characterEars &rest)" but it doesn't seem to work. Can anyone shed some light on this for me, please?



Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #1 on: December 11, 2024, 01:05:25 PM »
If you alter the Talker class, or preferably subclass it, you can theoretically animate as many parts as you want. Of course, if you don't actually have support for a fourth (or fifth, sixth...) portrait part, of course characterEars gets ignored.

Assuming for a second you correctly implement your specific characters' talkers as subclasses of Talker, you'll notice if you look at the Talker class' init that it indeed takes only three parameters: theBust, theEyes, and theMouth. And the class' properties include the same trio without the article. Then in the show method, each of these (if set) is drawn, and in doit they are cycled. And of course in dispose each of the three parts are disposed of.

So if you want your characters to support animated ears, you'll want to adapt each of these methods in Talker (or again preferably a subclass) accordingly.

Offline amcparty

Re: Adding a fourth loop to talker portraits?
« Reply #2 on: December 11, 2024, 01:24:09 PM »
Thank you for the detailed response. I'm still new to SCI so I'm learning as I go. For the most part, I've been reviewing the code for King's Quest 6 to learn how things work. I don't know how familiar you are with KQ6, but do you happen to know which script needs to be modified so I can add additional loops to portraits? After searching, I'm guessing it's "Blink.sc" (script 928)? I'm not entirely sure.
« Last Edit: December 11, 2024, 01:28:35 PM by amcparty »

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #3 on: December 11, 2024, 02:02:43 PM »
You are entirely correct. Blink is the right file to look at -- it's confusingly named because Blink is the first class found inside script #928, so the decompiler named it that instead of Talker.sc, which would be the correct, canonical name.

As for how familiar I am with KQ6's code... that doesn't matter! The 900-999 scripts are generally the same between SCI games of a given vintage, so you might as well speak of Larry 6 (the low-res version), or Freddy Pharkas, or whatever.
« Last Edit: December 11, 2024, 02:06:40 PM by Kawa »

Offline amcparty

Re: Adding a fourth loop to talker portraits?
« Reply #4 on: December 11, 2024, 02:29:11 PM »
Phew, there is a lot of code here. I'm guessing I can just duplicate all the syntax used for the eyes but instead change it to a new name. This is going to be trickier than I thought but I'll see what I can do.

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #5 on: December 11, 2024, 02:37:52 PM »
Basically, yeah. Good luck!

Offline amcparty

Re: Adding a fourth loop to talker portraits?
« Reply #6 on: December 11, 2024, 02:48:36 PM »
Thank you for the help, Kawa. So far, not so good.  :P https://imgur.com/a/NPd87Pw

If I manage to get this working, I'll share the code for anyone else who may want to have multiple loops for their characters.

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #7 on: December 11, 2024, 02:57:27 PM »
It's too bad my game doesn't use talker portraits or I'd have a very good reason to implement it myself.

Offline Collector

Re: Adding a fourth loop to talker portraits?
« Reply #8 on: December 12, 2024, 06:44:23 AM »
Don't know if it makes a difference, but remember that KQ6 has two different sets of views for the dialog portraits, one for DOS and one for Windows.
KQII Remake Pic

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #9 on: December 12, 2024, 07:51:52 AM »
Even worse: the Windows portraits weren't views.

Offline Charles

Re: Adding a fourth loop to talker portraits?
« Reply #10 on: December 12, 2024, 08:55:46 AM »
Even worse: the Windows portraits weren't views.

Oh, that's really interesting... what were they? Because it's been a long while, but I seem to recall that in Win3.1 you could choose between the high-res version and the low-res version on the fly (by right-clicking on the title bar or application icon, maybe?), and it would change the character portraits to match the version you selected... I always preferred the low-res versions because the high-res ones always looked too red to me. But it would still keep the lip syncing regardless of the ones you picked.

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #11 on: December 12, 2024, 09:12:15 AM »
Quote
(by right-clicking on the title bar or application icon, maybe?)
I'm sorry but that does not make any sense.

Anyway, I believe they may have been called Rave portraits, and regardless of the tech name they allowed talkers to be more visually expressive if I recall correctly. More information in the relevant ScummVM code.

No other SCI game used them to my knowledge.

Offline Charles

Re: Adding a fourth loop to talker portraits?
« Reply #12 on: December 12, 2024, 09:29:09 AM »
Quote
(by right-clicking on the title bar or application icon, maybe?)
I'm sorry but that does not make any sense.

I mean the window title bar. Running the game in a window in Win3.1.

Offline Kawa

Re: Adding a fourth loop to talker portraits?
« Reply #13 on: December 12, 2024, 09:38:46 AM »
It was clear what element you were talking about. I'm just saying it doesn't make sense to put such a toggle there.

Offline Charles

Re: Adding a fourth loop to talker portraits?
« Reply #14 on: December 12, 2024, 04:14:59 PM »


There we go!  I imaging at the time, they considered it an extension of the standard Size ability of windows.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.084 seconds with 22 queries.