GetGenderFromNameDescriptor

From ESOUI Wiki

Jump to: navigation, search

This function appears to accept a string that contains localization control codes, and return a Gender constant matching the control codes in that string.

In an English-language copy of the game, the ^n and ^N codes (used to mark gender-neutral/non-binary pronouns and names) cause this function to return GENDER_MALE even though the game has a GENDER_NEUTER constant. The function also returns GENDER_MALE if the input string contains no localization control codes for gender. In Zenimax's code, this function is only used on raw unit names for in-game characters (who are always ^F or ^M), which may explain why this function doesn't handle the ^n and ^N codes.

Example

local rawCharacterName = GetRawUnitName("player") -- "John Zenimax^Mx"
local characterGender = GetGenderFromNameDescriptor(rawCharacterName) -- GENDER_MALE

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox