Thread Tools Display Modes
12-17-23, 04:34 PM   #1
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
Extracting default blizz UI

Can't find anything with the search tool on these forums so I'm asking here; I have some basic Lua and XML down; picked up the WoW programming book, but a lot of links are broken or dated. The WoW Interface Tool doesn't exist anymore, and the console commands "exportInterfaceFiles code" or "exportInterfaceFiles art" don't seem to be working
  Reply With Quote
12-17-23, 04:38 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
To Export
You have to make changes to the game launch settings to be able to export and you have to be at the character select screen, not actually in-game to run the export.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
12-17-23, 04:40 PM   #3
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
Thank you so much for fast response. I'll do that now, I'm super excited to get into this!!
  Reply With Quote
12-17-23, 04:46 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
The site linked has the best and latest API information.

Have Fun!
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
12-17-23, 06:47 PM   #5
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
If you linked a site I cannot see it

Do you know any online validator/checker for .xml against the W3C standard or whatever? Forgive me I am not a coder and this language can be difficult to grasp. I would just like to look at the default blizzard UI xml (with Visual Studio) and try to piece together from there, then I'll start making the Bag addon that's in the book (which is very helpful by the way for anyone reading despite some outdated information)
  Reply With Quote
12-17-23, 07:14 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
The site linked in my OP to the extract information. The documentation has moved from WowPedia to Wiki.gg.

There is nothing specific to wow for vaildating XML. For VS try this. It should have links to all the required bits.

You'll want to install BugGrabber and BugSack for in-game debugging (they work together).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-17-23 at 07:19 PM.
  Reply With Quote
12-17-23, 11:01 PM   #7
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
thank you!
  Reply With Quote
12-18-23, 04:17 AM   #8
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
I'm trying to get this red square to appear in the center of the screen per the book, but not working...is there something wrong with this syntax?
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2023-12-18 at 3.14.55 AM.jpg
Views:	55
Size:	91.9 KB
ID:	9861  Click image for larger version

Name:	Screenshot 2023-12-18 at 3.16.14 AM.png
Views:	51
Size:	134.3 KB
ID:	9862  Click image for larger version

Name:	Screenshot 2023-12-18 at 3.16.54 AM.png
Views:	47
Size:	54.9 KB
ID:	9863  
  Reply With Quote
12-18-23, 07:06 AM   #9
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
That looks like visual studio code and they do have a wow api extension available.

I just installed the extension on my newly installed visual studio code ( for unity coding ) and it seems to work but it still seems to have some issues as it reported a few errors which as far as I know aren't a problem ( but I could be wrong ) . Ah .. the errors I am seeing is because it isn't fully set up yet .. ``

Last updated last week so quite recent. With the following known issues.

