public static string GetLocalizedDisplayNameInDatabase(string nameInDatabase) { var result = DialogueLua.GetLocalizedActorField(nameInDatabase, "Display Name").asString; if (string.IsNullOrEmpty(result) || string.Equals(result, "nil")) { result = DialogueLua.GetLocalizedActorField(nameInDatabase, "Name").asString; } if (string.IsNullOrEmpty(result) || string.Equals(result, "nil")) { result = nameInDatabase; } return(FormattedText.ParseCode(result)); }