Recipe Type: Ritual - Mithion/Mana-And-Artifice GitHub Wiki
Supported Properties
- type: Must be "mna:ritual"
- tier: The tier required to perform the ritual.
- pattern: The placement of runes. Described below.
- displayPattern: Optional. The way the beams and light points are drawn. Defaults to pattern's value.
- reagents: Defines where reagents are placed on the runes.
- keys: Maps items and some additional properties to the reagents.
- manaweave: Required manaweave patterns to complete the ritual.
- parameters: Some additional parameters to control various aspects of the ritual.
- createsItem: Optional. Used for gui displays. DOES NOT actually cause the ritual to craft an item.
- command: Optional. A command that is run when the ritual finishes. This parameter removes the need for a RitualHandler from the API, but both can exist. @s in the command will be replaced with the player that performed the ritual, and the position of the command will be the ritual's center. The permission level rituals run their commands at can be set with the "ritualPermissionLevel" config value.
Patterns and Display Patterns
Patterns are 2-dimensional arrays that use non-zero numbers to indicate that a rune must be placed there. A value of -1 means require a rune, but don't put a light point or connect a beam there. Patterns can be no larger than 13x13, and they must be square and odd widths. For instance, you can't have a 4x4 ritual or a 4x3. Odd numbers are required so the ritual has a distinct center.
Display Patterns can be used to change the pattern separately from the runes. A limitation is that a rune must be placed at each location that is to have a light point or connected beam. The Display Pattern array must be the same size as the pattern array.
Use incrementing numbers to determine the order in which points/beams are drawn and connected.
The pattern will draw from 1 -> 2 -> 3 etc.
If you want to make a gap in the pattern, skip a number:
- 1 -> 2 -> 3
- 5 -> 6 -> 7 -> 8
Reagents and Keys
The reagents array is a list of strings that represent where items must go in the ritual. It must have the same number of elements as the Patterns array's outer bound, and each string must be the length of the Patterns array's inner bound. So, if your patterns array has 9 rows, your reagents array must have 9 rows, and each string must be 9 characters long.
Anywhere a letter exists in a reagent string is where an item must be placed. This must correspond with a rune in the Patterns array. Use spaces to indicate locations where a reagent is not needed.
Whatever letter you use in the reagents string must be defined in the Keys property. Keys support the following properties:
- item: The item required at the given location
- optional: Is the item required for the ritual to complete?
- consume: Should the item be consumed as part of the ritual?
- is_dynamic: Is this item resolved dynamically?
- dynamic_source: Is this item used to resolve dynamics? Only one dynamic source can exist per recipe.
The last 2 properties are only usable in rituals with a full ritual handler specified.
Parameters
The available parameters are all optional. They include:
- innerColor: The inner color of the light points
- outerColor: The outer color of the light points
- displayIndexes: Should index numbers be displayed? Think ritual of homestead, how it displays numbers for slots. This requires sequentially stepping numbers in the Patterns array to function.
- kittable: Can the ritual be kitted? Set this to false if you use dynamics.
- beamColor: The color of the beam
See Ritual Handlers for implementing custom functionality into rituals.
Sample Recipes
{
"type": "mna:ritual",
"tier": 1,
"pattern":
[
[ 0, 2, 0 ],
[ 1,-1, 3 ],
[ 0, 4, 0 ]
],
"reagents":
[
" ",
"W W",
" "
],
"keys":
{
"W":
{
"item": "wool",
"optional": false,
"consume": false
}
},
"parameters":
{
"innerColor": "0xFFCC00",
"outerColor": "0xFF8A00",
"beamColor": "0xffd000"
}
}
{
"type": "mna:ritual",
"tier": 1,
"pattern":
[
[ 0,34,38, 0,14, 0,41,37, 0 ],
[18, 0,26, 0,10, 0,29, 0,21 ],
[22,30,45, 0, 0, 0,42,33,25 ],
[ 0, 0, 0, 2, 8, 5, 0, 0, 0 ],
[17,13, 0, 6, 1, 7, 0,12,16 ],
[ 0, 0, 0, 4, 9, 3, 0, 0, 0 ],
[23,31,43, 0, 0, 0,44,32,24 ],
[19, 0,27, 0,11, 0,28, 0,20 ],
[ 0,35,39, 0,15, 0,40,36, 0 ]
],
"displayPattern":
[
[ 0,-1,-1, 0,-1, 0,-1,-1, 0 ],
[-1, 0,-1, 0, 2, 0,-1, 0,-1 ],
[-1,-1,-1, 0, 0, 0,-1,-1,-1 ],
[ 0, 0, 0,-1,-1,-1, 0, 0, 0 ],
[ 4,-1, 0,-1,-1,-1, 0,-1, 5 ],
[ 0, 0, 0,-1,-1,-1, 0, 0, 0 ],
[-1,-1,-1, 0, 0, 0,-1,-1,-1 ],
[-1, 0,-1, 0,-1, 0,-1, 0,-1 ],
[ 0, 1,-1, 0,-1, 0,-1, 3, 0 ]
],
"reagents":
[
" DD C DD ",
"E F C F E",
"EFG GFE",
" SSS ",
"CC SRS CC",
" SSS ",
"EFG GFE",
"E F C F E",
" DD C DD "
],
"keys":
{
"S":
{
"item": "mna:dynamic-shape",
"optional": true,
"consume": true,
"is_dynamic": true
},
"C":
{
"item": "mna:dynamic-component",
"optional": true,
"consume": true,
"is_dynamic": true
},
"D":
{
"item": "mna:dynamic-modifier-1",
"optional": true,
"consume": true,
"is_dynamic": true
},
"E":
{
"item": "mna:dynamic-modifier-2",
"optional": true,
"consume": true,
"is_dynamic": true
},
"F":
{
"item": "mna:dynamic-modifier-3",
"optional": true,
"consume": true,
"is_dynamic": true
},
"G":
{
"item": "mna:dynamic-complexity",
"optional": true,
"consume": true,
"is_dynamic": true
},
"R":
{
"item": "mna:enchanted_vellum",
"optional": false,
"consume": true,
"dynamic_source": true
}
},
"manaweave":
[
],
"parameters":
{
"innerColor": "0x00FFCC",
"outerColor": "0x00FF8A",
"displayIndexes": false,
"kittable": false,
"beamColor": "0x16ba99"
},
"createsItem": "mna:spell"
}