HytaleDocs
Item

RootInteractions

Asset path: Server/Item/RootInteractions/*.json

A RootInteraction serves as an entry point into a set of Interactions.

In order to start an interaction chain a RootInteraction is required. A basic RootInteraction can simply contain a reference to single interaction within Interactions field which will be the entire chain. More complex cases can configure the other fields.

Most fields configured here apply to all Interactions contained the root and any Interactions they contain as well. Systems that look at tags for interactions may also check the root interaction as well reducing the need to duplicate them on all nested interactions.

Parent

When set this asset will inherit properties from the named asset.

When inheriting from another RootInteraction most properties will simply be copied from the parent asset to this asset. In the case where both child and parent provide a field the child field will simply replace the value provided by the parent, in the case of nested structures this will apply to the fields within the structure. In some cases the field may decide to act differently, for example: by merging the parent and child fields together.

Type information: String

Tags

Tags are a general way to describe an asset that can be interpreted by other systems in a way they see fit.

For example you could tag something with a Material tag with the values Solid and Stone, And another single tag Ore.

Tags will be expanded into a single list of tags automatically. Using the above example with Material and Ore the end result would be the following list of tags: Ore, Material, Solid, Stone, Material=Solid and Material=Stone.

Type information:

(Nullable) Map of the following:

KeyType
any StringArray of String

Interactions

The list of interactions that will be run when starting a chain with this root interaction. Interactions in this list will be run in sequence.

Type information:

Array of the type: Either String or Interaction

Reference to a Interaction asset

Cooldown

Cooldowns are used to prevent an interaction from running repeatedly too quickly.

During a cooldown attempting to run an interaction with the same cooldown id will fail.

Type information:

(Nullable)

InteractionCooldown with the following properties:

KeyTypeDescription
Id(Nullable) String

The Id for the cooldown.

Cooldowns can be used on different interactions but share a cooldown.

Cooldown(Nullable) Either Number defaults to: 0.0 or String that matches the pattern: ^(-?Infinity|NaN)$

The time in seconds this cooldown should last for.

Charges(Nullable) Array of Number

The charge times available for this interaction.

SkipCooldownResetBoolean defaults to: false

Determines whether resetting cooldown should be skipped.

InterruptRechargeBoolean defaults to: false

Determines whether recharge is interrupted by use.

ClickBypassBoolean defaults to: false

Whether this cooldown can be bypassed by clicking.

Rules

A set of rules that control when this root interaction can run or what interactions this root being active prevents.

Type information:

InteractionRules with the following properties:

KeyTypeDescription
BlockedBy(Nullable) Array of the type: Any one of the following String:
InteractionType
NameDescription
"Primary"
"Secondary"
"Ability1"
"Ability2"
"Ability3"
"Ability4"
"Use"
"Pick"
"Pickup"
"CollisionEnter"
"CollisionLeave"
"Collision"
"EntityStatEffect"
"SwapTo"
"SwapFrom"
"Death"
"Wielding"
"ProjectileSpawn"
"ProjectileHit"
"ProjectileMiss"
"ProjectileBounce"
"Held"
"HeldOffhand"
"Equipped"
"Dodge"
"GameModeSwap"
"OnBreak"
"OnBreakImpact"

A collection of interaction types that should block this interaction from starting. If not set then a set of default rules will be applied based on the interaction type that theinteraction is fired with. This is only effective when used on the root interaction of a chain.

BlockingArray of the type: Any one of the following String:
InteractionType
NameDescription
"Primary"
"Secondary"
"Ability1"
"Ability2"
"Ability3"
"Ability4"
"Use"
"Pick"
"Pickup"
"CollisionEnter"
"CollisionLeave"
"Collision"
"EntityStatEffect"
"SwapTo"
"SwapFrom"
"Death"
"Wielding"
"ProjectileSpawn"
"ProjectileHit"
"ProjectileMiss"
"ProjectileBounce"
"Held"
"HeldOffhand"
"Equipped"
"Dodge"
"GameModeSwap"
"OnBreak"
"OnBreakImpact"

A collection of interaction types that this interaction blocks from starting whilst running. Defaults to an empty set (blocking nothing).

InterruptedBy(Nullable) Array of the type: Any one of the following String:
InteractionType
NameDescription
"Primary"
"Secondary"
"Ability1"
"Ability2"
"Ability3"
"Ability4"
"Use"
"Pick"
"Pickup"
"CollisionEnter"
"CollisionLeave"
"Collision"
"EntityStatEffect"
"SwapTo"
"SwapFrom"
"Death"
"Wielding"
"ProjectileSpawn"
"ProjectileHit"
"ProjectileMiss"
"ProjectileBounce"
"Held"
"HeldOffhand"
"Equipped"
"Dodge"
"GameModeSwap"
"OnBreak"
"OnBreakImpact"

A collection of interaction types that should stop this interaction while it's running. This is only effective when used on the root interaction of a chain.

Interrupting(Nullable) Array of the type: Any one of the following String:
InteractionType
NameDescription
"Primary"
"Secondary"
"Ability1"
"Ability2"
"Ability3"
"Ability4"
"Use"
"Pick"
"Pickup"
"CollisionEnter"
"CollisionLeave"
"Collision"
"EntityStatEffect"
"SwapTo"
"SwapFrom"
"Death"
"Wielding"
"ProjectileSpawn"
"ProjectileHit"
"ProjectileMiss"
"ProjectileBounce"
"Held"
"HeldOffhand"
"Equipped"
"Dodge"
"GameModeSwap"
"OnBreak"
"OnBreakImpact"

A collection of interaction types that this interaction should stop when it starts.

BlockedByBypass(Nullable) String

A tag that if matched will bypass the BlockedBy rules.

BlockingBypass(Nullable) String

A tag that if matched will bypass the Blocking rules.

InterruptedByBypass(Nullable) String

A tag that if matched will bypass the InterruptedBy rules.

InterruptingBypass(Nullable) String

A tag that if matched will bypass the Interrupting rules.

Settings

Per a gamemode settings.

Type information:

(Nullable) Map of the following:

KeyTypeDescription
AdventureRootInteractionSettings
CreativeRootInteractionSettings

ClickQueuingTimeout

Controls the amount of time this root interaction can remain in the click queue before being discarded.

Type information:

(Nullable) Either Number defaults to: 0.0 or String that matches the pattern: ^(-?Infinity|NaN)$

RequireNewClick

Requires the user to click again before running another root interaction of the same type.

Type information: Boolean defaults to: false

HudInputBindingEntry

The localization key the client shows as an input binding hint on the HUD for whichever input this root interaction is bound to. When unset, no hint is shown.

Type information: (Nullable) String

On this page