StressBotPlugin

Server stress testing plugin that spawns fake players with random equipment for performance testing

Server stress testing plugin that spawns configurable numbers of fake player bots with randomized equipment to test viewport performance, rendering systems, and server load under heavy player density.

File Location

GameServer/Data/Plugins/StressBotPlugin.xml

Dependencies

Depends On
Purpose

Item.xml

Equipment pool loaded from Item.xml to randomize bot equipment

Overview

StressBotPlugin creates "stress bots" - fake players that appear in the game world with fully randomized equipment and character classes. These bots are visible to real players and generate all the same viewport packets, rendering effects, and server processing as real players, making them ideal for:

  • Testing server performance under high player density

  • Stress testing viewport packet processing

  • Testing client rendering performance with many players

  • Validating equipment visual effects at scale

  • Performance profiling under realistic load

GM Commands

All commands require GM authority level 32 or higher.

Command
Description

/stressbot spawn <map> <count>

Spawn specified number of bots on a map

/stressbot clear <map>

Remove all bots from specified map

/stressbot clearall

Remove all bots from all maps

/stressbot status

Display current bot counts per map

/stressbot reload

Reload configuration from XML

Command Examples

Configuration Attributes

Core Settings

Attribute
Type
Default
Description

Enabled

bool

false

Enable/disable the plugin. Set to true to activate stress testing features

Bot Limits

Attribute
Type
Default
Description

MaxBotsPerMap

int

200

Maximum number of bots allowed per map. Higher values create more concentrated stress. Limited by server memory (~50KB per bot)

MaxBotsTotal

int

500

Maximum total bots across all maps. Limited by server's summon object pool (1000 slots total, range 15000-15999, shared with player pets and guardians)

Bot Appearance

Attribute
Type
Default
Description

DefaultBotLevel

int

400

Level assigned to spawned bots. Affects visual appearance through armor glow effects and animations. Higher levels display more advanced visual effects

DefaultBotClass

int

1

Default character class when RandomizeClass="false". Values: 0=Dark Wizard, 1=Dark Knight, 2=Fairy Elf, 3=Magic Gladiator, 4=Dark Lord, 5=Summoner, 6=Rage Fighter

RandomizeClass

bool

true

If true, each bot receives a random class (0-6). Creates visual variety for more realistic testing scenarios

Equipment Settings

Attribute
Type
Default
Description

RandomizeEquipment

bool

true

If true, equips bots with random items from Item.xml. Tests equipment rendering, glow effects, and visual system performance

RandomizeWings

bool

true

If true, includes wings in equipment randomization. Wings have high-impact particle effects and should be tested separately

ItemLevel

int

13

Item level for equipped items (0-15). Higher levels = more visual effects (glow, particles). Level 13+ creates significant visual complexity

ItemOption

int

16

Additional option level (+4, +8, +12, +16). Value represents the actual bonus. Adds stat display effects and visual indicators

ItemExcellent

bool

true

Add excellent options to items. Excellent items have special glow effects and are the most visually intensive item type

Spawn Behavior

Attribute
Type
Default
Description

WalkableRetryCount

int

50

Number of random position attempts before fallback. Higher values = better spatial distribution but slower spawn time. 50 is typically sufficient for most maps

Important Behavior

circle-info

Bot Spawning Algorithm: Bots attempt to spawn near the GM who issued the spawn command (within 15 tile radius). If no walkable position is found nearby, the system falls back to random map positions, and finally to the map center area (coordinates 100-156).

circle-exclamation
circle-exclamation
circle-info

Item Pool Loading: The plugin reads Item.xml on initialization and builds separate pools for regular equipment (slots 0-6) and wings (slot 7). Only items with valid slot assignments are included in randomization.

circle-info

Bot Safety: Bots are configured with extremely high Life (30,000), Defense (32,000), and MagicDefense (32,000) to prevent death during testing. Bot death can cause server crashes as they don't have full player cleanup handlers.

circle-exclamation

Common Map Numbers

Map ID
Map Name
Map ID
Map Name

0

Lorencia

30

Castle Siege

1

Dungeon

31

Land of Trials

2

Devias

33

Aida

3

Noria

34

Crywolf

4

Lost Tower

51

Elbeland

7

Atlans

56

Swamp of Calmness

8

Tarkan

57

Raklion

10

Icarus

Examples

Conservative settings for development testing. 100 bots per map, full equipment randomization for visual testing.

Performance Testing Workflow

1. Baseline Test

Start with 50 bots in Lorencia. Check server CPU, memory, and client FPS.

2. Incremental Load

Incrementally add bots to find performance thresholds.

3. Multi-Map Distribution

Test server performance with load distributed across multiple maps.

4. Status Monitoring

Regularly check bot distribution and ensure limits aren't exceeded.

5. Cleanup

Always clear bots when testing is complete to free server resources.

Common Issues

circle-exclamation
circle-exclamation
circle-exclamation
circle-exclamation
circle-info

Tip: For viewport stress testing, spawn all bots in a small area (they spawn near the GM). For distributed load testing, teleport to different locations before each /stressbot spawn command.

Technical Details

Bot Properties

Stress bots are configured as follows:

  • Type: OBJECT_BOTS (appears in viewport, minimal server processing)

  • Life/Mana: 30,000 (prevents death)

  • Defense: 32,000 (monsters cannot damage them)

  • MagicDefense: 32,000 (magic attacks cannot damage them)

  • Level: Configurable (affects visual appearance)

  • Name: Bot##### where ##### is object index (e.g., "Bot15450")

  • Inventory: Full inventory array allocated (237 slots including equipment, InventoryMap arrays)

  • Movement: Stationary (no AI, no walking)

  • Combat: Cannot attack, cannot be killed

Slot Assignment

Equipment slots match MU Online's standard layout:

Slot
Name
Slot
Name

0

Weapon (Right)

5

Gloves

1

Weapon (Left)

6

Boots

2

Helm

7

Wings

3

Armor

8

Pet

4

Pants

When RandomizeEquipment="true", slots 0-6 are filled with random items from the Item.xml pool that match each slot. Wings (slot 7) are only equipped if RandomizeWings="true".

Item Excellent Options

When ItemExcellent="true", bots receive 0x3F (all 6 excellent options):

  • Excellent items display special glow effects

  • This creates maximum visual complexity for stress testing

  • Performance impact is significant with 100+ bots

Set to false for baseline testing without excellent effects.

Last updated