Content generated with AI — it may contain mistakes.

ExyliaClasses/GuidesUpdated in v1.9.0

Add a mark or backstab weapon

Give a class a mark weapon or a backstab weapon, and see what triggers each one and what it does.

Page 7 of 206 min read

At the end of this page a class has a weapon with a special hit: arrows that mark the players they hit, or a sword that deals flat damage from behind. There are two kinds and a class can have one of each.

Before you start#

You need a class file to edit: see Edit or add a class. The Archer ships with a mark weapon and the Rogue with a backstab weapon, so you can copy their weapons block.

Steps#

Open the class file

Open plugins/ExyliaClasses/lang/<language>/classes/<Class>.yml.

Add the weapon under weapons

The key is the material, and type is MARK (an arrow of that item type, on hit) or BACKSTAB (that item in the main hand, hitting from behind). A backstab sword:

yaml
weapons:
  GOLDEN_SWORD:
    type: BACKSTAB
    extra-damage: 8
    can-dead: false
    attack-cooldown-need: 0.6
    break-item: true

Reload

Run /classesadmin reload.

Try it with a second player

Put on the class armour, hold the weapon (or shoot the arrow) and hit another player.

One of each per class

Only the first MARK weapon and the first BACKSTAB weapon in a class are ever used, and "first" is unordered. Declare at most one of each type per class.

Check that it works#

For a backstab, hit a player from behind with a fully charged swing: you are told the backstab landed and the victim is told who did it. Hit from the front and it is an ordinary hit. For a mark, shoot a player with the marking arrow: both of you get a message with the mark's number, and the mark bar counts down above their hotbar. If nothing happens, check the weapon material, the class armour and Common problems.

Going further#

Build a mark weapon#

yaml
weapons:
  ARROW:
    type: MARK
    mark-duration: 10
    give-glow: true
    mark-same-class: false
    marks:
      1:
        extra-damage: 7
        color: "<#9e9e9e>"
        icon: "◆"
        remove-invisibility: true
        attacked-effects: []
        attacker-effects: []
      2:
        extra-damage: 14
        color: "<#55ff55>"
        icon: "◆◆"
        remove-invisibility: true
        attacked-effects: []
        attacker-effects: []

Each arrow that lands raises the target's mark by one, and each level can apply its own effects and glow.

extra-damage is a number, not damage

The mark system does not modify damage. extra-damage is what gets written into the mark messages, into the mark boss bar as %extra_damage%, and into %exyliaclasses_classes_mark_extra_damage% for anything reading the plugin through PlaceholderAPI. The bonus itself is expected to come from your own setup reading that number. Marks also do not change the arrow's own damage.

Marks belong to the target, not to a pair of players

A player carries one mark count and one mark weapon at a time. A second archer's arrow adds to the same stack and takes over the weapon, rather than starting a separate one.

Marks are cleared when the target dies, quits, or leaves their own class. The bar's look is in Energy.

Tune a backstab#

Backstab damage ignores armour

Setting health directly bypasses armour, Protection, Resistance and absorption hearts. extra-damage: 8 is four full hearts against a naked player and four full hearts against a netherite one. Tune it low.

can-dead: false skips the backstab, not the swing

When the subtraction would reach zero health, the attacker is told and the backstab is abandoned. The swing itself is left alone, so the ordinary sword damage still lands, and can still kill. What can-dead: false prevents is the flat extra-damage being the killing blow, not the target dying to that hit.

Mark keys
KeyDefaultWhat it does
mark-duration10Seconds the mark boss bar counts down for. When it empties the marks are cleared.
give-glowfalseMakes the marked player glow.
mark-same-classfalseWhether a player of the shooter's own class can be marked.
marks.<n>noneOne level per number of marks stacked.

A mark level:

KeyDefaultWhat it does
extra-damage0The number written into messages, the boss bar and the placeholders.
color&fThe colour of the icon. The mark bar is given it as %mark_color%; anything outside the plugin reads it as %exyliaclasses_classes_mark_color%, or together with the icon as %exyliaclasses_classes_mark_display%.
icon◆The icon. The mark bar is given it as %mark_icon%; anything outside the plugin reads it as %exyliaclasses_classes_mark_icon%. The shipped classes repeat it once per level.
remove-invisibilityfalseStrips Invisibility from the target when the glow is applied. Only does anything with give-glow: true.
attacked-effectsnoneEffect lines applied to the target.
attacker-effectsnoneEffect lines applied to the shooter.
How marking works
  1. An arrow lands. The projectile must be an arrow shot by a player, the shooter must be in a class with a mark weapon, and the arrow's own item type must equal the weapon's material. Shooting yourself does nothing.
  2. Same-class check. With mark-same-class: false, a target already in the shooter's class is refused and the shooter is told. A target in another class, or in none, is fine.
  3. The stack goes up by one. Levels are looked up by the new count, capped at the highest level defined: a fifth hit on a four-level weapon stays at level 4.
  4. The level fires. Its effects are applied to both sides, the glow goes on if configured, and both players are told what the level's extra-damage says.
  5. The bar counts down. When it reaches zero the marks reset to zero, the glow comes off, and the target is told the marks expired.
Backstab keys
yaml
weapons:
  GOLDEN_SWORD:
    type: BACKSTAB
    extra-damage: 8
    can-dead: false
    attack-cooldown-need: 0.6
    break-item: true
    attacked-effects:
      - SLOW|1|3
    attacker-effects:
      - SLOW|3|3
      - WEAKNESS|3|3
    attacked-particles:
      enabled: true
      type: "SMALL_FLAME|100|1.5|1.5|1.5|3"
    attacked-sound:
      enabled: true
      type: "BLOCK_BEACON_POWER_SELECT|1|1"
    attacker-particles:
      enabled: true
      type: "SMALL_FLAME|100|1.5|1.5|1.5|3"
    attacker-sound:
      enabled: true
      type: "BLOCK_BEACON_POWER_SELECT|1|1"
KeyDefaultWhat it does
extra-damage50Health points taken off the target directly. 8 is four hearts.
can-deadfalseWhether a backstab may be the killing blow.
attack-cooldown-need0.9How charged the attack must be, from 0 to 1. 0.6 is 60%.
break-itemfalseDestroys the weapon on a successful backstab.
attacked-effects / attacker-effectsnoneEffect lines for each side.
attacked-particles / attacker-particlesoffShown to each side.
attacked-sound / attacker-soundoffPlayed to each side.
How a backstab lands
  1. The weapon must be in the main hand, and the attacker must be in a class that declares it. Both players must be players; mobs are ignored.
  2. The swing must be charged. Below attack-cooldown-need the attacker is told the current and required percentages and the hit continues as an ordinary attack.
  3. The attacker must be behind, measured against the target's facing: roughly the rear 145 degree arc. In front of that, an ordinary attack.
  4. Damage is replaced, not added. The vanilla damage of the swing is set to zero and extra-damage is taken straight off the target's health.

Something missing on this page? Tell us on Discord