Schematics
Schematics define how modules are crafted, and how existing major modules can be improved.
Schematics can be defined in JSON files within data/tetra/schematics/
in your datapack, those resources are typically structured like this: data/tetra/schematics/<item>/<module>/<schematic>.json
, e.g. data/tetra/schematics/double/basic_pickaxe/basic_pickaxe.json
for a basic pickaxe.
Schematic
Data defining a schematic. Schematics determine how modules are crafted, and how existing major modules can be improved.
Format:Marks if this should replace or merge with existing entries (if any) for this schematic definition. The default behaviour for upgrade schematics added by other mods and datapacks is to merge values set by those into the existing entry (if any). By setting replace to true it's possible to completely replace schematics registered by tetra, which can be useful when one wants to remove something.
The key used for localized human readable strings such as name and description. If this is not available the key field is used for picking up localized strings instead, which is preferable in most cases. This field is useful when multiple schematics should use the same name, description etc.
An array of slots which this schematic is applicable for.
Suffixes, used when crafted modules should have different keys depending on slot (e.g. pickaxe head keys end with "_left" or "_right" so that different textures can be used depending on the slot. Optional, but if provided it has to have the same length as the slots field.
The number of material that can be used when crafting with this schematic, currently only a value 0 or 1 is supported.
States if a repair schematic should also be generated based on this schematic. Useful when the crafted module is repaired using the same materials and tools as if it was crafted.
Defines if this schematic should only be applicable when the player has a honing attempt available for the item.
If set this schematic will only be visible if the player carries at least one itemstack that will produce an outcome if placed in the slot at the provided index.
Defines the outline around the schematic glyph, visible in most views where players interact with the schematic somehow. "minor" and "major" display a similar outline as minor and major modules, "improvement" looks like a major module outline with a plus, "other" has no outline and the outline can instead be part of the glyph.
The rarity of a schematic affects how it is rendered. Colors and effects are used to differentiate between effects.
Horizontal offset (from the left) for the glyph in the sprite sheet
Vertical offset (from the top) for the glyph in the sprite sheet
The resource location for the texture where the glyph is located.
The glyph displayed for this schematic, preferably the same as the module it will be used to craft but with no tint.
Used to display some information about how material properties translate into stats for the module or improvement that the schematic crafts.
Used to display hints about which materials that can be used for this schematic, strings starting with # are considered as materials, others as item IDs.
{
"slots": [
"double/head_left",
"double/head_right"
],
"keySuffixes": [
"_left",
"_right"
],
"materialSlotCount": 1,
"glyph": {
"textureX": 64,
"textureY": 0
},
"displayType": "major",
"outcomes": [
{
"material": {
"tag": "forge:obsidian"
},
"requiredTools": {
"hammer": 6
},
"moduleKey": "double/basic_hammer",
"moduleVariant": "basic_hammer/obsidian",
"improvements": {
"arrested": 0
}
},
{
"materials": [
"tetra:metal/"
],
"countFactor": 2,
"toolOffset": 1,
"moduleKey": "double/basic_hammer",
"moduleVariant": "basic_hammer/"
}
]
}
Schematic outcome data
Different types of outcomes that can be produced by a schematic.
Standard schematic outcome data
Defines a standard outcome for a schematic, resulting in a new module or an added/updated improvement.
Format:Can be set if the material stack should have some specific nbt data.
Determines how large the itemstack has to be to match this outcome. This also determines how many items are consumed when crafting.
The required itemstack required for the outcome, basically an item predicate. Required if the schematic which contains this outcome has 1 or more material slots.
The slot in which to look for the material, this can be set when doing multi-material-schematics. Can be set to a value between 0 (inclusive) and 'materialSlotCount' on the schematic. Not to be confused with the module slots of a modular item.
The experience cost for the craft, in levels. The player will be required to have this amount of experience, and will lose this amount of levels when crafting something with this outcome.
A key referring to a module. Optional, but the schematic should then apply improvements or the outcome won't do anything.
A module variant, has to be a variant (matching the 'key' of the variant) of the module specified by the moduleKey field. Optional, but has to be set if the moduleKey field is set.
An object describing which improvements to apply for this outcome, where the key is the improvement identifier and the value is the improvement level. This can be used both with and without the moduleKey being set. Improvements will only be added if that improvement is available for the module in the target slot.
If set to true the outcome will not be visible in the holosphere, but will still be craftable if the requirements are met.
Material schematic outcome data
Defines a material outcome for a schematic, this expands into several outcomes based on the referenced materials.
Format:The slot in which to look for the material, this can be set when doing multi-material-schematics. Can be set to a value between 0 (inclusive) and 'materialSlotCount' on the schematic. Not to be confused with the module slots of a modular item.
The experience cost for the craft, in levels. The player will be required to have this amount of experience, and will lose this amount of levels when crafting something with this outcome.
Multiplies the number of required materials. Decimal values allowed, the result is rounded to the nearest integer.
Offsets the number of required materials.
Multiplies the level for required tools defined by the material. Decimal values allowed, the result is rounded to the nearest integer.
Offsets the level for required tools defined by the material.
A key referring to a module. Optional, but the schematic should then apply improvements or the outcome won't do anything.
A module variant, this value is suffixed with the 'key' field from referenced materials. Optional, but has to be set if the moduleKey field is set.
An object describing which improvements to apply for this outcome, where the key is the improvement identifier and the value is the improvement level. This can be used both with and without the moduleKey being set. Improvements will only be added if that improvement is available for the module in the target slot. The improvement keys listed here are suffixed with the 'key' field from referenced materials.
If set to true the outcome will not be visible in the holosphere, but will still be craftable if the requirements are met.