Using Earth to create a QuestLog Earth ( AddOn ) , a FrameXML library , is useful for rapidly creating Frames in WoW . By using Earth , it is possible to create a fancy quest log rather quickly . I ' ll go through the simple steps here . I will assume you already know how to create an addon and fill - in an example . toc file . You should also know how to specify a dependency in the . toc . You should also know how to use getglobal ( ) . Summary . The goal of this tutorial is to create a fancier quest log . Using the tools provided by Earth ' s Tree template , along with the functions available in Sea and Chronos , we ' ll be able to show a complete list of the player ' s quests with very little trouble . Creating the XML file . The first step is to create the XML file . Normally , I just copy my favourite AddOn ' s Ui tag , then work from there : Once you have that , the next stage is to setup your localization and code files . Having an independent localization . lua file will make it exceptionally easier for the lovable Frenchies and swanky Swedes to translate your AddOn into their mother tongue . This goes inside the Ui tag : The next stage is to setup the window for the frame ! Because we ' re inheriting from an Earth frame , we don ' t need to specify the default background texture . This works great for simple mods , like this quest log . At this point , our Frame looks like this : < br clear = all > Woo hoo ! Wasn ' t that easy ? Okay , next we need to add an EarthTree . This will let us render information from a table to a nice , collapsable list ( up to a decent limit ) . First , we add a < Frames > tag to the PartyQuestsFrame . Then we stick the EarthTree frame inside of it . You may have noticed that I placed it at a very specific x / y set . I got those through experimentation . However , if you find yourself getting frustrated , I recommend you try the following trick : Place that code snippet inside of the frame you are trying to position . This will force the entire frame to be colored green . You can then use this green box to help position the frame correctly and ensure your hit rectangles are 100 % correct . You can disable it by setting a = " 0 . 0 " . Now , for the next stage , we need to specify something to load the actual data into the EarthTree . So , first things first , we add the event handler to the PartyQuestsFrame . Starting the Code . Then , going into our PartyQuests . lua file , we create : First , we move the + All frame a bit to the right , then hide the Exit Button and set the Title text . This just makes it look nicer . Next , we add the dummy function : EarthTable _ LoadTable will put the data into the tree . Once the data is inside we don ' t need to call LoadTable unless the data changes . Then EarthTree _ UpdateFrame will draw the information to the screen . For the sake of speed , I ' m going to pass on screenshotting this . Try it out ! Parsing the Player ' s Quest List . The next step is to create a table which contains all of the Quests a player has . This part is kind of complicated , but I am probably going to commit my function to Sea , so you don ' t have to worry about the details too much . First thing , write the function to get all of the information from the game . Everything looks great , right ? Uh oh ! Whats this ? We had to call ExpandQuestHeader to ensure we got all of the quests . This means the player ' s collapsed quests will be expanded . He won ' t like that , so first thing we do is create a function to keep track of all of his collapsed quests and a function to re - collapse them when done . We also want to make sure no other function tries call us for an update while we ' re still parsing the information . ( For you advanced programmers , I ' m making sure my code is thread - safe ) . We add a bit called " PartyQuests _ CurrentlyGettingQuestData " to ensure we can ' t call this funcion before it is finished . Whew ! Okay . Next we implement those two quick functions : Displaying the Quest List . Hey , that wasn ' t so bad ! Just a couple of loops . We ' ve saved a lot of frustration from our user ' s end , too ! Okay , so now we have a fancy function to get all of the quests for the current player . Let ' s use this instead of our dummy data . We ' ll do this by moving all of the update code into another function : Then we ' ll add something to the PartyQuests _ Frame _ OnLoad ( ) function : Chronos . afterInit is a really nice tool , that lets us do something after the game - world has started . In our case , its populating our quest list and refreshing . Using code like this helps ensure we run into fewer errors , but we need to change all of the this references into frame references . So reload and you ' ll see that will cause the EarthTree to parse our tree by type , as well as create sublists for all of the members of this table . Check out the result ! Not bad , eh ? Rendering Complex Trees . However , we ' re no slaves to simplicity , we ' re real coders , out to make life easier for our users . So we persist on , to make it even better . The first step is to convert our data - tree into an enhanced tree . The enhanced tree format for Earth ( AddOn ) is pretty complicated , but you can find out more about it by reading the EarthTree . lua file . Let ' s write a function to make an enhanced tree out of the simple one : Then , change the function to use the LoadEnhanced call : There . This is a lot to soak up , but basically , every entry in the Earth EnhancedTree format has an entry called " children " , which determines what elements go inside of it . " title " is the main text , " right " is the extra text on the right , " tooltip " is what appears when you mouse it over and onClick is what happens when you click it ! Here ' s the result : Ooh ! That was nice . However , it was kind of bland . All that white . So lets spice it up with some color . We ' re going to use the function the default QuestLog uses to set its colors . That will ensure we don ' t need to change our code if Blizzard changes theirs . Doesn ' t that look pretty ? But it still not enough . We need to complete this masterpiece by improving upon the original . Let ' s make use of that spiffy localization . lua file . Open it up and add the following : These are a couple of formatting strings that will help us make the Enhanced Tree look even better . " string . format " is another really nice function , that you can find more about over at http : / / www . lua . org , check out their documentation . These strings allow us to format those tags we ' d like changed very quickly . Plus , if a different country prefers to use a different format , we can update it just by changing the localization . lua file . Beautiful . A work of art and it only took us about an hour to do . If you ' d like to extend this work , you can set all of those onClick entries to do something more advanced than just print out a message . Likewise , you can make checkboxes show up by adding " checked = true " to each entry . Rendering the Actual Quest Text . If you wish to see how to create the actual QuestLog , check out . Its a bit more grizzly than this tutorial . Wrap - up . Well , that ' s all for this time . Stay tuned for next time , when I hope to tackle the mysteries of sending messages between two users via Sky ( AddOn ) . The code I used to create this tutorial can be found at : http : / / www . cosmosui . org / tutorials / EarthQuestLog _ Example . zip