Skip to content

Skript Variable Placeholder

Yevhen Harasymchuk edited this page Jul 29, 2026 · 3 revisions

MythicSkriptAddon exposes a custom MythicMobs Placeholder that lets you read global Skript variables directly inside any MythicMobs config field that supports placeholders (message, Display, numeric attributes, conditions, etc.), without needing a skfunction bridge for simple value reads.

MythicMobs Syntax

<skript.variable_name>

  • variable_name: The exact name of a global Skript variable (without the surrounding {}).

Since the value is resolved via string substitution before MythicMobs uses the final field value, this placeholder works both in plain text fields (message{m=...}) and in numeric/typed attributes such as damage{amount=<skript.my_var>}.

Basic Example

In your .sk file:

on script load:
    set {arena_status} to "waiting"

In MythicMobs Skills.yml:

BossAnnounce:
  Skills:
  - 'message{m="&6Arena status: &f<skript.arena_status>"} @self ~onSpawn'

The result will be:

Arena status: waiting

Numeric Variables

Numeric global variables can be used directly inside numeric attributes, since MythicMobs substitutes the placeholder text before parsing the attribute's type:

on script load:
    set {boss_bonus_dmg} to 5
- 'damage{amount=<skript.boss_bonus_dmg>} @target ~onAttack'

List Variables

List variables ({list::*}) are supported through Skript's own :: index separator. Since MythicMobs only treats . as a placeholder segment separator, :: passes through untouched:

on script load:
    set {top_killers::1} to "Andromedov"
    set {top_killers::2} to "BerndiVader"
    set {top_killers::3} to "Herobrine"
Placeholder Result
<skript.top_killers::1> Andromedov
<skript.top_killers::2> BerndiVader
<skript.top_killers::*> Andromedov, BerndiVader, Herobrine (comma-joined)
- 'message{m="&bTop killers: &f<skript.top_killers::*>"} @self ~onSpawn'

Live Updates

The placeholder reads directly from Skript's variable storage at resolution time. Any script that changes a global variable is reflected the next time the placeholder is evaluated—no reload is needed:

command /setarena <text>:
    trigger:
        set {arena_status} to arg-1
- 'message{m="&6[timer] Status: &f<skript.arena_status>"} @PlayersInRadius{r=30} ~onTimer:100'

Running /setarena fighting in-game will update the timer message on its next tick.

Limitations

  • Global variables only. Local (event-scoped) Skript variables cannot be resolved, since a MythicMobs skill cast has no Bukkit Event tied to a running Skript trigger.
  • Read-only. This placeholder only reads variables; use skfunction (see Custom Mechanics) if you need to write Skript variables from a MythicMobs skill.
  • Unset values return no value. An unset scalar or empty list is returned to MythicMobs as null; the surrounding MythicMobs field decides how to handle it.
  • YAML quoting. As with any Skill line containing &, :, {, or }, wrap the whole line in single quotes ('...') to avoid YAML parsing errors — this is a general MythicMobs config requirement, not specific to this placeholder.

Clone this wiki locally