GetGameSoundInfo
getGameSoundInfo
Returns compiled catalog metadata and, when available, the last successful preload metadata for the current client resource.
Syntax
table|false getGameSoundInfo(string key)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
yes | Exact, case-sensitive key from getGameSoundCatalog. Accepts catalog entries only; no filename, URL or arbitrary event name. |
Returns
Returns false for an unknown key. Otherwise returns a Lua table with key (string), category (string: sfx, music or dialogue), speaker (string, empty when unspecified), verifiedInGame = false and capabilitiesKnown = false before a successful preload.
After a successful preloadGameSound in the same resource, the table can also contain:
| Field | Type | Meaning |
|---|---|---|
capabilitiesKnown |
bool | True once native event capabilities have been queried successfully. |
studioEvent |
string | Actual resolved game event, including any dialogue template fallback. |
lookup |
string | Diagnostic lookup method, currently FMOD.FindEventByName.
|
authoredSpatial, oneShot |
bool | Event capabilities reported by FMOD. oneShot = false is not a guarantee of a simple loop.
|
loopMode |
string | Currently authored; looping follows the event's design.
|
eventSamplesPreloaded |
bool | True in a successful preload result. |
voicePreloadRequested, voicePreloadConfirmed |
bool | Whether dialogue preload was requested and independently confirmed. The current implementation always reports voicePreloadConfirmed = false.
|
nativeMs |
number | Native processing time in milliseconds for the completed preload attempt; excludes earlier retries and is not total load latency. |
Dialogue replies may additionally contain recordingResolved, controllerPresent, controllerRootPresent, pawnRootPresent, viewTargetQuerySucceeded, viewTargetPresent, viewTargetIsLocalPawn and viewTargetRootPresent (booleans), plus voiceLanguageSet (string, when available).
Dialogue playback results and getGameSoundState can also expose localizedTextPathPresent, localizedTextPathMatchesId, identityPathVerified and recordingPrepared (booleans), resolution (string: localized-text-record or verified-catalog-identity), and recordingDurationSeconds (positive number). These playback-only fields are not populated by this function's preload cache.
Examples
Read catalog metadata without starting playback:
local info = getGameSoundInfo("voice/INFO_DIEGO_BARRIERE_11_01")
if info then
outputDebugString(info.category .. ": " .. info.speaker)
outputDebugString("Native capabilities known: " .. tostring(info.capabilitiesKnown))
end
Notes
- Planned for update 0.1.7; not included in public 0.1.6.
- Available only in client-side resource scripts. See Game audio for ownership, lifecycle, limits and server-triggered playback.
- This function submits no native request. Catalog metadata is available before the game is ready.
- Only a successful preload updates the per-resource information cache. Playing a sound alone does not set this function's
capabilitiesKnownto true; inspect that sound's state for playback metadata. verifiedInGameremains false. Capability flags, prepared recording duration and observed playback state do not prove that audio was audible.- Optional diagnostic fields can be absent, particularly on an early failure. They describe the game state at the time of that result and do not expose native paths or pointers.
- Resource/session cleanup clears cached preload metadata. The catalog entry itself remains available.