Quantcast
Download
(22 Kb)
Download
Updated: 05/12/16 06:55 AM
Compatibility:
Dark Brotherhood (2.4)
Thieves Guild (2.3)
Updated:05/12/16 06:55 AM
Created:04/16/15 09:31 PM
Monthly downloads:36
Total downloads:1,273
Favorites:3
MD5:
LibSkillsFactory
Version: 6
by: Ayantir [More]
LibSkillsFactory is an ingame library which let you get access to Skills information that the current player cannot have access to.

The actual limitations of the API prevents you to get data of skills you don't know. This include :
  • Get data of a passive skill at rank X-n or X+n (in that case n >1).
  • Get data of a skillLine unlocked (Vampire, Werewolf, Legerdemain, other classes, other races).

LibSkillsFactory break those limitations and give you some functions to grab data from it.


How it works :

First, enable it with LibStub :

Lua Code:
  1. local LSF = LibStub("LibSkillsFactory")


Then, init the factory.
It's necessary because the factory does not accept multi classes or multi races. But you can hack it if you want it. (please let me know, first).

Lua Code:
  1. -- Init the factory like this :
  2. -- Class is ClassID : 1,2,3,6
  3. -- Races MUST be : 1 Breton, 2 Redguard, 3 Orc, 4 Altmer, 5 Bosmer, 6 Khajiit, 7 Dunmer, 8 Argonian, 9 Nordic, 10 Imperial
  4. LibSkillsFactory:InitSkillFactory(GetUnitClassId("player"), 1)



Then use your functions :


LibSkillsFactory:GetAbilityType(skillType, skillLineIndex, abilityIndex)
  • Returns : abilityType, maxRank
  • abilityType is 0 for Ultimates, 1 for active skills, 2 for passives skills
  • maxRank is nil or 2+. If nil and abilityType is passive (2) consider 1. Ultimates and Active skills always returns nil.


LibSkillsFactory:GetAbilityInfo(skillType, skillLineIndex, abilityIndex, abilityLevel)
  • Returns : earnedAt, texturePath
  • earnedAt is the skillLine level needed in order to learn the skill
  • texturePath is the path of the skill texture
  • Please note that for now, some Vampire passive and Legerdemain passives returns 69 for earnedAt, because I still don't get the info. See you soon.


LibSkillsFactory:GetSkillLineInfo(skillType, skillLineIndex)
  • Returns : name
  • name is the name of the skillLine


LibSkillsFactory:GetAbilityId(skillType, skillLineIndex, abilityIndex, abilityLevel, rank)
  • Returns : abilityId
  • abilityId is the ID of the skill.
    Please note : abilityLevel is the rank of a passive skill. abilityLevel is for ultimates : 0 for base skill, 1 for upper morph, 2 for lower morph. rank is the active/ultimate rank of the skill (1/2/3/4).


LibSkillsFactory:GetNumSkillLines(skillType)
  • Returns : numSkillLines
  • numSkillLines is the number of skillLines of a skillType


LibSkillsFactory:GetNumSkillAbilities(skillType, skillLineIndex)
  • Returns : numAbilities
  • numSkillLines is the number of abilities of a skillType / skillLineIndex
v6
======
- Skills update reflecting changes in Dark Brotherhood DLC
- Dark Brotherhood is now Guild 1 (Fighters 2, Mages = 3, Thieves = 4, Undaunted = 5)

v4
======
- Skills update reflecting changes in Thieves Guild DLC
- RaceId changed conforming to the new function GetUnitRaceId(unitTag) : -- 1 Breton, 2 Redguard, 3 Orc, 4 Dunmer, 5 Nord, 6 Argonian, 7 Altmer, 8 Bosmer, 9 Khajiit, 10 Imperial
- SkillLine names are now initialized into the library
- Undaunted skillline is now SKILL_TYPE_GUILD > 4
- Thieves Guild skillline is SKILL_TYPE_GUILD > 3

v3
======
- Skills update reflecting changes in Imperial City and Orsinium DLC

v2
======
- Assault and Emperor icons were inverted, fixed
- Imperial racial skillline had the bretons icons, fixed
- maxRank of Undaunted passive skills were badly set. fixed.
- Added few legerdemain earnedRanks.
Optional Files (0)


Archived Files (4)
File Name
Version
Size
Author
Date
4
21kB
Ayantir
03/14/16 07:58 AM
3
20kB
Ayantir
12/07/15 06:46 AM
2
20kB
Ayantir
05/06/15 07:30 PM
1
20kB
Ayantir
04/16/15 09:31 PM


Post A Reply Comment Options
Unread 05/13/16, 10:43 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 849
File comments: 1281
Uploads: 30
Originally Posted by Baertram
Thanks for the work in this library!

A question about the init of the factory:


Is there a function to get the current character's race as well, like
Lua Code:
  1. GetUnitRaceId("player")
