<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetGameSoundCatalog</id>
	<title>GetGameSoundCatalog - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetGameSoundCatalog"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=GetGameSoundCatalog&amp;action=history"/>
	<updated>2026-10-01T15:28:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=GetGameSoundCatalog&amp;diff=1178&amp;oldid=prev</id>
		<title>QCherry: Document upcoming 0.1.7 game audio: 11 client APIs, result event, limits and complete dialogue catalog; not a release</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=GetGameSoundCatalog&amp;diff=1178&amp;oldid=prev"/>
		<updated>2026-10-01T10:20:26Z</updated>

		<summary type="html">&lt;p&gt;Document upcoming 0.1.7 game audio: 11 client APIs, result event, limits and complete dialogue catalog; not a release&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= getGameSoundCatalog =&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; font-weight:bold; letter-spacing:0.04em;&amp;quot;&amp;gt;PLANNED FOR UPDATE 0.1.7&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; margin-top:0.25rem;&amp;quot;&amp;gt;This function is planned for G1R:MP 0.1.7. It is not included in the public 0.1.6 release.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Searches and pages the compiled game sound metadata catalog on the client.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table|false getGameSoundCatalog([string query = &amp;quot;&amp;quot;, string category = &amp;quot;&amp;quot;, int offset = 0, int limit = 50])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;query&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || no || Optional substring search across key and speaker, case-insensitive for ASCII text. Defaults to an empty string, which matches all entries. Maximum length: 160 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || no || Optional exact category: an empty string for all categories, or sfx, music or dialogue. Defaults to an empty string; category names are lowercase and case-sensitive.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;offset&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || no || Zero-based count of matching entries to skip. Must be at least 0; defaults to 0.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || no || Maximum number of items to return, from 1 through 200. Defaults to 50.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns a Lua table with &amp;lt;code&amp;gt;items&amp;lt;/code&amp;gt; (array of entry tables), &amp;lt;code&amp;gt;total&amp;lt;/code&amp;gt; (number of all matches before paging) and &amp;lt;code&amp;gt;offset&amp;lt;/code&amp;gt; (the requested zero-based offset), or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for invalid search or paging arguments. Each entry has &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;speaker&amp;lt;/code&amp;gt; strings. Lua array entries are indexed from 1. A valid query with no matches, or an offset beyond the result set, returns an empty &amp;lt;code&amp;gt;items&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
List the first twenty matching dialogue keys:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
local page = getGameSoundCatalog(&amp;quot;Diego&amp;quot;, &amp;quot;dialogue&amp;quot;, 0, 20)&lt;br /&gt;
if page then&lt;br /&gt;
    outputDebugString(&amp;quot;Matching dialogue entries: &amp;quot; .. tostring(page.total))&lt;br /&gt;
    for _, item in ipairs(page.items) do&lt;br /&gt;
        outputDebugString(item.key .. &amp;quot; | &amp;quot; .. item.speaker)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Planned for update 0.1.7; not included in public 0.1.6.&lt;br /&gt;
* Available only in client-side resource scripts. See [[Game audio]] for ownership, lifecycle, limits and server-triggered playback.&lt;br /&gt;
* Entries are returned in key order. The offset is zero-based even though the Lua items array is one-based.&lt;br /&gt;
* Use nil for omitted earlier optional arguments when providing later ones, for example &amp;lt;code&amp;gt;getGameSoundCatalog(nil, &amp;quot;sfx&amp;quot;, 0, 20)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Search is a substring match, not a regular expression. Copy the exact returned key for playback because key lookup is case-sensitive.&lt;br /&gt;
* The catalog contains metadata only. Recordings remain in the player&amp;#039;s installed game; membership does not prove availability in every language/version or audible playback.&lt;br /&gt;
* Catalog queries are local and synchronous; no ready game session or preload is required.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Functions]]&lt;br /&gt;
[[Category:Client Functions]]&lt;br /&gt;
[[Category:Audio Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>