@ -3,13 +3,13 @@ and documentation will be printed.
keepAdvancements:
pageOrder:
Arguments:
String array
Default Values:
true
Usage:
Array of root advancement resource location
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:
Arguments:
@ -19,34 +19,10 @@ allowDragging:
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.
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:
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'
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:
Arguments:
boolean
@ -77,3 +53,27 @@ printDocumentation:
Notes:
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:
Arguments:
String
@ -10,33 +18,21 @@ setDescription:
Notes:
Sets the description for the advancement. This or setTranslatedDescription is required.
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.
setBackground:
addCriteria:
Arguments:
boolean
String, String
Usage:
background resource location
Notes:
Sets the background for the advancement page. This is required and only used by root advancements. Be aware the background is tiled.
drawDirectLines:
criteria name, criteria trigger type
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:
Notes:
Sets the advancement to hide connection lines to parents.
setPos:
Arguments:
int, int
Usage:
x pos, y pos
drawDirectLines:
Notes:
Sets the x and y coordinates of the advancement.
Sets the advancement to draw direct lines to parents.
setTitle:
Arguments:
@ -54,163 +50,143 @@ setIcon:
Notes:
Sets the item icon for the advancement. This is required.
addParent:
setPos:
Arguments:
String
int, int
Usage:
x pos, y pos
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:
boolean
Usage:
if the advancement should be hidden
background resource location
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:
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:
String
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:
String, String array
int
Usage:
Requirements type, criteria exception array
color
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:
String
int, int, int
Usage:
Requirements type. This type can be either "any" or "all"
red, green, blue
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:
String array
String
Usage:
array of criteria requirements
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:
loottable resource location
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:
boolean
int
Usage:
if the toast should be shown
color int
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:
String
int, int, int
Usage:
Advancement resource location or gamestage name
red, green, blue
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:
String
Usage:
Advancement resource location or gamestage name
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
title translation path
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:
String
String, int
Usage:
recipe name
skill, levels
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:
String
boolean
Usage:
Advancement resource location or gamestage name
if advancement completion should be announced in chat
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:
String
int
Usage:
Advancement resource location or gamestage name
color int
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:
String
int, int, int
Usage:
Advancement resource location or gamestage name
red, green, blue
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:
String
int
Usage:
Advancement resource location or gamestage name
color int
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:
ItemBlockData
int, int, int
Usage:
item data
red, green, blue
Notes:
Adds the item as a reward for completing this advancement.
Sets the uncompleted title color for the advancement.
setFrameType:
setCompletedLineColor:
Arguments:
boolean
int, int, int
Usage:
frame type
red, green, blue
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:
String
int
Usage:
Advancement resource location or gamestage name
color int
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:
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:
Arguments:
@ -220,14 +196,6 @@ pageVisibleUnless:
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.
addRewardLootTable:
Arguments:
String
Usage:
loottable resource location
Notes:
Adds a loot table reward.
setRewardExperience:
Arguments:
int
@ -236,143 +204,175 @@ setRewardExperience:
Notes:
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:
int
Usage:
color
Notes:
Sets the completed icon color for the advancement.
Sets the completed title color for the advancement.
setCompletedIconColor:
setCompletedTitleColor:
Arguments:
int, int, int
Usage:
red, green, blue
Notes:
Sets the completed icon color for the advancement.
Sets the completed title color for the advancement.
setCompletedLineColor:
setTranslatedDescription:
Arguments:
int
String
Usage:
color int
description translation path
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:
int, int, int
boolean
Usage:
red, green, blue
if the toast should be shown
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:
int
String
Usage:
color
Advancement resource location or gamestage name
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:
int, int, int
String
Usage:
red, green, blue
Advancement resource location or gamestage name
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:
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:
String, int
String array
Usage:
skill, levels
array of criteria requirements
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:
int, int, int
boolean
Usage:
red, green, blue
frame type
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:
int
String
Usage:
color int
recipe name
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:
String
ItemBlockData
Usage:
function name
item data
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:
int, int, int
String
Usage:
red, green, blue
Advancement resource location or gamestage name
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:
int
String
Usage:
color int
Advancement resource location or gamestage name
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:
int, int, int
String
Usage:
red, green, blue
Advancement resource location or gamestage name
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:
int
String, String array
Usage:
color int
Requirements type, criteria exception array
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:
boolean
String
Usage:
if advancement completion should be announced in chat
Requirements type. This type can be either "any" or "all"
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:
String
Usage:
title translation path
Advancement resource location or gamestage name
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:
String
Usage:
description translation path
Advancement resource location or gamestage name
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.