Difference between revisions of "Cutscene"

From GTAMods Wiki
Jump to navigation Jump to search
(ID:24 - EXTRA_ROOM)
(ID:7 - VEHICLE_REMOVAL)
Line 508: Line 508:
 
===== ID:6 - VEHICLE_DETAILS =====  
 
===== ID:6 - VEHICLE_DETAILS =====  
  
===== ID:7 - VEHICLE_REMOVAL =====  
+
===== ID:7 - VEHICLE_REMOVAL =====
 +
It is used to remove the detail from the car in cutscene.
 +
 
 +
Number, BoneID
 +
 
 +
''Number'' - Serial number of the model, which is recorded in the tag [MODELS].
 +
 
 +
''BoneID'' - Identifier bone.
 +
 +
Example:
 +
[MODELS]
 +
0 Banshee Banshee_0
 +
[/MODELS]
 +
 
 +
[VEHICLE_REMOVAL]
 +
0 15301
 +
[/VEHICLE_REMOVAL]
  
 
===== ID:8 - CAMCORDER =====
 
===== ID:8 - CAMCORDER =====

Revision as of 13:34, 28 April 2012

Cutscenes are short, pre-animated sequences before, during or after missions. Their purpose is to advance the plot and give background information about characters, situations and actions.

San Andreas Cutscenes

In San Andreas cutscenes are only loaded using main.scm. However, camera movement during cutscenes can't be controlled via script. This data is usually stored externally in the anim\cuts.img archive. Each cutscene consists of 3 files with the same name and a different extension: .cut, .ifp and .dat.

Whilst modification of existing cutscenes is possible through the files detailed below, new cutscenes cannot be added to the game unless they have a filename that already exists. This is due to the presence of an internally hardcoded table which links each cutscene (the .cut, .ifp and .dat files) to its audio streams and it does so by cutscene filename.

Cutscene data

The CUT File

The .cut file is loaded first. It contains the important data of the cutscene like its offset and the loaded models. The models of an cutscene are usually stored in the models\cutscene.img archive. It's split up into certain sections. Not every cut-file requires all sections, but it is better to include all sections into a cut-file and leave unused sections empty.

INFO

The info section contains information to the offset. It describes the 3D-coords of a point to which all other coords in the rest of the files are relative. Its format is

info
offset X Y Z
end

The offset parameter can also be set using opcode 0244.

MODEL

The model section contains information about models the cutscene uses. The models don't need to be defined in the IDEs. But the texture name must be the same as the model's one. The model section also attaches models to animations in the IFP-animation archive. Its format is:

model
?, name, animation
end

Where the name is without extension, and the animation describes an entry in the IFP file. The unknown value is a number, which is always 1 and actually is ignored by the game.
There is a Limit to 50 entries here!

EXTRACOL

Extracol stands for "Extracolor" and sets the active interior's color. It corresponds to the opcode 04F9.

extracol
Number
end

Extracolours can be edited in the timecyc.dat.

TEXT

The text section displays a GXT entry at an certain point of time relative to the cutscene start.

text
starttime, length, gxt
end

Where the numbers are integer and define the time in milliseconds.

UNCOMPRESS

the uncompress-section uncompresses the IFP animations.

uncompress
Animation
end
PEFFECT

stands for the particle effect and sets an particle effect from the effects.fxp.

peffect
effectname, starttime, endtime, unknown_number, bone, X, Y, Z, ?, ?, ?
end

The bone is a number of the body part the particle effect is attached to.

REMOVE

Removes an static (IPL-mapped) object being placed at specified coord.

remove
Objectname, X, Y, Z
end
ATTACH

Actually the content and use of this section is unknown. It is rarely used.

attach
Number, Number, Number
end
MOTION

This section is ignored by the game!

The DAT-File

The dat-file contains information about the camera movements during the cutscene.

It consists of 4 blocks:

  • Block1: Rotation
  • Block2: Zoom
  • Block3: CameraPositions
  • Block4: CameraTargetPoints

Each block starts with an integer number being the number of entries in this block, followed by its content and ended by a semicolon. The whole file is also marked as finished with an additional semicolon. Each line is marked as finished by an simple comma. The file describes 3 lanes, where the last 2 ones are ignored. So those 3 lines could be set identically by editors. This gives a general format:

TimeOffset,Lane1,Lane2,Lane3,

The TimeOffset is an floating value which defines the time of the event in seconds. The game interpolates the curve between the 2 points.

