Skip to main content

Utility Mechanics

These mechanics are the glue that holds your skills together, managing execution flow and providing feedback to players.

Communication

message / msg

Sends a message to the target.
  • Attributes:
    • message (string): The text to send. Supports placeholders.
- message{msg="<mob.name> screams at you!"} @target ~onAttack

sendtitle

Displays a large title on the target’s screen.
  • Attributes:
    • title (string): The title text.
    • subtitle (string): The subtitle text.

sendtoast

Sends a toast notification (achievement-style) to the target.
  • Attributes:
    • text (string): The notification text.
    • icon (string): The icon material.

Meta Mechanics (Control Flow)

skill / metaskill

Executes another skill by name.
  • Attributes:
    • s (string): The name of the skill to execute.
- skill{s=AnotherSkill} @target ~onDeath

delay / wait

Pauses execution for a specified duration.
  • Attributes:
    • ticks (number): The delay in ticks.

repeat

Repeats the execution of a sub-mechanic.
  • Attributes:
    • times (number): Number of repetitions.
    • interval (ticks): Delay between repetitions.

Variable System

BTCMobs includes a powerful variable system for storing and manipulating data across skills.
MechanicDescriptionExample Use
setvariableStores a value in a variable.Tracking kill counts, phases.
variableaddAdds a value to a variable.Incrementing stacks, timers.
variablesubtractDecreases a variable value.Skill cooldowns, mana costs.
customrandomPicks a weighted random value.Random rewards, path branching.

Logic & Branching

switch

Executes different skills based on a condition or variable value.

foreach

Iterates through a list of targets or values and executes a skill for each.

cancelevent

Cancels the event that triggered the skill (e.g., onAttack).