Enchants, spell vs itemid

API Discussion
Hey all, I know I've brought this to everyones attention before but when retrieving a characters information it returns a spellid of the enchant. How can I get the itemid or even associated the spellid with an itemid. I've been attempting to solve this problem for a few days now and nothing is really popping up other than manually entering all the enchants spellids\assocaited itemids\and enchant names into a table and getting the information that way. This seems like an excessive way of doing things. Any help?

actually it dosent even for most of them return the spell_id but the effect id
as you see my rings have
"tooltipParams": {
"enchant": 5297

on them and if you look at http://www.wowhead.com/spell=5297 it does not exist
came from
and the effect is
(see Enchant Item: +30 Haste (5297) )

thus making it almost impossible from the api to attach enchants to people ><
So what you're saying is the only real way to do it currently is to create a table with all the associated affects?

if so... has anyone already done this by chance... what a pain!
i started one .. but it proved way to complicated to extract the information from the game files and with the file system change you cant access the game database files any more to pull this info ..
Here's the lookup table which TSM users:

In a comment at the top, you can see the javascript which we used to generate the list from this Wowhead page:

You can easily tweak that javascript to generate the lookup table in whatever format you want, or just do some processing on the Lua lookup table to get it into an appropriate form for your language of choice.
That's awesome Sapu, thanks for saving me a headache!!

also I use your TSM addon and fantastic job on it... hope you don't quit working on it any time soon :P
so i was bored
and i hope this dosent double post


effect id to wow enchant text
i think what the OP is on about is something down the lines of this old topic but updated to include all of the new enchants.


i remember using that myself and still to this day cant find a way automaticly via the blizzard api to make a list of "effectid > effectstats > spellid > itemid > name > icon"

i tried the wowhead JS linked above but still no back linking to the effectid itself. even combing the 2 lists provided in this topic is not helpful as again no way to define which goes where.
my list would more or less be for tooltip info adding the "Enchanted: +30 Versatility" on to items but no there is no official way to do it my list is generated from in game processing the enchanting tradeskill
Yea essentially the ideal solution would be to combine the two lists but not clear way of doing that currently.

Ulminia, did you create that list by hand or did you use a script to generate it? perhaps i can combine the two if I know how the second one was created.
After reading this it looks like someone provided the spreadsheet with the older enchant son them, saves a ton of work but I'm still curious on how you came up with your list Ulminia... i'd like to have an "automated" process for creating this enchant list.
there was no automated process i dumped in game data processed it with php and then by hand and encoded it to json took about 40 min
Yea I downloaded that older spreadsheet as a csv and wrote a dirty script to parse and insert the effectid into a database based off Sapu's inital post using the spellid as the key value.

Worked ok but I need to make sure the data is somewhat accurate and of course add the new enchants.

When I'm done verifying the data and making sure it's as accurate as possible I post it here for anyone else to save them a headache.
Ulminia, do you mind if I add your gist to the Community Created Libraries & Resources thread? If you're not interested in maintaining it I can call out that was created on X date and is not maintained.

Of course if you'd rather not have it I won't include it :D
go ahead and add it ial update it when its needed
Hadn't had a chance in the last two days to work on my personal items but manage to complete the tables.

Basically what I did was I modified Sapus code and inserted said information into a table. I then downloaded the older excel work sheet from https://docs.google.com/spreadsheets/d/1bJAbERWg7SaBuVQLhYUCiZkAB-VL_cMBY-Rx4YKNpII/edit#gid=0 and wrote a dirty php script that would parse the file, then lookup the enchant by spell id, if found would insert the effect id into the column. Then wrote another quick dirty script to parse the names and insert the type of enchant into the slot columns so that all you have is the name in the enchant column.

I also had to manually find the new enchants effectids and enter them, luckly there are only about 30 of those... The only part I had to do manually so no complaints.

Here's the gist with my current professions_enchanting dump, should be self explanatory:


My end results: http://shawnabshire.com/profile.png
PS: If you do notice any errors please message me, I'd like to keep this table as updated as possible to prevent future headaches for other people. Was a lot of work just to be able to display the proper enchant names.

Also, It's currently missing DK enchants and Scopes for hunters... will work on that soon and updated this thread.
Delilya, I'll also throw your SQL gist on the community contribs unless you object :D
No objections, was posting it on here with the intent of preventing other people from having to do the same thing :)
I've exported all of the known mappings we've ever seen on our site; hopefully someone else will find this useful for mapping enchantid to text (until we can get something in the api to do this for us).



Join the Conversation

Return to Forum