GetPlayerAnimationNames

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:18, 19 October 2026 by QCherry (talk | contribs) (Document upcoming 0.1.9 activity animations: 844 aliases, fishing, player/NPC Lua usage and qualification; not a release)
Jump to navigation Jump to search

getPlayerAnimationNames

New server-side function since 0.1.4 BUILD127. Requires the 0.1.4 server; the additional animations also require the matching client. See Update 0.1.4 for release status.

Returns the animation aliases supported by the running server. The earlier catalog has 118 aliases (27 original plus 91 added in 0.1.4), with previous in-game confirmation. From upcoming 0.1.9, it contains 962 aliases: the earlier 118 plus 844 additions. The additions include route/gesture variants and are not all individually visually confirmed. See Activity animation catalog and Activity animations.

Syntax

table getPlayerAnimationNames()

Returns

A fresh, 1-based array of strings in catalog order. Changing this Lua table does not change the server catalog. Use the aliases, not array positions, in scripts. See Player animation catalog for the complete list and getPlayerAnimationInfo for metadata.

Example

for _, name in ipairs(getPlayerAnimationNames()) do
    local info = getPlayerAnimationInfo(name)
    if info.group == "work" then
        outputDebugString(name)
    end
end

Listing names does not start an animation or change player state. Use startAnim and stopAnim to control playback.

Expanded list from 0.1.9

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Both the server and observing clients need the matching update. The signature and fresh-table behavior are unchanged. Query getPlayerAnimationInfo for each alias; info.since == "0.1.9" identifies the new entries on the expanded server. Listing the catalog does not play or preload all animations. The same aliases are accepted by startNpcAnim, subject to NPC eligibility.