Go Back   WowAce Forums > Official Addon Threads > General AddOns
General AddOns Authors, post your release ready addons here to get feedback or just to let everyone know about it.

Reply
 
Thread Tools
Old 11-08-2010   #1
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Syllabus

Syllabus is an addon that keeps track of the location of class and profession trainers, as well as the level requirements and cost of the skills they teach. Conceived as the spiritual successor to FuBar_TrainerFu.

Syllabus works by learning what you know the professions and class skills when you visit a trainer and also learn what your character knows from visiting the trainers and when you open your craft windows.

The here's a link to the site for more information. I'll try to keep the thread up to do on my advancements but the site has the compiled details.

Last edited by LaoTseu; 11-15-2010 at 04:09 AM.
LaoTseu is offline   Reply With Quote
Old 11-10-2010   #2
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

Well, it's getting along quite I think .

At this point, Syllabus is able to learn any trade or class related skills. It deals with the special cases for skill that require other abilities (like Goblin or Gnome Engineering) and also with the special cases of Engineering armour that are different depending on the class of the Engineer.

I haven't found a way to find out if the trainer is a riding trainer. I guess I could try to do something by looking at the spellID but in the past, not all Riding trainer could teach the same riding skills so it looks like a mess a bit. Until I find a better way, the riding trainer are identify as class trainer by the game (the only function I have to work with is IsTradeskillTrainer()). If someone knows of a clean way to do this, let me know. Until then you will need to visit the Riding trainer on every toon.

The Alliance and Horde have some skills differences, not many but enough to be quite annoying and also quite unpredictable. This is why you have to visit the same trainers both with your Alliance and Horde toons.

I aim to keep the localization needed for data gathering to a minimum. Right now, the only thing left is Herbalism. If anyone knows a way to get it from a global or a function in game, let me know.

The way I store the data is not optimal and I will change it before the first beta. Be warned, I'll try to do something to convert the existing data but you may have to wipe out your SaveVariables' Syllabus.lua and revisit the trainers. I plan to stop storing the skill names as mush as possible. Since I have the SpellID for each skills, that should work fine and take a lot less memory for the character Known section. For the skill sections, I may keep the names since I'll probably cache them anyway. I don't want to call GetSpellInfo() every refresh although since I need that information only when displaying the tooltip, I might not cache anything. Any opinions?

Having a precompiled database is something that will come latter, after everything else is working.

Functionality wise, I want to add a filter by amount (ex. do not display anything that cost more the 1000g). This will allow you not to display the 5000g for Flight Mastery if you don't intend to buy right away. I will also have options to select the tradeskills you want to see displayed. If you are not interested in Fishing, you won't have to waste a line.

I not sure about the worth of showing already known skills. You guys can always open your spellbooks. I remember trying that option once with Fubar_TrainerFu but I always found it silly. I don't intend on implementing collapsible section either. I mean, with the filters, their will not be that much to show. I know that I want Syllabus so that I remember to train as fast as possible.

For the trainer, I thought I would go with a toggle. If you click on a skill, the trainer information will replace the detail for the spell. I want to use LibQTip for the trainers info and allow click on a trainer to set the TomTom arrow. Mixing GameTooltip and LibQTip appear to be a lot of bother. I guess I'll have a better idea when I start working on that.

Anyway, that's enough with my rambling. Let me know what you think.

Cheers!
LaoTseu is offline   Reply With Quote
Old 11-13-2010   #3
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

This is more like a blog than a forum thread . I'll have to create pages in the project after the end of the Hacking Phase(tm). Read on only if you have an interest in how Syllabus works.

Detection

Two things need to be detected or learned by the addon: what the toon knows and what the toon can learn.

Professions that the toon know

I haven't found a way to get the professions for a toon without opening either a crafting windows or a trainer windows. I don't think Blizzard wants to expose them without user intervention. This is annoying, if anyone knows of way, let me know.

So, TRADE_SKILL_SHOW and TRAINER_SHOW are use to detect when the windows open. From there, the lines are scanned and the result is saved in the db.char.known i.e. the Known database for the character. The lines are also scanned on TRAINER_CLOSED in case something was learned while talking to the trainer.

The trade skill windows scanning is not very reliable right now. For some reasons, it needs to be done multiple times in order to get everything. I'm looking into this.

At this point, the known skills are added as names in the form of "<Profession Name:Skill Name>" in the known database. I plan to only save the SpellID in the future.

Skills that the toon know

Here, a variety of techniques are used.

