TourGuide/Guide Creation

=Introduction=
There are two places you can create your own guides in
* Appending to the TourGuide addon
* Creating your own Addon Folder
We shall look at Creating your own Addon Folder here.
=Preperation=
You will need to access the Interface/Addons folder of World of Warcraft, and then create a new folder. A sample folder name would be TourGuide_UserOwnGuide
=Initial Files=
Your folder will be filled with three types of files
* .toc - the detail of your addon supplemental files, so that it can be controlled from the Addon Menu
* .xml - a directory of your addon guides
* .lua - one for each guide you create.
You can either use a basic ASCII editor like Notepad, or you can obtain a custom program such as SciTE to create all these files.
==.toc file==
AddOn List after creating all three files	AddOn List after creating all three files
 	
Create a text file called TourGuide_MyOwnGuide.toc, and enter the following:
 ## Interface: 30200
 ## Title: Tour Guide - My Own Guides
 ## Notes: My Own Guides
 ## Author: Your Name
 ## Version: 1.00
 ## X-Category: User Guide
 ## RequiredDeps: TourGuide
 ## OptionalDeps: TomTom
 ## DefaultState: enabled
 ## LoadManagers: AddonLoader
 ## X-LoadOn-Always: delayed
 TourGuide_MyOwnGuide.xml
Of course, you can change some of these elements to your own requirements, such as the Title, Notes, Author and version.
==.xml file==
Create a text file called TourGuide_MyOwnGuide.xml, and enter the following:
 <ui xmlns="http://www.blizzard.com/wow/ui/">
 <Script file="Guide1.lua"/>
 </Ui>
You will need a line for every script file (.lua) that you have, with the exact filename. If it's not in this .xml file, it won't show up in the game
==.lua file==
This is the guts of your guides, each guide should have it's own .lua file. Ensure you add the filename to the .xml file created above otherwise it won't show in the game. For this demonstration, create a text file called Guide1.lua, and as a bare minimum, enter: 
 TourGuide:RegisterGuide("Guide Title", nil, nil, function()
 return[[
 N Guide #1 |N|This is where your guide will go|
 ]]
 end)
==Trial Run==
After you've completed all the above steps, load up the game and you should find your guide available to select. Of course, it doesn't have much in it, but everything has to start somewhere.
=Customising your Guide=
Okay, as said above, the .lua file is the guts of your guide, and that's where to put everything you need for your guide. So, lets go through it all to help you create a wonderful guide.
First off, the file we created above has the line
 TourGuide:RegisterGuide("Guide Title", "NextGuide", Faction, function()
This has three customisable parts
* "Guide Title" - The title as displayed at the top of your guide list, inside Quote Marks
* The next guide to load up when the current guide is finished in Quote Marks (or enter nil without quotes to not open a new guide)
* The faction, enter "Alliance", "Horde" or nil (nil is without quotes, Alliance and Horde are with quotes)
Now you need to enter the guide entries one by one. You can use the TourGuide Recorder to help here, with that addon installed, typing /tgr will display a list of all logged entries of what you've just done. To manually create them, this is what you need to enter:
 type DisplayTitle |tag|tagnotes|
== Type ==
These are the valid type that can be entered:
type	Creates 	Icon	Notes
A 	Accept Quest 	 	QID|####| below.
B 	Buy 	 	L|####| loot tag is provided, completes when the loot is received, otherwise completes when an item that matches the title is received. For title match use the format "[Item Name]"
C 	Do Quest Requirements	 	Complete a quest's objectives. Kill something, loot something, whatever. This is only needed for quests that need you to do something before finishing it, such as kill something. Auto-completes when the title is found in the quest log and is marked "Complete" there.
F 	Fly 	 	Directs player to fly to a destination. Completes on (sub-)zone change when the title matches the new zone or subzone name.
H 	Hearth 	 	Directs player to heathstone to a destination. Completes on (sub-)zone change when the title matches the new zone or subzone name.
K 	Kill 	 	L|####| loot tag or quest-objective tag pair
N 	Note 	 	L|...| tag) or with a quest pair of tags
R 	Run 	 	Directs player to run to a destination. Completes on (sub-)zone change when the title matches the new zone or subzone name.
T 	Turn-In Quest 	 	Turn in the quest. Like A and C, uses the title to complete when the quest is turned in.
U 	Use 	 	U|####| tag to function.
b 	Boat 	 	Directs player to catch a boat to a destination. Completes on (sub-)zone change when the title matches the new zone or subzone name.
h 	Set hearth 	 	Set your hearth to a new location. Auto-completes when it detects the text "<title> is now your home."
f 	Get Flight Point 	 	Remind the user to grab the flight point. Completes on the popup text "Discovered flight point". These should only be used if the flight point is out of the way and might not be seen on the minimap tracking.
== Tag ==
These are the valid tag that can be entered:
Tag 	Notes
N|...| 	Creates a Note. This is displayed in the tooltip and in the objective frame. Entering a coordinate in the format "(12,34)", "12.3,45.6" or "12.34,56.78" in the note will automatically set up a TomTom waypoint.
QID|1234| 	Quest ID - essential for any A, C and T tags. This quest ID identifies the quest being handled. Quest IDs can be found on wowhead, on most quest pages on the wiki as well as through other addons such as TourGuide Recorder
O| 	L| or |U| tag, the entry is not displayed if the player does not have the items needed.
L|1234| or |L|1234 10| 	O| on an ACCEPT objective, the objective will be skipped if the user does not have the item (and quantity) needed.
U|1234| 	O| on an ACCEPT objective, the objective will only appear if the user has the item to use.
PRE|Quest Name| 	Used with the optional tag to only show a quest if another quest has been completed in the same guide. Note that the prerequisite quest must be optional as well, normal quests will appear to be complete if the user drops the quest and manually checks it off of the list.
C|Class(es)| 	C|Warrior Paladin Hunter Rogue Priest Shaman Mage Warlock Druid|
R|Race(s)| 	C|, multiple races are supported per objective, and it takes a localized value.<BR>For Horde only in a neutral guide, use |R|Orc Undead Tauren Troll BloodElf Goblin|<BR>For Alliance only in a neutral guide, use |R|Human Gnome Dwarf NightElf Draenei Worgen|
Z|Zone| 	Overrides the mapping zone for the objective. If not defined the objective's waypoints will use the guide title for the zone. If the title isn't a valid zone name, the player's current zone is used. These should not be used heavily, if the player is changing locations to another zone and doing more than turnins, accepts and maybe one or two completes, a new guide should be started. Remember, relocation to a new quest hub usually means you should start a new guide!
NODEBUG| 	Supresses debug warnings for an objective. Use for quests that don't follow correct title case, for example A Little Help From My Friends
Q|Quest Name| |QO|Some Mob slain: 10/10|	Completes when a sub-objective of the quest matches the QO tag. Both tags must be specified. Works with Note and Kill objectives. Like quest titles, this is case-sensitive and must match the quest log text EXACTLY.
T| 	Signifies that an objective takes place in a "town". Changes the objective list's background color to provide a visual queue to the player.
Category:AddOns