03-28-16, 01:32 PM | #1 |
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' Code:
Fx must belong to faction x where A is Alliance and H is Horde Code:
Lxxx player level must be >= xxx 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 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 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 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 K0230, K0100 - both do not fit pattern Will be grateful if somebody helps with understanding it! |
|
03-28-16, 04:33 PM | #2 |
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.
|
|
03-29-16, 04:32 AM | #3 |
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! |
|
03-29-16, 07:04 AM | #4 |
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
|
|
04-01-16, 06:42 AM | #5 |
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. |
|
05-29-16, 02:56 AM | #6 | |
|
||
05-29-16, 06:51 AM | #7 |
If you have any questions, just ask. By the way, the latest code is on github: https://github.com/smaitch/Grail
I am toying with changing the NPC data around a bit to basically remove the explicit use of the NPC id for the name for most entries since they are the same, and remove most of the localized NPC name values because they can be gotten from the runtime. The only ones remaining will be game objects. Once this work is done and tested it will likely appear on github. |
|
06-02-16, 01:07 PM | #8 | |
|
||
06-02-16, 01:14 PM | #9 | |
Last edited by Oniya : 06-02-16 at 01:18 PM. |
||
06-02-16, 07:58 PM | #10 | |
The "npcId" that Grail uses mostly maps to the NPC IDs Blizzard uses. So, 102700 really maps to Meryl Felstorm. However, Grail will still have alias NPC IDs for a while. This is because an NPC can appear in more than one place (usually after an event has happened), yet Blizzard still uses the same NPC ID. In this case, Grail uses alias NPC IDs where there is an A: code associated with that NPC that indicates the real NPC ID Blizzard uses. This is done because Grail wants to be accurate as to where an NPC is at any time. There are other plans to have smart NPC locations that have their own prerequisites. Usually alias NPC IDs are just the NPC ID + 500,000. Object npcIds are the normal OBJECT IDs + 1,000,000 so 1000033 is really OBJECT 33 - Locked Chest. Item npcIds are the normal ITEM IDs + 100,000,000 so 100001307 is really ITEM 1307 - Gold Pickup Schedule. Assuming testing goes well there will be a version of Grail with some convenience routines to get the name of an "NPC": NPCName(npcId), ItemName(itemId), and ObjectName(objectId). You can use the Blizzard values in each of them, or the Grail values in the NPCName one. These should return all NPC and Item names, and only the Object names that Grail knows (as they cannot be gotten from the runtime in an arbitrary fashion). |
||
WoWInterface » Developer Discussions » General Authoring Discussion » Using Grail |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|