-
Notifications
You must be signed in to change notification settings - Fork 5
Rituals
Rituals are ceremonies players can perform to interact with their chosen god, leading to rewards or enhancements in game. In deities.yml, the rituals players can perform for a given deity are listed under each one. The format for defining rituals is straightforward: under 'rituals', list the key of each ritual as it's listed in rituals.yml. You can add only one ritual if you want, or as many as you'd like.
For example:
rituals:
- "purification_ritual"
- "harvest_festival"
The rituals listed in your deity configuration should also be set up in your rituals.yml config. Here's an example:
purification_ritual:
display_name: "Ritual of Purification"
description: "Purify the lands by vanquishing dark entities"
favor: 40
item:
type: "VANILLA"
id: "IRON_SWORD"
conditions:
time: "NIGHT"
objectives:
- type: "PURIFICATION"
description: "Defeat 6 zombies around the shrine"
target: "ZOMBIE"
count: 6
outcome-command:
- "effect give @p minecraft:regeneration 30 1"
- "effect give @p minecraft:strength 60 1"
These are the current ritual objectives, more may be added over time.
| Objective | Description |
|---|---|
| Gathering | Collect specific items and bring them to a shrine. The target field specifies the item type, and count indicates the number of items required. |
| Purification | Defeat a certain number of specified mobs. The target field identifies the entity type, and count represents the number of entities to defeat. |
| Meditation | Meditate at a shrine for the specified duration. The count field indicates the time (in seconds) the player needs to meditate. |
objectives:
- type: "PURIFICATION"
description: "Defeat 6 zombies around the shrine"
target: "ZOMBIE"
count: 6
- type: "MEDITATION"
description: "Meditate at the shrine for 10 seconds"
target: PLAYER
count: 10
- type: "GATHERING"
description: "Bring 20 wheat to the shrine"
target: "WHEAT"
count: 20
Feel free to suggest more conditions in our Discord!
| Condition | Description | Possible Inputs |
|---|---|---|
| Expression | Uses PlaceholderAPI to create custom JavaScript conditions. | JavaScript expressions using PlaceholderAPI placeholders |
| Time | Specifies the time of day for the ritual. | "DAY", "NIGHT" |
| Biome | Indicates the biome in which to perform the ritual. | Names of biomes (e.g., "FOREST", "DESERT") |
| Weather | Requires specific weather conditions. | "CLEAR", "RAIN", "THUNDER" |
| Moon Phase | Specifies the required phase of the moon. | "FULL_MOON", "WANING_GIBBOUS", "LAST_QUARTER", "WANING_CRESCENT", "NEW_MOON", "WAXING_CRESCENT", "FIRST_QUARTER", "WAXING_GIBBOUS" |
| Min Altitude | The minimum altitude for the ritual location. | Numeric value (e.g., 64) |
| Min Experience | The minimum experience level of the player. | Numeric value (e.g., 15) |
| Min Health | The minimum health the player must have. | Numeric value (0.0 to 20.0) |
| Min Hunger | The minimum hunger level the player must maintain. | Numeric value (0 to 20) |
The Expression condition allows admins to define custom conditions for rituals using the JavaScript PlaceholderAPI expansion. This allows for more unique conditional requirements for rituals to begin.
How to Use:
- Write a JavaScript expression that returns true or false.
- Use PlaceholderAPI placeholders within the expression for dynamic values.
- Place the expression in the conditions.expression field in your ritual configuration.
Example
To require a player to be at least level 20 in MMOCore for a ritual, use the following condition in your rituals.yml:
conditions:
expression: "%mmocore_level% > 20"
In this example, %mmocore_level% is replaced by the player's level from MMOCore, and the JavaScript parseInt function ensures the value is treated as an integer for comparison.