Limits and Performance
On this page(4)
Enchants run for every player at once, so the plugin bounds what one player's effects can cost.
The limits live in enchants: of modules/sword/config.yml and apply per player. A
/dungeons reload applies a change.
The limits
| Key | Default | Range | When it is reached |
|---|---|---|---|
max-sequences | 8 | 1 to 64 | Effect sequences alive at once. A proc while a player is at the limit does not run |
max-actions-per-tick | 200 | 10 to 10000 | Actions run in one tick. The rest waits for the next tick |
max-particles-per-tick | 300 | 0 to 5000 | Particles sent in one tick. The points past it are not sent |
max-entities | 32 | 1 to 256 | Effect entities (mobs, displays, lightning) seen at once. One past it does not appear |
max-entities-per-tick | 8 | 1 to 64 | Effect entities that appear in one tick. One past it does not appear |
max-npcs | 6 | 1 to 32 | Fake players (the npc action) alive at once. They also count in max-entities |
aim-height | 0.5 | 0 to 1 | Where effects that fly at a mob aim: a share of its height (0.5 = the middle) |
Other keys of the same block (open-on-right-click, upgrade-amounts, upgrade-click-grace-ticks,
prestige) are covered on Pricing and Prestige and
Menu Tiles.
What counts
- A sequence is one proc that is still running (it has a
delay, aloopwithevery, or aparallelbranch still alive). A proc whose actions all run in one tick ends in that tick. - A
parallelbranch takes no slot of its own: the proc keeps its one slot until its last branch ends. - A momentum enchant without actions never takes a slot.
- Each mob of a
for-each-mob, each jump of achainand each point of afor-each-pointcounts as one action.
Design tips for heavy enchants
| Situation | What to do |
|---|---|
| A loop drops many entities in one tick | Add every: (1 to 3 ticks) so they spread over max-entities-per-tick |
| A big shape every proc | Lower count. 40 to 80 points read as a solid shape |
| Long effects (fighters, 15 second golems) | Add a cooldown-ticks at least as long as the effect, or the sequences pile up |
| A frequent enchant | Keep it in one tick (no delays) so it frees its slot at once |
| Effects on every mob of the zone | Use for-each-mob with every: so the actions spread over ticks |
add-booster with persistent: true | Give it a low chance or a cooldown: it writes the database on every proc |
| Particles in a fast loop | Remember the cap: 300 particles per player per tick, shared by every enchant |
Hitting a limit is safe: nothing breaks, and the effect is only trimmed. If a big enchant looks incomplete, check its entity and particle counts against these limits first.
What a reload and a quit do
/dungeons reloadends every running effect, removes the effect entities and forgets the cooldowns.- A quit, a world change, or the module turning off removes the player's effect entities and stops their sequences.
- The levels are never touched.