A cutscene is a pre-animated sequences before, during or after missions, of the game. There are made to give the help of the storyline of the game, what things, or characters are like, etc.
In San Andreas cutscenes are loaded by the main.scm file, camera movement and things, can not be controlled, via the main.scm file. Cutscene data is usually stored externally in the cuts.img archive. To be more correct; San Andreas/anim\cuts.img
Each cutscene consists of 3 files, all 3 must, and do, have the same file name, but with a different file extension (.cut, .ifp and .dat).
Modifying of existing cutscenes is possible, however, new cut scenes may not be added to the game, only if they have a file name that already exist in game. This is because a internally hardcoded table, in the EXE, which links each cutscene.
Obviously the.cut file is loaded first, as this contains the important data of the cutscene,(e.g. offset, models). Models of the cutscene are usually stored in the models\cutscene.img archive. And, this file is split up into sections.
The info section has information of the offset. Its format is the following:
offset X Y Z
The model section has information about the models that the cutscene uses.
Pay, attention that the model does not need to be defined in the IDE's.
Obviously, the model and texture must have the same name, like normally.
The model section also attaches models to animations in the IFP-animation archive. Its format is the following:
1, name, animation
The first, digit is always 1, and not even read by the game. There is a limit to 50 entry's in that, I think.
This sets the active interior's color:
Extra colours can be edited in the timecyc.dat file.
The text section displays a GXT entry at an certain point of time relative to the cutscene start. The numbers are integers and define the time in milliseconds.
starttime, length, gxt
The uncompress-section uncompresses the IFP animations.
This sets the particle effect and sets an particle effect from the effects.fxp; I may need to create a topic on the effect.fxp later, if you wish me to just say.
The bone is a number of the body part, the particle effect is attached to.
effectname, starttime, endtime, unknown_number, bone, X, Y, Z, don't know, don't know, don't know
Removes an static object being placed at specified coordinates.
Objectname, X, Y, Z
This is not even read by the game.
This is rarely used. And I don't know the meaning.
Never looked into it, much.
The dat file has information about the camera moving, movements during the cutscene time.
It has 4 blocks:
So, Each block starts with an integer number being the number of entries in the block, followed by its content and ended by a semicolon.
Each line is marked as finished by an just a comma.
The file describes 3 lanes, the last two are not read by the game.
This gives a general format:
The Time Offset is a value which defines the time of the event in game seconds. The game interpolates the curve between the 2 points.
Block1 - Rotation
Describes the rotation around the vector towards the target place/point in Euler angles.
Block2 - Zoom
Defines the focal of the camera for each lane.
Block3 - Cameraposition
Defines the position of the camera, relative to the offset point.
Block4 - Target
Defines the position of the target of the game camera, relative to the offset point.
An Animation Package IFP file, including the animations used for the cutscene.
The positions of the bones and animated objects in the animation are relative to the offset, defined in the INFO section of the .cut file.
Well, yes, creating a cutscene is quite hard, but the most hardest thing is actually, how long it takes, to make one. And the animation, of the cutscene is quite hard to get perfect.
You can make small cutscene's using SCM coding, although not as advanced, it's possibly more easy(judging on the amount, of scripting), and a lot more quicker, plus, if you get anything wrong, it's much more easy to correct.
There are the opcodes made for loading the cutscenes and, etc.
0244: set_cutscene_pos 8@ 11@ 14@
This opcode sets the cutscene position. (3 parameters).
02e4: load_cutscene_data 'PROLOG1'
This opcodes loads the cutscene data. (1 parameter).
Starts the cutscene(load it first). (0 parameters).
02e8: $5202 = cutscenetime
Stores the cutscene time to a varible. This only used once. (1 parameter).
Used as a condition, checks if the cutscene has finished. (0 parameters).
Ends a cut scene. (0 parameters).
03b7: process_cutscene_only 0
Process the cut scene, I myself, have never used this. (1 parameter).
Used as a condition, checks if the cutscene has loaded. (0 parameters).
Used as a condition, checks if the cutscene has been skipped. (0 parameters).
08f0: set_cutscene_model 'model' texture 'texture' // 8-byte strings
Sets the cutscene model and texture, I myself. have never used this. (2 parameters).