-- Frame templates are not completely supported, only BackdropTemplate (#15)
-- The Classic (TBC) API is not supported (#13)


** Rereads the post and realises you weren't asking for something like that screen but regarding the code inside *slaps head*
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 12-18-23 at 12:42 PM.
  Reply With Quote
12-18-23, 09:07 AM   #10
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
In RedSquareTest you have
Code:
<Layer setAllPopints="tue" color=...
A Layer describes the DrawLayer it's children will apear in in the parent frame.

The actual square would have to be a
Code:
<Texture ...
element with a size and anchor to place it within the frame.

The same with the CreateFrame version. It would require

Code:
RedSquareTest.Texture = RedSquareTest:CreateTexture(nil, "BACKGROUND")
RedSquareTest.Texture:SetAllPoints()
RedSquareTest.Texture:SetColorTexture(1, 0, 0)
As an aside, where you are using frame = ... you should use local frame = ... (unless you are re-using a previously created local) otherwise you are creating the varable as a global which (if using simple variable names) could overwrite a global from another addon or the Blizzard UI (they all share the same global table and Blizzard will use simple or "meaningful" names for global variables and they use a LOT ot them).
If you need to create globals, make them unique and identifiable by adding something like the name/acronym of your addon (same goes for frame/region names as these are also added to the global table).

As an aside aside. You can use either XML or CreateFrame (in lua code) you don't need both (unless you are creating a virutal or an intrinsic which require XML). There is no real benefit from using one over the other apart from preference.

As an aside aside...aside. Where you use
Code:
local frame = CreateFrame(...)
You can then refer to the frame using frame (while it is in scope) rather than the frame's name. Not every frame/texture/fontstring etc. needs a name).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-18-23 at 10:15 AM.
  Reply With Quote
12-18-23, 11:18 AM   #11
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
thank you so much for being active in this thread and helping me through this, it will take me a few minutes to read all that but stay tuned!
  Reply With Quote
12-18-23, 01:26 PM   #12
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
Do you have a preferred method for viewing the image texture files (like the ones included in the extracted art folder?) The addon Texbrowser (mentioned in the book) doesn't seem to exist anymore, so I have no idea if there is a more categorical/up to date source to which to view this info
  Reply With Quote
12-18-23, 01:43 PM   #13
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
You could try TextureAtlasViewer

If you want to convert from/to .blp/.png then
BLPNGConverter
and/or
BLP2PNG

There's also wow.tools but it's not being maintained these days so...

There also the game (if you know an element through something like /fstack you can often find the associated texture in the code files).

I'm sure there's others.

The game also accepts .png files these days so you're not limited to just .tga or .blp if you're creating your own.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-18-23 at 01:46 PM.
  Reply With Quote
12-18-23, 03:49 PM   #14
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
https://wago.tools is the spiritual successor to wow.tools. There's also this page on wow.tools directing you to alternatives.
  Reply With Quote
12-18-23, 04:15 PM   #15
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
BugSack should be giving you an error because you're missing the end tag for <ui ... as the last thing in the code you posted.

Code:
</Ui>
XML right

Btw, best to post code as code not images as images are impossible to properly test in-game.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-18-23 at 04:18 PM.
  Reply With Quote
12-21-23, 07:09 PM   #16
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
what is wrong with this? I'm trying to use CreateTexture and Texture functions but it keeps returning a nil value

Code:
frame=CreateFrame("Frame", "BagBuddy", UIParent)
BagBuddy:SetWidth(384)
BagBuddy:SetHeight(512)
BagBuddy:SetPoint("CENTER", UIParent, "CENTER")
BagBuddy:SetFrameStrata("HIGH")
BagBuddy:SetFrameLevel(5)
BagBuddy:SetToplevel(true)

BagBuddy.texture1=BagBuddy:createTexture("Interface\\BankFrame\\UI-BankFrame-TopLeft")
BagBuddy.texture2=createTexture("Interface\\BankFrame\\UI-BankFrame-TopRight")
BagBuddy.texture3=createTexture("Interface\\BankFrame\\UI-BankFrame-BotLeft")
BagBuddy.texture4=createTexture("Interface\\BankFrame\\UI-BankFrame-BotRight")

function BagBuddy_OnLoad(self) 
   SetPortraitToTexture(self.portrait,"Interface\\Icons\\INV_Misc_EngGizmos_30") 
end

BagBuddy.title = BagBuddy:CreateFontString("BagBuddy_Title",
"OVERLAY", "GameFontNormal")
BagBuddy.title:SetPoint("TOP", 0, -18)
BagBuddy.title:SetText("BagBuddy")

Last edited by LordMcLordus : 12-21-23 at 07:37 PM.
  Reply With Quote
12-21-23, 07:18 PM   #17
LordMcLordus
A Murloc Raider
Join Date: Mar 2018
Posts: 9
I also have to ask, this is a most inneficient way to learn...the book has a ton of .xml examples but like you posted earlier, it is impossible to verify to know if the code is working or not...I'm not even sure how to get the visual studio interpreter/debugger thing to work correctly, so I just have to resort to the in-game .lua addon

in addition to these even the most mild syntax causes tremendous confusion. How in the world do people learn this?!?!
  Reply With Quote
12-21-23, 07:55 PM   #18
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Code:
frame=CreateFrame("Frame", "BagBuddy", UIParent)
In the .XML example the frame would
Code:
inherit="SomeTemplate"
When using CreateFrame, the 4th argument is used to specify the templates the frame should enherit. Because you didn't include the template, you only created a base "blank" frame.

You seem to be trying to "re-create" the template in .lua which is doable but you would need to follow ALL the frames/regions and attributes of the template (notably, the .portrait texture at least is missing so SetPortraitToTexture() will fail).

Pretty much every attribute used in XML has an equivalent method to use with .lua code (usually [frame]:Setxxx()). The Wiki and game UI code is the best resource along with other addons. Templates are a bit different (like the frame name) because they have to be applied when the frame is created.

With createTexture(), this just created a base "blank" texture. You would need too

Code:
BagBuddy.texture1=BagBuddy:CreateTexture() -- Create the texure
BagBuddy.texture1:SetTexture("Interface\\BankFrame\\UI-BankFrame-TopLeft") -- Set it to show
BagBuddy.texture1:SetSize(xx, xx) -- give it a size
BagBuddy.texture1:SetPoint("TOPLEFT")-- Anchor to something (it's parent by default)
You can use multiple anchors instead of sizing. The same approach goes for any widget (FontStrings...).

Lua is case sensitive so while an XML attibute will use camel case, .lua Set methods don't xxx:SetSomeAttribute()

Also, should use:
Lua Code:
  1. local frame=CreateFrame("Frame", "BagBuddy", UIParent)
Where the local declaration prevents cluttering up the global table especially with such a common name for a variable such as frame.

How in the world do people learn this?!?!
Time and practice and not assuming that just because it's for a game, it's going to or should be "easy". Not trying to be mean, many people (especially if comming from other programming languages) make this assumption.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-21-23 at 08:17 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Extracting default blizz UI


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