Community
SCI Programming => SCI Syntax Help => Topic started by: amcparty 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?
-
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.
-
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.
-
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.
-
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.
-
Basically, yeah. Good luck!
-
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.
-
It's too bad my game doesn't use talker portraits or I'd have a very good reason to implement it myself.
-
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.
-
Even worse: the Windows portraits weren't views.
-
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.
-
(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. (https://github.com/scummvm/scummvm/blob/master/engines/sci/graphics/portrait.cpp#L43)
No other SCI game used them to my knowledge.
-
(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.
-
It was clear what element you were talking about. I'm just saying it doesn't make sense to put such a toggle there.
-
(https://i.imgur.com/s0tx1D9.png)
There we go! I imaging at the time, they considered it an extension of the standard Size ability of windows.
-
Now it makes sense. If you pick "small", the high-res assets, including the Rave portraits, wouldn't fit.
Anyway, we've gone way off track!
-
Even worse: the Windows portraits weren't views.
I had forgotten.
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. (https://github.com/scummvm/scummvm/blob/master/engines/sci/graphics/portrait.cpp#L43)
No other SCI game used them to my knowledge.
You are remembering correctly, Rave. In fact, a while back deckarep posted a GO script to extract them and as you noted, KQ6 was the only SCI game to use them.
(https://i.imgur.com/s0tx1D9.png)
There we go! I imaging at the time, they considered it an extension of the standard Size ability of windows.
I had never noticed that before. I had made the same assumption as Kawa about the "-" button, being a Windows interface rather than SCI. So being more of a Windows feature than one by Sierra, it was probably a transitional feature between old the old VGA standard of 320x200 and later VESA/SVGA 640x480. Another way to force it in-game was to switch to from speech to text, of course with no voices.
-
Sierra bought the company that produced Rave. I found an article about the Rave system some time ago (which is easier when you have the designer's name), but I can't find it just now. I'd say that Rave tried to do some things that Sierra was already doing with their internal tools (lip-syncing was a major feature), so it was a bit superfluous.
EDIT: Found my own post here that linked the article: https://www.callapple.org/documentation/bright-stars-talking-heads-behind-the-scenes-with-hyperanimator/ Elon Gaspar was the name.
-
Now consider: they also bought Coktel Vision, for their animation system. If you look at the leaked SCI32 code you can see that the video player code retains its original French comments, including a whole card at the top with ASCII checkboxes and text fields.
Now consider this was once about Talker portraits only having three parts.
-
As long as we're off topic, Coktel Vison was a cool company. I've read that a lot of their raunchier titles were lead by woman devs, which seems like a smart move.
-
Muriel Tramis
https://www.youtube.com/watch?v=rHM0U-IBqxc
-
I'm glad this question sparked a lot of conversation, haha. Unfortunately for me, I've been struggling to get this to work. I've been running into crashing issues whenever a conversation starts to begin. I'll keep playing around with it, but I'm hoping I don't have to additionally alter every talkie script for each individual character to accommodate the changes I make in Blink.sc. For example, in Cassima.sc there's (super init: 0 0 tMouth140 &rest) which passes 0s when specific parts aren't used. If there's now 4 loops, I'm curious if I need to pass an extra 0 even when they're only using the original 3 loops.
-
I've been running into crashing issues whenever a conversation starts to begin
If I were a betting cat, my first guess would be that none of the talkers actually provide a fourth argument and a lack of proper argc checks and/or null reference checks messes up the part where they're actually drawn and cycled.