GetPlayerIdentityNames: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document Protocol 23 voice and player presentation APIs
 
Document skin color and tattoos available from 0.1.3; identity/armor improvements
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!-- This page is generated automatically from the function definition: getPlayerIdentityNames. -->
= getPlayerIdentityNames =
= getPlayerIdentityNames =
Returns every complete armor-free character identity supported by the server.
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">IMPROVED FROM UPDATE 0.1.3</div>
<div style="color:#111111; margin-top:0.25rem;">This function is available in earlier releases and has corrected or expanded behavior in G1R:MP 0.1.3 and later. The contract below describes the updated behavior.</div>
</div>
 
Returns the supported head/face identity keys accepted by setPlayerIdentity.


== Syntax ==
== Syntax ==
Line 15: Line 19:


== Examples ==
== Examples ==
List all complete character identities:
List the supported named head/face identities:
<syntaxhighlight lang="lua" line>
<syntaxhighlight lang="lua" line>
for _, identityKey in ipairs(getPlayerIdentityNames()) do
for _, identityKey in ipairs(getPlayerIdentityNames()) do
Line 24: Line 28:
== Notes ==
== Notes ==
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.
* This is the recommended catalog for ordinary character appearance selection.
* This existing catalog API is marked improved in 0.1.3, not introduced in that release. It is read-only and requires no player identifier.
* Each identity combines the matching GTO face profile with validated face materials and hair geometry, but never includes armor.
* In the updated renderer, <code>setPlayerIdentity</code> selects a head-only layer with the named face presentation and supported hair/beard geometry. The existing game body and equipped armor remain in place; selecting a key does not require equipping that NPC's armor or replacing the full body.
* Some identity profiles still have compatibility issues with specific armor assets. Test every identity and armor combination used by a resource.
* Identity selection preserves the independent skin-color and tattoo overrides. It does not copy the NPC's complete body mesh, texture set, shape or authored body skin tone.
* See [[Player identity catalog]] for the complete list.
* The list describes supported server keys, not a promise that every combination of materials, armor and LODs renders identically or instantly. Test the local and remote appearances used by your resource.
* Use <code>getPlayerIdentity</code> to read the current canonical key. See [[Player customization]] and [[Player identity catalog]] for the layer contract and complete list.


[[Category:Lua Functions]]
[[Category:Lua Functions]]

Latest revision as of 02:32, 9 September 2026

getPlayerIdentityNames

IMPROVED FROM UPDATE 0.1.3
This function is available in earlier releases and has corrected or expanded behavior in G1R:MP 0.1.3 and later. The contract below describes the updated behavior.

Returns the supported head/face identity keys accepted by setPlayerIdentity.

Syntax

table getPlayerIdentityNames()

Parameters

This function does not accept parameters.

Returns

Returns a one-based array of stable identity keys. The first entry is default.

Examples

List the supported named head/face identities:

for _, identityKey in ipairs(getPlayerIdentityNames()) do
    outputDebugString(identityKey)
end

Notes

  • Available only in server-side resource scripts.
  • This existing catalog API is marked improved in 0.1.3, not introduced in that release. It is read-only and requires no player identifier.
  • In the updated renderer, setPlayerIdentity selects a head-only layer with the named face presentation and supported hair/beard geometry. The existing game body and equipped armor remain in place; selecting a key does not require equipping that NPC's armor or replacing the full body.
  • Identity selection preserves the independent skin-color and tattoo overrides. It does not copy the NPC's complete body mesh, texture set, shape or authored body skin tone.
  • The list describes supported server keys, not a promise that every combination of materials, armor and LODs renders identically or instantly. Test the local and remote appearances used by your resource.
  • Use getPlayerIdentity to read the current canonical key. See Player customization and Player identity catalog for the layer contract and complete list.