Thread Tools Display Modes
02/24/17, 04:18 AM   #1
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Can we have access to buffType?

ZOS already has all the Major and Minor buff effect types assigned global variables (Minor Force, Major Brutality, etc.), but the buffType field in all the events was never coded in the API to return these values to us, so it is always blank and inaccessible to addons.

http://wiki.esoui.com/Globals#BuffType

http://wiki.esoui.com/EVENT_EFFECT_CHANGED

It would be very helpful to cut down on the redundant database maintenance for buff trackers like Srendarr to have access to this info from events, and better still, to get a function like GetAbilityBuffType(abilityID) in the future.

@ZOS_ChipHilseberg any chance of this sir?
  Reply With Quote
02/24/17, 03:21 PM   #2
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
There really isn't anything in the ability data to attach an ability to a specific buff type from the types you mentioned. So the addon lookup tables are the best thing we have right now.
  Reply With Quote
02/24/17, 03:54 PM   #3
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Hey Chip,

Thanks for clarifying. I guess I sort of figured if it was just a matter of adding a pointer to a table you guys would have done it already.

Will be interesting to see how things take shape if the rumors are true and we get some native buff tracking in Morrowind.
  Reply With Quote
02/24/17, 06:20 PM   #4
Solinur
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 78
As written in the chat maybe we should make a lib for this and other "lookup" things related to buffs / procs
  Reply With Quote
02/25/17, 01:09 AM   #5
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
Originally Posted by decay2 View Post
As written in the chat maybe we should make a lib for this and other "lookup" things related to buffs / procs
Sure, that would be cool. Here is a simple function I was using to mine all the Major and Minor effect ability ID's for inclusion in the database:

Code:
local function FindByName(text)
	local matchedIDs = {}
	local compareName
	local auraName = text
	for id = 1, 100000 do -- scan all abilityIDs looking for this auraName
		if (DoesAbilityExist(id) and (GetAbilityDuration(id) > 0 or not IsAbilityPassive(id))) then
			compareName = zo_strformat("<<t:1>>",GetAbilityName(id)) -- strip out any control characters from the ability name
			if (compareName == auraName) then -- matching ability with a duration (no toggles or passives in prominence)
				table.insert(matchedIDs, id)
			end
		end
	end

	if (#matchedIDs > 0) then -- matches were found
		d("-- "..text)
		for _, id in ipairs(matchedIDs) do
			d("["..id.."] = ,")
		end
	end
end

Example use:

FindByName('Minor Force')
...and here's the current Major/Minor db from Srendarr:

Warning: Spoiler
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Can we have access to buffType?

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