?
As it's written in lib :

Lua Code:
  1. -- Class is ClassID : 1 (Dragon Knight), 2 (Sorcerer), 3 (Nightblade), 6 (templar) -- GetUnitClassId()
  2. -- Races MUST be : 1 Breton, 2 Redguard, 3 Orc, 4 Dunmer, 5 Nord, 6 Argonian, 7 Altmer, 8 Bosmer, 9 Khajiit, 10 Imperial -- GetUnitRaceId()
  3.  
  4. -- Init the factory ~like this :
  5. -- LibSkillsFactory:InitSkillFactory(GetUnitClassId("player"), GetUnitRaceId("player"))

Don't forget to update, because raceId changed since this version.
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Report comment to moderator  
Reply With Quote
Unread 05/13/16, 09:01 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1101
File comments: 1011
Uploads: 42
Thanks for the work in this library!

A question about the init of the factory:
-- Init the factory like this :
-- Class is ClassID : 1,2,3,6
-- Races MUST be : 1 Breton, 2 Redguard, 3 Orc, 4 Altmer, 5 Bosmer, 6 Khajiit, 7 Dunmer, 8 Argonian, 9 Nordic, 10 Imperial
LibSkillsFactory:InitSkillFactory(GetUnitClassId("player"), 1)
Is there a function to get the current character's race as well, like
Lua Code:
  1. GetUnitRaceId("player")
?
Report comment to moderator  
Reply With Quote
Unread 03/14/16, 08:02 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 849
File comments: 1281
Uploads: 30
Even if this is unused, little update

Please note that LibSkillsFactory:GetNumSkillLines(SKILL_TYPE_AVA) now returns 2. I dropped Emperor skillline support to be ~ compliant with myself.

LibSkillsFactory:GetNumSkillLines(SKILL_TYPE_GUILD) now returns 4.

Undaunted has been moved to the 4th skillLine in SKILL_TYPE_GUILD.

Here are the new TG skills : (SKILL_TYPE_GUILD, the 3rd).

Lua Code:
  1. [1] = {["mx"] = nil,["skillPool"] = {[1] = {["id"] = 74580,},},["at"] = 2,},
  2. [2] = {["mx"] = 4,["skillPool"] = {[1] = {["id"] = 76454,},[2] = {["id"] = 76455,},[3] = {["id"] = 76456,},[4] = {["id"] = 76457,},},["at"] = 2,},
  3. [3] = {["mx"] = 4,["skillPool"] = {[1] = {["id"] = 76458,},[2] = {["id"] = 76459,},[3] = {["id"] = 76460,},[4] = {["id"] = 76461,},},["at"] = 2,},
  4. [4] = {["mx"] = 1,["skillPool"] = {[1] = {["id"] = 76451,},},["at"] = 2,},
  5. [5] = {["mx"] = 1,["skillPool"] = {[1] = {["id"] = 76452,},},["at"] = 2,},
  6. [6] = {["mx"] = 1,["skillPool"] = {[1] = {["id"] = 76453,},},["at"] = 2,},
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Last edited by Ayantir : 03/14/16 at 08:02 AM.
Report comment to moderator  
Reply With Quote
Unread 12/07/15, 06:51 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 849
File comments: 1281
Uploads: 30
Even if this is unused, little update

Please note that LibSkillsFactory:GetNumSkillLines(SKILL_TYPE_AVA) still returns 3 even if Emperor skillline has been dropped in IC patch.

Updates are :

Emperor skillline : dropped
Khajiit : new abilityId due to changes
Cooking : 4th rank for 1st ability
Blacksmithing : 10th rank for 1st ability
Clothing : 10th rank for 1st ability
Woodworking: 10th rank for 1st ability
Enchanting: 10th rank for 2nd ability
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Report comment to moderator  
Reply With Quote
Unread 08/22/15, 07:57 AM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 849
File comments: 1281
Uploads: 30
Hey there, i've almost finished to update the library for the update. few things, mainly the new racials and alliance war reorganization

I'll maybe add some new functions if it could help in some addons. Maybe broke stealth, I would like to see an addon when stealthed which indicate me if the skill I will cast will broke my stealth state.

Some earning ranks of weapons are buggy, I'd also fix them if I got time, I thinked they're same for alls, but no -_-
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Report comment to moderator  
Reply With Quote
Unread 04/16/15, 09:39 PM  
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view AddOns

Forum posts: 849
File comments: 1281
Uploads: 30
Hello here,

So LibSkillsFactory is not really a library, it's almost used in addon SuperStar because I needed info of others classes without playing with them.
Please note that the data was collected ingame. It's not a copy paste of a website. 100% made with PTS and ingame functions.

Feel free to use it.

For more info to see how it works, just look at SuperStar.

If you want to know how I build it, it's just a compilation of some ingame api functions, good chars, skill points sets and a lot of regex with notepad++
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: