WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Using Grail (https://www.wowinterface.com/forums/showthread.php?t=53273)

Oniya 03-28-16 01:32 PM

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!

Barjack 03-28-16 04:33 PM

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.

Lombra 03-29-16 04:32 AM

Quote:

Originally Posted by Barjack (Post 313868)
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. :confused: I have no idea about this API, though. Maybe it uses base64 or something, I guess.

Barjack 03-29-16 07:04 AM

Quote:

Originally Posted by Lombra (Post 313872)
But there are only three bits and it goes up to 100k. :confused: 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

Nimhfree 04-01-16 06:42 AM

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.

Oniya 05-29-16 02:56 AM

Quote:

Originally Posted by Nimhfree (Post 313924)
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

Nimhfree 05-29-16 06:51 AM

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.

Oniya 06-02-16 01:07 PM

Quote:

Originally Posted by Nimhfree (Post 315318)
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.

Thanks a lot for Git link! <3

Oniya 06-02-16 01:14 PM

Quote:

Originally Posted by Nimhfree (Post 315318)
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.

So, at the end Npc Id's will stay or? Not sure what exactly the goal. Will be great if there will be explicitly npc ID's for more easy mapping and making connections \ search. And also will be great if there will be some flag saying is it npc actually or item \ object (or maybe there is already one?)

Nimhfree 06-02-16 07:58 PM

Quote:

Originally Posted by Oniya (Post 315395)
So, at the end Npc Id's will stay or? Not sure what exactly the goal. Will be great if there will be explicitly npc ID's for more easy mapping and making connections \ search. And also will be great if there will be some flag saying is it npc actually or item \ object (or maybe there is already one?)

What will be going away initially if it pasts testing is the use of the NPC Name ID from most entries (all except for objects). Basically Grail was trying to be sneaky in maintaining only a set of unique NPC names, and mapping from the NPC to the name used. This would have one name entry for Thrall, and tons of NPC entries that pointed to it. However, the npcId still will remain.

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).


All times are GMT -6. The time now is 12:18 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI