Go to Page... |
|
Thread Tools | Display Modes |
|
04/20/18, 08:25 AM | #1 |
|
[outdated] GetUnitRace("interact") returns [Empty String]
The following two functions always return [Empty String] or 0 when called on any NPC, with either "interact" or "reticleover" as the arguments.
GetUnitRace("interact") returns [Empty String] GetUnitRaceId("interact") returns 0 The fix would be to have them return the NPC Race and RaceId, respectively. All other GetUnit functions (applicable to NPC's) return appropriate information with either "interact" or "reticleover" as the argument: GetUnitAlliance("interact") GetUnitChampionPoints("interact") GetUnitDifficulty("interact") GetUnitEffectiveChampionPoints("interact") GetUnitEffectiveLevel("interact") GetUnitGender("interact") GetUnitLevel("interact") GetUnitName("interact") GetUnitReaction("interact") GetUnitReactionColor("interact") GetUnitType("interact") GetUnitZone("interact") GetUnitZoneIndex("interact") GetRawUnitName("interact") Note: NPC's must have some form of racial identifier, and even if its unnamed or different from player races, it would be extremely useful to have this information. Take for example Argonians; they tend to slowly drone on, so I'd set the timer on my addon to be much longer before expecting the dialog to be over when a lizard is the speaker. NPC's may not have well defined classes similar enough to players, so these two may or may not be working as intended: GetUnitClass("interact") returns [Empty String] GetUnitClassId("interact") returns 0 Testing Methodology:
Warning: Spoiler
I'm including the information from tests on an interactable NPC ("interact" and "reticleover"), a non-interactable NPC ("reticleover"), another player ("reticleover"), and myself ("player") with the stated arguments.
The following function calls are done inside a function registered for handling EVENT_CHATTER_BEGIN and EVENT_CONVERSATION_UPDATED where "interact" and "player" are used as arguments, and in a function hooked to a keybind for "reticleover" calls.
Warning: Spoiler
Code:
d("GetUnitAlliance: "..tostring(GetUnitAlliance("interact"))) d("GetUnitAvARank: "..tostring(GetUnitAvARank("interact"))) d("GetUnitAvARankPoints: "..tostring(GetUnitAvARankPoints("interact"))) d("GetUnitBankAccessBag: "..tostring(GetUnitBankAccessBag("interact"))) d("GetUnitBattlegroundAlliance: "..tostring(GetUnitBattlegroundAlliance("interact"))) d("GetUnitBattleLevel: "..tostring(GetUnitBattleLevel("interact"))) d("GetUnitCaption: "..tostring(GetUnitCaption("interact"))) d("GetUnitChampionBattleLevel: "..tostring(GetUnitChampionBattleLevel("interact"))) d("GetUnitChampionPoints: "..tostring(GetUnitChampionPoints("interact"))) d("GetUnitClass: "..tostring(GetUnitClass("interact"))) d("GetUnitClassId: "..tostring(GetUnitClassId("interact"))) d("GetUnitDifficulty: "..tostring(GetUnitDifficulty("interact"))) d("GetUnitDisguiseState: "..tostring(GetUnitDisguiseState("interact"))) d("GetUnitDisplayName: "..tostring(GetUnitDisplayName("interact"))) d("GetUnitDrownTime: "..tostring(GetUnitDrownTime("interact"))) d("GetUnitEffectiveChampionPoints: "..tostring(GetUnitEffectiveChampionPoints("interact"))) d("GetUnitEffectiveLevel: "..tostring(GetUnitEffectiveLevel("interact"))) d("GetUnitGender: "..tostring(GetUnitGender("interact"))) d("GetUnitHidingEndTime: "..tostring(GetUnitHidingEndTime("interact"))) d("GetUnitLevel: "..tostring(GetUnitLevel("interact"))) d("GetUnitName: "..tostring(GetUnitName("interact"))) d("GetUnitNameHighlightedByReticle: "..tostring(GetUnitNameHighlightedByReticle("interact"))) d("GetUnitRace: "..tostring(GetUnitRace("interact"))) d("GetUnitRaceId: "..tostring(GetUnitRaceId("interact"))) d("GetUnitReaction: "..tostring(GetUnitReaction("interact"))) d("GetUnitReactionColor: "..tostring(GetUnitReactionColor("interact"))) d("GetUnitSilhouetteTexture: "..tostring(GetUnitSilhouetteTexture("interact"))) d("GetUnitStealthState: "..tostring(GetUnitStealthState("interact"))) d("GetUnitTitle: "..tostring(GetUnitTitle("interact"))) d("GetUnitType: "..tostring(GetUnitType("interact"))) d("GetUnitXP: "..tostring(GetUnitXP("interact"))) d("GetUnitXPMax: "..tostring(GetUnitXPMax("interact"))) d("GetUnitZone: "..tostring(GetUnitZone("interact"))) d("GetUnitZoneIndex: "..tostring(GetUnitZoneIndex("interact"))) d("GetRawUnitName: "..tostring(GetRawUnitName("player"))) The test NPC here is "Valaste", in the Mages Guild of Ghratwood. Using "interact" and "reticleover" yield the same results:
Warning: Spoiler
GetUnitAlliance: 0
GetUnitAvARank: 0 GetUnitAvARankPoints: 0 GetUnitBankAccessBag: nil GetUnitBattlegroundAlliance: 0 GetUnitBattleLevel: 0 GetUnitCaption: nil GetUnitChampionBattleLevel: 0 GetUnitChampionPoints: 160 GetUnitClass: GetUnitClassId: 0 GetUnitDifficulty: 0 GetUnitDisguiseState: 0 GetUnitDisplayName: GetUnitDrownTime: 0 GetUnitEffectiveChampionPoints: 160 GetUnitEffectiveLevel: 66 GetUnitGender: 1 GetUnitHidingEndTime: 0 GetUnitLevel: 50 GetUnitName: Valaste GetUnitNameHighlightedByReticle: Valaste GetUnitRace: GetUnitRaceId: 0 GetUnitReaction: 3 GetUnitReactionColor: 0.16470588743687 GetUnitSilhouetteTexture: GetUnitStealthState: 0 GetUnitTitle: GetUnitType: 2 GetUnitXP: 0 GetUnitXPMax: 1 GetUnitZone: Grahtwood GetUnitZoneIndex: 180 GetRawUnitName: Valaste^F Next, testing with "reticleover" on an "Elden Root Guard" NPC:
Warning: Spoiler
GetUnitAlliance: 1
GetUnitAvARank: 0 GetUnitAvARankPoints: 0 GetUnitBankAccessBag: nil GetUnitBattlegroundAlliance: 0 GetUnitBattleLevel: 0 GetUnitCaption: nil GetUnitChampionBattleLevel: 0 GetUnitChampionPoints: 160 GetUnitClass: GetUnitClassId: 0 GetUnitDifficulty: 4 GetUnitDisguiseState: 0 GetUnitDisplayName: GetUnitDrownTime: 0 GetUnitEffectiveChampionPoints: 160 GetUnitEffectiveLevel: 66 GetUnitGender: 2 GetUnitHidingEndTime: 0 GetUnitLevel: 50 GetUnitName: Elden Root Guard GetUnitNameHighlightedByReticle: Elden Root Guard GetUnitRace: GetUnitRaceId: 0 GetUnitReaction: 2 GetUnitReactionColor: 0.86274516582489 GetUnitSilhouetteTexture: GetUnitStealthState: 0 GetUnitTitle: GetUnitType: 2 GetUnitXP: 0 GetUnitXPMax: 1 GetUnitZone: Grahtwood GetUnitZoneIndex: 180 GetRawUnitName: Elden Root Guard Next, testing with "reticleover" on another player:
Warning: Spoiler
GetUnitAlliance: 1
GetUnitAvARank: 3 GetUnitAvARankPoints: 14668 GetUnitBankAccessBag: nil GetUnitBattlegroundAlliance: 0 GetUnitBattleLevel: 50 GetUnitCaption: nil GetUnitChampionBattleLevel: 160 GetUnitChampionPoints: 144 GetUnitClass: Sorcerer GetUnitClassId: 2 GetUnitDifficulty: 0 GetUnitDisguiseState: 0 GetUnitDisplayName: @<REMOVED> GetUnitDrownTime: 0 GetUnitEffectiveChampionPoints: 144 GetUnitEffectiveLevel: 66 GetUnitGender: 1 GetUnitHidingEndTime: 0 GetUnitLevel: 50 GetUnitName: <REMOVED> GetUnitNameHighlightedByReticle: <REMOVED> GetUnitRace: High Elf GetUnitRaceId: 7 GetUnitReaction: 4 GetUnitReactionColor: 0.13333334028721 GetUnitSilhouetteTexture: /esoui/art/characterwindow/silhouette_human_female.dds GetUnitStealthState: 0 GetUnitTitle: Kingmaker GetUnitType: 1 GetUnitXP: 0 GetUnitXPMax: 1 GetUnitZone: Grahtwood GetUnitZoneIndex: 180 GetRawUnitName: <REMOVED> And lastly, testing with the argument "player" (which calls the above functions on me):
Warning: Spoiler
GetUnitAlliance: 1
GetUnitAvARank: 4 GetUnitAvARankPoints: 25554 GetUnitBankAccessBag: nil GetUnitBattlegroundAlliance: 0 GetUnitBattleLevel: 0 GetUnitCaption: nil GetUnitChampionBattleLevel: 0 GetUnitChampionPoints: 261 GetUnitClass: Templar GetUnitClassId: 6 GetUnitDifficulty: 0 GetUnitDisguiseState: 0 GetUnitDisplayName: @taloskiin GetUnitDrownTime: 0 GetUnitEffectiveChampionPoints: 261 GetUnitEffectiveLevel: 66 GetUnitGender: 2 GetUnitHidingEndTime: 0 GetUnitLevel: 50 GetUnitName: Julian Crestfall GetUnitNameHighlightedByReticle: Valaste GetUnitRace: Imperial GetUnitRaceId: 10 GetUnitReaction: 4 GetUnitReactionColor: 0.13333334028721 GetUnitSilhouetteTexture: /esoui/art/characterwindow/silhouette_human_male.dds GetUnitStealthState: 0 GetUnitTitle: Volunteer GetUnitType: 1 GetUnitXP: 106674 GetUnitXPMax: 0 GetUnitZone: Grahtwood GetUnitZoneIndex: 180 GetRawUnitName: Julian Crestfall^Mx |
ESOUI » Developer Discussions » Bug Reports » [outdated] GetUnitRace("interact") returns [Empty String] |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|