-
Notifications
You must be signed in to change notification settings - Fork 0
Formatting for the Quests Database
Disclaimer: This is being written as of 4:48am 😬. If something doesn't seem right, don't LMK.
What is JSON? [Video] Watch from 0:00 to 2:11
Unity Documentation - JsonUtility
Online JSON Viewer use this for validating and reading JSON.
More links below
Each quest object is structured as the following:-
- ID of the quest (This may or may not be removed, it hasn't been implemented so you can leave the whole line blank or give it a value of 0) [int]
- Title of the quest [string]
- Description of the quest [string]
- The name of the NPC giving the quest [string]
- Quest status (0 = Not Given, 1 = Given, 2 = Complete) [enum]
- Objectives [Separate Struct]
Refer to the QuestEntry structure under Khan-Branch in Assets/Scripts/Quests/QuestsDatabase.cs
A quest can have more than one objective.The data structure for objectives has 5 entries, however, not all entries are needed depending on the type of objective.
IMPORTANT: ALL ENTRIES APART FROM THE FIRST VARIABLE ARE STRING DATA-TYPES
Refer to the ObjectivesEntry structure under Khan-Branch in Assets/Scripts/Quests/QuestsDatabase.cs
- Is the objective complete (Set this value as false unless debugging.) [bool]
- Objective description (This should be left blank for an automatic description) [string]
- Name of the item to gather [string]
- Required amount [string]
- Current amount (Leave this as 0, it will run a check as long as the objective isn't complete) [string]
- Objective description (DO NOT LEAVE THIS BLANK) [string]
- Name of item or NPC to interact with [string]
- Objective description (DO NOT LEAVE THIS BLANK) [string]
- Name of place to find [string]
Do not create objectives of this type till AI is implemented and tested.
Do not create objectives of this type till AI is implemented and tested.
Use an online json viewing tool to beautify this
{"QuestEntry":[{"ID":0,"Title":"Gather Test","Description":"Test Saving","Giver":"NPC_NAME","Status":2,"ObjectivesEntry":[{"Complete":true,"Type":"GATHER","Description":"Gather [Test] 4/4","FirstEntry":"Test","SecondEntry":"4","ThirdEntry":"4"}]},{"ID":0,"Title":"Activate Test","Description":"DESCRIPTION","Giver":"NPC_NAME","Status":2,"ObjectivesEntry":[{"Complete":true,"Type":"ACTIVATE","Description":"Interact with the ARROW on the ground","FirstEntry":"Arrow","SecondEntry":"","ThirdEntry":""}]},{"ID":0,"Title":"Escort Test","Description":"Test Saving","Giver":"NPC_NAME","Status":0,"ObjectivesEntry":[{"Complete":false,"Type":"ESCORT","Description":"Escort [Test] to [4]","FirstEntry":"Test","SecondEntry":"4","ThirdEntry":""}]},{"ID":0,"Title":"Search Test","Description":"Test Saving","Giver":"NPC_NAME","Status":2,"ObjectivesEntry":[{"Complete":true,"Type":"SEARCH","Description":"Walk to the entrance of the cave","FirstEntry":"Cave","SecondEntry":"","ThirdEntry":""}]},{"ID":0,"Title":"Deliver Test","Description":"Test Saving","Giver":"NPC_NAME","Status":1,"ObjectivesEntry":[{"Complete":false,"Type":"DELIVER","Description":"Take [Test] to [4]","FirstEntry":"Test","SecondEntry":"4","ThirdEntry":""}]}]}