Bots — settings for the administrator

This page is for someone who runs their own server with bots. It describes where bot behaviour is set and which settings matter most. Settings come from three sources, which differ in when they take effect:

source where when it takes effect
the .env file the server's linux-port/docker/ directory after the game container is recreated (docker compose up -d, the launcher or the panel)
the weights file playerbot_weights.tsv the spool volume in the game container: /opt/m2spool/ live — within about 5 s
event flags (m2_bot_* and others) the server database; set with a GM command live; they persist after a restart

Full description of all server variables: all server settings. Panels: Web panels.

Number of bots and channels (server settings file)

variable default what it does
PLAYERBOT_AUTOSPAWN_COUNT 350 total number of bots, split equally between the three kingdoms; at most 2,500. The “Number of bots” tile in the panel sets the same thing (it changes .env and recreates the game container)
PLAYERBOT_AUTOSPAWN_PER_KINGDOM 0 1 = a separate number per kingdom (PLAYERBOT_AUTOSPAWN_SHINSOO, _CHUNJO, _JINNO); COUNT is then ignored
M2_PLAYERBOT_CH2, _CH3, _CH4 0 1 = bots on channel 2 / 3 / 4 as well (channel 3 requires 2, channel 4 requires 3)
PLAYERBOT_CH2_SHARE 40 what percentage of bots play outside channel 1 (10–90, split equally between the channels 2–4 that have bots). Since 14.11.2026 a bot sets up its shop on the channel it plays on, and buys from the shops of all channels without switching (Bots — shops)
PLAYERBOT_MEDAL_DROPPERS — extra medal collector bots per kingdom (0–200), on top of COUNT
PLAYERBOT_SPAWN_WINDOW_MINUTES 1 over how many minutes bots enter the game after the start (1–180)
PLAYERBOT_LATE_JOINERS, PLAYERBOT_LATE_JOIN_HOURS 0, 24 bots joining later, spread over the given number of hours
M2_PLAYERBOT_START_HELD 0 1 = after the start bots wait “outside the door” until the administrator lets them in (a button in the panel)
M2_PLAYERBOT_KINGDOMS 1 0 = bots in only one kingdom
M2_PLAYERBOT_WORLD_LAYOUT — unified or split — the layout of the bot world
M2_BUFFI 1 Buffi for players (bots never have her); 0 switches it off

The number of bots is not set separately for each game process — it is only split between kingdoms and channels. Limits for the New Continent (how many bots on the Yohara maps, in the Enchanted Forest, in the Time Rift, at the Hydra, on the Sung Ma maps) are set by the variables PLAYERBOT_ZAKLETY_*, PLAYERBOT_SZC_*, PLAYERBOT_HYDRA_*, PLAYERBOT_SUNGMA_* and PLAYERBOT_COHORT* — described in the comments of the example settings file in the linux-port/docker/ directory.

Weights file (live)

The file /opt/m2spool/playerbot_weights.tsv in the game container. Format: one line KLUCZ<TAB>liczba (key, tab, number); everything after # is a comment. The server checks it every 5 s and reloads it after every change — no restart is needed. A removed key goes back to its default value; no file = all defaults. The file is written by the web panel (“Bot behaviour” („Zachowanie botów”) → save live) and by the F9 panel in the client (sliders); it can also be edited by hand.

Goal weights (default 100, range 25–250)

How keen bots are to do a given thing: RESTOCK (trips back for potions), REFINE (blacksmith), SKILL (books), HORSE (horse), BIOLOG, METIN, PARTY, HUNTING, LEVEL, FISHING, TRADE (stalls), MINING, HERB. REFINE, SKILL, BIOLOG and HUNTING can only be lowered — above 100 they change nothing.

Switches (1 = on, 0 = off)

key default what it switches on
PERSONA 1 bot personalities (roles, moods, Metin Slayer, defence against players, truce, surrender)
CHAT 1 the bot's status label above its head
NIGHT 1 night on the server: between 22:00 and 6:00 (container time) the client shows a night sky
WARS 1 bot guild wars
TOWER, CATACOMB, DUNGEONS 1 Demon Tower, Devil's Catacomb, bot dungeons
ISHOP, ISHOP_DAILY_POOL 1 bot purchases in the ItemShop and their daily pool
HAGGLE 1 bot haggling
SHOUTERS 1 bots announcing in chat
SPOT 1 whispers from bots defending their hunting spot
LEGENDS 1 Legend System
PERF_CACHE 1 calculation cache (0 only for performance comparisons)
LIFE 0 bot play sessions (bots play for 3–6 hours and log out); length in LIFE_HOURS
SHOP_M2 0 bot stalls in the second villages as well
MATERIAL_MARKET 0 materials market test

Numeric values

key default what it sets
KINGDOMPVP 0 what percentage of bots pick fights with bots of other kingdoms on shared maps (0–100). Does not apply to players
TICK_MS 120 how many milliseconds per pass the server gives the bot logic (CPU budget)
ISHOP_SOURCE 2 where bots buy from: 2 = ItemShop V3, 1 = the old catalogue, 0 = nowhere
REST 100 percentage of bots that rest in town
SCRAP 0 percentage of bots collecting scrap
BATTLEPASS, SASH, ALCHEMY 100 how keen bots are on the Battle Pass, sashes and alchemy, in % (0–250)
SALE_TAX 0 what part of the price in sales between players and bots disappears from the game (0–50%)
WAR_MINUTES, WAR_HOURS, WAR_KILLS 30, 1, 200 length of a bot guild war, how many hours between wars, how many kills to win
GUILD_DROPPER_HOURS 24 every how many hours of play a new bot is drawn to gather materials for the guild (0 = fixed choice)
TRADECHAT, TRADECHAT_BOT 75 s, 20 min how many seconds between bot trade announcements (0 = off) and how often a single bot may post one
SHOUT_ANSWER 100 what percentage of questions in general chat bots answer
SCROLL_FROM 1 from which plus bots use the Blessing Scroll / Dragon Scroll (e.g. 7 = only for +7, +8, +9)
EXPLAIN 7 how many days explanations of bot decisions are kept (0–30)
CHEST, CHEST_STONE 10, 300 chances (‰) of Caskets of Radiance
VISITS, VISIT_PER_HOUR, VISIT_MAX, VISIT_MIN_LEVEL, VISIT_MIN_GOLD 1, 200, 80, 35, 200,000 trade visits to other kingdoms
RAIDS, RAID_EVERY_MIN, RAID_SIZE, RAID_MIN_LEVEL 1, 60, 8, 40 bot raids on villages (raid size at most 16)

There are also the key groups SHOP_MGMT_* (bot shop management) and STONE4_* (Spirit Stones +4).

m2_bot_* event flags

An event flag is a number stored in the server database. It is set in game with a GM command:

/eventflag m2_bot_free_teleport_off 1
/geteventflag m2_bot_free_teleport_off

(the short form /e works the same way; high GM permissions are needed). The change takes effect at once on all channels and persists after a restart. Some flags are set by the web panel (e.g. difficulty, alchemy, fair price on the market).

Rules:

  • a flag that is not set = 0;
  • …_off flags: 1 switches off the given feature and restores the old behaviour — by default all features are on;
  • numeric flags: 0 = the game's default value.

The game has over 700 bot flags — most are minor tuning of individual systems. The most important ones are below.

Combat, death, survival

flag default what it does
m2_bot_deathloop_off 0 1 = no escape to a safe place after death and no avoiding a map after a series of deaths (getting up with 50% HP stays)
m2_bot_raid_deaths_off 0 1 = a bot does not leave a boss raid after 4 deaths in 10 min
m2_bot_death_lock_min 60 how many minutes the EXP lock after deaths lasts for 70+ bots (10–1440)
m2_bot_death_lock_1h_off 0 1 = a shared, longer lock limit as before
m2_bot_survive_off 0 1 = switches off the 60+ survival rules (better gear, moving down to an easier map, selling Experience Rings, buying Dragon God); separately: _tier_off, _stepdown_off, _ring_off, _booster_off
m2_bot_dragon_god_off 0 1 = bots do not get the free Dragon God Life, Attack and Defence effects (they go back to buying them)
m2_bot_zaklety_potion_pct 85 at what % HP bots drink a potion in the Enchanted Forest (50–95)
m2_bot_buff_food_off 0 1 = bots do not eat fish or drink Dews; _buy_off — they do not buy them
m2_bot_juice_off 0 1 = bots do not use Juices and Waters
m2_bot_dead_phase_off 0 1 = switches off the fix for a bot that is “alive but dead”
m2_bot_deathloop_monkey_off 0 1 = the old Monkey Dungeon level thresholds

Movement, travel, channels

