Community

SCI Programming => SCI Syntax Help => Topic started by: Pakolmo on February 05, 2016, 02:40:22 PM

Title: Change Script from Phantasmagoria 1
Post by: Pakolmo on February 05, 2016, 02:40:22 PM
Hello!  :)

I am trying to change the script and heap 0 from Phantasmagoria 1 because I want that the game shows the subtitles (msg) down the screen when it play the videos.

I don't know how do it. Please, Help me!
Title: Re: Change Script from Phantasmagoria 1
Post by: MusicallyInspired on February 05, 2016, 06:42:21 PM
That's....no small task you're asking. Why don't you start with SCI basics before tackling something so big? Then when you have a firm grasp on how it works, it'll look less like Greek to you.
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 05, 2016, 07:44:37 PM
Also, Phantasmagoria is SCI2 and Companion is limited to SCI1.1. Not sure what you might be able to do with the language flag in the CFG file and TraduSCI (http://sciwiki.sierrahelp.com//index.php?title=SCI_Resource_Utilities#TraduSCI_2.3).
Title: Re: Change Script from Phantasmagoria 1
Post by: MusicallyInspired on February 05, 2016, 07:52:59 PM
Actually, IIRC, troflip made some changes so that SCI2 scripts will compile now. It's just not "supported".
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 05, 2016, 08:29:39 PM
I thought it was just the beginnings of graphics support, but I was not paying that much attention since there was not going to be full support for it. Getting SCI1.1 is a pretty big deal in and of itself. Any SCI2 support is icing in the cake.
Title: Re: Change Script from Phantasmagoria 1
Post by: Pakolmo on February 05, 2016, 08:30:29 PM
Thank you very much, it is a beginning. ;)

Scicompanion is wonderful.

Do you know the sentence to call a msg in a script file?
Title: Re: Change Script from Phantasmagoria 1
Post by: Kawa on February 05, 2016, 08:51:18 PM
In SCI11 at least it's (gMessager say: nounNum verbNum caseNum 0 self) or something like that, but that first word may be different and it won't include anything about placement. I think it's basically the same in SCI2 but on the other hand Phantasmagoria may well do its own thing to display those msg lines.
Title: Re: Change Script from Phantasmagoria 1
Post by: troflip on February 05, 2016, 08:56:34 PM
I managed to get a lot of things working with SCI2 (enough that I thought someone should be able to make a game with it - with difficulty), but yeah, it's all "at your own risk" and not very tested. I know I tried Phantasmagoria because the screenshots of it look familiar, but I also remember there were a few slightly different flavors of SCI2, and I focused mainly on making sure SQ6, GK, and KQ7 sort of worked.

Do you know the sentence to call a msg in a script file?

For SCI1.1:
http://scicompanion.com/Documentation/Classes/Messager.html

I'm not sure if SCI2's class library is different, or what the messager variable would be called in a decompilation. But basically it's an instance to which you send a "say" method, and it does the necessary kernel calls to display the message box on a screen.

The kernel call is Message:
http://scicompanion.com/Documentation/Kernels/Message.html
which will get you the raw text, and then you can display it how you want.
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 05, 2016, 10:09:59 PM
What about the decompiler? Will it work for SCI2?
Title: Re: Change Script from Phantasmagoria 1
Post by: troflip on February 05, 2016, 11:51:35 PM
Assuming I apply the right list of kernel names, sure. I think The only decompiler changes needed for SCI2 were to handle the _file_ and _line_ debug opcodes.

For some reason everyone has this idea that the compiler/decompiler is a big hurdle to move between SCI versions. In reality, it's almost identical across all SCI versions (the only big change is the split between heap/script resources between SCI1 and SCI1.1, but that's independent of the compiler/decompiler code). It's all the other stuff that was a pain (pics, views, sound, audio).
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 06, 2016, 02:53:38 AM
Do you know what the difference is with CSC script files in SCI3 games?
Title: Re: Change Script from Phantasmagoria 1
Post by: troflip on February 06, 2016, 03:27:21 AM
I don't know what CSC files are. But... SCI32 is 32-bit (I think?), and "16-bitness" is pervasive throughout SCI Companion when it comes to scripts, so it would probably be a lot of work to get Companion working with SCI32 stuff (if that's what you're getting at).
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 06, 2016, 12:40:50 PM
The SCI32 games' scripts have a CSC extension. The attached are samples from Lighthouse, RAMA, Phantasmagoria 2 and LSL7. Not suggesting that you do anything with them, just thought you might be interested in looking at them.
Title: Re: Change Script from Phantasmagoria 1
Post by: Pakolmo on February 11, 2016, 01:02:52 PM
Show msg at screen in videos was wrong idea. I think is better change the VMD videos for MPG subtitled videos.

I saw the sintaxis is: (PlayVMD 0 {1.vmd})

And for the MPG is:  (ShowMovie 1 0 {1.MPG})

But I have problems to recompile the scripts.
Title: Re: Change Script from Phantasmagoria 1
Post by: Kawa on February 11, 2016, 01:35:30 PM
I was not aware MPG was a thing that was supported.
Title: Re: Change Script from Phantasmagoria 1
Post by: lskovlun on February 11, 2016, 01:38:07 PM
I don't quite understand, if you've decided to edit the movies instead, why you'd want to change the scripts?

The PlayVMD function is rather complicated, it has 32 subfunctions.

And if you want to use the ShowMovie call, be aware that it is not included in all interpreters.
Title: Re: Change Script from Phantasmagoria 1
Post by: Pakolmo on February 11, 2016, 01:41:01 PM
I can't edit a VMD video. I don't know how encode it. With MPG or AVI I can encode it.

I want to translate the game.
Title: Re: Change Script from Phantasmagoria 1
Post by: Kawa on February 11, 2016, 01:43:02 PM
You can't use MPG here, I'll tell you that much. And the last time I tried to use AVI, it wouldn't accept my file despite my best attempts to match codecs.
Title: Re: Change Script from Phantasmagoria 1
Post by: Collector on February 11, 2016, 02:20:05 PM
No SCI game supported MPG and only a few supported AVI. KQ6, KQ7, GK1, the GK2 demo and QfG4 did, but only with their 16-bit Win interpreters. There is VAG's VMD Player that can play VMDs outside of the games, but it has no conversion ability nor any source. Might be nice if someone could get him to release his source. His site is still up, but don't know if he is reachable. http://vagsoft.chat.ru/sci.html
Title: Re: Change Script from Phantasmagoria 1
Post by: Pakolmo on February 17, 2016, 10:11:38 AM
Phantasmagoria 1 interpreter can play avi if I change the scripts.