Scene System

Scene Structure

Each scene is a table with specific properties that control location, animations, and camera work:

[sceneId] = {
    name = "Scene Name",
    baseLocation = vector3(x, y, z),
    timeOverride = {hour = 22, minute = 30, second = 0}, -- Optional
    ped = {
        -- Ped configuration
    },
    cameraSequence = {
        -- Array of camera shots
    },
    loop = true --for looping animations in sequence
}

Scene Properties

Property
Type
Required
Description

name

string

Yes

Display name for scene identification

baseLocation

vector3

Yes

World position for scene center

timeOverride

table

No

Override game time (hour, minute, second)

ped

table

Yes

Character configuration and animations

cameraSequence

table

Yes

Array of camera movements

loop

boolean

Yes

Whether camera sequence loops

Ped Configuration

Ped Properties Explained

Property
Type
Description

position

vector3

Exact world position for ped spawn

heading

float

Direction ped faces (0-360)

scenario

string

Native GTA scenario (simpler than animations)

animations

table

Array of custom animations to play

animationLoop

boolean

Loop through animation array

requiresPositionLock

boolean

Prevent ped from wandering

allowedDrift

float

Maximum drift distance if position locked

Animation Properties

Property
Type
Description

dict

string

Animation dictionary to load

anim

string

Animation name within dictionary

duration

number

Duration in ms (-1 for infinite)

flag

number

Animation flags (0=normal, 1=loop, 2=stop on last frame)

blendIn

float

Blend-in time in seconds

blendOut

float

Blend-out time in seconds

Camera System

The camera system supports multiple movement types, each with specific parameters:

Camera Types

  1. move - Point A to B movement

    • Required: startPosition, endPosition, rotation or startRotation

    • Optional: endRotation for rotation during movement

  2. orbit - Circular movement around center

  3. crane - Vertical movement (up/down)

  4. dolly - Forward/backward with zoom

  5. tracking - Follow predefined path

  6. portrait - Static close-up shot

Camera Parameters Explained

Parameter
Type
Description

duration

number

Total shot duration in milliseconds

transitionTime

number

Fade transition time between shots (ms)

cutStart

number

Start time offset for dynamic cuts (ms)

cutEnd

number

End time for cut (ms)

fov

float

Field of view (10-110, lower = more zoom)

fovEnd

float

End FOV for zoom effects

focus

string/vector3

Focus target: "ped", "manual", or world position

focusOffset

table

Offset from focus target {x, y, z}

focusOffsetEnd

table

End offset for focus transitions

Depth of Field (DOF)

  • Near: Objects closer than this distance blur

  • Far: Objects farther than this distance blur

  • Strength: Overall blur intensity (0 = off, 1 = maximum)

Camera Shake

Shake Types:

  • HAND_SHAKE - Natural handheld camera movement

  • VIBRATE_SHAKE - Small rapid vibrations

  • DRUNK_SHAKE - Wobbly, unstable movement

  • ROAD_VIBRATION - Vehicle-like vibrations

Camera Sway

Creates gentle floating movement, simulating breathing or wind.

Visual Effects

Common Timecycles:

  • cinema - Cinematic color grading

  • rply_contrast - High contrast

  • rply_saturation - Vivid colors

  • Barry1_Stoned - Hazy, dreamlike

  • tunnel_entrance - Dark, moody

  • MP_race_finish - Bright, energetic

Last updated