Block1 - Rotation
TimeOffset,Rotation(Lane_1),Rotation(Lane_2),Rotation(Lane_3),

Describes the rotation around the vector towards the target point in euler angles (degree).

Block2 - Zoom
TimeOffset,Zoom(Lane_1),Zoom(Lane_2),Zoom(Lane_3),

Defines the focal of the camera for each lane.

Block3 - Cameraposition
TimeOffset,X(Lane_1),Y(Lane_1),Z(Lane_1),X(Lane_2),Y(Lane_2),Z(Lane_2),X(Lane_3),Y(Lane_3),Z(Lane_3),

Defines the position of the camera relative to the offset point.

Block4 - Target
TimeOffset,X(Lane_1),Y(Lane_1),Z(Lane_1),X(Lane_2),Y(Lane_2),Z(Lane_2),X(Lane_3),Y(Lane_3),Z(Lane_3),

Defines the position of the target of the camera relative to the offset-point.

The IFP animation archive

This is an ANPK (Animation Package v1 | GTA III/VC) IFP file including the animations used for the cutscene. For the file specification look here: IFP Animations. 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.

List of Cutscenes in San Andreas

SCM (OpCodes)

  • 0244 - SetsCutscenePosition
  • 02E4 - LoadsCutsceneData
  • 02E7 - StartsCutscene
  • 02E8 - GetsCutsceneTime
  • 02E9 - HasCutsceneReachedEnd
  • 02EA - EndsCutscene
  • 03B7 - ProcessCutsceneOnly
  • 06B9 - IsCutsceneDataLoaded
  • 08D0 - IsCutsceneSkipped
  • 08F0 - SetsCutsceneModelTexture

GTA IV

Cutscenes in GTA IV used .WAD, .CUT and .model files for cutscenes. Cut files of this game is used tags. List and description of these tags are discussed below. GTA IV Cutscene contain a tags. One cutscene may contain about 15 sections. Tags DRAW_DISTANCE, FLAGS, BLOCKING_BOUNDS, CAMCORDER, TEXT, as usual, are not used within the sections.

Sections for .cut (GTA 4) was researched by - DK22PAC & Solom.

Tags description

ID:0 - SECTION_START

The tag indicates the start of the section cutscene.

ID:0 - SECTION_END

The tag indicates the end of the section cutscene.

ID:1 - OFFSET

A point that defines the beginning of the coordinate system cutscene

float X, float Y, float Z

Example:

[OFFSET]
-109.416000 -265.023010 14.785000
[/OFFSET]
ID:2 - CUTSCENE_HEADER

Unknown section.

Note: Parameters of this section is not used by the game, but they must be present.

ID:3 - DURATION

determines the length of sections.

Example:

[DURATION]
45466.667969
[/DURATION]
ID:4 - ANIM

File Name of WAD, that contain animations for cutscene.

string WADName

Usually, this is <cutscene name>_<ID section>

Example:

[ANIM]
RB_1_1
[/ANIM]
ID:5 - MODELS

Contain info about subject, that are present in the cutscene, their models and animations.

int ID, string ModelName, string AnimName, string HeadAnimName, int Unknown
  • ID - object identifier that can be used in other tags
  • ModelName - model name (models for cutscene placed in cutsprops.img)
  • AnimName - animation name for the subject from WAD file
  • HeadAnimName - The name of the person's face animations from WAD file

One section in cutscene may to use 570 subjects.

Example:

[MODELS]
0 CS_Davethemate CS_Davethemate_0 Davethemate_head_0
1 player player_0 player_head_0
2 CS_Hossan CS_Hossan_0 cs_hossan_head_0 0
3 CS_WhippingGirl CS_WhippingGirl_0
4 csWhip csWhip_0
5 csToolBox csToolBox_0
[/MODELS]
ID:6 - VEHICLE_DETAILS
ID:7 - VEHICLE_REMOVAL

It is used to remove the detail from the car in cutscene.

Number, BoneID

Number - Serial number of the model, which is recorded in the tag [MODELS].

BoneID - Identifier bone.

Example:

[MODELS]
0 Banshee Banshee_0
[/MODELS]
[VEHICLE_REMOVAL]
0 15301
[/VEHICLE_REMOVAL]
ID:8 - CAMCORDER
ID:9 - VARIATION
ID:10 - REMOVE
ID:11 - FIXUP
ID:12 - CAMERA
ID:13 - AUDIO
ID:14 - TEXT
ID:15 - ATTACHMENT
ID:16 - PROPS
ID:17 - FLAGS
ID:18 - LIGHTS
ID:19 - DRAW_DISTANCE
ID:20 - EFFECTS
ID:21 - BLOCKING_BOUNDS