flag default what it does
m2_bot_free_teleport_off 0 1 = bots pay for the Teleporter, the ring and expeditions again
m2_bot_ring_travel_off 0 1 = the Teleportation Ring only for returning to the village
m2_bot_ring_fee_on 0 1 = the ring costs bots money
m2_bot_channel_roam_permille 0 how many ‰ of bots change channel every 2 minutes (at most 100; 0 = none)
m2_bot_handover_off 0 1 = bots stop moving to the New Continent; all of them go back home
m2_bot_cohort_off 0 1 = pauses the groups of bots sent to the Yohara maps
m2_bot_gate_trial_off 0 1 = no “trials” at map gates
m2_bot_travel_loop_fix_off 0 1 = no protection against hopping between maps; m2_bot_travel_loop_min_stay_s — minimum stay (600 s)
m2_bot_grind_dry_off 0 1 = a bot does not abandon a spot where nothing respawns
m2_bot_m1_town_thin_off 0 1 = no thinning out of the crowd in the first village
bot_visit_now 0 N = immediately send N bots (up to 30) on a trade visit to another kingdom (the flag resets itself)
bot_raid_now 0 forces a raid on a village of another kingdom

Progression, loot, equipment

flag default what it does
m2_bot_exp_pct 150 the percentage of the server's experience rate that bots get (1–1000; negative = the old premium rule)
m2_bot_need_drop_all_off 0 1 = bots get the level penalty on drops like players (the exception for pet materials stays); m2_bot_petmat_drop_off switches that off too
m2_bot_book_wait 0 seconds of break between bots' books (set from the difficulty level)
m2_bot_skill_instr_off 0 1 = bots do not use skill Manuals; m2_bot_skill_instr_gap70_h — every how many hours a chest from level 70 (4)
m2_bot_refine_policy_off 0 1 = switches off the rules for using scrolls when upgrading
m2_bot_refine_scroll_level 75 from which item level bots use a scroll on every step
m2_bot_alchemy_fee_pct 10 what percentage of the Alchemist's fees bots pay (100 = full)
m2_bot_bonus67_off 0 1 = bots do not add 6/7 bonuses
m2_bot_junk_gear_off 0 1 = the old rules for selling old gear to the merchant

Market, ItemShop

flag default what it does
m2_bot_fairprice_off 0 1 = switches off the “fair price” on the bot market
m2_bot_lada_off 0 1 = switches off the bot counter
m2_bot_shop_migrate_off 0 1 = pauses moving bot shops between channels
m2_bot_shop_anych_off 0 1 = bot shops only on channel 1 again (buying from all channels stays)
m2_bot_market_nomove_off 0 1 = the old market: bots switch to channel 1 to buy and put items up
m2_bot_sm_need_daily 1000 daily pool of Dragon Coins for bots' needs (whole server)
m2_bot_sm_need_per_bot 100 daily share of one bot
m2_bot_ishop_cor_guard_off 0 1 = no protection against buying Cor Draconis without free space
bot_material_market 0 the same as the MATERIAL_MARKET key

Dungeons, PvP, other systems

flag default what it does
m2_bot_dropki_off 0 1 = no new parties of Yohara dungeon farmer bots
m2_bot_meley_off 0 1 = no new bot expeditions to Meley's Lair
m2_bot_kolezyum_off 0 1 = bots do not take part in the Colosseum
m2_pvpfan_off 0 1 = switches off the PvP Fan bots
m2_najemnicy_off 0 1 = switches off mercenaries
m2_bot_zmetin_off 0 1 = bots do not attack the Enchanted Forest Metins
m2_bot_sungma_gate_off 0 1 = no resistance gate on the Sung Ma maps
m2_bot_fishbot_off 0 1 = switches off angler bots

Other control files (in /opt/m2spool/)

  • playerbot_item_policy.tsv — item policy: a line numer_przedmiotu<TAB>słowo (item number, tab, word) or type:N<TAB>słowo. Words: keep/zostaw (do not sell), stall/stragan (put up on the stall), merchant/handlarz (always sell to the merchant), drop/wyrzuc (get rid of it at the merchant without selling). An entry for a number beats an entry for a type. The file is read every 5 s; it does not affect what a bot picks up from the ground. Editing: the web panel (AI items page).
  • playerbot_hold — 1 on the first line keeps bots out of the world; 0 or no file — bots enter. The panel button “Let bots into the world” („Wpuść boty do świata”) writes 0.
  • “Now” triggers: playerbot_tower_now, playerbot_catacomb_now, playerbot_war_now, playerbot_raid_now, playerbot_reprice_now — changing the file starts the given action at once (the panel uses them).

GM commands

command what it does
/bot_spawn <pid> <królestwo 1–3>, /bot_despawn <pid> lets one bot in / logs one bot out
/bot_spawn_many <pierwszy_pid> <1–500> <królestwo>, /bot_despawn_many <pierwszy_pid> <1–500> the same for many bots
/botadmin the bot administration window
/bot_rank bot ranking
/eventflag, /e, /geteventflag setting and reading event flags

Full list of commands: GM commands.

See also