Bosses
Any monster class listed in Bosses.xml becomes a boss, whoever spawns it: MonsterSetBase, an invasion, a Summon Item, a dungeon, /monster, or the plugin itself as a field boss. A boss scales with the number of players fighting it, tracks how much each player contributed, and when it dies gives every eligible player their own reward by rank. Nobody can steal the kill, because the boss's normal loot is not dropped.
Players near a boss see a boss HP bar at the top centre of the screen (boss name, HP as numbers and %, and "+40% HP" while extra players have scaled it up), and a contribution card at the lower right with their own share and rank, how many players are fighting, and the top 5. Players can drag the card by its header; the game remembers where they put it.
File Location#
Data/Plugins/World/Bosses.xml
Reload with /reload plugins. A boss that is already fighting keeps its old settings until it dies.
Dependencies#
| Depends On | Purpose |
|---|---|
| Monster.xml | Base stats and the boss name |
| CustomMonster | Applied first. Boss scaling is applied on top of it |
| EventItemBag | Bag indexes used by <Reward ItemBag> |
| MonsterAffix | Bosses never roll affixes |
How It Works#
- Fighting. A fighter is a player who hit the boss, was hit by it, or healed someone fighting it in the last 15 seconds, and stands within
Radiusof it. - Scaling. Every second the boss is scaled for the number of fighters: Life, damage and defense rise by the
*PerPlayerpercentages for each fighter after the first, up toMaxPlayers. The boss keeps its current HP %. - Contribution. Each player's score = damage dealt x
DamageWeight% + healing xHealWeight% + damage taken xTakenWeight%. Healing counts Heal and party heal, only the HP actually restored. Damage taken is HP lost to the boss, after SD. - Death. Eligible players are those online, on the boss's map and within
Radius, with at leastMinContribution% of the total score. They are ranked by score and each<Reward>row is given. Items go straight into the inventory, or are dropped owned by that player. - Reset. At full HP with nobody fighting for 30 seconds (leash, everyone ran away), the fight is over: scores are cleared and scaling goes back to one player. The next spawn always starts clean.
Schema#
<Bosses>
<Defaults HpBar="1" BarRange="20" Radius="15" ScaleMode="Live" MaxPlayers="20"
DamageWeight="100" HealWeight="50" TakenWeight="25" MinContribution="1"
RewardMode="Inventory" Announce="1"/>
<Boss Class="561" LifePerPlayer="20" DamagePerPlayer="5" Announce="2">
<Reward Type="Rank" From="1" To="3" ItemBag="106"/>
<Reward Type="Party" ItemBag="102"/>
<Reward Type="Participation" ItemBag="105"/>
</Boss>
</Bosses>
<Defaults> sets values for every <Boss>; any attribute on a <Boss> overrides it.
Boss Attributes#
| Attribute | Default | Effect |
|---|---|---|
Class | required | Monster.xml index |
Title | Monster.xml name | Name on the HP bar and in the announcement |
HpBar | 1 | 1 = show the boss HP bar, 0 = no bar |
BarRange | 20 | Tiles. Players this close see the bar |
Radius | 15 | Tiles. Fighters must be this close to count for scaling and to get rewards |
LifePerPlayer | 0 | +% Life per extra fighter. 0 = no Life scaling |
DamagePerPlayer | 0 | +% damage per extra fighter |
DefensePerPlayer | 0 | +% defense and magic defense per extra fighter |
MaxPlayers | 20 | Fighters counted at most |
ScaleMode | Live | Live = follows the fighter count up and down. Peak = only rises to the highest count seen this fight, so leaving does not make the boss weaker |
DamageWeight | 100 | % weight of damage dealt in the score |
HealWeight | 50 | % weight of healing done |
TakenWeight | 25 | % weight of damage taken |
MinContribution | 1 | % of the total score a player needs for any reward |
RewardMode | Inventory | Inventory = straight into the inventory (full inventory = dropped at the player's feet, owned by them). Drop = dropped around the boss, owned by that player |
Announce | 1 | 0 = nothing, 1 = top 3 to everyone on the map, 2 = to the whole server |
Reward Rows#
| Row | Who gets the bag |
|---|---|
<Reward Type="Rank" From="1" To="3" ItemBag="N"/> | Players ranked From..To |
<Reward Type="Party" ItemBag="N"/> | Every eligible member of the party with the highest combined score |
<Reward Type="Guild" ItemBag="N"/> | Every eligible member of the guild with the highest combined score |
<Reward Type="Participation" ItemBag="N"/> | Every eligible player |
A player can get several rows (rank + party + participation). ItemBag is an EventItemBag Bag Index.
Field Spawns#
Add a <Spawn> inside a <Boss> to make it a field boss. The plugin spawns the boss itself: when the server starts, and again after it dies.
<Boss Class="561" LifePerPlayer="20">
<Reward Type="Rank" From="1" To="3" ItemBag="106"/>
<Spawn Map="56" Respawn="60-90" Warn="5" Notice="2">
<Spot X="53" Y="108" Range="3"/>
<Spot X="131" Y="166" Range="3"/>
</Spawn>
</Boss>
| Attribute | Default | Description |
|---|---|---|
Map | required | Map number |
Respawn | 60 | Minutes after death. 60-90 = a random time between 60 and 90 minutes |
Times | empty | Clock times instead of Respawn, e.g. 12:00,20:00. The boss comes back at the next listed time after it dies. If it is still alive at that time, nothing happens. Uses the server PC's clock |
Warn | 5 | Minutes before the spawn to announce it. 0 = no warning |
Notice | 2 | 0 = no messages, 1 = players on that map, 2 = whole server |
SpawnMessage | {boss} has appeared in {map}! | {boss} = Title or Monster.xml name, {map} = map name |
WarnMessage | {boss} appears in {map} in {min} min! | {min} = minutes left |
Warn, Notice, SpawnMessage and WarnMessage can also go on <Defaults>.
Each <Spot> has X, Y and an optional Range: the number of tiles around X/Y to pick a free cell from (0 = exactly X/Y). With several spots, one is picked at random every time. At least one spot is required.
- Every field boss spawns when the server starts.
/reload pluginskeeps a live field boss and its running timer. A newly added<Spawn>spawns right away.- Several
<Spawn>rows on one<Boss>give several copies, each with its own timer.
Script#
Add a <Script> inside a <Boss> to give it phases and special attacks. It works on every spawn of that boss. The script starts when somebody first hits the boss (or is hit by it). It starts over when the fight resets (the boss healed to full and nobody fought it for 30 seconds) or when the boss dies. Adds disappear with the boss.
<Script Gap="2500">
<Phase Hp="100" Say="Medusa: Who dares disturb my swamp?">
<Action Type="Slam" Shape="Circle" At="Target" Radius="3" Delay="1500" Damage="15" Cooldown="8" Color="venom"/>
<Action Type="Slam" Shape="Cone" Radius="7" Angle="70" Delay="2000" Damage="25" Cooldown="14"/>
</Phase>
<Phase Hp="60" Damage="20" Say="Medusa: Look into my eyes!">
<Action Type="Slam" Shape="Line" Length="12" Width="2" Delay="1800" Damage="30" Freeze="2" Cooldown="12" Color="ice"/>
<Action Type="Summon" Class="560" Count="3" MaxAlive="6" Cooldown="40"/>
</Phase>
<Phase Hp="25" Shield="Adds" Say="Medusa: My children, protect me!">
<Action Type="Summon" Class="560" Count="4" MaxAlive="4" Cooldown="60"/>
<Action Type="Slam" Shape="Donut" At="Self" Radius="9" Inner="3" Delay="2500" Damage="40" Stun="2" Cooldown="16"/>
<Action Type="Pull" Radius="12" Cooldown="25"/>
</Phase>
<Enrage After="600" Damage="100" Say="Medusa is enraged!"/>
</Script>
Gap is the time in ms between two actions (default 2000). The boss uses one ready action at a time, picked by Weight.
Vanilla (default 1): some bosses have hardcoded vanilla spells (Medusa casts Decay, Evil Spirit and Chaotic Diseier; Kundun has his own list). With 1 they keep casting them on top of the script. With Vanilla="0" they are off: the boss only swings plain attacks, and the script decides every skill. Rebuild the spells you want with Type="Skill" actions.
Phases#
| Attribute | Description |
|---|---|
Hp | Starts when HP drops to this % or below. The first phase starts with the fight |
Time | Or this many seconds into the fight (use one of the two) |
Damage | +% damage while in this phase, on top of player scaling |
Defense | +% defense and magic defense while in this phase |
Shield | Adds = the boss takes no damage while adds from this phase are alive |
Say | Screen announcement to the boss's map when the phase starts |
List phases in order. A later phase never goes back to an earlier one.
<Enrage After="600" Damage="100" Defense="0" Say=""/> makes the boss stronger after N seconds of fighting.
Actions#
Every action has Cooldown (seconds, default 10), First (seconds after the phase starts before its first use, default 0), Weight (default 100), Range (only used when a fighter is this many tiles close, default 12) and Say (screen announcement when used).
| Type | What it does | Attributes |
|---|---|---|
Slam | Telegraphed area hit. The exact hit area is drawn on the ground with a timer line. When the timer reaches the far edge, it lands on whoever is still inside | Shape, At, Radius, Inner, Angle, Length, Width, Delay, Damage, Stun, Freeze, Knockback, Color, Count |
Summon | Spawns adds next to the boss | Class (Monster.xml index), Count per cast, MaxAlive, Lifetime (seconds, 0 = until the boss dies) |
Pull | Drags fighters within Radius (default 12) next to the boss | Radius |
Teleport | The boss jumps next to a random fighter within Range | |
Heal | The boss heals Heal % of its max HP (only when hurt) | Heal |
Say | Only the Say text | |
Skill | Casts a vanilla skill at a fighter, with the skill's own damage, effect and animation. No ground warning | Skill (Skill.txt index, e.g. 2 Meteorite, 9 Evil Spirit, 10 Hell Fire, 14 Inferno, 38 Decay, 39 Ice Storm, 62 Earthquake, 230 Lightning Shock, 238 Chaotic Diseier), At (Target or Random), Cast (Auto = Area when the skill has a radius, else Target; Target; Area) |
Slam attributes:
| Attribute | Default | Description |
|---|---|---|
Shape | Circle | Circle, Cone, Line or Donut (safe in the middle) |
At | Target | Target = the boss's target, Random = Count different fighters, Self = around the boss. Cone and Line always start at the boss and point at the victim |
Radius | 3 | Circle, Donut and Cone size in tiles |
Inner | 0 | Donut: the safe circle in the middle, tiles |
Angle | 60 | Cone width in degrees (360 = all around) |
Length / Width | 8 / 2 | Line size in tiles |
Delay | 1500 | Warning time in ms before it lands, 1000-10000 |
Damage | 20 | % of each victim's max HP. SD takes its share first |
Stun / Freeze | 0 | Seconds. Ice resistance blocks Freeze. One stun or freeze per player per 6 seconds, so slams cannot chain-lock anyone |
Knockback | 0 | 1 = push victims away from the boss |
Color | red | red, fire, ice, venom, storm, shadow, blood, arcane, holy, life, steel, gold, earth. Also picks the default landing effect and sound |
Fx | by Color | The spell effect played all over the hit area when it lands. Empty = by Color: red and blood hellfire, fire inferno, ice ice_storm, venom decay, storm gigantic_storm, steel twister, earth debris, the others nova. none = only the flash. Any Custom Skills effect name works, e.g. meteor, meteorite, aqua_beam, sahamutt, fire_scream, earthquake, chaotic_diseier, flame_strike, dragon_roar |
Count | 1 | With At="Random": that many marks on different fighters |
Common Issues#
- Boss HP does not go up with more players. Its Life is already at the 2,000,000,000 cap (Medusa ships at 78,000,000,000, which is cut to the cap). Lower
Lifein Monster.xml so there is room to scale. - No HP bar. The client needs
fragments/bosshud.xml,fragments/bosscontrib.xml,boss/frame.png(all underData/Interface/UI), thebosshudandbosscontribhosts in both shells and theboss.*styles in both skins. Check thatHpBaris not0and that you stand withinBarRange. - Field boss never appears. Check the GameServer log for
<Spawn> for class N needs a valid Map and at least one <Spot>. Without theboss-pluginmodule no field boss spawns. - A player got nothing. They were offline, on another map, further than
Radiuswhen the boss died, or underMinContribution.