Перейти к содержимому
Scaleform Functions

Scaleform Functions

Search 471 GTA V scaleform movies and 4,847 functions, see their parameter names, and build a ready Lua call with BeginScaleformMovieMethod and a draw loop.

Эта документация пока на английском.

Open the tool Last updated

Scaleform Functions is a reference of GTA V scaleform movies and the functions you can call on them, with their parameter names. Pick a function, fill the parameters, and copy a Lua snippet that loads the movie, calls it and draws it.

What it is for

Scaleform movies are the Flash UI files GTA V uses for big “mission passed” shards, instructional buttons, phones, computer screens, the minimap and more. Using one from a script means knowing the movie name, the function name and the order of its arguments. This page lists all of that and writes the boilerplate so you can try a message in seconds.

Quick start

  1. The page opens on MIDSIZED_MESSAGE with SHOW_SHARD_MIDSIZED_MESSAGE selected.
  2. Search movie names in the Movies tab, or switch to Functions to search function names across every movie (type at least 2 characters, for example SET_TITLE).
  3. Click a movie, then a function in its list.
  4. In the Snippet builder, check the type of each parameter and type a value.
  5. Copy scaleform.lua.

Browsing

Control What it does
Movies / Functions tabs Search by movie name, or by function name across all movies. The Functions search also matches a parameter name exactly.
Category chips All, frontend, generic, generic_2, heist_mp, minigames, minimap, platform_pc, web.
UPPERCASE functions only Hides lowercase functions, which are mostly internal.
Filter functions Appears on a movie with more than 8 functions.

Each movie shows its category, its name (click to copy) and the function count. Functions are listed with their parameter names, for example SHOW_SHARD_MIDSIZED_MESSAGE(bigText, msgText, colID, useDarkerShard, useCondensedShard). The selected movie and function are kept in the URL (?movie= and ?fn=), so you can link someone straight to a function.

Snippet builder

For every parameter you get a type dropdown and a value field. The type is pre-filled from the parameter name (useDarkerShard becomes a bool, colID an int, bigText a string). Change it if the movie expects something else.

Type Native written
int ScaleformMovieMethodAddParamInt
float ScaleformMovieMethodAddParamFloat
bool ScaleformMovieMethodAddParamBool
string (TextureNameString) ScaleformMovieMethodAddParamTextureNameString
string (PlayerNameString) ScaleformMovieMethodAddParamPlayerNameString
text (BeginTextCommand…) BeginTextCommandScaleformString("STRING"), AddTextComponentSubstringPlayerName, EndTextCommandScaleformString
Option What it does Default
Draw fullscreen Adds a DrawScaleformMovieFullscreen loop after the call. on
Duration (seconds) How long to draw before SetScaleformMovieAsNoLongerNeeded. 0 draws forever. 5

Use the text type when you want ~r~ style colour codes or long strings, since the plain string natives do not format.

Example

What the builder writes for a green midsized shard:

scaleform.lua
local function LoadScaleform(name)
    local handle = RequestScaleformMovie(name)
    local timeout = GetGameTimer() + 5000
    while not HasScaleformMovieLoaded(handle) do
        if GetGameTimer() > timeout then return nil end
        Wait(0)
    end
    return handle
end

CreateThread(function()
    local scaleform = LoadScaleform("MIDSIZED_MESSAGE")
    if not scaleform then return print("Could not load MIDSIZED_MESSAGE") end

    BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_MIDSIZED_MESSAGE")
    ScaleformMovieMethodAddParamTextureNameString("MISSION PASSED") -- bigText
    ScaleformMovieMethodAddParamTextureNameString("You delivered the car") -- msgText
    ScaleformMovieMethodAddParamInt(2) -- colID
    ScaleformMovieMethodAddParamBool(false) -- useDarkerShard
    ScaleformMovieMethodAddParamBool(false) -- useCondensedShard
    EndScaleformMovieMethod()

    local untilTime = GetGameTimer() + 5000
    while GetGameTimer() < untilTime do
        DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0)
        Wait(0)
    end
    SetScaleformMovieAsNoLongerNeeded(scaleform)
end)

Tips

  • A scaleform only shows while you draw it every frame.
  • Call functions after the movie has loaded, or they are dropped.
  • Release a movie you no longer need with SetScaleformMovieAsNoLongerNeeded.
  • colID style parameters take HUD colour ids. The Draw Text Colors page lists the common HUD colours by name.

Warning

Movies in the frontend category (pause menu and similar) usually cannot be drawn with DrawScaleformMovie. They are driven through BeginScaleformMovieMethodOnFrontend and friends, and are mostly undocumented. The tool shows a warning on those movies.

Limitations

  • Not every listed function does something in game. UPPERCASE functions are the movie’s public API and usually work; lowercase ones are internal but sometimes work too.
  • Only parameter names are known, not their types or allowed values. Test in game.

Data: Vespura (tomgrobbe.com).