Access functions via game["fvtt-player-achievements"].api
.
All functions return the following object:
{
errorMessage: 'Error message',
payload: object
}
Returns:
- "PlayerAchievementReturn.<Array.<Achievement>>"
: Achievements List
Parameters:
- achievementId
(string): The achievement id
Returns:
- "PlayerAchievementReturn.<boolean>"
: Does the achievement exist?
Parameters:
- characterUUID
(string): The character uuid
- achievementId
(string): The achievement id
Returns:
- "PlayerAchievementReturn.<boolean>"
: Does the character have the achievement?
Parameters:
- achievementId
(string): The achievement id
- characterUUID
(string): The character uuid
Returns:
- "PlayerAchievementReturn.<boolean>"
: Was the achievement awarded?
Parameters:
- characterUUID
(string): The character uuid
Returns:
- "PlayerAchievementReturn.<Array.<Achievement>>"
: achievements for the character
Parameters:
- id
(string): The achievement id
- title
(string): The achievement title
- description
(string): The achievement description
- showTitleCloaked
(boolean): Show the title cloaked?
- image
(string): The achievement image
- cloakedImage
(string): The achievement cloaked image
- sound
(string): The achievement sound effect
- tags
(Array.<string>): The achievement tags
Returns:
- "PlayerAchievementReturn.<string>"
: The ID of the achievement
Parameters:
- id
(string): The achievement id
- title
(string): The achievement title
- description
(string): The achievement description
- showTitleCloaked
(boolean): Show the title cloaked?
- image
(string): The achievement image
- cloakedImage
(string): The achievement cloaked image
- sound
(string): The achievement sound effect
- tags
(Array.<string>): The achievement tags
Returns:
- "PlayerAchievementReturn.<boolean>"
: Was the achievement edited?
Parameters:
- achievementId
(string): The achievement id
- characterUUID
(string): The character uuid
Returns:
- "PlayerAchievementReturn.<boolean>"
: Was the achievement removed?
Parameters:
- id
(string): The achievement id
Returns:
- "PlayerAchievementReturn.<boolean>"
: Was the achievement deleted?