OpenXcom Forum
Contributions => Programming => Topic started by: BBHood217 on May 16, 2015, 11:54:26 am
-
TFTD actually has two kinds of cutscenes: The FMV kind which is of course fully animated 3D CGI scenes (that's obviously outdated by today), and the text kind that's just a slideshow of the aforementioned 3D CGI scenes but with captions that actually give some context to said scenes. My question is: How will OpenXcom determine which kind of cutscene to play when running TFTD?
-
Warboy and I discussed this at some length, and it's implemented already. See: https://github.com/SupSuper/OpenXcom/pull/1007 The ruleset format is described at the top, and you can see examples in the cutscenes.rul file
-
Neat. Imagine all the possibilities.
Although did the original Xcom have research cutscenes?
-
completing the t'leth research triggers one.
-
So we can now Mod our own "cutscenes" for Missions or Research stuff?
-
I see this in the ruleset
- type: intro
useUfoAudioSequence: true
videos:
- UFOINTRO/UFOINT.FLI
Is .FLI the only file format one can use as intro or is there also support for .mpg or something similar. I just ask, because .FLI may be difficult to edit.
Or are there any special tools for this?
-
RAD video tools, for example. Allows conversion .gif to .fli, that's for sure. I was using it to mod several old games.
-
Regarding file format support, the video player used is https://www.libsdl.org/projects/flxplay/ which supports FLC and FLX files (and apparently FLI files).
-
Regarding file format support, the video player used is https://www.libsdl.org/projects/flxplay/ which supports FLC and FLX files (and apparently FLI files).
It seems OXcom only excepts "ufoint.fli" as filename for the intro in UFOINTRO folder.
Changing the filename in the cutscenes ruleset has no effect.
Even if you have "ufoint.flc" as file in the UFOINTRO folder it is ignored. This is different from the way music is handled. There you can replace for example "gmgeo1.mid" by "gmgeo1.ogg".
It would be good if one could replace "ufoint.fli" by "ufoint.flc", cause this is the format those RAD video tools produce.
EDIT:
If I change the filename of my generated file from "ufoint.flc" to "ufoint.fli" (I think the formats are nearly identical) it is loeded by openxcom. However only the the first frame is shown and after pressing a button there is a crash to desktop. :(
-
It seems OXcom only excepts "ufoint.fli" as filename for the intro in UFOINTRO folder.
Changing the filename in the cutscenes ruleset has no effect.
hrm.. nowhere in the code is "ufoint.fli" hard-coded. it gets the filename from the ruleset and nowhere else. Check the openxcom.log file -- did the ruleset file where you overrode the cutscenes: definition get loaded properly?
If I change the filename of my generated file from "ufoint.flc" to "ufoint.fli" (I think the formats are nearly identical) it is loeded by openxcom. However only the the first frame is shown and after pressing a button there is a crash to desktop. :(
could you send me your ufoint.flc file to me via dropbox? I can look into it a bit.
-
hrm.. nowhere in the code is "ufoint.fli" hard-coded. it gets the filename from the ruleset and nowhere else. Check the openxcom.log file -- did the ruleset file where you overrode the cutscenes: definition get loaded properly?
could you send me your ufoint.flc file to me via dropbox? I can look into it a bit.
I have done some more testing and this is what I found out:
The reason for most of my problems was that the UFOINT.FLI is always played first, no matter what you specify in a new ruleset. After that your file is played.
If you take a new file with name UFOINT.FLI it replaces the original otherwise you have to watch two intros.
cutscenes:
- type: intro
useUfoAudioSequence: false
videos:
- newintro.FLC
So if you use a new ruleset with the above code. First the normal UFOINT.FLI is played and then newintro.flc (no problem with .flc loading :) )
Other points
1. For the first Openxcom start with the mod enabled the new intro is playing. After I started Openxcom 1 or two times after that it starts crashing at the intro start. After rebooting the computer it works again for the first start, but for the second restart again crash.
2. If openxcom cannot find newintro.FLC (because you named it newintro.FLI) then you get a crash to desktop.
3. My intro file is played very fast (when it plays), much faster then the animation should be (checked with MPC-HC). Is this changeable by ruleset, or do have to increase the framerate of my file?
file download:
https://www.mediafire.com/download/r3j3424r3045wgo/UFOINT.zip
-
got it, so the video files are being appended when it should be replacing the list. also the crash issue. I'll look into them. thanks!
-
I've been experimenting with cutscenes for some time now. From looking at the code, I see that the speed the video is played depends on the audio length, at least for FLC files. Since we have no tools to create an FLC file with audio support (all the modern day tools only convert to video-only), videos are played at the same rate which is 1 frame per millisecond, regardless of the headers specified in the file.
Also, i've found out that the implementarion of the FLC player does not fully comply to the standard FLIC specification. For example, TFTD defines its audio chunks in a very different way than it should, it uses 0xAAAA to define an audio chunk and adds 10 bytes after it, while the specification dictates that it should be 0x0038.
https://www.ffmpeg.org/doxygen/0.6/flic_8c-source.html
https://github.com/SupSuper/OpenXcom/blob/master/src/Engine/FlcPlayer.cpp
https://www.compuphase.com/flic.htm
I downloaded an old FLC compiler called EGI that could produce FLC with audio, but the game still does not recognize it because of the custom audio chunk header.
What this means, I guess, is that there will be no way to add a cutscene with audio and a proper playback rate unless the devs tweak a lot with the player code, and it still would be really hard due to the difficulty of finding a compiler that can generate FLC files with audio. I had to install EGI on a Windows XP virtual machine because it is incompatible with modern operating systems.
It would be much easier for both the devs and modders to support mpeg or other format, and leave the FLC player as is for compatibility.
-
Why not just make a video-only FLC with a separate audio track backing it, like in UFO?
-
Why not just make a video-only FLC with a separate audio track backing it, like in UFO?
How can I do this? As far as I know there is no way of adding separate audio playback in the cutscene rulesets....
-
TFTD actually has two kinds of cutscenes: The FMV kind which is of course fully animated 3D CGI scenes (that's obviously outdated by today), and the text kind that's just a slideshow of the aforementioned 3D CGI scenes but with captions that actually give some context to said scenes. My question is: How will OpenXcom determine which kind of cutscene to play when running TFTD?
Because the game was distribuited either on CD-ROM and floppy. The former features a filmed intro. In the 90' cd roms began to appear, just for info, but hopefully you all already know that :-X
-
How can I do this? As far as I know there is no way of adding separate audio playback in the cutscene rulesets....
I think you can specify a "music" track, but I'll investigate.
TFTD actually has two kinds of cutscenes: The FMV kind which is of course fully animated 3D CGI scenes (that's obviously outdated by today), and the text kind that's just a slideshow of the aforementioned 3D CGI scenes but with captions that actually give some context to said scenes. My question is: How will OpenXcom determine which kind of cutscene to play when running TFTD?
It'll use whichever is available. If both are available, then an option decides the preferred format.
-
I think you can specify a "music" track, but I'll investigate.
From what I've seen in the wiki and the code itself, you can't unless it's for slideshows. Animated cutscenes only need you to specify a video file.
Adding that feature would solve the audio problem, but not the playback speed feature.