97 Signs
Fyreum edited this page 2022-10-17 11:49:08 +02:00

The old article about dungeon signs is available here. Note that this new article might not contain all information from the old one yet.

This article explains the dungeon sign system that will be added to the 0.18 update of DungeonsXL.

The new sign systems aims to make the actions of signs more predictable and standardized as well as to create a stable, supported API to easily create new ones through addons.


  1. Groups
  1. List of signs by their group
  2. Triggers

Groups

API note: Each group is represented by an abstract class in the de.erethon.dungeonsxl.api.sign package. The method DungeonSign#trigger(Player) is defined for every group, but may refer to different actions depending on the sign.

Button

A sign that performs a specific action every time it is triggered. For example, a classes sign with the default interact trigger sets your class every time you punch it.

Operations:

public void trigger(Player) - =push(Player)
public void push() - When the button is pushed.
public void push(Player) - When the button is pushed (player-sensitive).

Passive

Passive signs don't do anything on their own. Their function is mostly to mark locations or blocks, like lobby or bed signs.

As the name says, passive signs don't have any operations.

public void trigger(Player) - Overridden with an empty method.

Rocker

A sign that has a deactivated and an activated state and can switch between these two is called a rocker. For example, if a door sign is activated, the door opens - if it is deactivated, the door closes. The state may be set for the whole game world or for the player who triggered the sign depending on the context.

Operations:

public void trigger(Player) - Activates the sign if it is not yet activated;
                              deactivates it if it is already activated.
public void activate() - Activates the sign for the game world.
public boolean activate(Player) - Activates the sign for the player.
                                  Returns true if successful.
public boolean deactivate() - Deactivates the sign for the game world.
public boolean deactivate(Player) - Deactivates the sign for the player.
                                    Returns true if successful.
public boolean isActive() - Returns if the sign is activated for the game world.
public boolean isActive(Player player) - Returns if the sign is activated
                                         for the player.

Windup

A windup sign is a sign with an attached task that does actions in a set interval n times, like a mob sign that spawns n mobs. It is similar to a rocker as it expires (=is deactivated).

Additional operations:

public double getIntervalSeconds() - Returns the interval time in seconds
public long getIntervalTicks() - Returns the interval time in ticks (20/s)

List of signs by their group

/ = or

() = Optional

{} = Nonterminal

{}* = Nonterminal may occur multiple times with "," as a separator, e.g. "{Item ID}*" -> "IRON_SWORD,APPLE,STICK"

everything else = Terminal

Group Name 2nd line syntax 3rd line syntax
Button ActionBar {MSG ID} N/A
Button BossShop {Shop name} N/A
Button MSG {MSG ID} N/A
Button Checkpoint N/A N/A
Button Classes {Class name} N/A
Button End {Floor in the dungeon} N/A
Button Leave N/A N/A
Button Lives {Modifier} GAME/GROUP/PLAYER
Button Ready N/A {Seconds to auto start}
Button ResourcePack {ResourcePack ID}/reset N/A
Button SoundMSG {Vanilla sound name}/{Sound enum value} {Category},{volume},{pitch}
Button Teleport {x coordinate},{y},{z} {compass direction[1]}
Button Title {MSG ID for the title}(,{subtitle}) N/A
Passive Bed {Team ID} N/A
Passive DungeonChest N/A ({Loottable name})
Passive Flag {Team ID} N/A
Passive Hologram {MSG ID} {Height}
Passive Interact {ID of fired I trigger} Line 3&4 contain the text that will be showed on line 2&3 of the clickable sign.
Passive Lobby N/A N/A
Passive Note N/A N/A
Passive Place {Block ID} ({Rotation}*,{fired sign triggers}*)
Passive Protection N/A N/A
Passive RewardChest ({Money reward, level reward}) ({Loottable name})
Passive Script {Script name} N/A
Passive Start ({Team ID}) N/A
Rocker Block {Block ID} {Block ID}
Rocker Door N/A N/A
Rocker Trigger {ID of fired T trigger} N/A
Windup Command {Command script ID} {Delay in sec.},OP/CONSOLE/DEFAULT
Windup Drop {Item ID} {Stack size}(,{Drop rate})
Windup Mob {Mob ID = fired M trigger} {Delay in sec.},{Amount}(,{external mob plugin tag})
Windup Redstone {Delay in decisec.} ({Repeats}/0)

[1]: E.g. "N", "NE", "NNE", "E", "ENE"

How to copy a sign

You can copy a sign and its configuration by right-clicking it with a stick. To paste it, you just have to right click an empty sign with the stick.

Triggers

Symbol Name Usage Trigger condition Annotation
D Distance D{distance in blocks} One time when one player is in distance Use e.g. for mob signs
F Fortune F{chance} On initialization by chance ".75" = 75%
I Interact I{ID} The interaction block is clicked
M Mob M{spawn ID} A mob with the spawn ID has been killed Mob needs to be spawned through a mob sign. Spawn ID is whatever was used there.
P Presence P{distance in blocks} Every time for each player in distance Use e.g. for checkpoints
R Redstone R Block is powered For wall signs, the block to power is the block the sign is attached to
T Sign T{ID} Generic ID trigger See trigger sign
U Use item U{item ID} Click with item in hand