Skip to content

Asset Architecture

Hytale uses a fully data-driven architecture. Game content (items, interactions, NPCs, projectiles) is defined in JSON files, not code. The server loads these at startup and syncs them to clients.

The vanilla game content lives in: <Hytale Install>/release/package/game/latest/Assets.zip

This is read-only reference - use it to understand vanilla assets and find things to inherit from.

Custom content goes in Packs - mod folders that mirror the base game structure:

  • Singleplayer: %AppData%/Roaming/Hytale/UserData/mods/YourPackName/
  • Dedicated Server: <server>/mods/YourPackName/

Packs can:

  • Add new assets (new items, NPCs, interactions)
  • Override base game assets (same asset ID replaces vanilla)
  • Inherit from base game assets (via Parent)

Both base game and packs use identical structure:

[Pack or Assets.zip]/
├── Server/ # Game logic (JSON definitions)
│ ├── Item/
│ │ ├── Items/ # Item definitions
│ │ ├── Interactions/ # Interaction behaviors
│ │ ├── RootInteractions/ # Interaction entry points
│ │ ├── Recipes/ # Crafting recipes
│ │ └── Animations/ # Per-weapon animation sets
│ ├── Entity/ # Entity components (stats, effects)
│ ├── NPC/ # AI behaviors, roles
│ ├── Projectiles/ # Projectile configs
│ ├── Drops/ # Loot tables
│ └── ...
└── Common/ # Shared assets (visuals, audio)
├── Items/ # .blockymodel, textures
├── Characters/ # Player animations
├── Sounds/ # .ogg audio
├── Particles/ # Particle definitions
└── Icons/ # UI icons

Key insight: Server/ contains behavior, Common/ contains presentation.

Every pack needs a manifest.json in its root:

{
"Group": "MyGroup",
"Name": "MyPack",
"Version": "1.0.0",
"Description": "Custom content pack",
"Authors": [{ "Name": "YourName" }],
"ServerVersion": "*",
"Dependencies": {},
"DisabledByDefault": false
}

Asset IDs (derived from filenames) must follow:

  • Only A-Z, a-z, 0-9, and _ allowed
  • First letter and letters after _ must be uppercase
  • Examples: My_Custom_Sword, Fire_Wolf, Explosive_Arrow

All JSON is parsed through a typed codec system that provides validation, inheritance, and schema generation.

Code: com.hypixel.hytale.codec.builder.BuilderCodec Code: com.hypixel.hytale.assetstore.AssetStore

Each asset type has a codec that defines its fields:

// from com.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction
CODEC = BuilderCodec.builder(Interaction.class, ...)
.append("RunTime", FLOAT, (o,v) -> o.runTime = v, ...)
.append("Effects", InteractionEffects.CODEC, ...)
.build();

This means:

  • JSON fields are validated at load time
  • Unknown fields cause warnings
  • Missing required fields cause errors
  • You can’t invent new fields without code changes

Assets can inherit from other assets using Parent:

Example (from base game Server/Item/Items/Weapon/Sword/Weapon_Sword_Iron.json):

{
"Parent": "Template_Weapon_Sword",
"InteractionVars": {
"Swing_Left_Damage": {
"Interactions": [{
"Parent": "Weapon_Sword_Primary_Swing_Left_Damage",
"DamageCalculator": { "BaseDamage": { "Physical": 9 } }
}]
}
}
}

Inheritance chain:

Weapon_Sword_Iron
└── Parent: Template_Weapon_Sword
└── Parent: Template_Weapon
└── (base item properties)

Key fields:

  • Parent - Inherit all fields from another asset
  • InteractionVars - Override specific nested interactions by variable name
  • Fields you specify override parent values

Custom packs can inherit from base game assets:

{
"Parent": "Template_Weapon_Sword",
"TranslationProperties": { "Name": "My Custom Sword" }
}

Items don’t contain attack logic directly. They reference interactions via trigger bindings.

Trigger types (com.hypixel.hytale.protocol.InteractionType):

  • Primary - Left click
  • Secondary - Right click
  • Ability1, Ability2, Ability3 - Ability keys
  • Use - Interact key (E)
  • SwapTo, SwapFrom - Equip/unequip
  • Held, Equipped - Passive while holding/wearing
  • ProjectileHit, ProjectileMiss - Projectile events
  • CollisionEnter, Death - Entity events

Interactions form a behavior tree executed by the server.

Code: com.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction Code: com.hypixel.hytale.server.core.modules.interaction.interaction.config.RootInteraction

Execution flow:

Different interaction types have different authority models:

AspectAuthorityWhy
Combo indexClientResponsiveness
Charge timeClientResponsiveness
Hit detection (Selector)ClientLag compensation
Damage calculationServerAnti-cheat
Status effectsServerAnti-cheat
Inventory changesServerAnti-cheat

Code: com.hypixel.hytale.protocol.InteractionSyncData - Packet containing client state Code: com.hypixel.hytale.protocol.WaitForDataFrom - Enum: Client, Server, None

When an interaction has WaitForDataFrom.Client, the server waits for client input (like which combo attack or what entities were hit).

6. Variable Override System (InteractionVars)

