Skip to main content
Version: 26.1.2 (Latest)

Unlock Conditions

Conditions can be used to keep pages, entries or whole categories hidden until the condition is met. This is useful to give players a sense of progression.

Most progression is now handled through the Research System. The condition types below cover the remaining non-research conditions.

Conditions are JSON Objects that can be set as value for the "condition" field on page, entry or category JSONs as follows:

"condition": {
"type": "<type>",
... //condition specific fields
},

Note that only one condition can be supplied per entry or category. If you want to combine multiple conditions, you can use the modonomicon:and, modonomicon:or or modonomicon:not condition types.

info

The condition only controls visibility, the content is always loaded. To remove content entirely (e.g. for optional mod integrations or to remove content via datapack), use Load Conditions instead.

Locked Categories​

When a category condition is not met, the category is either hidden from the parent screens or shown as locked, depending on locked_category_display:

  • hidden: no button / list entry is shown for the category.
  • show_as_locked: the category is still listed with a lock indicator (node mode: lock badge over the bottom right quarter of the category icon; index mode: lock icon with a "Locked" label). Opening it shows its locked entries (or an empty list in index mode).

The default is hidden for node mode books and show_as_locked for index mode books. It can be set per book in book.json and overridden per category in the category json.

Available Condition Types​

The following condition types are available:

Common Attributes​

The following attributes are available for all condition types:

type (String, mandatory)​

The type of condition, it determines which loader is used to load the json data. Needs to be fully qualified domain:name, e.g. modonomicon:research_node_unlocked.

tooltip (DescriptionId or Component JSON, optional)​

Default Value: A tooltip that explains what needs to be done to unlock the entry based on the condition type.
The tooltip to display when hovering over the entry locked by this condition. Will only display while the entry is still locked.