@ -3,13 +3,13 @@ and documentation will be printed.
keepAdvancements:
pageOrder:
Arguments:
Arguments:
String array
String array
Default Values:
Usage:
true
Array of root advancement resource location
Notes:
Notes:
Used to set advancements that should be kept. Can contain both mod ids and advancement ids. If anything is set in this array, everything else will be removed.
Forces an order for advancement pages in the gui. Any not added to this array are ordered alphabetically.
allowDragging:
allowDragging:
Arguments:
Arguments:
@ -19,34 +19,10 @@ allowDragging:
Notes:
Notes:
Sets whether advancements can be dragged around in the gui. End positions will be saved to script files when the mouse button is released, but advancements must be reloaded to refresh positions after the gui is closed.
Sets whether advancements can be dragged around in the gui. End positions will be saved to script files when the mouse button is released, but advancements must be reloaded to refresh positions after the gui is closed.
removeModAdvancements:
Arguments:
boolean
Default Values:
true
Notes:
Used to set whether Triumph should remove mod advancements.
removeAdvancements:
Arguments:
String array
Default Values:
true
Notes:
Used to set advancements that should be removed. Can contain both mod ids and advancement ids. If anything is set in this array, everything else will be kept.
useNewParentCompletionCriteriaNames:
useNewParentCompletionCriteriaNames:
Notes:
Notes:
Tells the mod to use the new naming scheme for parent completion criteria generated with 'setRequiresParents()', instead of the old one. 'Completed Title' vs 'completedParent1'
Tells the mod to use the new naming scheme for parent completion criteria generated with 'setRequiresParents()', instead of the old one. 'Completed Title' vs 'completedParent1'
pageOrder:
Arguments:
String array
Usage:
Array of root advancement resource location
Notes:
Forces an order for advancement pages in the gui. Any not added to this array are ordered alphabetically.
removeVanillaAdvancements:
removeVanillaAdvancements:
Arguments:
Arguments:
boolean
boolean
@ -77,3 +53,27 @@ printDocumentation:
Notes:
Notes:
Used to set whether Triumph should print config documentation.
Used to set whether Triumph should print config documentation.
removeModAdvancements:
Arguments:
boolean
Default Values:
true
Notes:
Used to set whether Triumph should remove mod advancements.
removeAdvancements:
Arguments:
String array
Default Values:
true
Notes:
Used to set advancements that should be removed. Can contain both mod ids and advancement ids. If anything is set in this array, everything else will be kept.
keepAdvancements:
Arguments:
String array
Default Values:
true
Notes:
Used to set advancements that should be kept. Can contain both mod ids and advancement ids. If anything is set in this array, everything else will be removed.
@ -2,6 +2,14 @@ These are the functions which can be called directly in a script advancement fil
setHidden:
Arguments:
boolean
Usage:
if the advancement should be hidden
Notes:
Sets if the advancement should be hidden until it is completed. Not compatible with other visibility options.
setDescription:
setDescription:
Arguments:
Arguments:
String
String
@ -10,33 +18,21 @@ setDescription:
Notes:
Notes:
Sets the description for the advancement. This or setTranslatedDescription is required.
Sets the description for the advancement. This or setTranslatedDescription is required.
setRequiresParents:
addCriteria:
Notes:
This is a helper method which adds criteria either named 'completedParent'/'completedParent2'/etc or if the 'useNewParentCompletionCriteriaNames' option is set in the main config named the same as their title or resource location (Example: "Completed Some Advancement Title") with type "triumph:completed_advancement", and makes them a requirement. This effectively makes the advancement require its parents to be completed before it can be completed.
setBackground:
Arguments:
Arguments:
boolean
String, String
Usage:
Usage:
background resource location
criteria name, criteria trigger type
Notes:
Sets the background for the advancement page. This is required and only used by root advancements. Be aware the background is tiled.
drawDirectLines:
Notes:
Notes:
Sets the advancement to draw direct lines to parents.
Adds a criteria to the advancement with the specified type. Returns the criteria object for use as a variable.
hideLines:
hideLines:
Notes:
Notes:
Sets the advancement to hide connection lines to parents.
Sets the advancement to hide connection lines to parents.
setPos:
drawDirectLines:
Arguments:
int, int
Usage:
x pos, y pos
Notes:
Notes:
Sets the x and y coordinates of the advancement.
Sets the advancement to draw direct lines to parents.
setTitle:
setTitle:
Arguments:
Arguments:
@ -54,163 +50,143 @@ setIcon:
Notes:
Notes:
Sets the item icon for the advancement. This is required.
Sets the item icon for the advancement. This is required.
addParent:
setPos:
Arguments:
Arguments:
String
int, int
Usage:
x pos, y pos
Notes:
Notes:
Adds a parent for the advancement. This only effects its position on the advancement page and connection lines. By default parents are not required for the advancement to be completed. At least one parent is required for non-root advancements. If the string ends with a / it will be treated as a folder, and all advancements within that folder will be added as parents.
Sets the x and y coordinates of the advancement.
setHidden:
setBackground:
Arguments:
Arguments:
boolean
boolean
Usage:
Usage:
if the advancement should be hidden
background resource location
Notes:
Notes:
Sets if the advancement should be hidden until it is completed. Not compatible with other visibility options.
Sets the background for the advancement page. This is required and only used by root advancements. Be aware the background is tiled.
addCriteria:
addParent:
Arguments:
Arguments:
String, String
String
Usage:
criteria name, criteria trigger type
Notes:
Adds a criteria to the advancement with the specified type. Returns the criteria object for use as a variable.
pageRequiresRoot:
Notes:
Notes:
Convenience method to add a 'triumph:completed_advancement' criteria for this root to every advancement on the page. Can only be used in a root advancement.
Adds a parent for the advancement. This only effects its position on the advancement page and connection lines. By default parents are not required for the advancement to be completed. At least one parent is required for non-root advancements. If the string ends with a / it will be treated as a folder, and all advancements within that folder will be added as parents.
setRequirements:
setCompletedIconColor:
Arguments:
Arguments:
String, String array
int
Usage:
Usage:
Requirements type, criteria exception array
color
Notes:
Notes:
This is a helper method designed to make setting criteria requirements easier. If set to "all" this will make all criteria required for completion. If set to "any" this will make any criteria complete the advancement. If set to "any" the array of criteria exceptions is used to configure the requirements where all exceptions are required plus any other single criteria.
Sets the completed icon color for the advancement.
setRequirements:
setCompletedIconColor:
Arguments:
Arguments:
String
int, int, int
Usage:
Usage:
Requirements type. This type can be either "any" or "all"
red, green, blue
Notes:
Notes:
This is a helper method designed to make setting criteria requirements easier. If set to "all" this will make all criteria required for completion. If set to "any" this will make any criteria complete the advancement.
Sets the completed icon color for the advancement.
addRequirements:
addRewardLootTable:
Arguments:
Arguments:
String array
String
Usage:
Usage:
array of criteria requirements
loottable resource location
Notes:
This is the manual way of adding requirements. The array of criteria requirements will be added as a requirement array. This is done in basically the same way as vanilla Json advancements, where an array of requirements is a group of criteria that, if all are completed, the advancement is completed. Multiple arrays can be added by calling this function multiple times.
alwaysVisible:
Notes:
Notes:
Makes the advancement always visible. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Adds a loot table reward.
setShowToast:
setUncompletedLineColor:
Arguments:
Arguments:
boolean
int
Usage:
Usage:
if the toast should be shown
color int
Notes:
Notes:
Sets if a toast should be shown to the player when the advancement is completed.
Sets the uncompleted line color for the advancement.
visibleUnless:
setUncompletedLineColor:
Arguments:
Arguments:
String
int, int, int
Usage:
Usage:
Advancement resource location or gamestage name
red, green, blue
Notes:
Notes:
Makes the advancement visible if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the uncompleted line color for the advancement.
pageHiddenUnless:
setTranslatedTitle:
Arguments:
Arguments:
String
String
Usage:
Usage:
Advancement resource location or gamestage name
title translation path
Notes:
Only usable in root advancements. Makes the page hidden if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
pageAlwaysHidden:
Notes:
Only usable in root advancements. Makes the page always hidden. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setRepeatTime:
Arguments:
long
Usage:
number of seconds before the advancement can be repeated
Notes:
Notes:
Sets the number of seconds real time between advancement completion and when it will be completable again.
Sets the translated title for the advancement. Used for localization. This or setTitle is required.
addRewardRecipe:
addRewardSkillable:
Arguments:
Arguments:
String
String, int
Usage:
Usage:
recipe name
skill, levels
Notes:
Notes:
Adds a recipe as a reward for completing the advancement. You can get the name of the recipe you want to grant from NEI or JEI.
Adds a Skillable skill level up reward.
visibleIf:
setAnnounceToChat:
Arguments:
Arguments:
String
boolean
Usage:
Usage:
Advancement resource location or gamestage name
if advancement completion should be announced in chat
Notes:
Notes:
Makes the advancement visible if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets if the advancement completion should be announced in chat.
hiddenIf:
setUncompletedIconColor:
Arguments:
Arguments:
String
int
Usage:
Usage:
Advancement resource location or gamestage name
color int
Notes:
Notes:
Makes the advancement hidden if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the uncompleted icon color for the advancement.
hiddenUnless:
setUncompletedIconColor:
Arguments:
Arguments:
String
int, int, int
Usage:
Usage:
Advancement resource location or gamestage name
red, green, blue
Notes:
Notes:
Makes the advancement hidden if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the uncompleted icon color for the advancement.
pageVisibleIf:
setUncompletedTitleColor:
Arguments:
Arguments:
String
int
Usage:
Usage:
Advancement resource location or gamestage name
color int
Notes:
Notes:
Only usable in root advancements. Makes the page visible if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the uncompleted title color for the advancement.
addRewardItem:
setUncompletedTitleColor:
Arguments:
Arguments:
ItemBlockData
int, int, int
Usage:
Usage:
item data
red, green, blue
Notes:
Notes:
Adds the item as a reward for completing this advancement.
Sets the uncompleted title color for the advancement.
setFrameType:
setCompletedLineColor:
Arguments:
Arguments:
boolean
int, int, int
Usage:
Usage:
frame type
red, green, blue
Notes:
Notes:
Sets the frame type for the advancement. Options are "TASK", "CHALLENGE", "GOAL". Default is TASK.
Sets the completed line color for the advancement.
pageHiddenIf:
setCompletedLineColor:
Arguments:
Arguments:
String
int
Usage:
Usage:
Advancement resource location or gamestage name
color int
Notes:
Notes:
Only usable in root advancements. Makes the page hidden if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the completed line color for the advancement.
alwaysHidden:
pageAlwaysVisible:
Notes:
Notes:
Makes the advancement always hidden. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Only usable in root advancements. Makes the page always visible. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
pageVisibleUnless:
pageVisibleUnless:
Arguments:
Arguments:
@ -220,14 +196,6 @@ pageVisibleUnless:
Notes:
Notes:
Only usable in root advancements. Makes the page visible if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Only usable in root advancements. Makes the page visible if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
addRewardLootTable:
Arguments:
String
Usage:
loottable resource location
Notes:
Adds a loot table reward.
setRewardExperience:
setRewardExperience:
Arguments:
Arguments:
int
int
@ -236,143 +204,175 @@ setRewardExperience:
Notes:
Notes:
Sets the experience amount for the reward for completing the advancement. This is in xp, not in levels.
Sets the experience amount for the reward for completing the advancement. This is in xp, not in levels.
setCompletedIconColor:
setRequiresParents:
Notes:
This is a helper method which adds criteria either named 'completedParent'/'completedParent2'/etc or if the 'useNewParentCompletionCriteriaNames' option is set in the main config named the same as their title or resource location (Example: "Completed Some Advancement Title") with type "triumph:completed_advancement", and makes them a requirement. This effectively makes the advancement require its parents to be completed before it can be completed.
addRewardFunction:
Arguments:
String
Usage:
function name
Notes:
Adds the function with the provided name as a reward for completing the advancement.
setCompletedTitleColor:
Arguments:
Arguments:
int
int
Usage:
Usage:
color
color
Notes:
Notes:
Sets the completed icon color for the advancement.
Sets the completed title color for the advancement.
setCompletedIconColor:
setCompletedTitleColor:
Arguments:
Arguments:
int, int, int
int, int, int
Usage:
Usage:
red, green, blue
red, green, blue
Notes:
Notes:
Sets the completed icon color for the advancement.
Sets the completed title color for the advancement.
setCompletedLineColor:
setTranslatedDescription:
Arguments:
Arguments:
int
String
Usage:
Usage:
color int
description translation path
Notes:
Notes:
Sets the completed line color for the advancement.
Sets the description for the advancement. Used for localization. This or setDescription is required.
setCompletedLineColor:
pageRequiresRoot:
Notes:
Convenience method to add a 'triumph:completed_advancement' criteria for this root to every advancement on the page. Can only be used in a root advancement.
setShowToast:
Arguments:
Arguments:
int, int, int
boolean
Usage:
Usage:
red, green, blue
if the toast should be shown
Notes:
Notes:
Sets the completed line color for the advancement.
Sets if a toast should be shown to the player when the advancement is completed.
setCompletedTitleColor:
hiddenUnless:
Arguments:
Arguments:
int
String
Usage:
Usage:
color
Advancement resource location or gamestage name
Notes:
Notes:
Sets the completed title color for the advancement.
Makes the advancement hidden if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setCompletedTitleColor:
pageVisibleIf:
Arguments:
Arguments:
int, int, int
String
Usage:
Usage:
red, green, blue
Advancement resource location or gamestage name
Notes:
Notes:
Sets the completed title color for the advancement.
Only usable in root advancements. Makes the page visible if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
pageAlwaysVisible:
setRepeatTime:
Arguments:
long
Usage:
number of seconds before the advancement can be repeated
Notes:
Notes:
Only usable in root advancements. Makes the page always visible. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
Sets the number of seconds real time between advancement completion and when it will be completable again.
addRewardSkillable:
addRequirements:
Arguments:
Arguments:
String, int
String array
Usage:
Usage:
skill, levels
array of criteria requirements
Notes:
Notes:
Adds a Skillable skill level up reward.
This is the manual way of adding requirements. The array of criteria requirements will be added as a requirement array. This is done in basically the same way as vanilla Json advancements, where an array of requirements is a group of criteria that, if all are completed, the advancement is completed. Multiple arrays can be added by calling this function multiple times.
setUncompletedIconColor:
setFrameType:
Arguments:
Arguments:
int, int, int
boolean
Usage:
Usage:
red, green, blue
frame type
Notes:
Notes:
Sets the uncompleted icon color for the advancement.
Sets the frame type for the advancement. Options are "TASK", "CHALLENGE", "GOAL". Default is TASK.
setUncompletedIconColor:
alwaysVisible:
Notes:
Makes the advancement always visible. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
alwaysHidden:
Notes:
Makes the advancement always hidden. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
pageAlwaysHidden:
Notes:
Only usable in root advancements. Makes the page always hidden. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
addRewardRecipe:
Arguments:
Arguments:
int
String
Usage:
Usage:
color int
recipe name
Notes:
Notes:
Sets the uncompleted icon color for the advancement.
Adds a recipe as a reward for completing the advancement. You can get the name of the recipe you want to grant from NEI or JEI.
addRewardFunction:
addRewardItem:
Arguments:
Arguments:
String
ItemBlockData
Usage:
Usage:
function name
item data
Notes:
Notes:
Adds the function with the provided name as a reward for completing the advancement.
Adds the item as a reward for completing this advancement.
setUncompletedTitleColor:
visibleUnless:
Arguments:
Arguments:
int, int, int
String
Usage:
Usage:
red, green, blue
Advancement resource location or gamestage name
Notes:
Notes:
Sets the uncompleted title color for the advancement.
Makes the advancement visible if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setUncompletedTitleColor:
visibleIf:
Arguments:
Arguments:
int
String
Usage:
Usage:
color int
Advancement resource location or gamestage name
Notes:
Notes:
Sets the uncompleted title color for the advancement.
Makes the advancement visible if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setUncompletedLineColor:
pageHiddenUnless:
Arguments:
Arguments:
int, int, int
String
Usage:
Usage:
red, green, blue
Advancement resource location or gamestage name
Notes:
Notes:
Sets the uncompleted line color for the advancement.
Only usable in root advancements. Makes the page hidden if the provided advancement/gamestage is not completed. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setUncompletedLineColor:
setRequirements:
Arguments:
Arguments:
int
String, String array
Usage:
Usage:
color int
Requirements type, criteria exception array
Notes:
Notes:
Sets the uncompleted line color for the advancement.
This is a helper method designed to make setting criteria requirements easier. If set to "all" this will make all criteria required for completion. If set to "any" this will make any criteria complete the advancement. If set to "any" the array of criteria exceptions is used to configure the requirements where all exceptions are required plus any other single criteria.
setAnnounceToChat:
setRequirements:
Arguments:
Arguments:
boolean
String
Usage:
Usage:
if advancement completion should be announced in chat
Requirements type. This type can be either "any" or "all"
Notes:
Notes:
Sets if the advancement completion should be announced in chat.
This is a helper method designed to make setting criteria requirements easier. If set to "all" this will make all criteria required for completion. If set to "any" this will make any criteria complete the advancement.
setTranslatedTitle:
pageHiddenIf:
Arguments:
Arguments:
String
String
Usage:
Usage:
title translation path
Advancement resource location or gamestage name
Notes:
Notes:
Sets the translated title for the advancement. Used for localization. This or setTitle is required.
Only usable in root advancements. Makes the page hidden if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.
setTranslatedDescription:
hiddenIf:
Arguments:
Arguments:
String
String
Usage:
Usage:
description translation path
Advancement resource location or gamestage name
Notes:
Notes:
Sets the description for the advancement. Used for localization. This or setDescription is required.
Makes the advancement hidden if the provided advancement/gamestage is complete. All visibility options (alwaysVisible, alwaysHidden, visibleIf, hiddenIf, visibleUnless and hiddenUnless) are run in order of addition to the script. The first one in the list to be completed is the one which enforces its visibility option.