Skip to content

CoreLib Actions

When EmakiSkills is enabled, it adds skill cast, level, slot, cooldown, and manual-unlock stages to the CoreLib action registry. Use them in other modules' rewards, trigger follow-up effects, or CoreLib pipeline templates.

NOTE

This page documents only the stages registered by EmakiSkills. EmakiSkills' own native skill script actions are documented in Native Script System, and CoreLib built-in stages in CoreLib Actions.

Stage ID reference

All twelve stages declare REQUIRED_ENTITY. Apart from cast_skill and cast_mythic_skill, they accept only player targets and skip anything else.

Stage IDPurpose
cast_skillCasts an EmakiSkills skill with the target as the caster.
cast_mythic_skillCasts a MythicMobs skill with the target as the caster.
skill_set_levelSets one of the target's skill levels directly.
skill_upgradeUpgrades one of the target's skills through the upgrade service.
skill_equipEquips a skill into one of the target's skill slots.
skill_unequipClears one of the target's skill slots.
skill_bindBinds a trigger to one of the target's skill slots.
skill_cooldown_clearClears one or all of the target's skill cooldowns.
skill_cooldown_setSets one of the target's skill cooldowns.
skill_learnUnlocks a skill through the manual skill source.
skill_forgetRemoves one manually unlocked skill.
skill_forget_allRemoves all manually unlocked skills.

Old IDs map as follows: castskill and skill.cast are no longer registered, skill_setlevel is now skill_set_level, and skill_clearcooldown / skill_setcooldown are now skill_cooldown_clear / skill_cooldown_set. The IDs of skill_upgrade, skill_equip, skill_unequip, skill_bind, skill_learn, skill_forget, and skill_forget_all are unchanged.

Which entity is affected comes from the source: use self for the caster, or player_by_name for a named player.

cast_skill

Casts an EmakiSkills skill with the target as the caster.

NOTE

Breaking change. The skill parameter takes an EmakiSkills skill id, not a MythicMobs skill id. Configuration that used to pass a MythicMobs skill name here must move to cast_mythic_skill.

ParameterTypeRequiredDefaultDescription
skillSTRINGYesEmakiSkills skill id.
bypass_cooldownBOOLEANNofalseSkips the per-skill and global cooldown checks.
bypass_resource_checkBOOLEANNofalseCasts even when the caster cannot afford it.
consume_resourceBOOLEANNotrueWhether a successful cast bills its resource costs.
yaml
actions:
  - 'self | cast_skill skill=fireball'
  # Admin testing: no cooldown, no resource cost
  - 'self | cast_skill skill=fireball bypass_cooldown=true consume_resource=false'
  # One free cast even when resources are short
  - 'self | cast_skill skill=heal bypass_resource_check=true consume_resource=false'

This stage goes through EmakiSkills' own cast flow, so cooldowns, resource costs, cast conditions, and the pre/post cast events all apply.

Player and non-player casters

The two paths behave differently, because a skill profile only exists for players:

  • Player caster: the full cast flow, with all three switches above in effect.
  • Any other entity: only the skill's mythicSkill component is cast. A mob has no profile, so there is no cooldown to read and no resource pool to bill; the three switches are inert on this path, and a script-only skill (one with no mythicSkill configured) is refused rather than silently doing nothing.

How the outcome is decided

The cast flow is asynchronous but the stage must answer synchronously, so it inspects the settled state once without waiting: a cast that already failed by the time the call returns was stopped at a synchronous gate (cooldown, resource, wrong activation type), and that is a result the pipeline can branch on. A cast still in progress is reported as success, with any later failure going to the debug log only. This matches the tradeoff start_task makes: the stage guarantees the cast was accepted, not that it finished.

A blank skill or an unknown skill id fails with INVALID_CONFIG.

cast_mythic_skill

Casts a MythicMobs skill with the target as the caster. This stage moved from CoreLib to EmakiSkills in this round; its registered category is integration.

ParameterTypeRequiredDefaultDescription
skillSTRINGYesMythicMobs skill id.
yaml
actions:
  - 'self | cast_mythic_skill skill=FireballSkill'
  # Make the entity under the crosshair cast it
  - 'looking_at range=20 | cast_mythic_skill skill=ExplodeSkill'

Any entity can be the caster, which is why this stage is separate from cast_skill. MythicMobs is an optional dependency: when it is absent or the bridge fails to initialise, the stage fails with OWNER_DISABLED instead of taking the pipeline down. The skill value is not id-normalised; it is passed through exactly as MythicMobs spells it.

Skill levels

skill_set_level

Writes the level directly, ignoring upgrade costs and success rolls.

ParameterTypeRequiredDefaultDescription
skillSTRINGYesSkill id.
levelINTEGERYesTarget level.

skill_upgrade

ParameterTypeRequiredDefaultDescription
skillSTRINGYesSkill id.
yaml
actions:
  - 'self | skill_set_level skill=fireball level=3'
  - 'self | skill_upgrade skill=fireball'

skill_upgrade goes through EmakiSkills' upgrade service, so upgrade materials, economy costs, success rates, and upgrade actions all still apply. An unknown skill id fails with INVALID_CONFIG.

Skill slots

Stage IDParametersDescription
skill_equipslot (INTEGER, required), skill (STRING, required)Equips a skill into the given slot.
skill_unequipslot (INTEGER, required)Clears the given slot.
skill_bindslot (INTEGER, required), trigger (STRING, required)Binds a trigger to the given slot.
yaml
actions:
  - 'self | skill_equip slot=0 skill=fireball'
  - 'self | skill_bind slot=0 trigger=right_click'
  - 'self | skill_unequip slot=0'

Slot validation stays entirely inside PlayerSkillStateService, which owns the unlocked-skill set, the trigger conflict table, and the slot-change event. An unreadable slot falls back to -1, which the state service rejects, so a bad value fails loudly instead of hitting slot 0.

Cooldowns

skill_cooldown_clear

ParameterTypeRequiredDefaultDescription
skillSTRINGNo""Skill id. Empty clears every cooldown and cast delay.

skill_cooldown_set

ParameterTypeRequiredDefaultDescription
skillSTRINGYesSkill id.
duration_ticksTIMEYesCooldown duration. Zero or less removes that skill's cooldown.
yaml
actions:
  - 'self | skill_cooldown_set skill=fireball duration_ticks=5s'
  - 'self | skill_cooldown_clear skill=fireball'
  - 'self | skill_cooldown_clear'

Manual unlocks

The manual skill source is written into the player's skill profile and shows as "manually unlocked" in the GUI. After a skill is forgotten, EmakiSkills revalidates and cleans up invalid slot bindings.

Stage IDParametersDescription
skill_learnskill (STRING, required)Adds the skill to the player's manual source.
skill_forgetskill (STRING, required)Removes one manually unlocked skill.
skill_forget_allnoneRemoves all manually unlocked skills.
yaml
actions:
  - 'self | skill_learn skill=fireball'
  - 'self | skill_forget skill=fireball'
  - 'self | skill_forget_all'

These three stages only touch the manual source. Skills granted by equipment or other sources are collected elsewhere and cannot be forgotten through them.

skill_learn on an already unlocked skill is skipped rather than failed: the pipeline's intent is already satisfied.

Notes

  • cast_skill and cast_mythic_skill accept any entity as the caster; the other ten stages accept only player targets.
  • cast_mythic_skill requires MythicMobs to be installed and enabled, with the skill named by skill present.
  • Skill ids are normalised (case and separators) before use; MythicMobs skill ids are not.
  • When the relevant service is not ready, the stage fails with MISSING_CONTEXT rather than skipping silently.