Quantcast Using Grail - WoWInterface
Thread Tools Display Modes
03-28-16, 01:32 PM   #1
Oniya
An Aku'mai Servant
Join Date: Feb 2015
Posts: 36
Question Using Grail

Trying to find out how to read Grail
Have read all instructions, but have some stop point for some parameters i do not understand so well.

Example we have quests in DB:
Code:
G[2]='FH K0230 L019 A:100016305 T:12696'
G[11]='FA K0100 L007 A:963 T:963 O:239'
Tags i understood:

Code:
Fx	must belong to faction x where A is Alliance and H is Horde
FA, FH - Fx faction related quest

Code:
Lxxx	player level must be >= xxx
L019,L007 - minimum player level to pick up

Code:
--		O:pat		where pat is a pattern (see below) of quests that are optional prerequisites
--		OAC:list	where list (see below) is the list of quests that are marked complete once this quest is accepted (On Accept Complete)
--		OBC:list	where list (see below) is the list of quests that are marked "control" complete once this quest is abandoned
--		OCC:list	where list (see below) is the list of quests that are marked complete once this quest is marked complete in the quest log
--		ODC:list	where list (see below) is the list of quests that are marked complete once this quest is turned in
--		OEC:list	where list (see below) is the list of quests that are marked complete once this quest is turned in and OPC: rules are met
--		OPC:pat		where pat is a pattern (see below) of prerequisites that need to be met before other OxC: codes that use OPC: rules will do their actions
--		OTC:pat		where pat is a comma-separated list of plus-separated pairs where the first in the pair is an NPC ID and the second is the quest ID to complete
O:239 - optional prerequisites quest ID
G[239]='FA K0100 L007 A:240 T:963 P:76'

Not so clearly understood tags:

1)
Code:
A:list		where list (see below) is the list of NPCs that give this quest to anyone
AA:list		where list (see below) is the list of NPCs that give this quest to Alliance only
AH:list		where list (see below) is the list of NPCs that give this quest to Horde only
AK:list		where list (see below) is the list of NPCs that you can kill to automatically start the quest
AZ:zone		where zone is the zone ID of the zone that when entered automatically gives the quest
A:100016305, A:963 - Npc which gives quest.
Should be be linked ID for Npc table, i found:
G[100016305]={100016305,'D:12676 Q:2'}
G[963]={963,'30:24.23,74.46'}

tho cant get how to get id from it ..

Same for turn in :
Code:
--		T:list		where list (see below) is the list of NPCs where the quest is turned in by anyone
--		TA:list		where list (see below) is the list of NPCs where the quest is turned in by Alliance only
--		TH:list		where list (see below) is the list of NPCs where the quest is turned in by Horde only
T:963, T:12696
G[963]={963,'30:24.23,74.46'}
G[12696]={12696,'43:49.75,65.08'}
Cant get how to get Npc ID from it


Tags i cant decode

2)

Code:
Kxxxyyy		where xxx is the level of the quest (or 000 if the quest has a changing quest level the same as the player level) and 
--			yyy is a number whose bits represent aspects of the quest:
--			1	repeatable
--			2	daily
--			4	weekly
--			8	monthly
--			16	yearly
--			32	escort
--			64	dungeon
--			128	raid
--			256	PVP
--			512	group
--			1024	heroic
--			2048	scenario
--			4096	legendary
--			8192	account-wide
--			16384	pet battle
--			32768	bonus objective
--			65536	rare mob
--			131072	treasure
Here i am totally stopped cant get how to decode this from this 2 example quests:

K0230, K0100 - both do not fit pattern

Will be grateful if somebody helps with understanding it!
  Reply With Quote
03-28-16, 04:33 PM   #2
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 88
Looks like Kxxxx numbers are actually bit fields, so you add together multiple properties to get the number. So for example a repeatable (1) daily (2) dungeon (64) quest would have a value of 1+2+64 = 67.
  Reply With Quote
03-29-16, 04:32 AM   #3
Lombra
An Onyxian Warder
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 358
Originally Posted by Barjack View Post
Looks like Kxxxx numbers are actually bit fields, so you add together multiple properties to get the number. So for example a repeatable (1) daily (2) dungeon (64) quest would have a value of 1+2+64 = 67.
But there are only three bits and it goes up to 100k. I have no idea about this API, though. Maybe it uses base64 or something, I guess.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
03-29-16, 07:04 AM   #4
Barjack
A Black Drake
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 88
Originally Posted by Lombra View Post
But there are only three bits and it goes up to 100k. I have no idea about this API, though. Maybe it uses base64 or something, I guess.
Looking at the data, it seems like the xxx part of K is always three characters, but yyy can be any number of characters. For some it's just "0", but other quests have larger numbers, e.g. K000131072
  Reply With Quote
04-01-16, 06:42 AM   #5
Nimhfree
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 200
The first three digits after the K represent the level of the quest. All other digits after the first three represent a number that is to be interpreted using bit math with the meaning of each bit indicated in the list in the comments. Barjack's description is correct. So the easy codes K0230 means level 23 with 0 in the bits (K 023 0), and K0100 means level 10 with 0 in the bits (K 010 0). So if we have a level 100 quest as Barjack describes for daily repeatable dungeon the code would be K10067, and maybe in the future a level 105 quest for that would be K10567.

The A: and T: "family" of codes represents NPCs (where NPCs can actually also be objects and items in the world). Mostly they are direct mapping to the actual NPC ID. However, objects and items get added to their real IDs large numbers to pull them out of the NPC space of IDs. So, T:963 means the NPC ID is 963. This is th key into the NPC table. Note that the first value in the NPC table is the NPC Name ID (which mostly is the same) which allows Grail to have a single NPC name for multiple NPC IDs. So when Thrall has tons of NPC IDs he still only has one name in Grail.
  Reply With Quote
Today, 02:56 AM   #6
Oniya
An Aku'mai Servant
Join Date: Feb 2015
Posts: 36
Originally Posted by Nimhfree View Post
The first three digits after the K represent the level of the quest. All other digits after the first three represent a number that is to be interpreted using bit math with the meaning of each bit indicated in the list in the comments. Barjack's description is correct. So the easy codes K0230 means level 23 with 0 in the bits (K 023 0), and K0100 means level 10 with 0 in the bits (K 010 0). So if we have a level 100 quest as Barjack describes for daily repeatable dungeon the code would be K10067, and maybe in the future a level 105 quest for that would be K10567.

The A: and T: "family" of codes represents NPCs (where NPCs can actually also be objects and items in the world). Mostly they are direct mapping to the actual NPC ID. However, objects and items get added to their real IDs large numbers to pull them out of the NPC space of IDs. So, T:963 means the NPC ID is 963. This is th key into the NPC table. Note that the first value in the NPC table is the NPC Name ID (which mostly is the same) which allows Grail to have a single NPC name for multiple NPC IDs. So when Thrall has tons of NPC IDs he still only has one name in Grail.
Big thanks for such descriptive answer! <3
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Using Grail

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