MonsterSkillElement.xml

Atomic building blocks for monster skills. Each Element defines one effect: damage/heal over a stat, a status change, a summon, a forced teleport, a buff nullification, and so on. Up to 5 Elements are chained inside a Skill Unit.

File Location#

Data/Monster/MonsterSkillElement.xml

Loaded once at GameServer startup. Changes require a restart.

Dependencies#

Referenced byPurpose
MonsterSkillUnit.xmlEach Unit chains up to 5 Elements by Number
Depends onPurpose
Skill.txtNullifiedSkill references skill indices (buff cancel, tether skill, paired effect id)

Schema#

<MonsterSkillElement>
    <Element Number="..." Name="..."
             Type="..." SuccessRate="..."
             ContinuanceTime="..."
             IncAndDecType="..." IncAndDecValue="..."
             NullifiedSkill="..."
             CharacterClass="..." CharacterLevel="..." />
</MonsterSkillElement>

Attributes#

AttributeTypeEffect
NumberintUnique Element ID (0-99). Values outside this range are ignored.
NamestringHuman-readable label. Not used by logic.
TypeintEffect category (see Effect Types).
SuccessRateintPercent chance the effect applies on hit (0-100). Rolled per target per Element.
ContinuanceTimeintDuration in seconds for timed effects. -1 or * means "indefinite" where the Type supports it. Ignored for instant Types.
IncAndDecTypeint or *Stat modifier mode (see IncAndDecType Values). * stores -1 (none).
IncAndDecValueint or *Magnitude paired with IncAndDecType. * stores -1. Also reused as a secondary parameter for some Types (see Type notes).
NullifiedSkillint or *Skill ID tied to the effect (buff to cancel, tether skill ID, or paired message ID). * stores -1.
CharacterClassintLoaded but not read by the skill pipeline. No class filter is applied. Keep 0.
CharacterLevelintLoaded but not read by the skill pipeline. No level gate is applied. Keep 0.

Effect Types#

TypeNameBehavior
0StunAdds the stun effect for ContinuanceTime seconds. Blocked by Iron Defense buffs on the target. SuccessRate has the target's stun resistance subtracted before the roll.
1MovePlaceholder. The handler is empty - no movement debuff is applied by this Type directly.
2HPDamage or heal based on IncAndDecType. Percent modes scale against current Life. Cycle modes write a periodic tick into the target for ContinuanceTime seconds.
3MPSame math as Type 2 against Mana.
4AGSame math as Type 2 against BP (AG).
5DefenseModifies the target's defense; value and duration are stored on the target and consumed over ContinuanceTime.
6AttackModifies the target's physical damage; stored and consumed over ContinuanceTime.
7DurabilityReduces durability on a randomly selected equipment slot (users only).
8SummonRespawns the target monster (the Element caller resurrects / repositions an allied monster). IncAndDecValue is the random placement radius (defaults to 10 if * or <0).
9PushIf NullifiedSkill < 1, knocks the target back by IncAndDecValue tiles (default 3). Otherwise queues a delayed tether message with NullifiedSkill as the skill ID.
10Stat EnergyPlaceholder - handler is empty.
11Stat StrengthPlaceholder - handler is empty.
12Stat DexterityPlaceholder - handler is empty.
13Stat VitalityPlaceholder - handler is empty.
14Remove SkillStrips a specific buff from the user. Supports Greater Damage and Greater Defense; NullifiedSkill must be that skill's ID.
15Resist SkillStores a resist entry on the caster keyed to NullifiedSkill for ContinuanceTime seconds.
16Immune SkillStores an immunity entry on the caster and applies a physical-damage immunity effect for ContinuanceTime seconds.
17Teleport SkillTeleports the caster to a random free tile within 5 tiles. Cancelled if caster is stunned or no valid tile exists.
18Double HPQueues two delayed self-messages 400ms and 1000ms out. Used for boss phase effects.
19PoisonIf NullifiedSkill < 1, adds poison for IncAndDecValue seconds (subject to target poison resistance). Otherwise queues a delayed message with NullifiedSkill as the skill ID and IncAndDecValue as the duration.
20Normal AttackRuns a melee attack against the target. If IncAndDecType / IncAndDecValue are set, acts as an item-gate: target is instantly killed unless item GET_ITEM(IncAndDecType, IncAndDecValue) is equipped in slot 9, 10, or 11. With NullifiedSkill >= 1, queues a delayed message instead of attacking.
21BerserkApplies monster physical and magical damage immunity for ContinuanceTime seconds (or indefinite if -1) and stores the berserk duration on the target.

IncAndDecType Values#

Used by Types 2, 3, 4, 5, 6, 7 to decide how IncAndDecValue is applied. Cycle variants also set up a per-tick apply driven by ContinuanceTime.

ValueModeMeaning
0NoneNo stat modification. Paired with IncAndDecValue="*".
1Percent IncreaseAdds IncAndDecValue percent of the base stat.
2Percent DecreaseSubtracts IncAndDecValue percent of the base stat.
11Constant IncreaseAdds IncAndDecValue flat.
12Constant DecreaseSubtracts IncAndDecValue flat.
100Cycle PercentPeriodic percentage change baseline.
101Cycle Percent IncreasePeriodic percent heal tick.
102Cycle Percent DecreasePeriodic percent damage tick.
110Cycle ConstantPeriodic flat change baseline.
111Cycle Constant IncreasePeriodic flat heal tick.
112Cycle Constant DecreasePeriodic flat damage tick.

Any other value leaves the stat unchanged.

Important Behavior#

  • Only 100 Element slots exist (Number 0-99). Entries outside this range are dropped silently.
  • Stun resistance: for Type 0 the formula is roll = rand(0..99); if roll > SuccessRate - ResistStunRate then fail.
  • SuccessRate is rolled independently per Element per target; a Unit with three Elements can partly succeed.
  • CharacterClass and CharacterLevel are parsed but not consulted by the current pipeline. Do not rely on them as filters.
  • Name is stored but never compared - any string works.
  • Types 1, 10, 11, 12, 13 are stubs in the engine. Setting them has no effect.
  • Types 14, 15, 16 use NullifiedSkill as the skill ID to cancel, resist, or immunize against.
  • Type 20 (Normal Attack) doubles as a gear-check: fill IncAndDecType / IncAndDecValue with an ItemKind / Index pair to instakill players who do not have that item equipped in weapon or shield slots.

Examples#

<Element Number="1" Name="Monster Stun"
         Type="0" SuccessRate="50" ContinuanceTime="3"
         IncAndDecType="*" IncAndDecValue="*"
         NullifiedSkill="*"
         CharacterClass="0" CharacterLevel="0"/>

50% chance to stun the target for 3 seconds. Stun resistance reduces the roll.

Common Issues#

  • Element never fires - SuccessRate is rolled per target; low values combined with stun resist can drop effective chance to zero.
  • Stat Element has no effect - the Type is one of the stub Types (1, 10-13). Pick a live Type.
  • "Nullify" does nothing - Type 14 only handles Greater Damage and Greater Defense. Other buffs are not supported.
  • Push goes the wrong distance - set IncAndDecValue to the tile count. Default is 3 tiles when * or <1.
  • Class filter not working - CharacterClass / CharacterLevel are ignored by the pipeline. TODO: verify whether a future gate uses these.
  • Element number too high - IDs must be 0-99. Higher numbers are dropped at load.

Last updated April 21, 2026