Specifies the zone blocking (for peds / cars). used to ignore spawn peds/cars on current zone.

float CornerAA_x, float CornerAA_y, float CornerAA_z, float CornerAB_x, float CornerAB_y, float CornerAB_z, float CornerBA_x, float CornerBA_y, float CornerBA_z, float CornerBB_x, float CornerBB_y, float CornerBB_z, float Height
  • CornerAA, CornerAB, CornerBA, CornerBB - point of the quadrilateral
  • Height - Zone's height

Max number of the string is - 24

Example:

[BLOCKING_BOUNDS]
-6.656193 3.182460 -1.100477 -3.160525 -2.872214 -1.100477 -0.601519 6.678128 -1.100477 2.894149 0.623454 -1.100477 6.991335
-9.463666 8.045147 -1.100477 -5.967999 1.990473 -1.100477 -3.408992 11.540814 -1.100477 0.086675 5.486141 -1.100477 6.991335
-12.252039 12.874750 -1.100477 -8.756371 6.820076 -1.100477 -6.197365 16.370419 -1.100477 -2.701697 10.315743 -1.100477 6.991335
-15.035851 17.696455 -1.100477 -11.540183 11.641781 -1.100477 -8.981177 21.192123 -1.100477 -5.485509 15.137448 -1.100477 6.991335
-17.831411 22.538509 -1.100477 -14.335744 16.483833 -1.100477 -11.776738 26.034176 -1.100477 -8.281070 19.979500 -1.100477 6.991335
-20.628733 27.383612 -1.100477 -17.133064 21.328936 -1.100477 -14.574059 30.879278 -1.100477 -11.078391 24.824604 -1.100477 6.991335
-3.858371 -1.663509 -1.100477 -0.362703 -7.718184 -1.100477 2.196303 1.832158 -1.100477 5.691970 -4.222516 -1.100477 6.991335
[/BLOCKING_BOUNDS]
ID:24 - EXTRA_ROOM
string Unknown

Note 1: Section is not used in original .cut files.

Note 2: The resulting value is ignored by the game.

ID:25 - MAX_PEDS

Determines the maximum number of peds in cutscene (not counting the peds involved in cutscene)

Example:

[MAX_PEDS]
5
[/MAX_PEDS]
ID:26 - MAX_CARS

Determines the maximum number of cars in cutscene (not counting the cars involved in cutscene)

Example:

[MAX_CARS]
2
[/MAX_CARS]
ID:27 - TIMECYCLE_MODIFIER_NAME

Sections, ignored by the game

ID:22 - PLAYER_START

ID:23 - MISSION_TEXT_NAME

Note: These two parameters used only in .SCO, so these sections is ignored by the game.

ORIENT

TIME

ANIMRANGE

COMPRESSION

SCO (Native functions) for cutscenes

CLEAR_CUTSCENE

CLEAR_NAMED_CUTSCENE

EXPLODE_CAR_IN_CUTSCENE

EXPLODE_CAR_IN_CUTSCENE_SHAKE_AND_BIT

GET_CUTSCENE_TIME

GET_CUTSCENE_AUDIO_TIME_MS

GET_CUTSCENE_PED_POSITION

GET_CUTSCENE_SECTION_PLAYING

HIDE_CHAR_WEAPON_FOR_SCRIPTED_CUTSCENE

HAS_CUTSCENE_FINISHED

HAS_CUTSCENE_LOADED

INIT_CUTSCENE

IS_PED_IN_CUTSCENE_BLOCKING_BOUNDS

IS_PLAYER_READY_FOR_CUTSCENE

IS_POS_IN_CUTSCENE_BLOCKING_BOUNDS

MAKE_PLAYER_SAFE_FOR_CUTSCENE

SET_CAR_IN_CUTSCENE

SET_CHAR_IN_CUTSCENE

SET_CUTSCENE_EXTRA_ROOM_POS

SHAKE_PAD_IN_CUTSCENE

START_CUTSCENE_NOW

START_CUTSCENE - Don't used (?)

SET_CUTSCENE_EXTRA_ROOM_POS

WAS_CUTSCENE_SKIPPED

External link