Skip to content

Triggers

EmakiSkills uses active triggers and passive triggers.

  • Active triggers are global slot triggers. Players bind skills to trigger slots in the GUI, then cast them while cast mode is enabled.
  • Passive triggers are declared in skill definitions through trigger_type: passive and passive_triggers.

Active triggers

TriggerOperation
left_clickLeft click.
right_clickRight click.
shift_left_clickShift + left click.
shift_right_clickShift + right click.
drop_qDrop key.
hotbar_1 ~ hotbar_9Number keys 1-9.

Active triggers are configured globally in config.yml under triggers:

yaml
triggers:
  right_click:
    display_name: "[Right Click]"
    enabled: true
    incompatible_with:
      - shift_right_click

Passive triggers

yaml
id: lifesteal_passive
trigger_type: passive
passive_triggers:
  - attack
cooldown_ticks: 60
TriggerWhen it fires
attackWhen the player hits an entity.
damagedWhen the player takes damage.
damaged_by_entityWhen the player is damaged by an entity.
deathWhen the player dies.
kill_entityWhen the player kills a non-player entity.
kill_playerWhen the player kills another player.
shoot_bowWhen the player shoots a bow.
arrow_hitWhen an arrow hits an entity.
arrow_landWhen an arrow lands without hitting an entity.
shoot_tridentWhen the player throws a trident.
trident_hitWhen a trident hits an entity.
trident_landWhen a trident lands.
break_blockWhen the player breaks a block.
place_blockWhen the player places a block.
drop_itemWhen the player drops an item.
shift_drop_itemShift + drop item.
swap_itemsSwap main hand and off hand.
shift_swap_itemsShift + swap hands.
loginPlayer login.
sneakSneak toggle.
teleportPlayer teleport.
timerPeriodic trigger.
combo_attackCombo attack trigger.

Passive trigger settings

yaml
passive_trigger_settings:
  timer_interval_ticks: 20
  combo_timeout_ticks: 60
FieldDescription
timer_interval_ticksCheck interval for the timer passive trigger.
combo_timeout_ticksTime before combo state resets.

Cast mode

Active skills require cast mode. By default, the F key toggles cast mode through the server-visible hand-swap action.

yaml
cast_mode:
  entry_key: "f"
  restore_last_state_on_join: true