For the complete documentation index, see llms.txt. This page is also available as Markdown.

🧩Control-flow Abilities

Every registered ability on this page is documented as a complete reference entry. All entries also support the common ability fields from the Abilities page.

Registry keys on this page

  • delay

  • conditional

  • any_of

  • limit

  • repeat


delay

Purpose: Runs nested abilities after a scheduled delay.

Context: Child abilities reuse the original PowerContext.

Fields

Field
Default
Description

ticks

delay or 1

Delay in server ticks, minimum 1.

delay

1

Legacy alias used when ticks is absent.

abilities

required

Nested ability entries.

Example

Behavior and limits

  • Entities and items can become invalid before execution.

  • Scheduling follows the appropriate entity/region scheduler.


conditional

Purpose: Executes every matching case and otherwise runs fallback abilities.

Context: Child conditions and abilities reuse the same context.

Fields

Field
Default
Description

cases

empty

Map of case sections.

cases.<id>.conditions

empty

AND condition group.

cases.<id>.abilities

empty

Children for a matching case.

else-abilities

empty

Children executed once when no case matches.

Example

Behavior and limits

  • Cases are evaluated in configuration order.

  • All matching cases execute; matching does not stop after the first.

  • Cancellation from any child is propagated.


any_of

Purpose: Selects one or more weighted child abilities without replacement.

Context: Children reuse the same context.

Fields

Field
Default
Description

amount

1

Number of different children to select.

abilities

required

Child map.

abilities.<id>.rate

1

Positive finite relative weight.

Example

Behavior and limits

  • Invalid/non-positive weights are excluded.

  • A selected child still runs its own checks; failure does not cause a replacement draw.

  • Cancellation from selected children is propagated.


limit

Purpose: Wraps nested abilities with one shared ability-level chance, cooldown, and execution count.

Context: Children reuse the same context.

Fields

Field
Default
Description

abilities

required

Nested abilities.

random

1

Wrapper probability.

cooldown

0

Wrapper cooldown in seconds.

times

0

Maximum wrapper attempts; zero is unlimited.

Example

Behavior and limits

  • Children keep their own independent limits in addition to wrapper limits.

  • Cancellation from children is propagated.


repeat

Purpose: Executes nested abilities immediately and then repeatedly for a configured duration.

Context: Children reuse the original context.

Fields

Field
Default
Description

abilities

required

Nested abilities.

duration

duration-ticks or 0

Total duration; non-positive executes only once.

duration-ticks

0

Alias for duration.

interval

period or 20

Ticks between executions, minimum 1.

period

20

Alias for interval.

Example

Behavior and limits

  • The first execution is immediate.

  • Scheduled children must tolerate invalid entities/items/locations.


Last updated