Archetypes

Archetype can be defined in JSON files within data/tetra/archetypes/ in your datapack.

Archetype definition

Archetypes allow for new types of modular items to be defined without having to register a new item programmatically, making it possible for datapacks or lowcode mods to add new types of items. All archetype items share the same item ID (tetra:dynamic_handheld), an nbt field (key: "archetype") determines the archetype of a given itemstack. Archetype items all act as handheld items, like swords and tools.

Format:
idResource location

Identifier for the archetype, use your own namespace.

honeableboolean

Determines if the item can gain progress towards honing.

honeBasenumber

The base value for the number of times the item has to be used for honing to become available.

honeIntegrityMultipliernumber

Integrity multiplier values used when calculating the number of times the item has to be used for honing to become available.

slots
array[
keystring

The key of the slot, referenced by modules, schematics and replacements. Should be unique within the archetype but could be reused between multiple archetypes and items.

majorboolean

Set to true if this should be a major module slot, major modules can hold improvements.

requiredboolean

If set to false, the player can remove the module from this slot.

xnumber

The x offset for the module in the item view (used in the workbench UI and the holosphere UI).

ynumber

The y offset for the module in the item view (used in the workbench UI and the holosphere UI).

]

Relevant localization keys

Keys used for localization entries related to archetypes (or modular items in general):

  • tetra.slot.<slot_key>: The label for the slot, displayed in the workbench and the holosphere