Thread Tools Display Modes
09-13-13, 01:38 AM   #1
Brudarek
A Defias Bandit
Join Date: Dec 2006
Posts: 3
enchant scaling, where's the info hiding?

I'd really like to make a tooltip mod that puts the 'real' value back into all crafting tooltips, and shows the scaled value in '( )', and for crafters, shows the info for each level range (ie. 1-60, 61-70 etc...)

Don't see any additions or changes to the API in 5.4, but that's probably because the crafted item scaling is working the same way as normal casted spells that scale with level.

Does anyone know how to access that information in the game? For example, take a spellID for an enchant and get the value it has for level 60, level 70 etc... ? It seems to relate to 'effects', but I can't find any API that deals with that level of data.

Are we limited by what GetSpellLink or GetSpellinfo will return? Or is there some way to access all of the information/fields in the spell database for a given spellID?
  Reply With Quote
09-13-13, 01:23 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
There is no such API. You'd have to either hardcode the specific value(s) for each level in a table, or reverse-engineer the forumula and calculate the value(s) for each level on the fly.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-14-13, 04:21 AM   #3
Brudarek
A Defias Bandit
Join Date: Dec 2006
Posts: 3
How does the game or wowhead (broken atm, but was working) do it then? I mean it's not just crafting, it's all spells, they all scale by level. There must be some way to, for example, get the heal value for 'flash of light' for any given player level?

I swear looking at the spell database fields you can see with simcraft (yes it can show crafting 'spells') the information is in the 'effect' info, but there's basically no information anywhere about that data. Also possible the variables for the formula are in that spell info.

https://code.google.com/p/simulation...iki/SpellQuery

For example, enchant chest peerless stats 5.3 vs 5.4. You can see where the fixed values were replaced with variables, so how does the game fill in those variables?

Code:
Name             : Enchant Chest - Peerless Stats (id=74250) 
Spell Level      : 300
Cast Time        : 1.5 seconds
Attributes       : .....x.. ........ x....... ........   ........ ..x..... ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
Effects          :
#1 (id=74201)    : Unknown effect type (53)
                   Base Value: 0 | Scaled Value: 0 | Misc Value: 4102 | Misc Value 2: 0xe
Description      : Permanently enchant chest armor to increase all stats by 20.  Requires a level 300 or higher item.
Code:
Name             : Enchant Chest - Peerless Stats (id=74250) [Scaling Spell (-4)] 
Cast Time        : 1.5 seconds
Attributes       : .....x.. ........ x....... ........   ........ ..x..... ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
                 : ........ ........ ........ ........   ........ ........ ........ ........ 
Effects          :
#1 (id=74201)    : Unknown effect type (53)
                   Base Value: 0 | Scaled Value: 20 (avg=0.5) | Misc Value: 4102 | Misc Value 2: 0xe
Description      : Permanently enchant chest armor to increase all stats by $s1.
  Reply With Quote
09-14-13, 05:12 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
Probably by datamining the dbc files.

(which before you ask are inaccessible to the Lua environment)
  Reply With Quote
09-14-13, 09:15 PM   #5
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Addon for that woud be great! Was very confusing since most of my crafters are still 85 and the things show up different for them.
The Scaled things are buged anyway atm
I made Jade Spirit on my 19 twink weapon and it said its sacaled to 60 int for the proc but it did not proc in 5 minutes...
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
09-14-13, 10:28 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Brudarek View Post
How does the game or wowhead (broken atm, but was working) do it then? I mean it's not just crafting, it's all spells, they all scale by level. There must be some way to, for example, get the heal value for 'flash of light' for any given player level?
Yes, but that information is not exposed to addons. Similarly, the game knows exactly where every NPC is standing, but there is no API for addons to get their coordinates; and the game knows exactly where every minimap tracking blip is, but there is no API for addons to find out where they are or that they exist at all.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-15-13, 01:33 AM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,857
Originally Posted by Phanx View Post
Yes, but that information is not exposed to addons. Similarly, the game knows exactly where every NPC is standing, but there is no API for addons to get their coordinates; and the game knows exactly where every minimap tracking blip is, but there is no API for addons to find out where they are or that they exist at all.
You mean the game knows more than we do.... SHOCK, HORROR... life will never be the same .
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
09-20-13, 07:23 PM   #8
Brudarek
A Defias Bandit
Join Date: Dec 2006
Posts: 3
Originally Posted by Fizzlemizz View Post
You mean the game knows more than we do.... SHOCK, HORROR... life will never be the same .
The difference is what is only available from the server vs what is already there in the client files.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » enchant scaling, where's the info hiding?

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