Quest Log Protocol v0.1 1 - Purpose The purpose of this document is to specify how quest status should be transferred between client and server in The Mana World for the purpose of facilitating a quest log. Quest status information must reside on the server to be adminstered by it and as such, there must be some interaction wherein the client may query the server for that information. The client will then store this information for the remainder of their session. 2 .1 - Quest Log Requirements At a bare minimum, the client requires only a list of all the quests begun by their player and the following information about each of those quests: - A quest ID number that uniquely identifies the quest. - The quest progress as an integer that will be meaningful to the client in the context of the quest data stored on the client. 2.2 - What is a quest ID? Since the server stores only the quest completion, it must be referenced by some unique identifier. That identifier is the quest ID. 2.3 - Why is a subdivision of quests into tasks not represented? While it's assumed that some quests will consist of multiple tasks, that does not need to be represented explicitly on the client's side. If it's considered desirable to have the quest log show completion of individual subtasks then that can be achieved by having the server dynamically change the quest description text and resend it to the client. For example, if a quest consists of two tasks and the first one is complete then the server might prefix the description of that task with the text “** Completed! **” and then update the client with the new description. 3 - Quest Related Transactions Quest log transactions are handled through the following message types: 3.1 - Send_Quest_Status Direction: Server ? Client Description: The server sends the client this message containing a quest ID and the progress of that quest. If the client is already tracking the progress of that quest then it overwrites the quest's status with the new info, otherwise it begins tracking that quest (causing it to appear in the quest log). Usage: The client quest log is initially populated through repeated use of this message, one transaction for every quest the client's player has started. This message is also used to update a single entry if the status of a quest has changed or to add a new entry to the log if a new quest has been started. 3.2 - Request_All_Quests Direction: Client ? Server Description: The client requests that the server send all the player's quests to it in order to populate the client's quest log. This consists of all quests that the player has started, both those that are in-progress and those that are complete. 4 - Data Representation This section provides recommendations for how data should be stored and transmitted. 4.1 - Data Types 4.1.1 - Quest ID: An integer value ranging from 1 to at least 1000000000 (1 billion). This provides more unique quests then could ever reasonably be created, but still allows it to be stored in a signed 32-bit integer. Zero is reserved as an illegal ID number. 4.1.2 - Completion Status: A positive integer that is referred to by the quest information stored on the client. It's number can represent anything the quest writer likes with the exception that zero means the quest hasn't been started and any number above zero means that it has. 4.2 - Quest Data Transmission A quest may be transmitted in whatever form is deemed suitable for the client-server connection that is in place. If there is a question of ordering though, it is in the ordering: quest ID, completion status integer. This ordering does not preclude the possibility of other data such as string lengths or message ID's being inserted amongst these items.