Placeholders - bedwarshurts/AlchemistMMExtension GitHub Wiki

DistanceFromTargetPlaceholder

Calculates the distance of the caster or target from any targeter. The distance is measured in blocks.

[!NOTE] This placeholder can only be used with a SkillMetadata

[!TIP] In case of targeters that return multiple entities / locations, specifying if you want the min or max distance is required. For example <caster.distanceFrom.@pir{r=100}.max> will return the distance of the furthest player for the caster

[!TIP] Use <target.distanceFrom.@origin> to calculate the distance from the target or <caster.distanceFrom.@origin> to calculate it from the caster

Syntax
If the targeter returns a single location: <(caster|target).distanceFrom.(@targeter)>
If the targeter returns multiple locations: <(caster|target).distanceFrom.(@targeter).(min|max)>

Example

<caster.distanceFrom.@origin>

RandomColorPlaceholder

Returns a random color between 2 hex values

[!NOTE] This is a general placeholder and thus can be used almost everywhere

[!TIP] This doesn't just return a random number between the 2 hex numbers. It returns a random color, for example <random.color.54f702to02f760> will always return a shade of green.

Syntax
<random.color.(hex1)to(hex2)> do not include # in front of the hexes.

Example

<random.color.54f702to02f760>

TargetVelocityPlaceholder

Returns the velocity of the target

[!NOTE] This is an entity placeholder

[!TIP] This doesn't just return a random number between the 2 hex numbers. It returns a random color, for example <random.color.54f702to02f760> will always return a shade of green.

[!WARNING] Requires the config option Settings.TrackPlayerMovement to be enabled.

Syntax
<target.vel.(x|y|z|length) The length option will return the length of the velocity vector.

Example

<target.vel.x>

TernaryPlaceholder

Returns a value out of 2 possible values depending on a boolean condition.

[!NOTE] This placeholder can only be used with a SkillMetadata

Syntax
<eval.(caster|trigger|target).(condition)?(outcomeIfTrue):(outcomeIfFalse)> The 2nd option is for which entity to evaluate the condition for.

Example

- msg{m="<eval.trigger.!day?test:test2>"} @trigger ~onInteract This will evaluate the day condition for the trigger and print test if the condition is false (since its reversed with the ! symbol) and test2 if its true