stoneharry / WoW-Spell-Editor

A Spell Editor for WoW versions WOTLK 3.3.5, TBC 2.4.3, or Vanilla 1.12.1.
260 stars 119 forks source link

Empty boxes - Spell Visual map (TrinityCore) #201

Closed ornfelt closed 1 year ago

ornfelt commented 1 year ago

Hi, I tried to use the visual spell map on TrinityCore but I can only see small blue white boxes when I use .go xyz 0 0 -15 13.

It seems like the modelid isn't set correctly. I'm not sure why. In the database I can see that the modelid1 is set to the entry of the creature. For example: modelid1 = 150000 where entry = 150000.

Maybe the issue is in the dbc files? I've copied them according to the intstructions.

Thanks!

stoneharry commented 1 year ago

Take one of the boxes. Check its display ID (.npc info).

This display ID maps to CreatureDisplayInfo.dbc.

The CreatureDisplayInfo has a Model Id column that points to CreatureModelData. The creature model data has a model path. Check this is a valid path in your WoW MPQs.

You might find while tracing this through that something is wrong/missing.

ornfelt commented 1 year ago

I tried to backtrack the issue with your description and found that the Path extension in my MPQs are set to .mdx instead of .m2. I fixed that by changing the code a bit so now the modelPath's are correct but there are still only boxes showing up.

I found that there are already existing entries in creaturemodeldata, for example id 2816 with modelPath "SPELLS\ENCHANTMENTS\Sparkle_A.mdx". I compared 150028 and it has the exact same modelPath and I even tried changing other values like setting the same geoBox values as the ones in 2816 but to no avail.

I ran select ID from creaturedisplayinfo where ModelID = 2816; and found that the ID that uses ModelID 2816 is: 25334 and when I tried to update one creature by running: update creature_template set modelid1 = 25334 where entry = 150007; creature 150007 correctly shows up as a spell in game, so I'm still not sure what the issue is.

ornfelt commented 1 year ago

Also, here's some info based on your description: Take one of the boxes. Check its display ID (.npc info). Display ID = 150028.

This display ID maps to CreatureDisplayInfo.dbc. select ModelID from Creaturedisplayinfo where ID = 150028; results in ModelID: 150028.

The CreatureDisplayInfo has a Model Id column that points to CreatureModelData. The creature model data has a model path. Check this is a valid path in your WoW MPQs. After changing the path extension and generating new DBCs, select modelPath from creaturemodeldata where id = 150028; results in "SPELLS\ENCHANTMENTS\Sparkle_A.mdx".

ornfelt commented 1 year ago

I managed to solve it now. Thanks!

stoneharry commented 1 year ago

Would be good to post the solution for other people searching in the future.

The client automatically converts mdx extensions to m2.

ornfelt commented 1 year ago

Agree. Well, I didn't actually apply the client-side patch since it wasn't included in the export directory when using the visual map tab. It had to be exported manually. But it was fun fiddling around. Great work with the program :)