A DiaQ Quest
More...
Inherits plyCommon.plyMetaDataInterface.
|
bool | accepted [get, set] |
| Has this quest been accepted yet? setting this false will set completed = false and rewarded = false More...
|
|
bool | completed [get, set] |
| Has this quest been completed? setting this true will set accepted = true and will set all condition progress as completed. setting this false will set rewarded = false and will reset conditions's progress. More...
|
|
bool | rewarded [get, set] |
| Has the player receive the quest rewards yet or not? setting this true will set accepted = true and completed = true. Setting rewarded = true will not cause any game logic that gives the reward, to run. You handle that separately. More...
|
|
Dictionary< string, plyMetaData > | runtimeMetaData [get, set] |
|
void DiaQ.DiaQuest.Awake |
( |
| ) |
|
bool DiaQ.DiaQuest.ConditionPerformed |
( |
string |
key | ) |
|
This will update the condition and note that it has been performed. The condition will be considered completed once it has been performed the target number of times DiaQuestCondition.targetValue. Will update DiaQuest.completed when quest is completed. Return false if condition key not found, quest not yet accepted by player or if player already completed the quest.
bool DiaQ.DiaQuest.ConditionPerformed |
( |
string |
key, |
|
|
int |
val |
|
) |
| |
This will update the condition performedTimes. The condition will be considered completed once it has been performed the target number of times DiaQuestCondition.targetValue. The value can be negative to decrease the performedTimes.
object DiaQ.DiaQuest.GetMetaDataValue |
( |
string |
name | ) |
|
string DiaQ.DiaQuest.ParsedQuestText |
( |
| ) |
|
Return parsed text. The inline values will be inserted if any present in text.
void DiaQ.DiaQuest.ResetQuest |
( |
| ) |
|
This will set the quest as not accepted, no rewards given, no progress in conditions
void DiaQ.DiaQuest.ResetQuestToAccepted |
( |
| ) |
|
This will set the quest as accepted but no progress in conditions and no rewards given
void DiaQ.DiaQuest.RunRewardGivers |
( |
| ) |
|
This will run through the rewards and execute any that makes use of DiaQuestReward.keyObject. If the execute fails then it is assumed that you want to make use of DiaQuestReward.keyString and will have to run through all rewards and check which of them are set (false == string.IsNullOrEmpty()) and then react according to your game's design.
void DiaQ.DiaQuest.SetCompleted |
( |
bool |
completed | ) |
|
Passing true will also update the condition progress as completed while false will reset all conditions' progress to 0
void DiaQ.DiaQuest.SetMetaDataValue |
( |
string |
name, |
|
|
object |
val |
|
) |
| |
List of conditions that must be completed before the quest is considered completed. Do not update the conditions directly, except if you know what you are doing. In most cases you want to use the provided functions to update the conditions.
string DiaQ.DiaQuest.customIdent = "" |
Optional way to identify quest by
int DiaQ.DiaQuest.id = -1 |
Extra data that can be associated with the quest. Do not access at runtime, use provided functions.
string DiaQ.DiaQuest.name = "" |
List of rewards for completing the quest.
string DiaQ.DiaQuest.text = "" |
Text associated with quest, for example a description of what the player must do.
bool DiaQ.DiaQuest.accepted |
|
getset |
Has this quest been accepted yet? setting this false will set completed = false and rewarded = false
bool DiaQ.DiaQuest.completed |
|
getset |
Has this quest been completed? setting this true will set accepted = true and will set all condition progress as completed. setting this false will set rewarded = false and will reset conditions's progress.
bool DiaQ.DiaQuest.rewarded |
|
getset |
Has the player receive the quest rewards yet or not? setting this true will set accepted = true and completed = true. Setting rewarded = true will not cause any game logic that gives the reward, to run. You handle that separately.