White model texture help
Hello.
I'm currently making my first WoW Addon. This addon will show a dialog message like the "Talking head messages" if the Shadow priest weapon Xal'atath whispers you. This works quite well, and even though I still need to fix some issues, and add some config options, I'm getting there. Now, the problem is that I'm displaying a 3D model of the weapon - but since it has several textures, it's shown as a white model. I hope someone can help me with this. Here's the cde for showing the model: local modelFrame = CreateFrame("Frame", nil, UIParent) modelFrame:SetPoint("Center", - 580, 300) modelFrame:SetWidth(200) modelFrame:SetHeight(200) modelFrame:SetAlpha(0) local model = CreateFrame("PlayerModel", nil, modelFrame) model:SetModel("item\\objectcomponents\\weapon\\knife_1h_artifactcthun_d_01.m2") model:SetAlpha(1) model:SetRotation(1) model:SetAllPoints(modelFrame) model:SetCustomCamera(1) //Maaggel |
This may work for you:
Code:
local modelFrame = CreateFrame("Frame", nil, UIParent) |
Quote:
Thank you so much!.. Where do you get the item id from? I'm planning on making this work for all the Artifact weapons that whisper you - and perhaps the whispers from raid bosses. //Maaggel |
Quote:
item=128827 Wowhead is an amazing place to look ID/Names up. :cool: Also here is the list of live artifact weapons. http://www.wowhead.com/artifact-rarity-weapons |
Quote:
But i guess it's not possible to get the other appearances and skins of the artifact weapons then? I see I can find the item id by using: GetInventoryItemID("player", GetInventorySlotInfo("MainHandSlot")) This should make it quite alot easier for adding the other weapons :) And than you for the great help :) //Maaggel |
Last I heard WoW api is a little bit weird when it comes to artifact appearances, and addons couldn't properly access them.
Correct me if I'm wrong and that has changed recently, but I know MogIt couldn't properly support alternate artifact skins/appearances precisely because of that. |
1 Attachment(s)
Quote:
The artifact weapons does work in a slightly different way than the usual things, so guess I'll just stick with the base skin and model for the dialogue. Perhaps I'll add an image version instead that I can then switch depending on the artifact weapon configuration. But thank you very much for the help :) Now all I need to add is: - Config options and a mover on "/sw move" command - Close button - Blurry background like the current talking head dialogue. If anyone got any hints for what the "Talking head dialogue" background texture path is, or how I make a mover, please do tell :) You can see an attached image of the addon as it is right now. |
Interface/QuestFrame/TalkingHeads.blp
How it is used: https://www.townlong-yak.com/framexm...sInfo.lua#3602 https://www.townlong-yak.com/framexm...gHeadUI.xml#58 I don't know how it would be done in pure lua, sorry. I don't know xml so I can't help with it. This addon has really nice and understandable code for config options that you can probably take inspiration from: https://mods.curse.com/addons/wow/work_complete For the mover: https://wow.gamepedia.com/Making_draggable_frames Close button I can't directly help with, but you can probably look around at other addons that re-use the default Blizzard close button. I know Classic Quest Log uses it, but it does it in xml/lua. If you're comfortable with xml you can probably check that. Otherwise surely there's a pure lua addon out there with a close button you can look at. ;p |
You can do an addon in strictly Lua. BUT, XML comes in handy when defining templates for the frames (IF I understand it correctly). It doesn't seem to be that difficult to read XML, but writing it could be something else.
I don't, personally, write either one of those languages. I know what it says under my avatar, but the plug-ins that I "wrote" are, really, just copy-n-paste work. The graphics were the tough part (and they are simple graphics). :o |
Code:
local close = CreateFrame("Button", "$parentCloseButton", parentframe, "UIPanelCloseButton") |
2 Attachment(s)
Quote:
I found the textures I needed, and I've migrated all frames to the XML structure instead of doing it in LUA :) I havn't added the mover yet, but that will be the next thing I'll do :p Quote:
Quote:
You can see the new version attached here :D I've attached an actual example of Xal'atath whispering me aswell Again, thank you guys so much for the help! I'm fairly close to the first version that I'm gonna release :) |
You're welcome, I'm sure. Glad to help (even if it's an infinitesimally small amount of help :o).
One thing - it's "Lua", not "LUA". It is a Portuguese word, not an anagram, which means "moon". Sorry, but, that sets my teeth on edge. |
Nice, glad you were able to figure it all out just from reading Blizzard's code, without needing more help understanding the code :p 'cause I wouldn't have been able to, haha.
|
All times are GMT -6. The time now is 09:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI