Quantcast White model texture help - WoWInterface
Thread Tools Display Modes
10-21-17, 09:55 AM   #1
Maaggel
A Murloc Raider
Join Date: Oct 2017
Posts: 5
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
  Reply With Quote
10-21-17, 02:38 PM   #2
Vrul
A Cobalt Mageweaver
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 235
This may work for you:
Code:
local modelFrame = CreateFrame("Frame", nil, UIParent)
modelFrame:SetPoint("Center", - 580, 300)
modelFrame:SetSize(200, 200)

local model = CreateFrame("DressUpModel", nil, modelFrame)
model:SetAllPoints()
model:SetItem(128827)
model:SetRotation(math.pi / 2)
  Reply With Quote
10-21-17, 03:27 PM   #3
Maaggel
A Murloc Raider
Join Date: Oct 2017
Posts: 5
Originally Posted by Vrul View Post
This may work for you:
Code:
local modelFrame = CreateFrame("Frame", nil, UIParent)
modelFrame:SetPoint("Center", - 580, 300)
modelFrame:SetSize(200, 200)

local model = CreateFrame("DressUpModel", nil, modelFrame)
model:SetAllPoints()
model:SetItem(128827)
model:SetRotation(math.pi / 2)
It works perfectly
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
  Reply With Quote
10-21-17, 03:47 PM   #4
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 238
Originally Posted by Maaggel View Post
It works perfectly
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
http://www.wowhead.com/item=128827/x...e-black-empire

item=128827

Wowhead is an amazing place to look ID/Names up.

Also here is the list of live artifact weapons.
http://www.wowhead.com/artifact-rarity-weapons
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.

Last edited by Kkthnx : 10-21-17 at 03:49 PM.
  Reply With Quote
10-21-17, 04:17 PM   #5
Maaggel
A Murloc Raider
Join Date: Oct 2017
Posts: 5
Originally Posted by Kkthnx View Post
http://www.wowhead.com/item=128827/x...e-black-empire

item=128827

Wowhead is an amazing place to look ID/Names up.

Also here is the list of live artifact weapons.
http://www.wowhead.com/artifact-rarity-weapons
Ah, nice.
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 edited by Maaggel : 10-21-17 at 04:52 PM.
  Reply With Quote
10-22-17, 12:12 AM   #6
Ammako
A Wyrmkin Dreamwalker
 
Ammako's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 56
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.
__________________
I get moody during that time of the month. You know, with the full moon and all.
  Reply With Quote
10-23-17, 02:24 AM   #7
Maaggel
A Murloc Raider
Join Date: Oct 2017
Posts: 5
Originally Posted by Ammako View Post
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.
Hmm, that makes sense.
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.
Attached Thumbnails
Click image for larger version

Name:	Dialogue.JPG
Views:	45
Size:	50.6 KB
ID:	9005  
  Reply With Quote
10-23-17, 11:37 AM   #8
Ammako
A Wyrmkin Dreamwalker
 
Ammako's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 56
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
__________________
I get moody during that time of the month. You know, with the full moon and all.

Last edited by Ammako : 10-23-17 at 11:51 AM.
  Reply With Quote
10-23-17, 02:49 PM   #9
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,188
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).
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
  Reply With Quote
10-23-17, 03:12 PM   #10
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 817
Code:
local close = CreateFrame("Button", "$parentCloseButton", parentframe, "UIPanelCloseButton")
close:SetPoint("TOPRIGHT")
Edit: It will close(hide) the frame provided as parentframe.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.

Last edited by Fizzlemizz : 10-23-17 at 03:16 PM.
  Reply With Quote
10-24-17, 02:03 PM   #11
Maaggel
A Murloc Raider
Join Date: Oct 2017
Posts: 5
Originally Posted by Ammako View Post
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
This is great!
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





Originally Posted by jeffy162 View Post
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).
I work as a lead developer, so getting to know this XML structure and LUA have proven to be fairly simple - but all the references etc. are whats holding my project back! So this is great Thank you.





Originally Posted by Fizzlemizz View Post
Code:
local close = CreateFrame("Button", "$parentCloseButton", parentframe, "UIPanelCloseButton")
close:SetPoint("TOPRIGHT")
Edit: It will close(hide) the frame provided as parentframe.
Nice I've added a "Close" button now, and took inspiration in your example, combined with some XML!

You can see the new version attached here
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
Attached Thumbnails
Click image for larger version

Name:	New Popup.JPG
Views:	34
Size:	81.4 KB
ID:	9011  Click image for larger version

Name:	actual.JPG
Views:	35
Size:	114.3 KB
ID:	9012  

Last edited by Maaggel : 10-24-17 at 02:08 PM.
  Reply With Quote
10-24-17, 05:00 PM   #12
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,188
You're welcome, I'm sure. Glad to help (even if it's an infinitesimally small amount of help ).

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.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.

Last edited by jeffy162 : 10-24-17 at 07:04 PM.
  Reply With Quote
10-24-17, 05:55 PM   #13
Ammako
A Wyrmkin Dreamwalker
 
Ammako's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 56
Nice, glad you were able to figure it all out just from reading Blizzard's code, without needing more help understanding the code 'cause I wouldn't have been able to, haha.
__________________
I get moody during that time of the month. You know, with the full moon and all.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » White model texture help

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