Thread Tools Display Modes
04/19/24, 07:43 AM   #1
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 26
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.

Last edited by Lykeion : 04/19/24 at 10:18 AM. Reason: Requirements supplemented
  Reply With Quote
04/22/24, 09:47 AM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 185
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.

Last edited by ZOS_DanBatson : 04/22/24 at 09:50 AM.
  Reply With Quote
04/22/24, 12:42 PM   #3
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 26
Originally Posted by ZOS_DanBatson View Post
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

Last edited by Lykeion : 04/22/24 at 12:46 PM.
  Reply With Quote
06/04/24, 03:09 AM   #4
Lykeion
 
Lykeion's Avatar
AddOn Author - Click to view addons
Join Date: May 2022
Posts: 26
https://www.esoui.com/downloads/info...oadUpdate.html

Just mentioning it, the update containing the Scribing Simulator is released with Gold Road. Thanks again for the help @ZOS_DanBatson, without the demo this feature would not be possible
  Reply With Quote

ESOUI » Developer Discussions » Wish List » Add GetAbilityId() with parameters craftedAbilityId & 3*scriptId's

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off