mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 06:48:04 +03:00
refactor!: rename milestones to quests and milestone-sets to questlines
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# GPT-Target Endpoints
|
||||
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a Game + Playtype. These are things like searching goals or milestones, or retrieving information about a specific ID.
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a Game + Playtype. These are things like searching goals or quests, or retrieving information about a specific ID.
|
||||
|
||||
For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endpoints](./ugpt-targets.md).
|
||||
|
||||
@@ -11,9 +11,9 @@ For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endp
|
||||
`GET /api/v1/games/:game/:playtype/targets/recently-achieved`
|
||||
|
||||
!!! info
|
||||
This endpoint returns the 100 most recently achieved goal subscriptions, and 50 most recently achieved milestone subscriptions.
|
||||
This endpoint returns the 100 most recently achieved goal subscriptions, and 50 most recently achieved quest subscriptions.
|
||||
|
||||
A target is not considered recently achieved if it was [instantly achieved](../../tachi-server/implementation-details/goals-milestones.md#instant-indirect-achievements).
|
||||
A target is not considered recently achieved if it was [instantly achieved](../../tachi-server/implementation-details/goals-quests.md#instant-indirect-achievements).
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -24,9 +24,9 @@ None.
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved. |
|
||||
| `milestones` | Array<MilestoneDocument> | The milestone documents that were recently achieved. |
|
||||
| `quests` | Array<QuestDocument> | The quest documents that were recently achieved. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | User subscriptions to goals that were recently achieved. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | User subscriptions to milestones that were recently achieved. |
|
||||
| `questSubs` | Array<QuestSubDocument> | User subscriptions to quests that were recently achieved. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -44,10 +44,10 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
goalID: "foo"
|
||||
// ... other goal props
|
||||
}],
|
||||
milestones: [{
|
||||
quests: [{
|
||||
name: "Go Beyond Diamond 1",
|
||||
milestoneID: "bar",
|
||||
// ... other milestone props
|
||||
questID: "bar",
|
||||
// ... other quest props
|
||||
}],
|
||||
goalSubs: [{
|
||||
userID: 1,
|
||||
@@ -55,11 +55,11 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
achieved: true,
|
||||
// ... other goalsub props
|
||||
}],
|
||||
milestoneSubs: [{
|
||||
questSubs: [{
|
||||
userID: 3,
|
||||
milestoneID: "bar",
|
||||
questID: "bar",
|
||||
achieved: true,
|
||||
// ... other milestone sub props
|
||||
// ... other quest sub props
|
||||
}]
|
||||
}
|
||||
```
|
||||
@@ -71,7 +71,7 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
`GET /api/v1/games/:game/:playtype/targets/recently-raised`
|
||||
|
||||
!!! info
|
||||
This endpoint returns the 100 most recently interacted-with goal subscriptions, and 50 most recently interacted-with milestone subscriptions.
|
||||
This endpoint returns the 100 most recently interacted-with goal subscriptions, and 50 most recently interacted-with quest subscriptions.
|
||||
|
||||
A recently interacted with target subscription is one where `progress` or `outOf` has changed recently.
|
||||
|
||||
@@ -87,9 +87,9 @@ None.
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved. |
|
||||
| `milestones` | Array<MilestoneDocument> | The milestone documents that were recently achieved. |
|
||||
| `quests` | Array<QuestDocument> | The quest documents that were recently achieved. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | User subscriptions to goals that were recently interacted with. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | User subscriptions to milestones that were recently interacted with. |
|
||||
| `questSubs` | Array<QuestSubDocument> | User subscriptions to quests that were recently interacted with. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -107,10 +107,10 @@ GET /api/v1/games/iidx/SP/targets/recently-raised
|
||||
goalID: "foo"
|
||||
// ... other goal props
|
||||
}],
|
||||
milestones: [{
|
||||
quests: [{
|
||||
name: "Go Beyond Diamond 1",
|
||||
milestoneID: "bar",
|
||||
// ... other milestone props
|
||||
questID: "bar",
|
||||
// ... other quest props
|
||||
}],
|
||||
goalSubs: [{
|
||||
userID: 1,
|
||||
@@ -119,12 +119,12 @@ GET /api/v1/games/iidx/SP/targets/recently-raised
|
||||
lastInteraction: 1649438990417,
|
||||
// ... other goalsub props
|
||||
}],
|
||||
milestoneSubs: [{
|
||||
questSubs: [{
|
||||
userID: 3,
|
||||
milestoneID: "bar",
|
||||
questID: "bar",
|
||||
achieved: false,
|
||||
lastInteraction: 1649438990415,
|
||||
// ... other milestone sub props
|
||||
// ... other quest sub props
|
||||
}]
|
||||
}
|
||||
```
|
||||
@@ -181,7 +181,7 @@ None.
|
||||
| `goal` | GoalDocument | The goal document at this ID. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | All of the subscriptions to this goal. |
|
||||
| `users` | Array<UserDocument> | All of the users subscribed to this goal. |
|
||||
| `parentMilestones` | Array<MilestoneDocument> | All of the milestones that include this goal. |
|
||||
| `parentQuests` | Array<QuestDocument> | All of the quests that include this goal. |
|
||||
|
||||
*****
|
||||
|
||||
@@ -215,7 +215,7 @@ None.
|
||||
| `results.outOfHuman` | String | A user friendly format for what this goal was out of. |
|
||||
|
||||
!!! info
|
||||
For more info on `progress`/`outOf`, see [Goals](../../tachi-server/implementation-details/goals-milestones.md#evaluating-a-users-progress).
|
||||
For more info on `progress`/`outOf`, see [Goals](../../tachi-server/implementation-details/goals-quests.md#evaluating-a-users-progress).
|
||||
|
||||
### Example
|
||||
|
||||
@@ -250,14 +250,14 @@ GET /api/v1/games/iidx/SP/targets/goals/some_goal_id/evaluate-for?userID=zkldi
|
||||
|
||||
*****
|
||||
|
||||
## Search milestones for this GPT.
|
||||
## Search quests for this GPT.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests`
|
||||
|
||||
!!! note
|
||||
You might notice that there's no equivalent endpoint for goals.
|
||||
|
||||
Searching goals for a GPT isn't very interesting, since they can be created by anyone at any time. The only reason goals are stored separately to subscriptions are for deduplication purposes and milestones.
|
||||
Searching goals for a GPT isn't very interesting, since they can be created by anyone at any time. The only reason goals are stored separately to subscriptions are for deduplication purposes and quests.
|
||||
|
||||
As such, searching goals for a GPT is pointless, since technically it should search the set of all possible goals.
|
||||
|
||||
@@ -271,13 +271,13 @@ GET /api/v1/games/iidx/SP/targets/goals/some_goal_id/evaluate-for?userID=zkldi
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `<body>` | Array<MilestoneDocument> | All of the milestones that matched this search criteria. |
|
||||
| `<body>` | Array<QuestDocument> | All of the quests that matched this search criteria. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve information about a specific milestone, and who is subscribed to it.
|
||||
## Retrieve information about a specific quest, and who is subscribed to it.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -287,33 +287,33 @@ N/A
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestone` | MilestoneDocument | The milestone with this milestoneID. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | All of the subscriptions to this milestone. |
|
||||
| `users` | Array<UserDocument> | All of the user's with subscriptions to this milestone. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this milestone. |
|
||||
| `parentMilestoneSets` | Array<MilestoneSetDocument> | Any milestone sets that contain this milestone. |
|
||||
| `quest` | QuestDocument | The quest with this questID. |
|
||||
| `questSubs` | Array<QuestSubDocument> | All of the subscriptions to this quest. |
|
||||
| `users` | Array<UserDocument> | All of the user's with subscriptions to this quest. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this quest. |
|
||||
| `parentQuestlines` | Array<QuestlineDocument> | Any questlines that contain this quest. |
|
||||
|
||||
*****
|
||||
|
||||
## Evaluate a milestone for a user, even if they aren't subscribed to it.
|
||||
## Evaluate a quest for a user, even if they aren't subscribed to it.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones/:milestoneID/evaluate-for`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests/:questID/evaluate-for`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `userID` | String | The user you wish to evaluate this milestone upon. |
|
||||
| `userID` | String | The user you wish to evaluate this quest upon. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this milestone. |
|
||||
| `goalResults` | Array<EvaluatedGoalResult> | This user's progress on each individual goal in this milestone. |
|
||||
| `achieved` | Boolean | Whether this user has this milestone achieved or not. |
|
||||
| `progress` | Integer | How many goals this user has achieved in this milestone. |
|
||||
| `outOf` | Integer | How many goals need to be achieved in this milestone for it to be marked as achieved. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this quest. |
|
||||
| `goalResults` | Array<EvaluatedGoalResult> | This user's progress on each individual goal in this quest. |
|
||||
| `achieved` | Boolean | Whether this user has this quest achieved or not. |
|
||||
| `progress` | Integer | How many goals this user has achieved in this quest. |
|
||||
| `outOf` | Integer | How many goals need to be achieved in this quest for it to be marked as achieved. |
|
||||
|
||||
#### EvaluatedGoalResult
|
||||
|
||||
@@ -328,27 +328,27 @@ N/A
|
||||
|
||||
*****
|
||||
|
||||
## Search Milestone Sets
|
||||
## Search Questlines
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestone-sets`
|
||||
`GET /api/v1/games/:game/:playtype/targets/questlines`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `search` | String | A name of a milestone set to search for. |
|
||||
| `search` | String | A name of a questline to search for. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `<body>` | Array<MilestoneSetDocument> | An array of MilestoneSetDocuments, based on the search parameter. |
|
||||
| `<body>` | Array<QuestlineDocument> | An array of QuestlineDocuments, based on the search parameter. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve a milestone set with a specific ID.
|
||||
## Retrieve a questline with a specific ID.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestone-sets/:setID`
|
||||
`GET /api/v1/games/:game/:playtype/targets/questlines/:questlineID`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -358,6 +358,6 @@ N/A
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestoneSet` | MilestoneSetDocument | The milestone set document at this ID. |
|
||||
| `milestones` | Array<MilestoneDocument> | All of the milestone documents that belong to this set. |
|
||||
| `questline` | QuestlineDocument | The questline document at this ID. |
|
||||
| `quests` | Array<QuestDocument> | All of the quest documents that belong to this set. |
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ scoreData=<file data>
|
||||
"userID": 1,
|
||||
"classDeltas": [],
|
||||
"goalInfo": [],
|
||||
"milestoneInfo": [],
|
||||
"questInfo": [],
|
||||
"userIntent": false, // if X-User-Intent was set, this would be true.
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# UGPT-Target Endpoints
|
||||
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a User, Game and Playtype. These are things like subscribing to a new milestone, or reading info about progress on a specific goal.
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a User, Game and Playtype. These are things like subscribing to a new quest, or reading info about progress on a specific goal.
|
||||
|
||||
For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endpoints](./ugpt-targets.md).
|
||||
|
||||
@@ -22,8 +22,8 @@ None.
|
||||
| :: | :: | :: |
|
||||
| `goalSubs` | Array<GoalSubDocument> | The goal subscriptions that were recently achieved by this user. |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved (if any). |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | The milestone subscriptions that were recently achieved by this user. |
|
||||
| `milestone` | Array<MilestoneDocument> | The milestone documents that were recently achieved (if any). |
|
||||
| `questSubs` | Array<QuestSubDocument> | The quest subscriptions that were recently achieved by this user. |
|
||||
| `quest` | Array<QuestDocument> | The quest documents that were recently achieved (if any). |
|
||||
| `user` | UserDocument | The user you requested this information about. |
|
||||
|
||||
*****
|
||||
@@ -45,15 +45,15 @@ None.
|
||||
| :: | :: | :: |
|
||||
| `goalSubs` | Array<GoalSubDocument> | The goal subscriptions that were recently achieved by this user. |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved (if any). |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | The milestone subscriptions that were recently achieved by this user. |
|
||||
| `milestone` | Array<MilestoneDocument> | The milestone documents that were recently achieved (if any). |
|
||||
| `questSubs` | Array<QuestSubDocument> | The quest subscriptions that were recently achieved by this user. |
|
||||
| `quest` | Array<QuestDocument> | The quest documents that were recently achieved (if any). |
|
||||
| `user` | UserDocument | The user you requested this information about. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve this user's milestone subscriptions.
|
||||
## Retrieve this user's quest subscriptions.
|
||||
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/milestones`
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/quests`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -63,20 +63,20 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestones` | Array<MilestoneDocument> | All of the milestones this user is subscribed to. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | All of this user's milestone subscriptions. |
|
||||
| `quests` | Array<QuestDocument> | All of the quests this user is subscribed to. |
|
||||
| `questSubs` | Array<QuestSubDocument> | All of this user's quest subscriptions. |
|
||||
|
||||
*****
|
||||
|
||||
## Get a user's progress on a specific milestone they are subscribed to.
|
||||
## Get a user's progress on a specific quest they are subscribed to.
|
||||
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
!!! info
|
||||
If you're looking to evaluate a milestone against a user, without knowing whether they're
|
||||
subscribed to it or not, you want [GPT/Targets/Milestones/Evaluate-For](gpt-targets.md#evaluate-a-milestone-for-a-user-even-if-they-arent-subscribed-to-it).
|
||||
If you're looking to evaluate a quest against a user, without knowing whether they're
|
||||
subscribed to it or not, you want [GPT/Targets/Quests/Evaluate-For](gpt-targets.md#evaluate-a-quest-for-a-user-even-if-they-arent-subscribed-to-it).
|
||||
|
||||
This endpoint is admittedly in a very strange position, where it overlaps with that `evaluate-for` endpoint quite significantly, but this endpoint is also intended to return the user's `milestoneSub`, so I thought it best to split this into two endpoints.
|
||||
This endpoint is admittedly in a very strange position, where it overlaps with that `evaluate-for` endpoint quite significantly, but this endpoint is also intended to return the user's `questSub`, so I thought it best to split this into two endpoints.
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -86,10 +86,10 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestoneSub` | MilestoneSubDocument | The user's subscription to this milestone. |
|
||||
| `milestone` | MilestoneDocument | The milestone document in question. |
|
||||
| `goals` | Array<GoalDocument> | The goals involved in this milestone. |
|
||||
| `results` | Array<EvaluatedGoalResult> | The user's progress on each goal in this milestone. |
|
||||
| `questSub` | QuestSubDocument | The user's subscription to this quest. |
|
||||
| `quest` | QuestDocument | The quest document in question. |
|
||||
| `goals` | Array<GoalDocument> | The goals involved in this quest. |
|
||||
| `results` | Array<EvaluatedGoalResult> | The user's progress on each goal in this quest. |
|
||||
|
||||
#### EvaluatedGoalResult
|
||||
|
||||
@@ -104,9 +104,9 @@ None.
|
||||
|
||||
*****
|
||||
|
||||
## Subscribe to a milestone.
|
||||
## Subscribe to a quest.
|
||||
|
||||
`PUT /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`PUT /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Permissions
|
||||
|
||||
@@ -121,16 +121,16 @@ None. (All relevant info is in the URL.)
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GpalDocument> | The goals involved in this milestone. |
|
||||
| `milestone` | MilestoneDocument | The milestone the user just subscribed to. |
|
||||
| `goalResults` | Array<EvaluatedGoalResults> | The user's progress on each individual goal in this milestone. |
|
||||
| `milestoneSub` | MilestoneSubscriptionDocument | The milestone subscription this user just created |
|
||||
| `goals` | Array<GpalDocument> | The goals involved in this quest. |
|
||||
| `quest` | QuestDocument | The quest the user just subscribed to. |
|
||||
| `goalResults` | Array<EvaluatedGoalResults> | The user's progress on each individual goal in this quest. |
|
||||
| `questSub` | QuestSubscriptionDocument | The quest subscription this user just created |
|
||||
|
||||
*****
|
||||
|
||||
## Unsubscribe from a milestone.
|
||||
## Unsubscribe from a quest.
|
||||
|
||||
`DELETE /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`DELETE /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Permissions
|
||||
|
||||
@@ -145,4 +145,4 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestone` | MilestoneDocument | The milestone you just unsubscribed from. |
|
||||
| `quest` | QuestDocument | The quest you just unsubscribed from. |
|
||||
|
||||
@@ -16,5 +16,5 @@ Refers to "User on Game + Playtype" - A user's "something" on a game and that pl
|
||||
Targets are a bucket term for things a user might set as targets to aim for. This term subsumes the following features:
|
||||
|
||||
- Goals
|
||||
- Milestones
|
||||
- Sets
|
||||
- Quests
|
||||
- Questlines
|
||||
|
||||
@@ -30,4 +30,4 @@ The current Events are:
|
||||
| :: | :: |
|
||||
| `class-update/v1` | Fires whenever a user has had a class update positively, such as going from 9th Dan to 10th Dan. |
|
||||
<!-- | `goal-achieved/v1` | Fires whenever a user has achieved a goal. |
|
||||
| `milestone-achieved/v1` | Fires whenever a user has achieved a milestone. | -->
|
||||
| `quest-achieved/v1` | Fires whenever a user has achieved a quest. | -->
|
||||
|
||||
@@ -50,4 +50,4 @@ type GoalSubscriptionDocument = MongoDBDocument & {
|
||||
| `progress` | The user's raw progress towards this goal. This is a number, and should not be displayed to the user. |
|
||||
| `outOf` | The value this goal is out of - this is a number, and should not be displayed to the user. |
|
||||
| `progressHuman`, `outOfHuman` | These are humanised, stringified versions of the above two fields. These convert things like the enum value of lamps to their string equivalents. |
|
||||
| `wasInstantlyAchieved` | Whether this goal was instantly achieved or not. Instantly achieved goals are excluded from some parts of the UI, and from being emitted as webhook events. [Read more here](../tachi-server/implementation-details/goals-milestones.md). |
|
||||
| `wasInstantlyAchieved` | Whether this goal was instantly achieved or not. Instantly achieved goals are excluded from some parts of the UI, and from being emitted as webhook events. [Read more here](../tachi-server/implementation-details/goals-quests.md). |
|
||||
|
||||
+20
-20
@@ -1,7 +1,7 @@
|
||||
# Goals, Milestones, Sets
|
||||
# Goals, Quests, Questlines
|
||||
|
||||
This page covers pretty much everything you need to know about interacting with goals
|
||||
and milestones.
|
||||
and quests.
|
||||
|
||||
Although these features are fairly straightforward on the surface, their implementation is a bit complex at points. We'll get to it.
|
||||
|
||||
@@ -56,54 +56,54 @@ For human representation, these values are formatted and stored in the Goal Subs
|
||||
Goal Subscriptions are capped by the MAX_GOAL_SUBSCRIPTIONS [conf.json5](../setup/config.md) property, and defaults to 1000.
|
||||
|
||||
!!! danger
|
||||
Unsubscribing from goals directly is only possible if they do not have any parent milestones.
|
||||
Unsubscribing from goals directly is only possible if they do not have any parent quests.
|
||||
More on that below.
|
||||
|
||||
## What is a Milestone?
|
||||
## What is a Quest?
|
||||
|
||||
Milestones are groups of goals, defined in a structured form, with support for assigning
|
||||
Quests are groups of goals, defined in a structured form, with support for assigning
|
||||
notes next to goalIDs, and other generally useful stuff.
|
||||
|
||||
Their purpose for users is to give them a quick way to assign a bunch of goals they might care about.
|
||||
|
||||
For example, a dedicated user may make their own "Kaiden Checklist", and create a set of goals
|
||||
they think are useful for kaidens to aim for. Another user interested in this can just
|
||||
subscribe to that milestone, and all the goals will be managed for them.
|
||||
subscribe to that quest, and all the goals will be managed for them.
|
||||
|
||||
### Identification
|
||||
|
||||
Milestones are identified by their `milestoneID`, which is a completely arbitrary string.
|
||||
Quests are identified by their `questID`, which is a completely arbitrary string.
|
||||
|
||||
At the moment, users cannot create milestones directly, they are hard-defined by the [Database Seeds](../infrastructure/database-seeds.md).
|
||||
At the moment, users cannot create quests directly, they are hard-defined by the [Database Seeds](../infrastructure/database-seeds.md).
|
||||
|
||||
### Evaluating a User's Progress
|
||||
|
||||
Similarly to goals, user's can subscribe to milestones.
|
||||
Similarly to goals, user's can subscribe to quests.
|
||||
|
||||
Milestone subscriptions are interesting in that the `progress` factor is always an integer -- how many goals in the milestone the user has achieved, and the `outOf` factor is always an integer -- how many goals need to be achieved in the milestone for the milestone to be marked as achieved.
|
||||
Quest subscriptions are interesting in that the `progress` factor is always an integer -- how many goals in the quest the user has achieved, and the `outOf` factor is always an integer -- how many goals need to be achieved in the quest for the quest to be marked as achieved.
|
||||
|
||||
Similarly, the `achieved` status on milestones is identical to `progress` being greater than or equal to `outOf`.
|
||||
Similarly, the `achieved` status on quests is identical to `progress` being greater than or equal to `outOf`.
|
||||
|
||||
### Parenting Goal Subscriptions
|
||||
|
||||
When a milestone is subscribed to, all the goals in the milestone are also subscribed to.
|
||||
When a quest is subscribed to, all the goals in the quest are also subscribed to.
|
||||
|
||||
When a user is subscribed to a milestone, they *must* also be subscribed to all the goals in
|
||||
that milestone. If they aren't, they've desynced with the milestone, and that's an awful
|
||||
When a user is subscribed to a quest, they *must* also be subscribed to all the goals in
|
||||
that quest. If they aren't, they've desynced with the quest, and that's an awful
|
||||
user experience.
|
||||
|
||||
As such, Tachi keeps track of all the milestones that care about this goal subscription, and users are *prevented from unsubscribing from this goal* while any of their milestone subscriptions parent the goal.
|
||||
As such, Tachi keeps track of all the quests that care about this goal subscription, and users are *prevented from unsubscribing from this goal* while any of their quest subscriptions parent the goal.
|
||||
|
||||
### Instant Indirect Achievements
|
||||
|
||||
Subscribing to a milestone *mandates* that all of the goals are assigned. It is not rare for this to mean that you subscribe to goals that are instantly achieved.
|
||||
Subscribing to a quest *mandates* that all of the goals are assigned. It is not rare for this to mean that you subscribe to goals that are instantly achieved.
|
||||
|
||||
This is fine. If this does happen though, `wasInstantlyAchieved` is set on the goal, and no
|
||||
webhook event is emitted.
|
||||
|
||||
### Unsubscribing
|
||||
|
||||
Unsubscribing from a milestone is a two-pass process. Firstly, for all `goalID`s in the milestone, the subscription document has the relevant `milestoneID` pulled from the array.
|
||||
Unsubscribing from a quest is a two-pass process. Firstly, for all `goalID`s in the quest, the subscription document has the relevant `questID` pulled from the array.
|
||||
|
||||
The second part of the process involves unsubscribing the user from any goals that now have
|
||||
an empty array as a result of this process.
|
||||
@@ -112,9 +112,9 @@ an empty array as a result of this process.
|
||||
If this process sounds like it has race conditions, it's because it probably does.
|
||||
Ah well.
|
||||
|
||||
## Milestone Sets
|
||||
## Questlines
|
||||
|
||||
Milestone sets are ordered groups of milestones. Their purpose is to group milestones together
|
||||
Questline are ordered lists of quests. Their purpose is to group quests together
|
||||
visually.
|
||||
|
||||
Users *can not* "subscribe" to milestone sets, but they can use sets as a utility for subscribing to all the related milestones.
|
||||
Users *can not* "subscribe" to quest sets, but they can use sets as a utility for subscribing to all the related quests.
|
||||
@@ -129,13 +129,13 @@ changed or not, and updates them accordingly.
|
||||
|
||||
- Full Page: [Goals](./goals.md)
|
||||
|
||||
### Milestones
|
||||
### Quests
|
||||
|
||||
Checks the set of goals modified in the previous step,
|
||||
and gets the relevant milestones. This step then re-evaluates all of those milestones and
|
||||
and gets the relevant quests. This step then re-evaluates all of those quests and
|
||||
updates accordingly.
|
||||
|
||||
- Full Page: [Milestones](./milestones.md)
|
||||
- Full Page: [Quests](./quests.md)
|
||||
|
||||
### Import Document
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# Updating Milestones
|
||||
|
||||
We update milestones by looking at the set of modified
|
||||
goalIDs, and check the user's assigned milestones to
|
||||
get those that are affected.
|
||||
|
||||
*****
|
||||
|
||||
## Returns
|
||||
|
||||
We evaluate every milestone, and for each one,
|
||||
create a bulkwrite operation to update the user's milestone
|
||||
progress.
|
||||
|
||||
If the user has newly achieved a milestone, a Redis Event
|
||||
is emitted, which could be hooked into by our Discord Bot.
|
||||
|
||||
If the progress has changed at all, the data is
|
||||
pushed to an array which is then returned. This is
|
||||
attached onto the Import Document.
|
||||
@@ -0,0 +1,20 @@
|
||||
# Updating Quests
|
||||
|
||||
We update quests by looking at the set of modified
|
||||
goalIDs, and check the user's assigned quests to
|
||||
get those that are affected.
|
||||
|
||||
*****
|
||||
|
||||
## Returns
|
||||
|
||||
We evaluate every quest, and for each one,
|
||||
create a bulkwrite operation to update the user's quest
|
||||
progress.
|
||||
|
||||
If the user has newly achieved a quest, a Redis Event
|
||||
is emitted, which could be hooked into by our Discord Bot.
|
||||
|
||||
If the progress has changed at all, the data is
|
||||
pushed to an array which is then returned. This is
|
||||
attached onto the Import Document.
|
||||
+17
-17
@@ -89,7 +89,7 @@ That's it for sessions! As a quick summary:
|
||||
## Goals
|
||||
|
||||
!!! note
|
||||
This feature goes hand-in-hand with [Milestones](#milestones).
|
||||
This feature goes hand-in-hand with [Quests](#quests).
|
||||
|
||||
Goals are a built-in way of setting targets for yourself.
|
||||
|
||||
@@ -187,7 +187,7 @@ That's it for goals! As a quick summary:
|
||||
|
||||
This is nice, but there's something missing...
|
||||
|
||||
## Milestones
|
||||
## Quests
|
||||
|
||||
As mentioned above, Goals were designed to go hand-in-hand
|
||||
with this feature.
|
||||
@@ -203,11 +203,11 @@ aiming for, or is just lazy and doesn't like setting goals?
|
||||
In general, we're bad at setting our own goals. How can
|
||||
we fix that?
|
||||
|
||||
### What are Milestones?
|
||||
### What are Quests?
|
||||
|
||||
Milestones are **pre-made groups of goals**. As an example,
|
||||
Quests are **pre-made groups of goals**. As an example,
|
||||
we might bundle together some goals aimed at SOUND VOLTEX
|
||||
11 dan players. You can then subscribe to that milestone,
|
||||
11 dan players. You can then subscribe to that quest,
|
||||
and all those goals will be merged with your list of goals!
|
||||
|
||||
This solves the problem of having to set and manage *loads*
|
||||
@@ -215,29 +215,29 @@ of goals on your own - since other people can come up with
|
||||
and debate good goals for your skill level, and you can
|
||||
just seamlessly integrate them with your play!
|
||||
|
||||
### Who makes the Milestones?
|
||||
### Who makes the Quests?
|
||||
|
||||
The community! People are free to create their own
|
||||
milestones and share them.
|
||||
quests and share them.
|
||||
|
||||
### Why are they called Milestones?
|
||||
### Why are they called Quests?
|
||||
|
||||
Milestones work as - well - milestones!
|
||||
Quests work as - well - quests!
|
||||
|
||||
They're achievable, just like goals, which means the
|
||||
milestone creator can set criteria.
|
||||
quest creator can set criteria.
|
||||
|
||||
A basic example would be counting the milestone as
|
||||
A basic example would be counting the quest as
|
||||
achieved when you've achieved *all* of the goals in that
|
||||
milestone.
|
||||
quest.
|
||||
|
||||
More advanced options include achieving X goals inside a
|
||||
milestone, or X% of the goals inside a milestone.
|
||||
quest, or X% of the goals inside a quest.
|
||||
|
||||
### Summary
|
||||
|
||||
That's all for milestones! As a quick summary:
|
||||
That's all for quests! As a quick summary:
|
||||
|
||||
- Since milestones are achievables, you'll be automatically notified when you tick another milestone off!
|
||||
- You can also see other user's milestones and their progress.
|
||||
- Milestones reduce the pain of having to set your goals yourself!
|
||||
- Since quests are achievables, you'll be automatically notified when you tick another quest off!
|
||||
- You can also see other user's quests and their progress.
|
||||
- Quests reduce the pain of having to set your goals yourself!
|
||||
|
||||
Reference in New Issue
Block a user