ax.recognition¶
Recognition system for tracking character familiarity, aliases, and name display.
Documented functions: 8 · Realm: server, shared
Functions¶
ax.recognition:GetAlias(char, targetID)ax.recognition:GetDisplayDescription(char, targetID)ax.recognition:GetRecord(char, targetID)ax.recognition:GetTier(score)ax.recognition:IsGloballyRecognized(targetChar)ax.recognition:NormalizeFamiliarity(familiarity)ax.recognition:AdminSetFamiliarity(admin, charID, targetID, score)ax.recognition:Introduce(client, targetClient, alias)
ax.recognition:GetAlias(char, targetID)¶
Resolve the display name that char uses for the character with ID targetID.
Returns the stored alias at ACQUAINTED or above, otherwise "Unknown".
Globally recognised faction members always show their real name.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
char |
table |
The perceiver's character instance |
targetID |
number |
The target character's ID |
Returns
string: Display name or fallback string
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:159
ax.recognition:GetDisplayDescription(char, targetID)¶
Resolve the description that char should see for the character with ID targetID.
Returns nil for strangers (description hidden). Returns the real description at SEEN or above.
Globally recognised faction members always show their real description.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
char |
table |
The perceiver's character instance |
targetID |
number |
The target character's ID |
Returns
string|nil: Description string, or nil when the perceiver shouldn't see one yet
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:190
ax.recognition:GetRecord(char, targetID)¶
Retrieve the familiarity record that char holds for targetID.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
char |
table |
The perceiver's character instance |
targetID |
number |
The target character's ID |
Returns
table|nil: Record{ score, alias, lastSeen }, or nil if none exists
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:138
ax.recognition:GetTier(score)¶
Derive the familiarity tier for a given raw score.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
score |
number |
Raw familiarity score (0–200+) |
Returns
number: Tier integer (0 = STRANGER … 4 = TRUSTED)
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:117
ax.recognition:IsGloballyRecognized(targetChar)¶
Check whether a character's faction grants global recognition.
When a faction sets isGloballyRecognized = true, all of its members are treated
as at least ACQUAINTED by every perceiver, regardless of individual score.
The optional globalFamiliarityFloor field on the faction sets which tier is the
minimum; it defaults to ACQUAINTED (2) when omitted.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
targetChar |
table |
The target character instance |
Returns
boolean: True when the target's faction is globally recognised
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:210
ax.recognition:NormalizeFamiliarity(familiarity)¶
Normalize a familiarity table to canonical string keys and sanitized records.
This prevents JSON/network round-trips from collapsing mixed numeric/string keys
(e.g. 123 and "123") into duplicate object keys, which can silently discard
aliases after reconnects.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
familiarity |
table |
Familiarity map keyed by target character ID |
Returns
boolean: True when the table was modified in-place
Source: gamemode/modules/recognition/libraries/sh_recognition.lua:43
ax.recognition:AdminSetFamiliarity(admin, charID, targetID, score)¶
Directly set the familiarity score between two characters (admin tool).
Score is clamped to 0–2000 and saved immediately. Fires OnFamiliarityChanged if the
tier changes. Requires the CAMI privilege "Parallax - Recognition".
Realm: server
Parameters
| Name | Type | Description |
|---|---|---|
admin |
Player |
The admin executing the change |
charID |
number |
The character whose record is being modified |
targetID |
number |
The target character ID |
score |
number |
The new raw score to set |
Source: gamemode/modules/recognition/libraries/sv_recognition.lua:257
ax.recognition:Introduce(client, targetClient, alias)¶
Record that client has introduced themselves to targetClient using alias.
Floors the score to ACQUAINTED if currently below, then stores the alias.
Only the client's own familiarity record is updated; the alias is theirs to give.
Realm: server
Parameters
| Name | Type | Description |
|---|---|---|
client |
Player |
The player performing the introduction |
targetClient |
Player |
The player being introduced to |
alias |
string |
The name the client is presenting (1–48 characters) |
Source: gamemode/modules/recognition/libraries/sv_recognition.lua:198