Requirements v2 - RealMegaMinds/ActionInventoryMod GitHub Wiki

Requirements


Requirements are what determine whether a player is able to view or click on an action item.

Requirements are represented by a json object. All requirements have:

Type

key = 'type'
Can be one of 'xp'. (More types planned soon!)

When

key = 'when'
Can be one of 'view' or 'click'.

Type Specific

Depending on the type, there are additional requirements.

XP

This requirement looks a players experience level.
A requirement with type 'xp' must have:

Required Cost

key = 'requiredCost'
This is an int. This is the number of xp levels a player must have.

Consumes

key = 'consumes'
This is a boolean. This determines whether the player's xp levels are consumed (true) or not (false).

Allow Partial

key = 'allowPartial'
This is a boolean. This determines whether partial amounts can be taken (true) or if the full amount must be paid at the same time (false). This doesn't matter if 'consumes' is false. This requirement will not be met until the full amount is paid, even if 'allowPartial' is true.

Resets

key = 'resets'
This is a boolean. This determines whether the requirement is reset (true) when a player is successful in activating an action item, or whether the paid amount is kept (false). This doesn't matter if 'consumes' is false.

⚠️ **GitHub.com Fallback** ⚠️