The spellbook is scanned right after the addon finished initializing (during OnEnable). Any spell that are known are added to the known database for the toon class. If a spell is identified as an ability (in the IS_ABILITY table), it is added as known ability in the known database. An ability is something that can be required by a skill e.g. Cat Form, Gnomish Engineer, Artisan Rising, ... There are also a list of "implied skills" (in the IMPLIED_SKILLS table). In short, if you know Artisan Riding, you also know Apprentice Riding even though it is no longer shown in your spell book. This is also good for cases when the skill shown by a trainer is not the same as the skill in the spell book e.g. you train Plate Mail and Plate Specialization in your spell book.

Then, the mounts list is scanned and added as known spell. Only a few of them are things that can be learn from a trainer but there is not problem with knowing to much in Syllabus so nothing was done to filter them out.

Then, the tracking types from the minimap menu are scanned. I haven't found any place else to get the information. Furthermore, there is no access the SpellID. I need to derive the SpellID from the texture. The only classes that have tracking abilities that are learned from a trainer are Druid and Hunter and those are the only ones that are saved in the known database.

Based on the level of the professions, some skills are also implied. So, if the max skill rank is 150, the toon is a Journeyman and an Apprentice in the profession. I think I'll be able to get rid of this by using implied skills more.

And like it's the case for the professions, each time the class trainer window is closed, any skills that are known are added to the known database.

Skills that are thought by a trainer and trainer information

Eventually, I hope that there will be a pre-compiled list for these. For now, Syllabus records the information whenever a trainer windows is opened (TRAINER_SHOW). The trainer name, location, zone, sub-zones and reputation are saved. Note that not all trainers have reputation (damn it Blizzard!).

There are two types of trainers, trade skill trainers and the others (IsTradeskillTrainer() tells which). Trade skills information is shared amongst all the classes. For the most part, the non trade skill trainers are class specific trainers with one notable exception: the riding trainer (damn it Blizzard!). I guess it makes since there is nothing to craft or gather that would raise the skill. The "share" class skills are copied between classes.

The information saved for the skills are the name, the base cost (without discount), the level, rank and ability requirements, the spell icon texture, a list of valid reputations (based on the trainers) and a list of trainers. We can get the textures and the names with the SpellID so they won't be saved in the future.

Right now, none of the data gathered needs to be localized except maybe for the ability requirements. In the Trainer windows, GetTrainerServiceAbilityReq() returns a string that is the name of the required ability (e.g. "Goblin Engineer") or a "name (type)" format (e.g. "Expert Rider (Expert)" or "Detect Traps (Passive)"). I really don't know if the other locales use the same format. I guess I guess I should just put it in localization files just in case.
LaoTseu is offline   Reply With Quote
Old 11-13-2010   #4
Torhal
Moderator
 
Torhal's Avatar
 
Join Date: Feb 2008
Location: Alabama
Posts: 2,193
Send a message via ICQ to Torhal
Default Re: Syllabus

Quote:
Originally Posted by LaoTseu View Post
<snip>
Professions that the toon know

I haven't found a way to get the professions for a toon without opening either a crafting windows or a trainer windows. I don't think Blizzard wants to expose them without user intervention. This is annoying, if anyone knows of way, let me know.
<snip>
This is no longer necessary as of patch 4.0.1 - for ARL and AckisRecipeList_QuickScan, I use a method similar to this:

Code:
-- Table to keep track of professions known by the logged-in toon.
local known_professions = {
	["prof1"]	= false,
	["prof2"]	= false,
	["archaeology"]	= false,
	["fishing"]	= false,
	["cooking"]	= false,
	["firstaid"]	= false,
}

-- Call this code to populate/update the known_professions table
local known = known_professions
known.prof1, known.prof2, known.archaeology, known.fishing, known.cooking, known.firstaid = GetProfessions()

-- Call this code to get information for the data stored in known_professions.
for profession, index in pairs(known_professions) do
	if index then
		local name, icon, rank, maxrank, numspells, spelloffset, skillline = GetProfessionInfo(index)
		-- Do stuff with the data.
	end
end
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author/Maintainer of Archy, Ackis Recipe List, Revelation, Spamalyzer, Volumizer, and many other AddOns.
Torhal is offline   Reply With Quote
Old 11-14-2010   #5
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

Quote:
Originally Posted by Torhal View Post
This is no longer necessary as of patch 4.0.1 - for ARL and AckisRecipeList_QuickScan, I use a method similar to this:

Code:
-- Table to keep track of professions known by the logged-in toon.
local known_professions = {
	["prof1"]	= false,
	["prof2"]	= false,
	["archaeology"]	= false,
	["fishing"]	= false,
	["cooking"]	= false,
	["firstaid"]	= false,
}

-- Call this code to populate/update the known_professions table
local known = known_professions
known.prof1, known.prof2, known.archaeology, known.fishing, known.cooking, known.firstaid = GetProfessions()

-- Call this code to get information for the data stored in known_professions.
for profession, index in pairs(known_professions) do
	if index then
		local name, icon, rank, maxrank, numspells, spelloffset, skillline = GetProfessionInfo(index)
		-- Do stuff with the data.
	end
end
That is done already in Syllabus. What I can't get without opening a trainer or trade windows are the skills that a toon knows in a profession. I can only scan the information when the window is displayed.

In fast, my problem with scanning the Windows after a SHOW_TRADE_CLOSE is that if the skills are not in the cache, I only get partial result and have to wait a bit and try again.

While we are on the subject, anybody knows how to find out if a character can Dual Wield without going to the class trainer? I was surprised to find out that it's not in the spell book.
LaoTseu is offline   Reply With Quote
Old 11-15-2010   #6
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

Whenever the packager starts working again, there will be a version with Trainer support.

How does it works?

When you mouse over a skill in the list, the skill details are shown. If you click on the line, the trainers' details will replace the skill details. If you click again, you go back to skill detail.

I will add an option to default to trainers instead of skill details. I will also make the trainer lines clickable and set the TomTom arrow to the trainer when clicking on the trainer.
LaoTseu is offline   Reply With Quote
Old 11-16-2010   #7
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

I've started drafting the new database model, see /syllabus/tickets/15-clean-up-database-model/ for details.
LaoTseu is offline   Reply With Quote
Old 12-12-2010   #8
Garonne
Newbie
 
Join Date: Dec 2008
Posts: 2
Default Re: Syllabus

I've got a curious problem. Syllabus belives my faction rating for Orgrimmar to be reverred... At least for my hunter skills... My faction rating is exalted and is displayed correctly for all tradeskills by Syllabus only my class skills are displayed with a wrong faction rating. This leads to mistakes by Syllabus as it takes the trainer prices as "reverred" and recalculates them for Undercity (where it correctly believes me to be exalted, leading to even lower prices (based on what Syllabus believes)).
This is a little bit anoying. Would be great if I could reset the faction rating somehow (or if I knew something where Syllabus rechecks my faction standing...).

Any Idea what to do or how to fix this (apart from deleting the SavedVariables for Syllabus)?
Garonne is offline   Reply With Quote
Old 12-12-2010   #9
LaoTseu
Senior Member
 
Join Date: Jun 2006
Posts: 491
Default Re: Syllabus

Quote:
Originally Posted by Garonne View Post
I've got a curious problem. Syllabus belives my faction rating for Orgrimmar to be reverred... At least for my hunter skills... My faction rating is exalted and is displayed correctly for all tradeskills by Syllabus only my class skills are displayed with a wrong faction rating. This leads to mistakes by Syllabus as it takes the trainer prices as "reverred" and recalculates them for Undercity (where it correctly believes me to be exalted, leading to even lower prices (based on what Syllabus believes)).
This is a little bit anoying. Would be great if I could reset the faction rating somehow (or if I knew something where Syllabus rechecks my faction standing...).

Any Idea what to do or how to fix this (apart from deleting the SavedVariables for Syllabus)?
Is your hunter a Goblin? I think I need to add something special for Goblins because of their racial ability that make then be "exalted" with every factions when talking to a trainer or a vendor. I haven't played a Goblin yet so I didn't come around to fix this.

If your hunter is not a Goblin, I'll need your SaveVariables to understand what is happening. In any case, can you please open a ticket here so I do not forget. I hope I'll be able to look into it today but I'm rather busy.

Best
LaoTseu is offline   Reply With Quote
Old 12-12-2010   #10
Garonne
Newbie
 
Join Date: Dec 2008
Posts: 2
Default Re: Syllabus

I'm playing a troll hunter. Where do I find the file? Server based? Account based? I can't see it at the moment (at least not character based).

The most curious thing is, that this problem isn't even applied to ALL skills, only to my hunter based skills. All other skills (tradeskills, riding skills) are displayed correctly.

Ah, I think I got it... Acount-based...
Attached as zip.

Ok, file has been added to my ticket, too.

Uhm... Ok... Problem has been solved... Sorry, it was my fault. I didn't realize that the trainer in Orgrimmar might be of a different faction (thunderbluff in this case) and not of Orgrimmar.

Thus Syllabus was obviously more intelligent than me. ^^

The data displayed by syllabus IS correct, I was wrong.
Attached Files
File Type: zip Syllabus.zip (76.7 KB, 1 views)

Last edited by Garonne; 12-12-2010 at 04:42 PM. Reason: Problem solved...
Garonne is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 PM.