ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   Add GetAbilityId() with parameters craftedAbilityId & 3*scriptId's (https://www.esoui.com/forums/showthread.php?t=10928)

Lykeion 04/19/24 07:43 AM

Add GetAbilityId() with parameters craftedAbilityId & 3*scriptId's
 
I briefly played around with the Scribing system in the PTS and checked the U42 API note. It looks like craftedAbilityId & 3*scriptId can fully determine an abilityId , but the game doesn't provide this API.

I'd like to add a Scribing simulator to my addon to help players quickly see the effects of various script combinations anytime anywhere without using the Scribing Altar. However, I checked the U42 API note and found that the abilityId can only be queried via craftedAbilityId. This means that we can only query the abilityId that have been crafted in our skill selector, but not the abilityId of any skill that has not been crafted.

I think this problem can be solved by organizing a scribing abilityId Lib. However, as described in the official stream, there are thousands of combinations of skills that can be scribed, and even if the Lib is done, performance issues are not guaranteed at the time of use. Can the dev team please provide this API to solve this problem? Also, I want the corresponding API of getting craftedAbilityId & 3* scriptId by abilityId.

ZOS_DanBatson 04/22/24 09:47 AM

Code:

if IsScribableScriptCombinationForCraftedAbility(craftedAbilityId, primaryScriptId, secondaryScriptId, tertiaryScriptId) then
    SetCraftedAbilityScriptSelectionOverride(craftedAbilityId, primaryScriptId, secondaryScriptId, tertiaryScriptId)
    local abilityId = GetCraftedAbilityRepresentativeAbilityId(craftedAbilityId)
    -- Ask whatever questions about the ability you want to ask
    ResetCraftedAbilityScriptSelectionOverride()
end

Keep in mind though that just having the abilityId doesn't mean it's everything you need to know. There can be dozens of combinations of scripts that use the same abilityId. All the GetAbility* functions (e.g.: GetAbilityDuration, GetAbilityRange, etc) can return drastically different values depending on the scripts even for the same abilityId. And how they're calculated is to look at the override scripts (if applicable) or look at what you've got currently scribed. This is why all our tooltips set the override first and foremost.

Lykeion 04/22/24 12:42 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 49899)
Code:

if IsScribableScriptCombinationForCraftedAbility(craftedAbilityId, primaryScriptId, secondaryScriptId, tertiaryScriptId) then
    SetCraftedAbilityScriptSelectionOverride(craftedAbilityId, primaryScriptId, secondaryScriptId, tertiaryScriptId)
    local abilityId = GetCraftedAbilityRepresentativeAbilityId(craftedAbilityId)
    -- Ask whatever questions about the ability you want to ask
    ResetCraftedAbilityScriptSelectionOverride()
end

Keep in mind though that just having the abilityId doesn't mean it's everything you need to know. There can be dozens of combinations of scripts that use the same abilityId. All the GetAbility* functions (e.g.: GetAbilityDuration, GetAbilityRange, etc) can return drastically different values depending on the scripts even for the same abilityId. And how they're calculated is to look at the override scripts (if applicable) or look at what you've got currently scribed. This is why all our tooltips set the override first and foremost.

Appreciate the demonstration of the use of override, it's fantastic! Thanks for the detailed explanation


All times are GMT -6. The time now is 03:13 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI