GetPlayerAnimationNames: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document 0.1.4 expanded animation catalog and Lua metadata APIs; confirmed in-game
 
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
'''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.
'''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. BUILD127 contains '''118 aliases''': 27 existing entries and 91 additions. The animations have been confirmed working in-game by the project owner.
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 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 ==
== Syntax ==
Line 27: Line 27:
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:Animation Functions]]
[[Category:Animation Functions]]
<!-- activities019:start -->
== Expanded list from 0.1.9 ==
'''Available from 0.1.9.''' Both the server and observing clients need the matching update.
The signature and fresh-table behavior are unchanged. Query [[getPlayerAnimationInfo]] for each alias; <code>info.since == "0.1.9"</code> 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.
<!-- activities019:end -->

Latest revision as of 13:27, 20 October 2026

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 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. 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.