Skip to main content
combat.yml controls the CombatActionEvaluator (CAE) combat system that drives elite basic attacks, guarding, retreat, and movement AI. The CAE is Hytale’s native combat evaluation system - RPGMobs generates per-style, per-tier, and per-weapon CAE configs at runtime from these settings.

How CAE Combat Works

Instead of a code-side state machine, RPGMobs uses Hytale’s built-in CombatActionEvaluator to handle:
  • Basic attacks - per-weapon swing chains with correct animations and sounds
  • Sustained guard - shield blocking on recent sustained damage (T2+)
  • BackOff - brief retreat after completing an attack chain (T2+)
  • Health retreat - fleeing when health drops below a threshold (T3+)
  • Group observe - pausing before joining group combat (T3+)
  • Flanking - positioning behind the target (T5 only for most styles)
RPGMobs abilities (Charge Leap, Multi Slash, Enrage, etc.) are handled code-side and temporarily interrupt CAE control. Code-side parry uses CAE’s setCurrentInteraction() to fire reactive guard interactions.

Combat Styles

The factionStyles map defines combat personality profiles. Despite the legacy name, styles are not faction-bound - any mob rule can reference any combat style to control its attack timing and defensive behavior.
factionStyles:
  skeleton:
    attackCooldownMin: 1.0
    attackCooldownMax: 2.0
    shieldBlockEnabled: true
    backoffEnabled: true
    retreatEnabled: true
    reengageEnabled: true
    strafeEnabled: false
    observeEnabled: true
    flankingEnabled: false
  trork:
    attackCooldownMin: 0.4
    attackCooldownMax: 0.8
    shieldBlockEnabled: false
    backoffEnabled: true
    retreatEnabled: true
    reengageEnabled: true
    strafeEnabled: false
    observeEnabled: false
    flankingEnabled: false
  outlander:
    attackCooldownMin: 0.8
    attackCooldownMax: 1.2
    shieldBlockEnabled: true
    backoffEnabled: true
    retreatEnabled: true
    reengageEnabled: true
    strafeEnabled: true
    observeEnabled: true
    flankingEnabled: true
  goblin:
    attackCooldownMin: 0.3
    attackCooldownMax: 2.0
    shieldBlockEnabled: true
    backoffEnabled: true
    retreatEnabled: true
    reengageEnabled: true
    strafeEnabled: false
    observeEnabled: true
    flankingEnabled: false
FieldTypeDescription
attackCooldownMinfloatMinimum delay between basic attack chains (seconds).
attackCooldownMaxfloatMaximum delay between basic attack chains (seconds). A random value in this range is chosen each cycle.
shieldBlockEnabledbooleanWhether the style uses CAE ShieldBlock action for sustained guarding.
backoffEnabledbooleanWhether the style briefly retreats after completing an attack chain.
retreatEnabledbooleanWhether the style retreats when health is low (CAE HealthRetreat).
reengageEnabledbooleanWhether the style automatically re-engages after retreating.
strafeEnabledbooleanWhether the style strafes around the target between attacks.
observeEnabledbooleanWhether grouped elites pause before joining combat (CAE GroupObserve).
flankingEnabledbooleanWhether the style attempts to position behind the target.

Tier Behaviors

The tierBehaviors list defines which CAE actions are unlocked at each tier. Index 0 = T1, index 4 = T5.
tierBehaviors:
  - shieldBlock: false
    backOff: false
    healthRetreat: false
    groupObserve: false
    flanking: false
  - shieldBlock: true
    backOff: true
    healthRetreat: false
    groupObserve: false
    flanking: false
    guardChargeFor: 3.0
    guardCooldown: 8.0
  - shieldBlock: true
    backOff: true
    healthRetreat: true
    groupObserve: true
    flanking: false
    guardChargeFor: 3.5
    guardCooldown: 6.0
    retreatHealthThreshold: 0.35
    retreatDuration: 3.0
  - shieldBlock: true
    backOff: true
    healthRetreat: true
    groupObserve: true
    flanking: false
    guardChargeFor: 4.0
    guardCooldown: 5.0
    retreatHealthThreshold: 0.30
    retreatDuration: 2.5
  - shieldBlock: true
    backOff: true
    healthRetreat: true
    groupObserve: true
    flanking: true
    guardChargeFor: 5.0
    guardCooldown: 4.0
    retreatHealthThreshold: 0.25
    retreatDuration: 2.0
FieldTypeDescription
shieldBlockbooleanWhether this tier can use sustained shield guard.
backOffbooleanWhether this tier retreats briefly after attacking.
healthRetreatbooleanWhether this tier retreats when health is low.
groupObservebooleanWhether this tier pauses before joining group combat.
flankingbooleanWhether this tier attempts to flank the target.
guardChargeForfloatDuration in seconds that the mob holds its shield guard.
guardCooldownfloatMinimum time in seconds between guard actions.
retreatHealthThresholdfloatHealth fraction below which the mob retreats (e.g., 0.35 = 35% HP).
retreatDurationfloatHow long in seconds the mob retreats before re-engaging.

Weapon Parameters

The weaponParams map defines per-weapon basic attack configuration. Each entry controls the attack chain, sounds, and combat reach for one weapon type.
weaponParams:
  swords:
    maxRange: 3.5
    speedMultiplier: 1.0
    animationSet: "Sword"
    attackChain:
      - "SwingLeft"
      - "SwingRight"
      - "SwingLeft"
      - "SwingRight"
    swingSound: "SFX_Sword_T1_Swing"
    impactSound: "SFX_Sword_T2_Impact"
    weaponTrail: "Sword_Distortion"
    hitParticle: "Mace_Signature_Cast"
FieldTypeDescription
maxRangefloatMaximum attack reach in blocks. Larger weapons (battleaxes, spears) have longer range. Uses projected distance (edge-to-edge, not center-to-center).
speedMultiplierfloatAttack speed modifier. 1.0 = baseline. Daggers are faster (~1.3), Battleaxes slower (~0.7).
animationSetstringHytale animation set ID (e.g., Sword, Daggers, Battleaxe, Mace, Spear, Club, Club_Flail, Axe, Longsword).
attackChainstring[]Ordered list of animation IDs for the basic attack cycle. The NPC cycles through these in order, then loops.
swingSoundstringSound event played on every swing regardless of hit.
impactSoundstringSound event played only on successful hit (defined in the damage template, not the swing).
weaponTrailstringTrail asset attached to the weapon during swings. Optional - leave empty for no trail.
hitParticlestringParticle system spawned on impact. Optional.

Default Weapon Configurations

WeaponRangeSpeedAnimation SetChain Length
Swords3.51.0Sword4
Longswords4.00.9Longsword4
Daggers2.81.3Daggers4
Axes3.50.9Axe5
Battleaxes4.00.7Battleaxe5
Maces3.50.85Mace4
Clubs3.50.9Club4
ClubsFlail3.50.9Club_Flail4
Spears4.50.85Spear4

Parry System

The code-side reactive parry system is not configurable via combat.yml - it is hardcoded with per-tier chances and per-weapon delays. The parry system detects player attacks via RPGMobsPlayerAttackDetectionSystem and fires guard interactions through CombatActionEvaluator.setCurrentInteraction().
TierParry Chance
T10%
T215%
T330%
T450%
T570%
Per-weapon parry delay (based on the player’s weapon wind-up time): Daggers 1 tick, Swords 2, Spears 5, Battleaxes 7, Maces 10.

Admin UI

Combat AI settings are editable in the Combat AI tab of the Admin UI. The tab provides visual editors for combat styles, tier behaviors, and per-weapon attack chains.