ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Folium Discognitum (https://www.esoui.com/forums/showthread.php?t=7482)

fritzOSU03 11/24/17 02:44 PM

Folium Discognitum
 
Hey all,

I hope this is a simple question and that I just can't find the answer. How can I tell if I've read the Folium Discognitum on a given character? I can't locate it in the Lore Library and that may be because it's listed as a scroll on the item card. Here's the item card and link.


Code:

|H1:item:45720:364:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:10000:0|h|h
Thanks in advance.

sirinsidiator 11/24/17 03:24 PM

Unfortunately it doesn't look like there is a way to do this right now. None of the api methods that accept an item link return anything that would indicate that it was read. The best you can do is check if the player has already done the quest and then check if the item is in the inventory, but that also doesn't necessarily mean that he has abandoned his humanity and let Valaste get taken (who would ever do that for 2 measly skill points? :confused:).

Rhyono 11/24/17 03:36 PM

Quote:

Originally Posted by sirinsidiator (Post 33230)
(who would ever do that for 2 measly skill points? :confused:).

Who indeed. Haha...ha...

Dolgubon 11/24/17 08:11 PM

Quote:

Originally Posted by sirinsidiator (Post 33230)
Unfortunately it doesn't look like there is a way to do this right now. None of the api methods that accept an item link return anything that would indicate that it was read. The best you can do is check if the player has already done the quest and then check if the item is in the inventory, but that also doesn't necessarily mean that he has abandoned his humanity and let Valaste get taken (who would ever do that for 2 measly skill points? :confused:).

You saved Valaste??!! But... but... skill points!!

Ayantir 11/27/17 01:05 AM

I saved Valaste too o/

Baertram 11/27/17 02:07 AM

I've saved VAlaste with my first char, then noticed I'll get 2 points for not saving her, and decided to save her with every 2nd char then ;)

Solinur 11/29/17 03:39 AM

I think it's irresponisble to save valaste, as Uncle Sheo is clearly very lonely and in dire need of some company. Also Valaste doesn't seem to mind, so from my perspective the only responsible action here is to let her go with Uncle Sheo :D.

AssemblerManiac 11/30/17 08:01 AM

I saved Valaste too.
After seeing it was only an additional skill point, and a 150% exp bonus scroll, it wasn't worth it.