Section titled “6. Variable Override System (InteractionVars)”

Items can override specific parts of their interaction chain without redefining everything.

Example: Same attack animation, different damage per weapon tier:

In your pack’s item (Server/Item/Items/Weapon/My_Sword.json):

{
"Parent": "Template_Weapon_Sword",
"InteractionVars": {
"Swing_Left_Damage": {
"Interactions": [{
"Parent": "Weapon_Sword_Primary_Swing_Left_Damage",
"DamageCalculator": { "BaseDamage": { "Physical": 25 } }
}]
}
}
}

The base game interaction chain uses Var references (from Server/Item/Interactions/Weapons/Sword/...):

{
"Type": "Selector",
"HitEntity": {
"Interactions": [{
"Type": "Replace",
"Var": "Swing_Left_Damage", // this gets replaced
"DefaultOk": true,
"DefaultValue": { "Interactions": ["Weapon_Sword_Primary_Swing_Left_Damage"] }
}]
}
}

Flow:

  1. Selector detects hit
  2. Looks for Swing_Left_Damage in item’s InteractionVars
  3. If found, use item’s override
  4. If not found, use DefaultValue

This allows:

  • Shared interaction chains across weapon tiers
  • Per-item damage, effects, sounds
  • No duplication of attack logic

Items reference animation sets, not individual animations.

Example (base game Server/Item/Items/Weapon/Sword/Template_Weapon_Sword.json):

{
"PlayerAnimationsId": "Sword"
}

This loads animation set from Server/Item/Animations/Sword.json:

{
"Animations": {
"Idle": { "ThirdPerson": "...", "FirstPerson": "..." },
"Walk": { ... },
"SwingLeft": { ... },
"SwingRight": { ... }
}
}

Interactions reference animations by ID:

{
"Effects": {
"ItemAnimationId": "SwingLeft" // looks up in current weapon's animation set
}
}

Projectiles are separate assets referenced by interactions.

Interaction (launches projectile):

{
"Type": "LaunchProjectile",
"ProjectileId": "My_Custom_Bullet"
}

Projectile definition (Server/Projectiles/My_Custom_Bullet.json):

{
"Appearance": "Bullet_Blunderbuss",
"MuzzleVelocity": 300,
"Gravity": 10,
"Damage": 50,
"TimeToLive": 50
}

Projectiles can have their own interactions for hit/miss events.

Create a template with shared properties, inherit for variants:

Template_Weapon_Sword (defines interactions, animations)
├── Weapon_Sword_Wooden (low damage)
├── Weapon_Sword_Iron (medium damage)
└── Weapon_Sword_Diamond (high damage)

Break complex behaviors into reusable pieces:

Root_Sword_Primary
└── Sword_Primary_Chain (Chaining - cycles through attacks)
├── Swing_Left (Simple - animation + sound)
│ └── Swing_Left_Selector (Selector - hit detection)
│ └── Swing_Left_Damage (DamageEntity)
├── Swing_Right
│ └── ...
└── Swing_Down
└── ...

Pattern 3: Var Overrides for Customization

Section titled “Pattern 3: Var Overrides for Customization”

Use Var + InteractionVars for per-item customization without duplicating chains:

// in interaction chain
{ "Var": "MyDamage", "DefaultValue": { ... } }
// in item
{ "InteractionVars": { "MyDamage": { "Interactions": [...] } } }

Located at <Hytale Install>/release/package/game/latest/Assets.zip:

WhatLocation in Assets.zip
Item definitionsServer/Item/Items/
RecipesServer/Item/Recipes/
InteractionsServer/Item/Interactions/
Root interactionsServer/Item/RootInteractions/
Animation setsServer/Item/Animations/
ProjectilesServer/Projectiles/
NPC rolesServer/NPC/Roles/
Entity statsServer/Entity/Stats/
Status effectsServer/Entity/Effects/
DropsServer/Drops/
ModelsCommon/Items/
SoundsCommon/Sounds/
ParticlesServer/Particles/

Located at mods/YourPackName/:

WhatLocation in Pack
Custom itemsServer/Item/Items/
Custom recipesServer/Item/Recipes/
Custom interactionsServer/Item/Interactions/
Custom projectilesServer/Projectiles/
Custom NPCsServer/NPC/Roles/
Custom dropsServer/Drops/
Custom modelsCommon/Items/
Pack metadatamanifest.json
SystemPackage
Asset loadingcom.hypixel.hytale.assetstore.AssetStore
Codec systemcom.hypixel.hytale.codec.builder.BuilderCodec
Interaction basecom.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction
Interaction typescom.hypixel.hytale.server.core.modules.interaction.interaction.config.none.*
com.hypixel.hytale.server.core.modules.interaction.interaction.config.client.*
com.hypixel.hytale.server.core.modules.interaction.interaction.config.server.*
Sync datacom.hypixel.hytale.protocol.InteractionSyncData
Trigger typescom.hypixel.hytale.protocol.InteractionType
Item configcom.hypixel.hytale.server.core.asset.type.item.config.Item
Projectile configcom.hypixel.hytale.server.core.asset.type.projectile.config.Projectile