Skip to content

CoreLib Actions

When EmakiLevel is enabled, it adds level and experience operation actions to the CoreLib action registry. They can be used by other module action lists, such as cooking completion, forge results, strengthen stages, skill rewards, or CoreLib action templates.

This page documents only CoreLib actions registered by EmakiLevel. CoreLib built-in actions are documented in CoreLib Actions. Current action IDs use only the canonical names below; historical aliases are no longer registered.

Action IDs

Action IDOperationRequires amount
emakileveladdexpAdd expYes
emakilevelsetexpSet expYes
emakilevelremoveexpRemove expYes
emakileveladdlevelAdd levelsYes
emakilevelsetlevelSet levelsYes
emakilevelremovelevelRemove levelsYes
emakilevelresetReset one level typeNo
emakilevellevelupManually level up one typeNo

Common parameters

All level and exp operations except reset / levelup use these parameters:

ParameterTypeRequiredDefaultDescription
typeSTRINGYesPrimary level typeLevel type ID, such as main, combat, or mining.
amountSTRINGYesExperience or level amount. Plain numbers and CoreLib expressions are accepted. Level operations round this value to an integer.
targetSTRINGNoContext playerTarget online player name or UUID. Empty means the action-context player.
reasonSTRINGNoactionOperation reason passed to the level service.
auto_upgradeBOOLEANNotrueOnly meaningful for emakileveladdexp. Controls whether automatic level-up is allowed.
silentBOOLEANNofalseWhether to suppress optional output.

emakilevelreset and emakilevellevelup read only type, target, and reason; they do not read amount, auto_upgrade, or silent.

Examples

yaml
actions:
  # Add 50 main exp to the current player
  - 'emakileveladdexp type=main amount=50 reason=forge_reward'

  # Add 1 combat level to the current player
  - 'emakileveladdlevel type=combat amount=1 reason=boss_reward'

  # Set mining exp for a named player
  - 'emakilevelsetexp target=PlayerName type=mining amount=200 reason=admin_adjust'

  # Reset the main level type
  - 'emakilevelreset type=main target=PlayerName reason=admin_reset'

  # Run one manual level-up through the level system
  - 'emakilevellevelup type=main target=PlayerName reason=quest_reward'

Notes

  • When target is empty, a player context must exist. In console-triggered or playerless action chains, provide an online player name or UUID.
  • When amount is an expression, numeric placeholders and action-context attributes are available as variables. Expressions that cannot be parsed evaluate to 0.
  • Level operations (add/set/remove level) round amount to an integer.