(I still have skill points because I've collected every skyshard in Tamriel)

Dolgubon 11/30/17 12:38 PM

Two extra skill points, and you can never have enough. I've gotten every non PvP skill point and still run out.

Rhyono 11/30/17 12:58 PM

You should run around and get the easy pvp skill points (ones not behind enemy gates); they add up. You don't need a group or anything.

Dolgubon 11/30/17 01:40 PM

Sorry, I meant all the skill points not from the PvP levels. I've already gotten that sweet skyshard furniture.

Rhyono 11/30/17 02:42 PM

Oh, yeah. I have no interest in going for that either.

fritzOSU03 12/05/17 04:39 PM

Yeah, I also saved Valaste the first time around. I'm working on something for skill points (all of them) and the Folium is the only thing I can't seem to isolate. It's not even in Eidetic Memory.

Dolgubon 12/06/17 01:57 PM

Guess this thread has gotten slightly off topic :D

I suppose you might be able to exhaustively check how many skill points a player has, and then exhaustively go through all the sources of skill points. I'm not certain if the Folium Discognitum counts as 6 skyshards, or 2 skill points API wise. If it counts as 6 skyshards you'd need to add up all the skyshards obtained. If it's 2 skill points, then you could count up skill points obtained from completed quests, skyshards (GetNumSkyShards()) and PvP.

Ayantir 12/06/17 02:26 PM

Counting skill points is a bit hard.

I did a pretty good algorithm in superstar :

All you have to do is to maintain the list of given skill points. It could be a bit optimized with skillLinesId, but I still didn't did it since addition of those functions. It would eliminate craft localization issue and the Guild/World skilllines which have dynamic skilllines indices.

Lua Code:
  1. local SKILLTYPES_IN_SKILLBUILDER = 8
  2. local ABILITY_LEVEL_NONMORPHED = 0
  3.  
  4. function SuperStarSkills:GetAvailableSkillPoints()
  5.    
  6.     local skillPoints = 0
  7.    
  8.     -- SkillTypes (class, etc)
  9.     for skillType=1, SKILLTYPES_IN_SKILLBUILDER do
  10.        
  11.         -- SkillLine (Bow, etc)
  12.         for skillLineIndex=1, GetNumSkillLines(skillType) do
  13.            
  14.             for abilityIndex=1, GetNumSkillAbilities(skillType, skillLineIndex) do
  15.                 skillPoints = skillPoints + SuperStarSkills:GetPointsSpentInAbility(skillType, skillLineIndex, abilityIndex)
  16.             end
  17.            
  18.         end
  19.        
  20.     end
  21.    
  22.     SuperStarSkills.spentSkillPoints = skillPoints + GetAvailableSkillPoints()
  23.    
  24.     return SuperStarSkills.spentSkillPoints
  25.    
  26. end
  27.  
  28. function SuperStarSkills:GetPointsSpentInAbility(skillType, skillLineIndex, abilityIndex)
  29.    
  30.     local _, _, _, _, _, purchased, progressionIndex = GetSkillAbilityInfo(skillType, skillLineIndex, abilityIndex)
  31.    
  32.     if not purchased then
  33.         return 0
  34.     elseif progressionIndex then
  35.        
  36.         -- Active skills
  37.        
  38.         -- Skill has been purchased
  39.         local _, morph = GetAbilityProgressionInfo(progressionIndex)
  40.         local skillLineName = GetSkillLineInfo(skillType, skillLineIndex)
  41.         if morph > ABILITY_LEVEL_NONMORPHED then
  42.             return (2 - SuperStarSkills:GetExceptionsPointsSpentInAbility(skillType, skillLineIndex, skillLineName, abilityIndex))
  43.         else
  44.             return (1 - SuperStarSkills:GetExceptionsPointsSpentInAbility(skillType, skillLineIndex, skillLineName, abilityIndex))
  45.         end
  46.        
  47.     else
  48.    
  49.         -- Passive skills
  50.         local currentUpgradeLevel = GetSkillAbilityUpgradeInfo(skillType, skillLineIndex, abilityIndex)
  51.        
  52.         local skillLineName = GetSkillLineInfo(skillType, skillLineIndex)
  53.         if currentUpgradeLevel then
  54.             return (currentUpgradeLevel - SuperStarSkills:GetExceptionsPointsSpentInAbility(skillType, skillLineIndex, skillLineName, abilityIndex))
  55.         else
  56.             return (1 - SuperStarSkills:GetExceptionsPointsSpentInAbility(skillType, skillLineIndex, skillLineName, abilityIndex))
  57.         end
  58.        
  59.     end
  60.    
  61. end
  62.  
  63. function SuperStarSkills:GetExceptionsPointsSpentInAbility(skillType, skillLineIndex, skillLineName, abilityIndex)
  64.  
  65.     -- Using SkillLines because thoses skilllines can or cannot be unlocked
  66.    
  67.     local exceptionList = {}
  68.    
  69.     exceptionList[SKILL_TYPE_WORLD] = {}
  70.     exceptionList[SKILL_TYPE_WORLD][2] = {}
  71.     exceptionList[SKILL_TYPE_WORLD][2][2] = true -- Soul Magic SoulTrap
  72.     exceptionList[SKILL_TYPE_WORLD][4] = {}
  73.     exceptionList[SKILL_TYPE_WORLD][4][1] = true -- WW Ultimate
  74.    
  75.     exceptionList[SKILL_TYPE_GUILD] = {}
  76.     exceptionList[SKILL_TYPE_GUILD][1] = {}
  77.     exceptionList[SKILL_TYPE_GUILD][1][1] = true -- Blade of Woe
  78.     exceptionList[SKILL_TYPE_GUILD][4] = {}
  79.     exceptionList[SKILL_TYPE_GUILD][4][1] = true -- Finders keepers
  80.    
  81.     exceptionList[SKILL_TYPE_RACIAL] = {}
  82.     exceptionList[SKILL_TYPE_RACIAL][1] = {}
  83.     exceptionList[SKILL_TYPE_RACIAL][1][1] = true -- 1st Racial passive
  84.    
  85.     exceptionList[SKILL_TYPE_TRADESKILL] = {}
  86.    
  87.     exceptionList[SKILL_TYPE_TRADESKILL][1] = {}
  88.     exceptionList[SKILL_TYPE_TRADESKILL][1][1] = true -- 1st Alchemy passive
  89.    
  90.     exceptionList[SKILL_TYPE_TRADESKILL][4] = {}
  91.     exceptionList[SKILL_TYPE_TRADESKILL][4][1] = true -- 1st Enchanting passive
  92.     exceptionList[SKILL_TYPE_TRADESKILL][4][2] = true -- 2nd Enchanting passive
  93.    
  94.     exceptionList[SKILL_TYPE_TRADESKILL][6] = {}
  95.     exceptionList[SKILL_TYPE_TRADESKILL][6][1] = true -- 1st Woodworking passive
  96.    
  97.     local _, blackSmithing = GetCraftingSkillLineIndices(CRAFTING_TYPE_BLACKSMITHING)
  98.     if blackSmithing == 5 then -- FR, DE
  99.         exceptionList[SKILL_TYPE_TRADESKILL][2] = {}
  100.         exceptionList[SKILL_TYPE_TRADESKILL][2][1] = true -- 1st Clothing passive
  101.        
  102.         exceptionList[SKILL_TYPE_TRADESKILL][3] = {}
  103.         exceptionList[SKILL_TYPE_TRADESKILL][3][1] = true -- 1st Provisionning passive
  104.         exceptionList[SKILL_TYPE_TRADESKILL][3][2] = true -- 2nd Provisionning passive
  105.        
  106.         exceptionList[SKILL_TYPE_TRADESKILL][5] = {}
  107.         exceptionList[SKILL_TYPE_TRADESKILL][5][1] = true -- 1st Blacksmithing passive
  108.     else
  109.         exceptionList[SKILL_TYPE_TRADESKILL][3] = {}
  110.         exceptionList[SKILL_TYPE_TRADESKILL][3][1] = true -- 1st Clothing passive
  111.        
  112.         exceptionList[SKILL_TYPE_TRADESKILL][5] = {}
  113.         exceptionList[SKILL_TYPE_TRADESKILL][5][1] = true -- 1st Provisionning passive
  114.         exceptionList[SKILL_TYPE_TRADESKILL][5][2] = true -- 2nd Provisionning passive
  115.        
  116.         exceptionList[SKILL_TYPE_TRADESKILL][2] = {}
  117.         exceptionList[SKILL_TYPE_TRADESKILL][2][1] = true -- 1st Blacksmithing passive
  118.     end
  119.    
  120.     local skillLineConverter = {
  121.         [LSF:GetSkillLineInfo(SKILL_TYPE_WORLD, 2)] = 2,
  122.         [LSF:GetSkillLineInfo(SKILL_TYPE_WORLD, 4)] = 4,
  123.        
  124.         [LSF:GetSkillLineInfo(SKILL_TYPE_GUILD, 1)] = 1,
  125.         [LSF:GetSkillLineInfo(SKILL_TYPE_GUILD, 4)] = 4,
  126.     }
  127.    
  128.     if exceptionList[skillType] then
  129.         if skillType == SKILL_TYPE_GUILD or skillType == SKILL_TYPE_WORLD then
  130.             skillLineName = zo_strformat(SI_SKILLS_TREE_NAME_FORMAT, skillLineName)
  131.             if exceptionList[skillType][skillLineConverter[skillLineName]] then
  132.                 if exceptionList[skillType][skillLineConverter[skillLineName]][abilityIndex] then
  133.                     return 1
  134.                 end
  135.             end
  136.         else
  137.             if exceptionList[skillType][skillLineIndex] then
  138.                 if exceptionList[skillType][skillLineIndex][abilityIndex] then
  139.                     return 1
  140.                 end
  141.             end
  142.         end
  143.     end
  144.    
  145.     return 0
  146.    
  147. end

Rhyono 12/06/17 02:30 PM

Quote:

Originally Posted by Dolgubon (Post 33319)
skyshards (GetNumSkyShards())

From memory, I'm going to say that function returns 0-2 (based on level of completion towards next point) NOT the sum total you've found. But I'm pretty sure the folium isn't treated as skyshards anyway.

Dolgubon 12/06/17 03:01 PM

Yeah looks like that's what it does.

You'll need to exhaustively count skillpoints, then.

fritzOSU03 12/06/17 04:11 PM

Quote:

Originally Posted by Ayantir (Post 33320)
Counting skill points is a bit hard.

I've noticed, haha.

Quote:

Originally Posted by Dolgubon (Post 33323)
You'll need to exhaustively count skillpoints, then.

Yeah, I've put together some of the functionality but the numbers never quite match up. I believe it has to do with morphs (especially after seeing Ayantir's functions) and some of the default passives and abilities.


For now I have a complete addon showing all of the available skill points in the game from all sources besides the Folium. Until I get that part figured out, I may just decrement the available total by two and call it a day. Or I could give it a menu setting per character as another option. You'd think there would be a function call in the API like GetEarnedSkillPoints() to make life simple. :confused:

fritzOSU03 12/06/17 04:18 PM

Here's a look at where I left off with that idea once I realized that some points weren't counting correctly.

Lua Code:
  1. local function USPF_SetFoliumDiscognitumPoints()
  2.     local skillPoints = GetAvailableSkillPoints()
  3.     for skillType = 1, GetNumSkillTypes() do
  4.         for skillLine = 1, GetNumSkillLines(skillType) do
  5.             for ability = 1, GetNumSkillAbilities(skillType, skillLine) do
  6.                 if GetSkillAbilityUpgradeInfo(skillType, skillLine, ability) ~= nil then
  7.                     skillPoints = skillPoints + GetSkillAbilityUpgradeInfo(skillType, skillLine, ability)
  8.                 else
  9.                     _, _, _, _, _, purchased = GetSkillAbilityInfo(skillType, skillLine, ability)
  10.                     skillPoints = (purchased and skillPoints + 1 or skillPoints)
  11.                 end
  12.             end
  13.         end
  14.     end
  15.    
  16.     local skillPointsDiff = USPF.pointsData.ptsLevel + USPF.pointsData.ptsMainQuest + USPF.pointsData.ptsMorrowindCharacter +
  17.             USPF.pointsData.ptsAvALevel + USPF.pointsData.ptsMaelstrom + USPF.pointsData.ptsQuestTotal +
  18.             USPF.pointsData.ptsSkyshardTotal + USPF.pointsData.ptsGroupDungeonTotal + USPF.pointsData.ptsPDGBTotal
  19.     USPF.pointsData.ptsFoliumDiscognitum = (skillPoints == skillPointsDiff - 2 and 2 or 0)
  20.     end
  21. end

Dolgubon 12/06/17 05:38 PM

Have you taken a look at the addon SpentSkillPoints?

For discrepencies, if you got rid of werewolf or vampirism that could be where some missing skill points are.


All times are GMT -6. The time now is 06:36 AM.

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