dayz-agentic-modding-mcp
dayz-agent-mcp
MCP-сервер, который позволяет агенту собрать мод для DayZ, проверить, что клиент компилируется, запустить тестовый сервер и получить структурированный вердикт вместо лога.
Сервер выполняет всю работу сам: он вызывает FileBank, инструмент подписи и диагностический исполняемый файл напрямую. Проекту не нужен собственный скрипт сборки.
Зачем нужен профиль
Сервер ничего не знает о конкретном моде. Всё специфичное хранится в профиле из двух частей:
dayz-mcp.toml— переносимая часть, хранится в репозитории мода: какие моды собирать, как выглядит здоровая загрузка.dayz-mcp.local.toml— машинозависимая часть, не хранится в репозитории: где находится игра, инструменты и тестовый стенд.
Смешивание этих частей запрещено при загрузке — именно так репозиторий перестаёт собираться
на чужой машине. Начните с dayz-mcp.example.toml.
Мод объявляется один раз, по имени: исходники в <root>/Name, результат —
@Name/addons/Name.pbo. Параметр build.sources может перенаправить исходники мода в другое место
(например, "." для мода, чей config.cpp лежит в корне репозитория).
Переносимая часть — dayz-mcp.toml
Ключ | Значение |
| как назвать этот проект |
| по одной записи на мод, по имени; исходники, pbo и |
| где на самом деле живут исходники мода, относительно профиля ( |
| что никогда не должно попадать в pbo. Указание этого списка полностью заменяет стандартный; по умолчанию: |
| собирать отфильтрованную копию вместо отказа, когда присутствует исключённое — раскладка, которая нужна корневому моду |
| каталог, относительно которого разрешаются все пути моделей; указывается относительно этого файла. Обязателен для инструментов работы с моделями — и больше ни для чего. См. «Конвейер ассетов» |
| сценарий PowerShell, запускаемый перед сборкой, для проектов, которые сначала генерируют код |
| строка, которую мод печатает, когда загрузка завершена — см. ниже |
| пары |
| допустимое число предупреждений; опустите ключ, чтобы отключить проверку |
| подстроки, наличие которых делает запуск неудачным независимо ни от чего |
| регулярные выражения, помечающие ошибки скриптов, принадлежащие вам; используются при проверке компиляции клиента |
| дополнительный шум движка, который следует игнорировать, помимо встроенного списка |
Машинозависимая часть — dayz-mcp.local.toml, не хранится в репозитории
Ключ | Значение |
| установка игры; определяется автоматически, если не указано |
| DayZ Tools; определяются автоматически, если не указаны |
| исполняемый файл Blender, только для |
| подготовленный тестовый стенд. Сервер загружается против него, а логи читаются из |
| имя конфигурационного файла сервера внутри стенда (по умолчанию |
| порт, который |
| имена папок модов, разрешаемые внутри собственной папки игры |
| полные пути ко всему остальному, что нужно загрузить, для модов, которые не лежат в |
| имена папок, которые направляются в |
Строка готовности
server_start завершается, когда expect.ready_line появляется в логе, записанном после
начала загрузки. Это единственное, что сервер не может выяснить сам, и
без неё меняются две вещи: ждать нечего, поэтому задание на запуск стартует
сервер, через мгновение проверяет, что он ещё жив, и завершается, сообщая об этом;
и у log_verdict нет строки, с которой можно считывать счётчики, поэтому expect.counters никогда
не срабатывает. Ошибки, падения и лимит предупреждений по-прежнему оцениваются. Профиль
без строки готовности поддерживается, а не считается сломанным — project_open сообщает об этом
в своих примечаниях.
Related MCP server: DayZ API MCP Server
Инструменты
Tool | Что делает |
| прочитать профиль, обнаружить игру и инструменты, сообщить, чего не хватает |
| текущий проект, запущенный сервер, недавние задачи |
| упаковать и подписать каждый объявленный мод; возвращает идентификатор задачи. Отказывается от второй сборки того же проекта, пока одна ещё выполняется |
| запустить тестовый сервер, завершить, когда он будет готов. Отказывается, если миссия, указанная в конфиге, не находится в |
| pid, жив ли процесс, растёт ли журнал (выборка с интервалом |
| остановить сервер, запущенный этой сессией (необязательный pid для осиротевших серверов) |
| прочитать — или намеренно изменить — |
| запустить диагностический клиент и прочитать его журналы |
| пройдено/не пройдено с причинами: счётчики, запрещённые строки, бюджет предупреждений. |
| последние строки, при необходимости отфильтрованные; те же два источника |
| статус длительной задачи |
| ждать завершения задачи |
| получить результаты завершённой задачи |
| упаковать мод-мост, исходники которого поставляются с этим сервером ( |
| продолжает ли мост внутри запущенной игры тикать: сообщает номер тика и продвинулся ли он за |
| отбросить команду, застрявшую в почтовом ящике, называя, что было выброшено. Отказывается, пока мост выглядит живым, если только |
| ждать, пока мост внутри игры действительно начнёт принимать команды. Вызовите его один раз после завершения задачи загрузки, перед первой командой мира — см. «сервер готов — не значит мост готов» ниже |
| снимок мира из публикации моста раз в секунду: игроки, позиция, здоровье, руки. Бесплатно без аргументов; с |
| создать предмет на земле (без времени жизни, чтобы он не исчез в середине проверки), в руках игрока или в его инвентаре |
| переместить игрока в |
| установить |
| удалить объекты одного класса поблизости. Требует класс; никогда не удаляет реального игрока |
| какие объекты находятся рядом, а не сколько: класс, позиция, расстояние и здоровье для каждого. Страница, и она об этом сообщает — истинное общее количество возвращается рядом со списком |
| переместить мировые часы. Каждое поле, оставленное на -1, сохраняет текущее значение, сначала считываемое из движка, потому что движок устанавливает дату как пять чисел одновременно |
| изменить облачность, дождь, туман, снегопад или ветер. Подталкивание, а не блокировка: движок продолжает моделировать погоду после этого, и инструмент, и мод об этом сообщают |
| выполнить собственное действие мода через шлюз движка — см. ниже |
| запасной выход: произвольный глагол через тот же транспорт, помеченный как нестандартный в каждом ответе |
| запустить игровой клиент и подключить его к стенду; возвращает идентификатор задачи. Всегда в оконном режиме. Завершается, когда мост сообщает |
| client_status() | pid, геометрия окна, свёрнуто ли окно или находится на переднем плане, настройка фона, количество игроков и подключён ли виртуальный контроллер |
| client_stop() | остановить клиент, запущенный этой сессией, и отключить виртуальный контроллер |
| client_shot(path) | захватить окно клиента в PNG, с lit_fraction — число, которое отличает настоящий кадр от полностью чёрного. Фокус не нужен |
| client_move(x, y, seconds) | вести персонажа левым стиком. Аналоговое управление, единственный способ вообще как-то двигать персонажа. Фокус не нужен |
| client_look(x, y, seconds) | поворачивать камеру правым стиком. Фокус не нужен |
| client_press(button, seconds) | одна кнопка геймпада, из закрытого списка четырнадцати названий. Фокус не нужен |
| client_chat(text, color) | отправить строку в чат — доставляется на стороне сервера через мост, так что не нужны ни клавиатура, ни окно, ни фокус |
| client_type(text, submit) | ввод в клиентском поле ввода настоящими нажатиями клавиш. Единственный инструмент здесь, которому нужен передний план, и он сам об этом сообщает в ответе |
| client_verdict(since) | судить живой клиент по его собственному .RPT — вердикт об ошибках и падениях; см. ниже |
| ui_menu() | что делает интерфейс клиента: класс открытого меню, курсор, диалог. Бесплатно — перепубликуется каждый тик |
| ui_tree(root, depth, limit) | дерево виджетов клиента: путь, класс, имя, видимость, прямоугольник на экране, глубина и текст. Это страница, и он сам об этом сообщает |
| ui_find(name, class_name, text, root) | тот же обход, но с фильтрацией на стороне клиента, так что всё дерево никогда не приходится передавать целиком |
| ui_click(path, expect_name, expect_class, via) | нажать виджет. via="script" проходит через обработчик открытого меню без фокуса; via="cursor" помещает настоящую мышь на его прямоугольник |
| ui_text(path, text, expect_name) | записать текст в поле ввода и прочитать значение обратно из виджета |
| mod_lint(mod, strict) | судить Enforce Script без упаковки и загрузки чего-либо. mod_build запускает его первым делом и отказывается на том, на чём отказывается он |
| knowledge_build(layer, full, only) | собрать или обновить слой индекса API; возвращает id задания. only=[path] перечитывает ровно те файлы, которые вы указали |
| knowledge_status() | что хранит каждый слой, насколько он старый и совпадает ли ещё с тем, что лежит на диске |
| knowledge_find(name, kind, owner, layer, prefix, limit) | найти класс, метод, константу, перечисление или конфиг-класс по имени |
| knowledge_show(name, ..., body) | одно объявление полностью: сигнатура, члены, цепочка наследования и сам исходник — читается напрямую из архива, если он там живёт |
| knowledge_overrides(name, owner, layer) | кто переопределяет этот класс или метод |
| knowledge_callers(name, kind, owner, layer) | кто вызывает этот метод или создаёт этот класс — каждое место вызова, с классом и методом, которые его сделали |
| asset_export(blend, mod, source, name) | экспортировать модель из .blend в build.project_root, без головы; возвращает id задания. Необязательный первый шаг — см. ниже |
| asset_build(mod, source, deploy) | бинаризовать модели мода из их MLOD-исходников, оценить результат и только потом положить его в мод; возвращает id задания |
| asset_check(mod, model) | судить модели и текстуры, которые мод уже поставляет. Ничего не собирает, DayZ Tools не нужны, отвечает за миллисекунды |
| asset_convert(source, output) | конвертировать одну текстуру между .png и .paa и оценить результат |
Сигнатуры, и почему собственное сообщение движка уводит вас не туда. При
verifySignatures = 2 стенд отказывает каждому клиенту с кодом 118 и "missing
dta\bin.pbo" — имя ванильного файла, без единого упоминания сигнатур вообще.
Причина обычно в связке ключей: этот инструмент запускает диагностический
исполняемый файл из установки КЛИЕНТА, поэтому движок читает keys рядом
с этим исполняемым файлом, тогда как dayz.bikey — ключ, подписывающий
собственные pbo игры, — поставляется с отдельной установкой DayZServer.
Папка keys, которой нет или в которой лежит только ключ самого мода,
оставляет сервер неспособным проверить что-либо, включая ванильные файлы.
client_start отказывается и называет, какой из трёх случаев имеет место;
server_start только предупреждает, потому что безголовая загрузка без клиента
всё ещё полезна. Неподписанный pbo на строке -mod клиента называется тем же
способом — включая собственный мост этого сервера, который упакован
неподписанным намеренно.
Три ограничения, которые движок накладывает на инструменты UI, и ни одно из них не обходится: у обычного TextWidget есть SetText и нет GetText нигде в enwidgets.c, так что строку подписи вообще нельзя прочитать — что означает интерфейс мода, остаётся вопросом для моста на стороне сервера, где данные настоящие. Клик на уровне скрипта достигает только открытого скриптового меню, потому что у Widget есть SetHandler и нет GetHandler; via="cursor" существует для всего остального. И клиент должен загрузить мост: один pbo несёт обе половины, поэтому профиль, перечисляющий его в mods.server_only, держит его вне строки -mod клиента — в этом случае отказ происходит по имени, а не ответом с пустым деревом.
job_wait — это инструмент, предназначенный для ожидания, и его timeout ограничен 600 секундами, какое бы большое значение ни было передано. Два других инструмента спят: server_status сэмплирует лог дважды, с интервалом pulse_seconds, ограниченным 10 секундами — эта пауза и есть то, как он отличает медленную загрузку от зависшей, — а bridge_status сэмплирует тик моста дважды, с интервалом window, ограниченным теми же 10 секундами, по той же причине. Всё остальное возвращается немедленно; работа, занимающая минуты, происходит за id задания.
Мод моста
bridge_build упаковывает bridge/ из репозитория самого этого сервера в
@DZMCP_Bridge рядом с ним. Это мод сервера, не ваш: одна копия обслуживает
все проекты, в ваш репозиторий ничего не записывается, кроме записи о задании,
и ни один ключ подписи проекта не используется — pbo с -serverMod никогда не
передаётся клиенту на проверку, поэтому он собирается неподписанным, и его
выходная папка хранится свободной от сигнатур и ключей.
Сборка не означает загрузку. Это остаётся решением вашего профиля, потому что
мост — это дополнительный pbo в стенде, и запуск без него должен оставаться
возможным. Чтобы подключить его, добавьте две строки в dayz-mcp.local.toml
(те же две, которые печатает сводка задания bridge_build):
[mods]
extra = ["<path printed by bridge_build>/@DZMCP_Bridge"]
server_only = ["@DZMCP_Bridge"]server_only — это то, что направляет его в -serverMod вместо -mod. Без
него стенд загружается совершенно нормально, и bridge_status сообщает, что
мост никогда не записал никакого состояния, — что правда, и это легко
принять за сломанный мост.
bridge_status также сообщает о почтовом ящике команд. Внутри игры его опустошает
только мод, заявляя команду; на этой стороне это делают bridge_clear и
очистка перед загрузкой в server_start. Так что команда, отправленная, пока
стенд был выключен или до подключения моста, не отбрасывается и не истекает
сама по себе — она продолжает блокировать
каждую последующую отправку, и стенд, загруженный вне этих инструментов,
подхватил бы её. server_start очищает оба транспортных файла перед каждой
загрузкой, так что сервер, запущенный через этот инструмент, никогда не
выполняет команду из предыдущей сессии; это гигиена, а не замена знанию того,
что команда там. Состояние возвращается как stale_command, и
bridge_clear() — это выход из него. Очистка — отдельный инструмент намеренно:
выбросить поставленную в очередь команду — это решение, а не то, что проверка
состояния должна делать за вашей спиной. Она отказывается, пока мост выглядит
живым, если вы не передадите force=True, и в любом случае сообщает id
команды, которую отбросила.
Что bridge_status умеет различать
Одного тика недостаточно, чтобы судить о мосте, потому что он перезапускается
с 0 при каждой загрузке, тогда как файл состояния переживает её в каталоге
профиля. Каждый ответ несёт собственный вердикт канала в heartbeat, и эти
четыре — действительно разные факты:
|
| значение |
|
| тик сдвинулся в пределах одной сессии — единственный ответ живости с |
|
| между двумя сэмплами поднялся новый мир: жив, не заморожен, и всё, что было отправлено старой сессии, пропало |
|
| тот же мир виден дважды, не движется — проблема на стороне скрипта, так что следующий шаг — |
|
| сэмпл не удалось прочитать (или |
Каждый ответ, прочитавший сэмпл, также несёт session_id — id живого
мира, — а ответ restarted несёт и previous_session_id, так что вызывающий
может сказать, какой мир исчез.
no_server, stale_command, no_state_file, invalid_state,
unreadable_state и outdated_bridge идут перед всем этим: ничего не
запущено, команда застряла, мод не загружен, документ состояния — валидный
JSON с ошибкой в именованном поле (он сообщает, в каком, и проверяет дважды,
прежде чем сказать), файл вообще не разбирается, или разбирается, но
предшествует протоколу этого сервера (пересоберите его с помощью
bridge_build).
Команды мира
Инструменты мира общаются с мостом через два JSON-файла в каталоге -profiles
сервера: почтовый ящик команд (атомарно записываемый с этой стороны,
удаляемый модом как заявка) и файл состояния, который мод перезаписывает раз
в секунду. У Enforce Script нет rename, так что мод не может писать атомарно —
читатель вместо этого терпит рваные записи, и один неудачный запрос никогда
не является новостью. Четыре факта, все измеренные на живом стенде, решают,
как ими пользоваться:
Готовность сервера — это не готовность моста. Мост начинает заявлять
команды через десятки секунд после того, как сервер сообщает о готовности —
наблюдаемый разброс на данный момент составляет 18–38 секунд, и он меняется
от загрузки к загрузке.
Команда, отправленная в это окно, не отклоняется — она заявляется с опозданием
и завершается после того, как вызывающий сдался. Поэтому: server_start,
дождитесь задания загрузки, затем world_ready(), затем команды. Каждый
инструмент мира также отказывает заранее, если тик не движется, называя
world_ready средством решения.
Каждое значение аргумента пересекает провод как строка. Парсер мода
строг: JSON-число где-либо в args отклоняет весь блок args. Инструменты сами
преобразуют числа и булевы значения в строки и отказывают значениям без
верной строковой формы (списки, словари, None). Позиции путешествуют одной
строкой, "x y z".
Отказ — это результат. Собственное предложение мода возвращается дословно как ошибка: "no player is on the server", "the class does not exist", "the action's own Can() said no". Никого не подключено — нормальное состояние безголового стенда, и каждый глагол, которому нужен игрок, говорит об этом вместо того, чтобы молча ничего не делать.
Id сессии защищает от вчерашней команды. Каждая команда несёт сессию, которую мост опубликовал последней; мод отказывает любой команде, адресованной другой сессии (или никакой), не выполняя её. Команда, записанная, пока стенд был выключен, поэтому никогда не может выстрелить в только что загруженный мир. Инструменты проставляют сессию автоматически — это важно только если вы пишете почтовый ящик вручную.
Действия, и почему нет словаря глаголов
Семантический глагол, как «рука в образце», лжёт: в реальном моде те же слова
означают разные вещи в зависимости от того, какое устройство рядом, какая фракция у игрока
и что уже разблокировано. Этот контекст неисчислим, поэтому мост
не пытается его учитывать. world_action принимает имя класса действия, цель и
предмет в руке, и просит движок прогнать его через собственные ворота — те же, через которые
проходит нажатие клавиши. Применимость определяется собственным Can() действия,
и его отказ — это осмысленный результат теста, а не сбой инструмента. Различимые
ответы: менеджер занят, игрок уже действует, игрок
бежит, неизвестный класс действия и «собственный Can() действия сказал нет».
«Принято» — тоже не успех: команда остаётся активной, пока движок
фактически не освободит действие, и каждый путь отказа освобождает менеджер, так что
игрок всё равно может действовать после этого.
world_exec — запасной выход
Всё, что мод предоставляет и что не является действием — «сколько очков в
фракции» — проходит через world_exec(verb, args): произвольный глагол через
тот же транспорт. Каждый ответ помечен как non_standard: этот сервер не
знает глагол, не проверяет его и не отвечает за то, что мод
с ним делает. Глагол, который сборка моста не знает, возвращается списком
глаголов, которые она знает. Проект, которому нужен собственный глагол, правит собственную копию
диспетчера моста (комментарий над KnownVerbs() в
bridge/scripts/5_Mission указывает точно, где); никакого механизма регистрации
намеренно нет — глагол, который этот сервер набрал и проверил, был бы глаголом,
за который этот сервер отвечает.
Клиент: три уровня ввода и почему их три
Мост достигает сервера. Чего он не может — смотреть на клиент
или действовать через клиент — вести персонажа по земле, открывать
меню, заполнять поле, нарисованное модом. Инструменты client_* — это именно то,
и они используют три разных пути, потому что ни один из них не может сделать работу двух других.
Каждая строка ниже — это измерение на живом клиенте, а не проектное
намерение.
Путь | Что он делает | Нужен ли передний план |
мост ( | мир и текст в чат | нет |
виртуальный геймпад, ViGEmBus ( | движение, камера и некоторый интерфейс | нет |
реальные нажатия клавиш, | текст в поле, которое существует только на клиенте | да, и он нужен |
Эмуляция клавиатуры не двигает персонажа, а оконные сообщения не делают
ничего. SendInput со сканкодами при подтверждённом переднем плане: 25 секунд
вперёд, 0 м. PostMessage/SendMessage с WM_KEYDOWN в главное окно
и его дочерние: 0 м, и никакой реакции меню тоже. Движок
читает ввод из сырых данных и игнорирует эмулируемые клавиши, поэтому ни один
инструмент здесь не предлагает оконных сообщений.
Виртуальный геймпад двигает персонажа, даже без фокуса, и он АНАЛОГОВЫЙ — вот причина, по которой он работает даже там, где клавиша не работает. Измерено в одном прогоне со сторонним приложением, удерживающим передний план всё время:
stick fully forward, 10.0 s -> 38.40 m (3.84 m/s)
stick at 0.3 forward, 8.0 s -> 11.34 m (1.42 m/s)Тот же путь, та же скорость 2.7× от одного только отклонения стика. «Персонаж идёт, а не бежит» — это нельзя выразить клавишей, которая знает только вкл/выкл. В том же прогоне персонаж прошёл около 141 м сам по себе, и собственный счётчик мода для объектов в радиусе 10 м от него изменился 1 → 0 → 1, когда он отошёл и вернулся — изменение состояния, вызванное присутствием, которое телепорт вызвать не может.
Часть интерфейса отвечает на геймпад, а часть — нет. Измерено, когда
окно игры было позади другого приложения всё время: back открывает и
закрывает инвентарь, start открывает меню паузы, b закрывает его — всё при
стандартном нажатии 0.1 с, так что короткого нажатия достаточно, чтобы движок сработал. Но a
ничего не сделал — ни при 0.1 с, ни при 0.5 с, и крестовина тоже не сработала в этих
экранах: клиент не переключился в режим навигации контроллером, поэтому
не было сфокусированного элемента, на который могла бы нажать кнопка подтверждения. Считайте закрытие меню задачей геймпада,
а подтверждение в меню — неподтверждённым.
Глазам фокус не нужен. Захват экрана — это живой кадр, даже когда окно
находится в самом низу порядка окон (lit_fraction 0.9997 без фокуса, 0.9997
с фокусом в той же сессии). Единственное состояние, которое их побеждает, — это
свёрнутое окно, чья клиентская область схлопывается до 0×0 — отказ с
указанием причины, а не сохранение пустой картинки, которая выглядит валидной.
Всё это фоновое поведение зависит от одной настройки клиента — pauseMode
(GAME → UPDATE IN BACKGROUND). При значении, измеренном здесь, клиент
продолжает отрисовку и симуляцию без фокуса, поэтому кадр живой и стик
продолжает двигать персонажа. При «no graphics» оба остановились бы молча —
замороженный кадр выглядит точно так же, как живой. Поэтому client_start и
client_status ЧИТАЮТ эту настройку и предупреждают; они никогда не пишут её, потому что она
принадлежит тому, кто владеет машиной.
client_type — единственный инструмент, которому нужен экран, и он честен
об этом: ответ содержит foreground_taken и предложение, объясняющее, что
человек за машиной не мог печатать в своём окне, пока шёл ввод. Он
проверяет GetForegroundWindow после запроса, потому что
SetForegroundWindow возвращает успех, ничего не сделав, когда Windows отказывает,
— и слепой ввод отправит нажатия в то окно, которое человек
реально использует. Когда передний план получить нельзя, ничего не вводится, и в отказе
называется процесс, который его удерживает.
ViGEm — это эмуляция реального устройства, а это испытательный стенд. Драйвер подписан и устанавливается без перезагрузки, а геймпад — это новое устройство, а не фильтр над клавиатурой и мышью машины — фильтрующий драйвер уже пробовали здесь однажды, и он стоил владельцу машины весь ввод с клавиатуры и мыши, пока его не открутили вручную. Ничто из этого не является обещанием насчёт античита на живом сервере, и ничто в этой фазе таких обещаний не даёт.
Индекс знаний
Агент, пишущий мод, снова и снова задаёт игре одни и те же вопросы: есть ли такой
API, как он называется, где объявлен, кто его переопределяет. Ответы
раньше означали распаковку scripts.pbo и прочёсывание текста — и каждая сессия
платила за это заново. knowledge_* превращает эту работу в один вопрос.
Это обычный SQLite-файл в собственной директории .dayz-mcp/ проекта, собираемый этим
сервером из игры, модов, объявленных в проекте, и собственных исходников проекта.
Никаких эмбеддингов, внешних сервисов и ключей.
Три уровня и почему их ритмы различаются
Уровень | Источник | Когда устаревает |
| игра: | при обновлении игры |
| архивы модов, объявленных в профиле, читаются без распаковки | при обновлении зависимости или изменении объявленного набора |
| собственные исходники мода, читаются там, где лежат | при каждой правке |
Один индекс, собранный за один проход, оказался бы неверным через минуту после того, как стал верным:
игра обновляется несколько раз в год, зависимость — несколько раз в месяц, а проект —
между одним ходом агента и следующим. Поэтому каждый уровень строится, стареет и
измеряется отдельно, и каждая сборка инкрементальна — неизменённые исходники
пропускаются по размеру и времени модификации, а only=[path] пропускает даже обход,
который их обнаруживает.
Ответ несёт возраст уровня, из которого он пришёл
Устаревание измеряется, а не угадывается: уровень записывает размер и время модификации каждого исходника, который он прочитал, и это сравнивается с файлами в их текущем состоянии.
Каждый ответ называет использованные уровни и возраст каждого. Ответ без результатов называет каждый уровень, который он обыскал — «не найдено» стоит ровно столько же, сколько актуальны уровни за ним.
Свежесть уровня проекта измеряется при каждом поиске, участвовал ли он в нём или нет. Это опасный случай: агент добавляет класс, спрашивает о нём, и уровень, собранный минуту назад, говорит «не найдено» — уверенное утверждение о коде, который существует.
Поиск по уровню, который никогда не был собран, отклоняется, и в отказе называется вызов, который его собирает. «Не найдено» и «не искали» — разные факты, и только один из них безопасен для действий.
Сужение несёт ту же ловушку на уровень ниже, поэтому пустой суженный ответ сообщает, где имя действительно существует: запрос
kind='class'по имени, которое игра объявляет только в конфиге, получает честное «нет», которое читается как «в игре нет такого класса».
Конфигурационные классы живут под kind='config', а не kind='class'. По подсчёту
в собственном индексе этой машины: 88 102 конфигурационных класса против 43 595
скриптовых объявлений всех видов вместе взятых, так что вперемешку с одним видом они
похоронят любой скриптовый ответ. Разделённые, вопрос «есть ли в игре класс предмета X» —
это вопрос, который можно задать точно.
Чего индекс не отвечает
Индекс отвечает на вопрос что существует: класс, метод, сигнатура, где объявлен, кто
переопределяет. Он не отвечает на вопрос что правильно — что modded class X extends X компилируется и молча не применяется, что _co стоит альфа-канала,
что binarize принимает директории, а не файлы. Ничто из этого не выводимо
из исходников; это было выучено на горьком опыте и живёт в навыке моддинга и
в самом моде. Индекс не пытается заменить ни то, ни другое, и не пытается
понять, что означает поле или зачем существует класс.
Семантического поиска здесь намеренно нет
Решение было принято измерением, а не осторожностью: каждый запрос, который формировал ранние фазы этого сервера, был запросом по имени. А индекс эмбеддингов нарушил бы правило, которого держится весь остальной сервер — установил и работает, без внешнего сервиса и без ключа. Проект-предшественник, на котором этот намеренно не строился, документирует свой слой знаний как локальный и бесплатный, пока его код импортирует платный клиент эмбеддингов, падает без ключа и несёт захардкоженные цены. Его два поисковых инструмента также зависают навсегда, потому что клиент за ними был создан без таймаута; отсюда и потолок, под которым работает каждый поиск здесь. Если точного поиска окажется недостаточно, семантический поиск — это отдельная фаза с одним условием: модель поставляется внутри дистрибутива.
Измеренные числа
На этой машине — игра с 2810 скриптовыми файлами, 35 установленными модами, один реальный проект из 41 исходника — через инструменты, а не через их внутренности:
Сборка | Результат | Время |
| 2927 исходников, 131 697 объявлений (41 ничего не дал) | 70.2 с |
| 8 архивов, 10 925 объявлений | 0.9 с |
| 523 архива, 204 768 объявлений, 3 архива нечитаемы и названы | 139–147 с |
| 41 исходник, 1196 объявлений | 0.12 с |
Индекс на диске: 74.7 МБ для трёх уровней реального проекта; 110 МБ для 523 архивов зависимостей отдельно. Эти архивы — 92 ГБ, и ни один из них не распакован.
Точки вызова — вот за что платит индекс. В собственных скриптах игры 43 579 объявлений и 113 703 точки вызова, и запись второго множества примерно удваивает индекс: замеры только на игровом слое — 23,8 МБ и 3,7 с на сборку без них, 49,6 МБ и 4,5 с с ними. Такова цена возможности ответить на вопрос «кто это вызывает», и она указана здесь, а не обнаруживается позже на заполненном диске.
Ответ | Время |
| 4,2 мс полного цикла, из которых 3,0 мс — обход проекта |
| 3,2 мс на запрос |
| 4,2 мс |
| 0,38 мс на запрос |
| 277 мс текстовых проверок, 7 мс проверок индекса |
Замерено на живом стенде, три запуска: world_time_set(hour=3, minute=7)
перевело часы на 2026-09-20 03:07 и оставило дату на месте;
world_weather_set("fog", 0.9, seconds=2) подняло публикуемый туман с 0,085 до
0,900 и удержало его; world_entities(pos="7500 0 7500", radius=150, limit=5)
вывело 5 из 171 объектов с truncated: true. Дистанции возвращались как 320 м
при радиусе 150 м, пока их не сделали горизонтальными — именно это измеряет
собственный тест радиуса движка.
| knowledge_show, класс с 400 членами и его предки | 6,8 мс |
| knowledge_status, все три слоя измерены | 41 мс (110 мс при первом вызове после сборки) |
Инкрементальность на реальном проекте: полная пересборка — 136 мс; один
изменённый файл, найденный обходом, — 8,8 мс (15×); тот же файл, указанный
через only=, — 5,8 мс (23×). На дереве из 2810 файлов доминирует обход,
и only= даёт гораздо больше — но для проекта такого размера 15× — это то,
что обычная пересборка даёт на самом деле.
Потолок действительно ограничивает: запрос, измеренный в 77 мс, запущенный под потолком 19,3 мс, был остановлен на 19,9 мс, и соединение продолжило отвечать.
Конвейер ассетов
Чтобы получить модель из Blender в мод, нужно десять шагов, и до этого этапа все они выполнялись вручную. Ценность не в запуске инструментов. А в том, что каждый инструмент в этой цепочке структурно не способен сообщить об ошибке, и каждое из этих умолчаний уже стоило дней.
Измерено на реальных бинарниках, а не взято с потолка:
Что произошло | Что вернул инструмент |
| 0, пустой выходной каталог, ни строчки текста |
| 0, ODOL размером 46 190 байт там, где правильная сборка — 58 644 |
|
|
экспортёр Blender с его же аргументами по умолчанию |
|
Поэтому всё это пространство имён построено на правиле: вердикт читается по артефакту, а не по отчёту инструмента. Код возврата фиксируется, но ему не верят ни в ту, ни в другую сторону.
Корень объявляется, а не предполагается
У binarize вообще нет опции корня проекта — полный список ключей был
составлен перебором по реальному бинарнику. Корень — это рабочая директория
процесса. Одна и та же команда, тот же вход, другая директория — и на выходе
валидный ODOL с правдоподобными путями текстур, которые движок рендерит без
текстур, с кодом успеха и без единой жалобы. Экспортирующий аддон Blender
хранит тот же корень в собственной настройке, запомненной из последнего
открытого проекта: на машине, где это разрабатывалось, он указывал на каталог
из посторонней сессии, и при неверном корне аддон тоже не падает — он срезает
букву диска, оставляет остальное и пишет пути, которые выглядят как пути.
build.project_root — это и есть тот каталог, указанный один раз в переносимой
половине профиля. Сервер устанавливает его рабочей директорией бинаризатора и
передаёт в аддон на время запуска, так что то, что хранит аддон, ни на что не
влияет (об этом сообщается, чтобы вы могли пойти и исправить). Именно поэтому
неверный корень становится невозможным, а не обнаруживаемым, и поэтому ключ
обязателен до того, как что-либо моделеподобное вообще запустится.
Отказы происходят до создания процесса — замерено 0,0003 с — а отклонённая сборка оставляет модель, которую мод уже поставляет, байт в байт нетронутой.
Двенадцать проверок артефакта, четыре из них — отказ
asset_check выполняет их без сборки и без DayZ Tools, потому что свежий клон
должен иметь возможность спросить, здорово ли то, что он поставляет. Четыре
отказа: собранная модель существует и является ODOL (C1), ни одна ссылка не
выходит за пределы мода (C3), материал действительно встроен (C4), и ничего
уже бинаризованного не скармливается обратно binarize (C10). Остальные —
предупреждения: висячие ссылки, rvmat, указывающий в другой мод,
прозрачность, потерянная в DXT1 (C7), анимация, так и не попавшая в артефакт,
model.cfg, не тот, из которого собран артефакт, структурный отпечаток,
который больше не совпадает с тем, что развернула последняя сборка. Каждая
находка говорит, что делать.
C4 — та самая, о которой стоит знать. Когда binarize разрешает rvmat, он
копирует текстурные стадии этого материала в модель — fresnel,
#(argb,8,8,3), env_land_co.paa, _nohq, _smdi — строки, которых нет ни
в одном MLOD. Шесть артефактов из шести были корректно разделены этим тестом,
и он нашёл на этой машине сломанную модель, о которой никто не знал.
Шаг Blender необязателен
asset_export — единственный инструмент здесь, которому нужен Blender, и всё
ниже по конвейеру работает с .p3d откуда угодно — ручной экспорт, файл
партнёра, модель, закоммиченная годы назад. Машина без Blender собирает и
поставляет мод без проблем; отказ сообщает об этом, а не выдаёт это за
сломанную установку. Ему нужно, чтобы экспортирующий аддон был включён в том
Blender, который он находит, и он никогда не записывает обратно пользовательские
настройки Blender (проверено: файл настроек был побайтово идентичен после
каждого запуска).
Экспорт и сборка — это два вызова, а не один, потому что у каждой половины свой вердикт, и сборка, отклонённая одним и разрешённая другим, — это не решение.
Побайтовая идентичность не обещается никогда
Ни одна половина этого конвейера не воспроизводима, и дизайн говорит об этом прямо, а не притворяется:
Экспорт. Семь экспортов одного неизменного исходного файла — три из одной сессии, три из другой и один, сделанный вручную в GUI месяцами ранее, — дали семь разных SHA-256 при постоянных 334 032 байтах. Разница — в порядке одного внутреннего блока.
binarize. Четыре запуска одного неизменного входа дали три разных результата: размер сдвинулся на 5 байт, и два фрагмента по 8 байт вытекли из сжатых областей.
Поэтому модель никогда не кэшируется и не сравнивается по хешу содержимого. Сравнивается структурный отпечаток — тип файла, количество LOD и набор имён. Во всех семи экспортах этот отпечаток был одним значением.
Замеренные цифры
Одна небольшая модель на этой машине, через инструменты:
Шаг | Результат | Время |
| MLOD, 334 032 Б, 5 LOD, чисто | 2,1 с (около 8 с на холодном старте) |
| ODOL v55, 58 646 Б, 4 LOD, все пять маркеров C4 | 43,8 с (75,6–78,7 с замерено за четыре предыдущих запуска) |
| оценено 1 модель и 10 пар текстур | миллисекунды |
| один PNG в DXT1, 50 764 Б | 0,52 с |
отказ на неверном корне | до запуска любого процесса | 0,0003 с |
Оба лога почти полностью состоят из шаблона, и то, что заглушено, подсчитывается,
а не отбрасывается: 169 строк Blender сократились до 4, а 91 строка
binarize — до 6 — и одна из этих шести была единственной настоящей жалобой
модели.
Соединённые в цепочку экспорт и сборка воспроизвели модель, сделанную вручную месяцами ранее: тот же тип, те же 4 LOD, те же 50 строк, а размер — на один байт.
Чего это не отвечает
Правильно ли выглядит модель, правильно ли отмасштабирована, правильно ли намотана, есть ли коллизия. Ничто за пределами игры на это не отвечает. C1–C12 сокращают путь к этому; они его не заменяют.
Известные ограничения
Обнаружение устаревшего pbo основано на mtime, а не на содержимом.
mod_buildотказывается принимать свежесобранный pbo, который старше своих исходников — обычная причина в том, что запущенный сервер всё ещё держит старый файл открытым, поэтому упаковка молча ничего не произвела. Ноgit checkoutменяет время модификации файла, не меняя его содержимого, так что вполне исправный pbo, собранный сразу после переключения веток, тоже может попасть под эту проверку. Еслиmod_buildсообщает «stale pbo» сразу после переключения ветки, вероятная причина именно в этом, а не в реальном сбое упаковки — пересоберите, и проверка пройдёт. Зрелый инструмент в этой области перешёл на хеш содержимого именно по этой причине; это будущая работа здесь, не сделанная на данном этапе (см.packer.py,pack_one).Папка исходников мода упаковывается целиком.
mod_buildотказывается упаковывать мод, в каталоге исходников которого есть что-либо, соответствующееbuild.exclude(семь шаблонов по умолчанию перечислены выше), а не молча отправляет это внутрь публикуемого pbo. Он отказывается независимо отbuild.exclude, когда в исходниках содержатся собственные артефакты этого сервера — ключи подписи, любая половина профиля, хранилище заданий, предыдущая сборка мода — потому что упаковка их публикует приватный ключ подписи, и ни один проект не должен настраивать это вручную. По умолчанию он не создаёт сначала отфильтрованную копию: копия всегда новее исходников, что навсегда отключило бы проверку устаревшего pbo выше, если бы эта проверка измеряла копию.build.stage = trueвсё же включает копирование — безопасно только потому, что сравнение устаревшего pbo всегда измеряет исходное дерево исходников, а не копию. Это компоновка, необходимая моду, чьи исходники находятся в корне репозитория (там всегда есть хотя бы.git).Вердикт судит весь журнал, а не только строки вашего мода.
log_verdictчитает журнал стенда, на который он указывает, поэтому стенд, разделяемый с другими модами, засчитывает их предупреждения в ваш бюджетexpect.max_warnings, а их ошибки — как причины. Два проекта, разделяющие одинmachine.stand_root, увидят базовый уровень друг друга. Либо дайте каждому проекту собственный стенд, либо задайте бюджет с учётом того, что ещё загружено. Фильтр в рамках проекта, симметричныйexpect.error_regex, — очевидное улучшение, и он не реализован.expect.noiseне может спасти строку, которая уже считается ошибкой. Классификация упорядочена:forbid→ сбой → ошибка → noise → предупреждение, поэтому строка, содержащаяERRORилиFATAL(или одну из ваших строкforbid), решается до того, как будет учтён noise. Этот порядок намеренный — если бы noise сопоставлялся первым, безобидная подстрока могла бы поглотить фатальную строку — но это означает, чтоnoiseможет подавлять только предупреждения и обычные строки и никогда не понижает строку уровня ошибки.client_verdict— это вердикт об ошибках и сбоях, а не о готовности.[expect]описывает журнал сервера: его строка готовности и счётчики печатаются серверной инициализацией мода, аmax_warnings— это бюджет, подсчитанный по тому же журналу. Клиентский.RPTне содержит ничего из этого, поэтому эти три ключа намеренно здесь не применяются, и ответ перечисляет их вnot_applied.forbid,error_regexиnoiseкасаются текста строки журнала и по-прежнему применяются. Клиентской строки готовности, которую можно было бы объявить, нет; попал ли клиент внутрь, определяется количеством игроков, которого ждётclient_start, а не его журналом.Клиентские инструменты подключаются к стенду, который эта сессия не запускала;
client_chat— не может.client_startс радостью подключится к тому, что уже есть на порту, и сообщает, чей это стенд. Но чат доставляется на стороне сервера, по тому же каналу, что и инструментыworld_*, а этот канал действует только на сервер, запущенный этой сессией — поэтому на заимствованном стенде работает всё, кромеclient_chat. Отказ называет pid'ы, удерживающие порт, а не предлагаетserver_start, который отказал бы им.Чат недоступен с геймпада, и подтверждение меню — тоже. Игра привязывает свою строку чата к Enter и ни к чему больше, и экранной клавиатуры нет, поэтому текст — это либо сообщение моста (
client_chat, бесплатно), либо реальные нажатия клавиш (client_type, стоит фокуса переднего плана).client_type("", submit=True)отправляет один Enter — так открывается строка чата — и, судя по приведённым выше данным, это единственное подтверждение, которое есть у набора инструментов.Каждый поиск по знаниям оплачивает обход дерева проекта. Этот обход — то, как измеряется устаревание проектного слоя при каждом ответе, и это единственное свойство, ради которого существует индекс. Он стоит 3,0 мс на реальном моде из 41 исходника (в его дереве около 1800 записей) и 21 мс на дереве из 2810 файлов. Кэширование его на секунду-другую убрало бы стоимость и восстановило ровно то окно тишины, от которого отказывается дизайн; если это когда-нибудь станет слишком дорого, этот компромисс придётся принять осознанно, а не случайно.
Сборка всегда проходит через задание, и задание стоит дороже, чем небольшая сборка. Время оборота измерено в 70–95 мс против 6 мс пересборки проекта:
job_waitопрашивает с интервалом 100 мс. Единая форма намеренна — вызывающему не нужно знать, какие блоки сборки — и ничто не заставляет вас ждать, потому что следующий поиск измеряет сам слой.Слой зависимостей измеряется относительно профиля в его текущем виде. Добавьте мод в
mods.required— и его архивы появятся какadded; удалите — и его архивы будут читаться какmissing. Это требование (объявленный набор — часть того, из чего строится слой), но выглядит так, будто индекс устарел, когда на самом деле изменился профиль.coreвсегда включает конфиги игры, и это большая часть его стоимости. 70 секунд с ними против примерно 4 секунд только для скриптов. Переключателя нет: без конфигов на вопрос «есть ли класс предмета под названием X» нельзя ответить, а вторая ось сделала бы измерение устаревания неоднозначным — обход не знал бы, ждать ли архивыAddons.knowledge_showотвечает сначала ближайшим слоем. Для класса, который зависимость переоткрывает с помощьюmodded class, объявление мода идёт раньше объявления игры. Это правильный порядок, и он удивителен; передайтеlayer='core'для собственного объявления игры.Условная компиляция индексируется, а не разрешается. 4,9% строк скриптов игры находятся внутри
#ifdef, включая около сотни объявлений классов. Этот сервер управляет серверной, клиентской и диагностической сборками, поэтому единого правильного набора defines не существует: индексируется всё, и guard записывается в объявление. Поэтому может быть сообщено имя, которое конкретная сборка исключает — альтернатива, фильтрация по одной догадке о defines, отрицала бы существование методов, которые есть в работающей сборке.Отпечаток C12 несёт размер файла, а размер
binarizeнестабилен. Пересборка модели, которую никто не редактировал, дала артефакт на один байт больше, чем поставляемый, с тем же типом, тем же количеством LOD и теми же пятьюдесятью строками — и другим дайджестом, потому что размер входит в него. Поэтому C12 может предупредить о пересборке, которая ничего не изменила. Он предупреждает, а не отказывает, именно по этой причине, и части, из которых он построен, сообщаются рядом, чтобы сравнение можно было провести вручную. Разделение дайджеста на стабильную половину и размер — очевидное улучшение, и оно не сделано.Частичный экспорт предупреждает; он не отказывает. С собственными аргументами экспортёра по умолчанию модель вышла с 2 из 5 LOD и прошла все остальные проверки. Этот сервер не передаёт эти аргументы, поэтому такого не должно происходить — но объект, помеченный как LOD и не связанный со сценой, учитывается на одной стороне сравнения и не учитывается на другой, что является законной причиной для расхождения счётчиков, поэтому отказ дал бы ложные срабатывания. Читайте E3.
Правило контейнера не видит каждый неправильный корень. Оно отказывает корню, который не содержит папку префикса мода — это измеренный сбой. Корень, который всё же содержит папку с таким именем — например, репозиторий, чей собственный каталог мода написан как префикс — проходит его, и этот случай ловят C10 или C3/C4 на один слой ниже. Измерено: при указании на такой корень сборка отказала, ничего не развернула и оставила поставляемый артефакт нетронутым, но отказ пришёл от задания, а не от вызова.
asset_exportтребует, чтобы экспортирующий аддон был включён в Blender, и не может его установить. Blender запускается с реальными настройками владельца машины, потому что запуск с--factory-startupполностью убирает аддон. Остальные его аддоны удерживаются вне пути поиска для запуска (два из установленных здесь обращаются к сети при старте и обвиняются в сбоях), что Blender сообщает как «Add-on not loaded» в журнале — эта строка — дело рук самого сервера, а не ошибка.У бинаризованного конфига нет тела для показа.
knowledge_show(body=True)читает объявление обратно из файла или архива, из которого оно было проиндексировано, ноconfig.binхранит бинарную форму, тогда как индекс хранит то, чтоCfgConvertиз неё сделал. Ответ сообщает об этом вместо того, чтобы вернуть ничего.
Установка
python -m pip install -e ".[dev]"
python -m pytestЗарегистрируйте в вашем MCP-клиенте:
{ "mcpServers": { "dayz": { "command": "dayz-mcp" } } }Лицензия
GPL-3.0-or-later. См. NOTICE.md.
Available Tools
55 toolsasset_buildA
Build a mod's models from their MLOD sources and put them in the mod.
Returns a job_id immediately: ONE small model measured 75.6 to 78.7
seconds across four runs, so this can never be a blocking call. Wait for it
with job_wait(job_id, timeout=...) -- give it minutes, not seconds -- and
read the numbers in the job's summary and its asset-build.json artifact.
What it does, in order: run binarize with its working directory set to
the project root declared as build.project_root, judge the ARTIFACT that
came out (never the tool's exit code -- three separate broken outcomes were
measured exiting 0, one of them leaving a zero-length file), and only then
copy the models into the mod. A refused build deploys nothing and leaves
the artifact the mod already ships exactly as it was.
mod names one of build.mods; with a single declared mod it can be
omitted. source is the model directory relative to the mod's own folder
under the root (e.g. "data/models"); left out, the only directory holding
.p3d files is used and two candidates are a refusal rather than a guess.
deploy=False builds and judges without writing into the mod.
The source is the MLOD export and the ODOL is the build's output (decision
D3). Handed an ODOL, binarize dies with 0xC0000005 and leaves a
zero-length file behind, so that is refused before the process starts.
Model.cfg is never copied for you: it is what the artifact was built from, and a mismatch between the copy under the root and the copy in the mod is reported by C11 with what to do about it. Rebuilds are not byte-stable and are not expected to be -- what a rebuild is compared against is structural.
Inputs: mod, deploy, source. Returns: ok, data, hint, error
asset_checkA
Judge the models and textures a mod already ships. Builds nothing.
Needs no DayZ Tools and no build: every check reads a file that is already on the disk, because the tools that produce these files are structurally unable to report failure. Answers in milliseconds.
Twelve checks (C1-C12). Four of them refuse, and this call fails when one
does: a built model is there and is an ODOL, no reference escapes the mod,
a material was actually inlined, and nothing already binarized is offered
back to binarize. The rest warn -- dangling references, an rvmat pointing
into another mod, a transparency lost to DXT1 (C7), an animation that never
reached the artifact, a model.cfg that is not the one the artifact was
built from, and a structural fingerprint that no longer matches what the
last build deployed. Every finding says what to DO about it.
model narrows it to one file, relative to the mod's directory. Files the
packer will drop (build.exclude) are not judged: a refusal about a file
that never enters the pbo is a refusal about nothing.
A texture is judged against the PNG it came from -- beside it or at the
same place under build.project_root -- because a legitimately opaque
texture and one whose transparency was destroyed are identical in the
output alone.
Inputs: mod, model. Returns: ok, data, hint, error
asset_convertA
Convert one texture between .png and .paa, and judge the result.
Which compression ImageToPAA writes is decided by the SOURCE FILE'S NAME,
and nothing says so at the time: a name ending in _co produces DXT1,
which keeps ONE BIT of alpha. A source measured 6 distinct alpha levels
going in and 2 coming out. So this measures the source's alpha before
converting, warns before the loss and again after it (C7), and says what to
do -- rename the source to end in _ca, because the output itself cannot
be repaired once the levels are gone.
source is absolute, or relative to the repository, or relative to
build.project_root. output defaults to the same name with the other
extension, beside the source; a relative output also lands beside it.
The verdict is read off the file that was written, never off the exit code.
Inputs: source (required), output. Returns: ok, data, hint, error
asset_exportA
Export a model out of a .blend into the project's model root.
Returns a job_id; wait for it with job_wait(job_id, timeout=...). One
five-LOD model measured 2.1 s warm and about 8 s cold, but the ceiling is
minutes, because how long an export takes is a property of the model.
This is the pipeline's OPTIONAL first step. It produces the MLOD; the
binarized model that the game loads is what asset_build makes from it,
and that is a separate call on purpose -- each half has its own verdict,
and a mod whose .p3d came from somewhere else skips this entirely.
The project root declared as build.project_root is pushed into the
exporting add-on for the duration of the run, so what the add-on has stored
decides nothing. That matters: an add-on preference is remembered from
whatever was open last, and against the wrong root every texture path comes
out with the drive letter stripped and the rest kept -- valid-looking,
resolving to nothing, reported as a success.
The verdict is read off the file: it must be an MLOD, this run must be what
wrote it, all of the source's LODs must have reached it, and none of its
references may leave the mod. Measured on a real model: with the exporter's
own default arguments, 2 LODs of 5 came out as a valid MLOD with correct
paths, FINISHED, exit 0, and no mention of it in 169 lines of log.
blend is absolute, or relative to the repository, or relative to
build.project_root. source is the directory the model should land in,
relative to the mod's own folder under that root (e.g. "data/models"); with
exactly one such directory already holding models it can be omitted.
name is the file to write, defaulting to the source file's own name with
a .p3d extension.
Nothing else is touched: an export that produces nothing leaves the model that is already there exactly as it was, and Blender's user preferences are never written back.
Inputs: blend (required), mod, name, source. Returns: ok, data, hint, error
bridge_buildA
Pack the bridge mod from this repository's own sources.
The bridge is the server's own mod, not the project's: one copy serves every project, and it is built UNSIGNED -- no project's signing key is used, and the output folder is kept free of signatures and keys.
Building it does not load it. Attaching it stays a profile decision (the job summary prints the two lines to add), because the bridge is an extra pbo in the stand and a run without it has to remain possible.
Inputs: no named parameters. Returns: ok, data, hint, error
bridge_clearA
Discard whatever command is sitting in the mailbox.
The remedy for bridge_status's stale_command. Inside the game, claiming
a command IS deleting the file, so a command sent while the stand was down,
or before the bridge was wired into -serverMod, is never claimed and never
expires on its own: it blocks every later send until something removes it.
Two things on this side do -- this tool, and server_start, which clears the
transport before every boot. A stand booted outside these tools would run
the command instead.
Its own tool, and never a side effect of asking for status: throwing away a
queued command is a decision, and bridge_status reporting the wedge must
not be the thing that silently resolves it.
Refuses when anything suggests the bridge is alive, because a running mod
could claim that command at any moment and destroying live in-flight work
is worse than leaving the wedge. FIRST on the plain fact that a server this
session started is running -- whatever its bridge is or is not publishing,
which matters most for a mod that has not started writing state yet -- and
that refusal costs no probe at all. Otherwise the channel probes for
probe_window
seconds and refuses on a tick that moved, on a world that restarted, AND on
a readable first sample followed by an unreadable second one -- that last
is proof something was alive moments ago, which a downed stand never
produces. force=True overrides all of it, and what it overrode is
reported either way.
Inputs: force, probe_window. Returns: ok, data, hint, error
bridge_statusA
Is the bridge inside the running game still ticking?
Blocks for up to window seconds (default 2, clamped to STATUS_WINDOW_MAX)
because that is what it costs to see a tick MOVE. window=0 returns at
once and then usually cannot tell -- it reports "unknown", never "frozen".
A stand with no state file at all now costs the FULL window too (measured: 2.07s at the default, 10.05s at the cap), because the reader retries to the deadline rather than giving up on the first miss. If the question is only "is the bridge publishing anything yet" -- the usual one while wiring it up -- pass window=0 and get the same answer in a tenth of a second; a window buys movement, and nothing else.
The answers, told apart in this order:
no_server nothing is running, so there is nothing to ask. Checked
FIRST and on the process, not on the file: the state
file outlives the server that wrote it, and reading a
leftover snapshot as a live bridge is precisely the lie
this ordering prevents.
stale_command the same, but with a command still sitting in the
mailbox. Its own answer because the remedy is its own:
the command does not expire, it blocks every send, and
a stand booted OUTSIDE these tools would pick it up.
(server_start clears the transport before every boot,
so a server started through these tools will not.)
no_state_file / the server is up but nothing readable came back. Four
outdated_bridge / fixes, so four answers: the mod is not loaded; the mod
invalid_state / predates this server's protocol (no session_id at all);
unreadable_state the document is valid JSON but a named field is wrong
(the answer says which field, what was expected and
what was seen, and it is checked twice a publish
interval apart so a mangled write is never reported as
a schema bug); or it does not parse at all.
alive / restarted a comparison was made. alive means the tick moved;
/ frozen / restarted means a new world came up mid-sample (also
unknown alive, and NOT frozen); frozen means the same world
was seen twice without moving; unknown means no
comparison could be made. Only the first two return ok.
Inputs: window. Returns: ok, data, hint, error
client_chatA
Put a line in the connected player's chat. FOCUS IS NOT NEEDED.
Said plainly because the general rule about typing does not apply here. Chat is a SERVER-SIDE MESSAGE: the engine hands the mod a call that delivers text to a player, so the bridge sends it as data -- no keyboard, no window, no foreground, and nothing taken away from whoever is at the machine. It is also more trustworthy than real typing, because the command carries an id and comes back with the mod's own confirmation instead of "typed it and hoped".
This is NOT the tool for a mod's own input field -- a PDA, a terminal, a
form. Those exist only on the client and are filled by client_type, which
does need the foreground.
The line goes to EVERY connected player, and the answer says how many got it: the engine's call names one recipient, so a verb that quietly took the first player would put the line on one screen and leave it missing from the one the caller was watching.
color is one of colorStatusChannel (the default), colorAction,
colorFriendly or colorImportant. Anything else is refused BY THE MOD rather
than passed on, because the client turns a colour class it does not know
into plain white and says nothing about it. Long lines are refused too,
rather than cut somewhere the caller cannot see.
What success promises is that the engine accepted the call for each named recipient -- not that the line was visible. A client drops whole chat channels according to the player's own profile options, so an accepted line that nobody can see is a client setting, not a fault in the bridge.
Requires the bridge to be loaded and ticking, like every other world command, and requires the stand to be running a bridge build that knows the verb; if it is not, the mod says so and the hint says what to do.
Inputs: text (required), color, timeout. Returns: ok, data, hint, error
client_compile_checkA
Compile the CLIENT half of the scripts and judge the result. Returns a job id.
A server boot never compiles anything behind the client-only guard, so a
broken menu, a broken widget or a broken client-side action passes every
server check and then breaks in front of a player. This runs the diagnostic
client for wait_seconds, stops it, and judges what it wrote -- and the
verdict does not accept a clean log on its own: the game's own "Module:
Mission" line has to appear, otherwise "no errors" only means "not that far
yet" and the job says so.
The client runs against a THROWAWAY -profiles directory inside this job's artifacts, so it never reads or writes the test stand. It also joins nothing: this is a compile pass, not a session. For the live client that connects to the stand -- and for looking at it, acting through it, and judging its .RPT -- the tools are client_start and its siblings, and log_verdict(source="client") reads THIS job's log while client_verdict reads the live client's.
extra_mods appends to the -mod list for this run only, for checking that
a mod still compiles alongside another one.
Inputs: extra_mods, wait_seconds. Returns: ok, data, hint, error
client_lookA
Turn the camera with the right stick. NO FOCUS NEEDED.
Same units and the same guarantees as client_move: x positive right,
y positive up, clamped to [-1, 1], released on every exit path.
Inputs: x (required), y (required), seconds (required). Returns: ok, data, hint, error
client_moveA
Walk the character with the left stick. NO FOCUS NEEDED.
x is positive to the right, y positive forward, both in [-1, 1] and
clamped (and reported as clamped) beyond that. client_move(0, 1, 6) is the
measured 24 m walk. The stick is back at rest when this returns, on every
path including a failure -- a stick left engaged is a character running
forever with nobody watching.
This is the only tract that moves the character at all: keyboard emulation was measured at 0 m over 25 s with the foreground verified. It is also the only one that is ANALOG, so "walking rather than sprinting" is testable here and nowhere else.
The first call attaches a virtual controller to this machine, which the
game can see -- DayZ switches its on-screen hints to controller mode -- and
the answer says so. client_stop unplugs it.
Inputs: x (required), y (required), seconds (required). Returns: ok, data, hint, error
client_pressA
Press one gamepad button. NO FOCUS NEEDED -- this drives the INTERFACE too.
Measured with a third-party application holding the foreground the whole
time: right_shoulder moved between options tabs, back opened and closed
the inventory, b left the menu. So menus and inventory are reachable
without ever taking the screen from the person at the machine, and that is
why this module offers no window messages and no mouse: window messages
were measured to do nothing at all.
What a pad cannot do is type -- DayZ has no on-screen keyboard. Text in
chat goes through client_chat (server-side, no focus); text in a mod's own
input field goes through client_type (real input, foreground).
Buttons: a b x y back start left_shoulder right_shoulder left_thumb right_thumb dpad_up dpad_down dpad_left dpad_right.
Inputs: button (required), seconds. Returns: ok, data, hint, error
client_shotA
Capture the client's window to a PNG. NO FOCUS NEEDED.
Measured rather than assumed: the frame is live with the client at the very bottom of the z-order and live when it is in front. The one state it cannot survive is MINIMIZED -- the client area collapses to 0x0 and there is nothing to copy -- and that is refused with a hint saying to restore the window, not reported as an empty picture.
lit_fraction in the answer is the honest half: a black capture is exactly
the failure that otherwise reports success, so the fraction of non-black
pixels comes back with every shot. A dark frame is never failed -- night is
dark -- but a caller reading 0.0 knows the eyes were shut.
With no path the file lands in this project's own .dayz-mcp/shots.
Inputs: path. Returns: ok, data, hint, error
client_startA
Start the game client and connect it to the test stand. Returns a job id.
Three things worth knowing before calling, all of them observable:
IT LAUNCHES WINDOWED, always. A fullscreen D3D window does not yield the foreground -- an attempt to cover one simply hung -- so a fullscreen client can be neither typed into nor left behind while the owner works. The window size itself is the client profile's business (DayZ.cfg), not this server's.
IT REFUSES WHEN THERE IS NO STAND TO JOIN. The client connects, it does not listen, so there is no port of its own to pre-flight; what there must be is something already on the stand's port. Without that the client sits at the server browser forever and every later tool answers about a client that never joined anything.
IT READS pauseMode AND WARNS. That setting (GAME -> UPDATE IN BACKGROUND,
stored in the client's own profile) is why the screenshot is a live frame
and why the gamepad moves the character while another window has the
foreground. At another value both stop working with nothing said anywhere,
so the value is reported on every start and a warning is attached when it is
not the one measured here. It is never rewritten: it belongs to the person
who owns this machine and is changed from inside the game.
READINESS IS THE PLAYER COUNT IN THE BRIDGE STATE, NOT A TIMER. Connecting
took about 50 s when it was measured and it varies; a timer would call a
still-loading client ready and a never-connecting client a success. The job
finishes when the bridge publishes players >= 1, and if that never
happens the failure says which of the two things went wrong -- the bridge
was never readable (the signal was unavailable) or it was readable and
nobody joined (the client itself did not get in).
extra_args appends launch arguments after the fixed ones, an explicit
one-run opt-in. Arguments this tool computes (-connect, -port, -mod,
-profiles, -window, -nolauncher) are refused rather than allowed to
displace its own.
Inputs: timeout, extra_args. Returns: ok, data, hint, error
client_statusD
Everything about the client that decides whether the other tools can work.
Four questions in one answer, because each of them has silently broken a run before: is the process alive; is its window in a state the eyes can capture (a MINIMIZED window cannot be captured at all -- its client area is 0x0); is UPDATE IN BACKGROUND still at the value that keeps the frame live and the gamepad effective while unfocused; and has the client actually joined the stand (the player count the bridge publishes).
Inputs: no named parameters. Returns: ok, data, hint, error
client_stopA
Stop the client this session started, and unplug the virtual controller.
The pad goes with it deliberately. Nothing else in this tool set closes it, and a controller left attached is visible inside any game running on this machine -- DayZ switches its on-screen hints to controller mode as soon as one appears. Stopping the client is the end of the input session, so it is where the device is given back.
Takes no pid on purpose: the client runs the same executable as the server, so a pid argument could not be checked against the image the way server_stop's is, and "stop this pid" would become a general process killer.
Inputs: no named parameters. Returns: ok, data, hint, error
client_typeA
Type into a CLIENT-SIDE INPUT FIELD -- a mod's PDA, terminal or form. REQUIRES THE ACTIVE WINDOW, and takes it.
This is not chat. Chat is a server-side message and client_chat delivers
it with no focus at all; use that unless the point of the test IS the
typing. What this tool is for is the case the bridge cannot reach: a field
that exists only on the client, which can only be filled the way a person
fills it -- the input line opening, the characters landing in the field,
the keyboard layout behaving.
So it brings the client window to the front and VERIFIES that it got there before sending a single keystroke. If Windows refuses -- which it does to a background process -- nothing is typed and the refusal says so, rather than keystrokes going into whatever window the person at the machine is using. That accident happened here once and is why the verification is not optional.
A successful call reports that the foreground was taken, because that is a side effect on a human, not an implementation detail.
The text is typed as US-layout scancodes, because the client starts on another layout and a virtual-key code would produce different characters. Anything with no scancode is refused by name BEFORE the screen is taken -- an underscore that arrived as a hyphen once failed a run as if the mod were at fault.
submit presses Enter afterwards, so filling a field and confirming it does
not need a second tool that takes the foreground all over again. With
submit=True and EMPTY text it sends Enter and nothing else, which is the
only way anything in this tool set can confirm or open something. Measured
on a live client: the game binds its chat line to Enter alone, and the
virtual gamepad's A button -- the obvious candidate for a confirm -- moved
nothing in the pause menu at 0.1 s or 0.5 s, while B (back) dismissed it at
the default. So dismissing is a gamepad job and confirming is this one.
Empty text WITHOUT submit is still refused: it would take the foreground to
do nothing at all.
Inputs: text (required), submit. Returns: ok, data, hint, error
client_verdictA
Judge the running (or last) client by its own .RPT.
The .RPT and not a script log, and that is a finding rather than a preference: in the Steam DIAG build the script log receivers are compiled out, so -logToFile / -logToScript / -logToRpt inject nothing and no script_*.log is produced for a client at all. Whatever the mod printed to the RPT is here; whatever it wrote only to the script log does not exist, and this says so instead of returning a clean verdict over an empty file.
Not to be confused with log_verdict(source="client"), which judges the
throwaway profile a client_compile_check job produced. This one judges
the LIVE client -- the one client_start launched, against the stand.
since ties the verdict to a run (pass the value client_start returned):
a report last modified before it belongs to an earlier client and is
refused as a reason rather than silently judged.
Inputs: since. Returns: ok, data, hint, error
job_artifactsD
Inputs: job_id (required). Returns: ok, data, hint, error
job_statusD
Inputs: job_id (required). Returns: ok, data, hint, error
job_waitA
Wait for a job to finish, or until timeout seconds pass.
timeout is clamped to at most MAX_WAIT_SECONDS (600s) regardless of what
is requested.
Inputs: job_id (required), timeout. Returns: ok, data, hint, error
knowledge_buildA
Build or refresh a knowledge layer. Returns a job_id immediately.
Layers, and how often each one needs this:
project the mod's own sources, read where they lie. Goes stale on every edit -- rebuild it whenever you want to ask about code you just wrote. Measured: 0.11 s for 41 files. deps the archives of the mods this project declares as dependencies, read without unpacking them. Stale when a dependency is updated or the declared set changes. Measured: 150 s for 36 mods. core the game itself: scripts.pbo for the API, Addons/*.pbo for the item classes. Stale when the game updates. Measured: 3.9 s for the scripts alone, 69 s with the configs. all (the default) every layer that applies to this project. Layers that cannot be built here -- no game installed, no dependencies declared -- are named with the reason instead of failing the call.
Nothing here blocks: wait with job_wait(job_id, timeout=...) and read the
per-layer numbers in the job's summary and its knowledge-build.json
artifact.
only=[path, ...] is the fast route for the project layer when you already
know what changed. It re-reads exactly those files and skips the directory
walk entirely -- and it therefore does NOT notice a file created or deleted
anywhere else. A named path that no longer exists is dropped from the
index, so a delete you name is handled; one you do not name is not. Without
only, every build is incremental anyway: unchanged sources are skipped by
size and modification time, and full=True forces the whole layer to be
re-read.
Inputs: full, only, layer. Returns: ok, data, hint, error
knowledge_callersA
Who CALLS this -- every place a method is invoked or a class is built.
A different question from knowledge_overrides, and one no search over
declarations can answer: an override is a declaration, a call is not.
This is the question asked before changing a signature, before removing
something, and when working out how a piece of the game is actually used.
kind narrows to call or new. owner narrows to calls made from one
class. Each hit names the class and method it was made from, the file and
line, and the layer -- with that layer's age, like every other answer
here.
What it does NOT see, so that an empty answer is not read as proof: a call
reached through a variable whose type the index does not track is recorded
under the method's own name, not the variable's, and new array<string>()
has no identifier before its parenthesis to record at all.
Inputs: name (required), kind, layer, limit, +1 more. Returns: ok, data, hint, error
knowledge_findA
Find declarations by name: classes, methods, constants, enums, configs.
Matching is case-insensitive and exact unless prefix=True. Answers come
nearest-layer-first -- the project's own declaration before its
dependencies', and those before the game's.
kind separates two namespaces that share a name space:
'class' a class declared in Enforce Script 'method' a function, with its owning class and full signature 'constant' / 'enum' what flags like ECE_* are found through 'config' a class declared in a config.cpp or a binarised config.bin -- this is how you ask "does the game have an item class called X". Kept apart because the game alone holds 88 102 of them against 43 595 script declarations, and mixed together they bury every script answer.
Every answer names the layers it used and how old each one is -- and an answer with no results names every layer it searched, because "not found" is worth exactly as much as the layers behind it are current. The project layer's staleness is measured on every call, so an answer taken from an index built before your last edit says so instead of describing code that no longer exists. A search that finds nothing while a layer that could have held it was never built is refused, not answered: "not found" and "not looked" are different facts.
Narrowing has the same trap one level down, so an empty narrowed answer
checks whether the name exists outside the narrowing and says where in
elsewhere -- asking for kind='class' about a name the game declares
only in a config gets a true "no" that reads as "the game has no such
class".
Every search runs under a hard time ceiling and a result limit; neither can be removed.
Inputs: name (required), kind, layer, limit, +2 more. Returns: ok, data, hint, error
knowledge_overridesA
Who overrides this class or this method -- the question a text sweep answers worst.
For a method: every declaration of it marked override, and every one
declared inside a modded class, which routinely replaces a method without
writing override at all. The original declaration is not an answer.
For a class: everyone who extends it, and every modded class that reopens
it.
Both readings are answered at once, because a caller asking "who overrides X" usually does not yet know which X it is. The answer names the layer each hit came from and how old that layer is; a search over a layer that was never built is refused rather than answered emptily.
Inputs: name (required), layer, limit, owner. Returns: ok, data, hint, error
knowledge_scopeA
Declare, inspect or clear the active mod set.
With no arguments it reports the set in force and every mod folder the dependency layer holds, so a caller can see what there is to choose from.
mods=[...] narrows every knowledge answer to those mod folders. The game
and the project's own code always answer -- the game is the substrate a
DayZ mod is written against, and the project layer is the code being
written, so narrowing either would report "no such class" about code you
are looking at.
Nothing is hidden by the narrowing. A search whose answer lies in a mod outside the set does not come back empty: it comes back naming the mod that holds it, and it comes back as a refusal, so it cannot be read as "no such thing". That is the whole point of the feature -- an invisible narrowing is the same silent lie as an answer from a stale layer.
source is free text saying where the set came from ("the server at
clear=True returns the index to answering from every mod it holds. An
empty mods=[] is refused rather than read as "narrow to nothing": those
are different requests and only one of them is ever meant.
The set is stored beside the index and survives a restart. It is NOT
changed by server_mods, which only proposes one.
Inputs: mods, note, clear, source. Returns: ok, data, hint, error
knowledge_showA
Everything the index holds about one declaration.
Where knowledge_find lists matches, this expands them: the full
signature, the file and line, what the declaration inherits from all the
way up, and -- for a class -- what is declared inside it.
body=True reads the declaration back out of the source it was indexed
from, up to max_lines lines, including out of an archive that was never
unpacked. A binarised config has no readable source to return and says so
rather than returning nothing.
Matches come nearest-layer-first, so a class a dependency reopens with
modded class is shown before the game's own declaration of it: pass
layer='core' to ask the game specifically.
Like every answer here, it names the layer each declaration came from and how old that layer is -- and when it finds nothing, every layer it looked in.
Inputs: name (required), body, kind, layer, +3 more. Returns: ok, data, hint, error
knowledge_statusA
What each knowledge layer holds, how old it is, and whether it still matches what is on disk.
Staleness is a measurement, never a guess: each layer records the size and modification time of every source it read, and this compares them against the files as they are now. A layer reports what changed, what appeared and what is gone -- so "the project was edited" is a different fact from "the game was updated", which is the whole reason there are three layers.
Two counts that must not be confused, and both are here: sources is
everything the build walked, and empty_sources is how many of those gave
no declarations at all -- an archive that could not be read, or a file that
genuinely declares nothing. Which of the two is in last_build: skipped
is what the LAST build could not read, and outstanding is every source
the layer still holds nothing from, including ones an earlier build found.
The second exists because the first is correctly empty after an incremental
build that re-read nothing, which left empty_sources standing with no
explanation at all.
Inputs: no named parameters. Returns: ok, data, hint, error
log_tailD
Inputs: n, source, pattern. Returns: ok, data, hint, error
log_verdictA
Judge the newest log for source.
since ties the verdict to a specific run (typically the value server_start
returned): a log last modified before since cannot belong to the run being
judged -- it is a leftover from an earlier boot (possibly one still holding the
file open on Windows) -- so it is refused as a reason, not silently judged.
Inputs: since, source. Returns: ok, data, hint, error
mod_buildA
Pack this project's mods. Returns a job_id.
Runs mod_lint first and refuses on what it refuses. That check costs
milliseconds and the boot it replaces costs a minute -- and two of the
defects it names would not appear in that boot's log at all, because a
modded class that modifies nothing loads and reports success.
skip_lint=True packs anyway. It exists because a refusal that cannot be
overridden is a refusal that gets worked around by not using the tool.
Inputs: skip_lint. Returns: ok, data, hint, error
mod_lintA
Check a mod's Enforce Script without packing or booting anything.
mod limits the check to one of the project's mods; empty checks them
all. strict makes warnings count as failure too -- off by default,
because a warning is something to read, not something to stop for.
Refusals: a class that extends itself (modded class X extends X loads
and applies nothing), an exception statement (try/catch/finally are
not Enforce), and a modded class whose target nothing declares.
Warnings: a statement continued onto the next line with a leading +,
which Enforce drops silently.
The modded class check needs the knowledge index, and says so when the
index cannot answer: an unbuilt layer makes it warn rather than accuse,
because "no such class" and "I have not read the game yet" are different
answers and only one of them is the mod's fault.
Inputs: mod, strict. Returns: ok, data, hint, error
project_openD
Inputs: path (required). Returns: ok, data, hint, error
project_statusD
Inputs: no named parameters. Returns: ok, data, hint, error
server_modsA
Ask a running server which mods it runs, and PROPOSE an active set.
address is "host" or "host:port"; query_port overrides an embedded one.
It must be the QUERY port, not the game port. The game port never
answers a Source query -- measured on six live servers, silent on all six,
while the query port answered on all six. The two are not related by a
fixed offset (252 distinct offsets in a live sample): a server browser
shows it, and for a local stand it is steamQueryPort in the server config.
The answer is three buckets, matched by Workshop id and never by name:
matched the server runs it and it is installed here on_server_not_installed the server runs it and this machine has not installed_not_on_server installed here, the server does not run it
Nothing is applied. proposed_scope and apply are a suggestion and
the exact call that would take it; running that call is a separate,
deliberate act. A query that silently rescoped the index would make a
mismatch an invisible action rather than something the caller read.
Three things this cannot see, and it says so in notes rather than letting
the answer read as complete: server-only mods (reasoned, not tested), the
BUILD of a mod behind an id, and mods downloaded but not linked into the
modpack.
Inputs: address, timeout, query_port. Returns: ok, data, hint, error
server_signaturesA
Read -- or deliberately change -- the stand's signature policy.
With no argument this only reports. With value it writes verifySignatures
into the config the profile names as this stand's, and reads it back.
WHY THIS IS ITS OWN TOOL. verifySignatures = 2 makes a stand refuse every
client with code 118 and "missing dtain.pbo" -- a vanilla file name that
says nothing about signatures, and that has already cost one session a long
hunt through byte-identical files. On a local stand the honest fix is
usually to turn the check off rather than to sign a throwaway bridge mod,
and doing that by hand in somebody's config is worse than doing it here,
where the previous value is reported, the file is read back, and nothing
else in it is touched.
WHAT KEEPS IT SAFE. It edits exactly one file: machine.stand_root /
machine.config, the stand this project already boots, and it refuses a
path that resolves outside that root. It refuses while a server is running
against that config, because a change the running server will never read is
a success message about nothing. And it says which way the setting moved:
0 is off, and the answer says so in words rather than leaving a number.
Inputs: value. Returns: ok, data, hint, error
server_startA
Start the test server and wait for it to be ready. Returns a job id.
Two things worth knowing before calling, both observable:
It CLEARS THE BRIDGE TRANSPORT first -- the command mailbox and the state
file in the -profiles directory are removed before the server is spawned, so
no world ever starts against a command or a state document left by an
earlier one. Script logs are deliberately left alone; see
clear_bridge_transport for why the two are treated differently. A file that
could not be removed is reported in bridge_transport_left and on the job,
and never fails the boot.
It REFUSES if the game port is already held, naming the pids holding it. A stand is shared -- one machine, one port, one profile directory -- and booting into a held port produces a server that dies during world load with nothing in its own log to say why. If the holder is a server this session started, the hint says to stop it with server_stop. If it is anyone else's, the refusal identifies it (pid and -mod= tail) and offers stopping it as the caller's own act -- the owner authorised stopping a neighbouring stand that blocks a live run -- but this tool never auto-stops a process it did not start.
extra_args appends launch arguments after the fixed ones -- an explicit
one-run opt-in, the same pattern as attaching the bridge, not profile
surgery. A list of strings, never one string to re-split. Arguments the
tool itself owns (-config, -profiles, -port, -mod, -serverMod) are refused:
the profile is where those are decided. The extras are recorded in the boot
job's summary, so a later reader can see the boot was non-standard. The
known use is the engine's action log (-doScriptLogs=1 -logToFile=1),
which writes to scriptExt.log -- a file log_verdict never reads, so these
flags cannot poison a verdict.
Readiness has two independent signals, and the summary always names which
one answered. expect.ready_line appearing in a log written by THIS run
says the MOD finished loading. The game port being bound by the pid we
spawned says the ENGINE is up and listening -- which needs neither a mod nor
a declared line, and is the readiness verdict for a project that declares
none (measured on a real stand: bound 16.9s after spawn). With a ready line
declared it remains the verdict, since a bound port cannot say a mod loaded;
the port is then what tells "the boot failed" apart from "the server is
listening and it is the mod's line that never appeared".
Inputs: timeout, extra_args. Returns: ok, data, hint, error
server_statusA
A quick health read: is the process alive, and is its log actually growing.
A hung boot and a slow one both look "alive, no ready line yet" from the
outside -- this project has hit a genuine post-compile server hang before --
so this samples the newest log's size twice, pulse_seconds apart, and also
reports how long it has been since the log last changed at all.
Inputs: pulse_seconds. Returns: ok, data, hint, error
server_stopA
Stop a server this session is responsible for.
With no pid, stops the session's own currently tracked server (the
original behaviour). With pid, stops that specific process instead --
but only if this session started it at some point, or it was reported as
orphaned_server_pid by project_open after a project switch (see
session.known_pid). Any other pid is refused: this is the only way an
orphaned server can be reached at all, and it must not become a general
process killer.
Either way, the pid is checked against the recorded image name before it
is handed to stop() (which calls taskkill): a recycled Windows pid can
belong to an unrelated process by the time this runs, and killing that
process instead would be a worse outcome than the stale bookkeeping this
guards against.
Inputs: pid. Returns: ok, data, hint, error
ui_clickA
Press a widget, by path, having checked it is still the one meant.
expect_name and expect_class are how a path stops being a loaded gun. A
tree walked a minute ago is not the tree in front of the mouse now, and
pressing "whatever is at 0.3.1 today" is how an automated run presses the
wrong button and reports success. Both are optional -- sometimes the caller
genuinely means "whatever is there" -- but then that is the caller's own
decision, taken in the open.
TWO TRACTS, and the answer always says which one was used:
via="script"delivers the click to the open menu's own handler. Works with the client in the background, no focus taken. Reaches ONLY the open scripted menu:Widgethas noGetHandler, so a HUD widget's own handler is not reachable from script at all.via="cursor"puts the real mouse on the widget's rectangle and clicks. Reaches anything the player could click -- and TAKES THE FOREGROUND, likeclient_type, because a real click goes wherever the real cursor is.
A handler that returns false is reported as what it is: the click was delivered and the menu did not act on it. That is a fact about the mod, not a failure of this tool, and the answer says so rather than inventing a verdict.
Inputs: path (required), via, root, button, +3 more. Returns: ok, data, hint, error
ui_findA
Find widgets by name, class or text, without fetching the whole tree.
name and class_name match exactly; text matches as a substring,
because a label's exact string is the one thing a caller rarely knows in
advance. At least one of the three is required -- with none of them this
would be ui_tree, and answering it as such would hide which question was
actually asked.
Filtering happens in the client, not here: sending the whole tree back so it could be filtered locally is exactly what the page limit exists to avoid.
Inputs: name, root, text, depth, +3 more. Returns: ok, data, hint, error
ui_textA
Write into an edit box, and read it back.
Only a field the player could type into may be written. A plain
TextWidget has SetText too, but writing a mod's label from outside would
change what the player sees without changing anything the mod believes -- a
lie drawn on the screen -- so it is refused rather than quietly allowed.
The value is read back out of the widget before the answer is returned:
SetText is native and returns nothing, so "it was set" would otherwise be
this tool's own claim about itself.
Inputs: path (required), text (required), root, timeout, +2 more. Returns: ok, data, hint, error
ui_treeB
The client's widget tree: what is on screen, as the engine holds it.
root is "menu" (the open scripted menu, the default) or "screen" (the
whole workspace). Each node comes back with its path, class, name,
visibility, screen rectangle, depth and -- where the engine allows it to be
read -- its text.
The answer is A PAGE: total is how many nodes the walk visited and count
is how many it listed, and truncated says when they differ. A shorter list
that did not say so would read as the whole interface.
Inputs: root, depth, limit, timeout. Returns: ok, data, hint, error
world_actionA
Run a mod's own action through the engine's gate, on the server.
action_class is the action's script class name. There is deliberately no
verb dictionary: the same word means different things in a mod depending on
context, so applicability is decided by the ACTION'S OWN Can() -- and its
refusal is a meaningful test result, not a tool failure. The distinguishable
refusals, classified in the mod before the engine is touched: the manager is
busy; the player is already acting; the player is sprinting; the action
class is unknown; and "the action's own Can() said no" -- the last one being
the answer this tool exists to produce.
target_class names the config class of the object to aim at (resolved to
the first match near the player); many actions take no target and it can be
omitted. subject optionally names a Man-derived entity class to act AS
instead of the connected player -- a diagnostic escape hatch, because a
spawned survivor owns an action manager while not being counted as a
player.
"Accepted" is not success: the engine can drop an accepted action one frame
later without clearing it. The mod therefore holds the command running
until the manager actually releases the action, and any failure path
releases it too -- otherwise that player could never act again for the rest
of the session. Expect an answer only after the action has genuinely ended;
a stuck action fails by the mod's own 20s watchdog, with the release noted
in the detail.
Inputs: action_class (required), pos, radius, subject, +2 more. Returns: ok, data, hint, error
world_deleteA
Delete every object of class_name within radius of pos (or of the
player, when pos is omitted).
The class is required: the mod will not delete everything nearby regardless of class, and the radius is clamped on its side. Players are never deleted, whatever the class filter says.
Inputs: class_name (required), pos, radius, timeout. Returns: ok, data, hint, error
world_entitiesA
WHICH objects are nearby, not how many.
world_state(class_name=...) counts; this one names them, with each
object's class, position, distance and health. An empty class_name lists
everything found rather than nothing.
The list is a page: the mod caps it at 200 entries and reports the true
total separately, so total larger than count means there is more out
there -- never a shorter list quietly standing in for the world.
distance is HORIZONTAL, because the engine's own radius test ignores
height: at the centre of Chernarus the terrain is 300 m up, so a
straight-line distance from a position written as "7500 0 7500" reads 320 m
for objects the engine returned inside a 150 m radius. A number that
contradicts the filter that produced it is worse than no number.
Players are not in it. The mod's own gather step skips them, which is what
keeps a delete of everything nearby from reaching the person standing in
it, and this tool shares that step deliberately rather than growing a
second notion of what is in the world.
Inputs: pos, limit, radius, timeout, +1 more. Returns: ok, data, hint, error
world_execA
Send an arbitrary verb through the bridge -- the debugging escape hatch, not a testing path.
This server does not know the verb, does not validate its arguments beyond
stringifying them, and does not answer for what the mod does with it; every
answer is marked non_standard to say so. Anything a mod's behaviour can
express as an ACTION should go through world_action instead, where the
mod's own Can() gives the refusal meaning.
A verb this bridge build does not know comes back as a failure listing the
verbs it does -- that is the mod answering, not this tool guessing. A
project that needs its own verb adds it to ITS OWN copy of the bridge's
dispatcher (IsKnownVerb, the routing, and a handler); this server ships
no registration machinery on purpose, because a verb the server typed and
validated would be a verb the server answers for.
The verb must be lowercase ASCII (letters, digits, underscore, up to 41 chars): the mod recovers a command's id by a raw string search when a parse fails, and the id embeds the verb -- characters outside that set can make a failure impossible to correlate, which is the silence this product exists to remove.
Inputs: verb (required), args, timeout. Returns: ok, data, hint, error
world_readyA
Wait until the bridge inside the game is actually ticking.
Call this once after server_start's boot job finishes and before the first
world command. The bridge publishes its first state during mission init but
does not start reading commands until tens of seconds AFTER the server
reports ready -- 18-38 s in the boots measured so far. A command sent in that
window
is claimed eventually and completes normally, long after the caller gave up.
Blocks, with a ceiling, because there is nothing else to do with the answer: the alternative is handing back "not yet" and having the caller poll, which is the same wait with more round trips.
Inputs: timeout. Returns: ok, data, hint, error
world_setB
Set health or quantity.
target is "player" or "hands"; left empty it defaults per what -- health
on the player, quantity on the held item -- because a single default for
both would make one of the two combinations a trap (a player has no
quantity, and empty hands have no health).
Inputs: what (required), value (required), target, timeout. Returns: ok, data, hint, error
world_spawnA
Create an item: on the ground, in the player's hands, or in their inventory.
where is "ground" (default), "hands" or "inventory". A ground spawn takes
pos as "x y z" and falls back to the player's own position when it is
omitted; with neither a position nor a player, the mod says so in words
rather than doing nothing.
Ground spawns are created with ECE_PLACE_ON_SURFACE and ECE_NOLIFETIME. Without the second flag the item lives by the lifetime in its own config and the central economy is free to remove it partway through a check -- which turns "my test item vanished" into a hunt through the mod under test. The flag is the mod's, not this tool's; it is named here because it is the reason a spawned item can be trusted to still be there a minute later.
Inputs: class_name (required), pos, where, timeout, +1 more. Returns: ok, data, hint, error
world_stateC
What the world looks like right now.
With NO class_name this costs nothing and waits for nothing: the mod republishes the player's position, health and what is in their hands every tick, so the answer is already on disk. That is deliberate -- a snapshot a caller has to pay a full command round trip for (a second to be claimed, two more of terminal dwell) would make the cheapest question the most expensive one.
With a class_name it also sends a query command to count objects of that
class within radius, because a count needs arguments only a command
carries. The count comes back in world.query_count as well as in the
detail, so it stays readable on later snapshots too -- which is how "is the
item I spawned a minute ago still there?" gets answered.
Inputs: pos, radius, timeout, class_name. Returns: ok, data, hint, error
world_teleportA
Move the player to pos, given as "x y z".
The same format world_state reports positions in, so a position read out
of a snapshot can be handed straight back. With nobody connected the mod
refuses by name -- an absent player is a distinct, stated reason, never a
silent no-op.
Inputs: pos (required), timeout. Returns: ok, data, hint, error
world_time_setA
Move the world clock.
Every field left at -1 keeps the value the world already has, read back from the engine before the change. That matters because the engine sets a date as five numbers at once: a tool that filled in the missing ones would move the date every time somebody set the hour.
Ranges are the engine's own documented ones -- month 1-12, day 1-31, hour 0-23, minute 0-59 -- and are checked in the mod, before a native call that would otherwise be handed a value it does not define behaviour for.
The answer carries the world's clock as it stands after the change, from the mod's own snapshot rather than from what was asked for.
Inputs: day, hour, year, month, +2 more. Returns: ok, data, hint, error
world_weather_setA
Move one weather phenomenon towards a value.
what is "overcast", "rain", "fog", "snowfall" or "wind". The first four
take a value between 0 and 1; wind takes a speed in metres per second.
seconds is how long the change takes (0 is immediate) and duration is
how long the value is held before the engine's own simulation may move it
again.
THIS IS A NUDGE, NOT A LOCK. The engine keeps simulating weather, so a value set here drifts afterwards -- said here and in the mod's own answer, because the alternative is a caller who sets rain, looks up two minutes later and concludes the tool did nothing.
Inputs: what (required), value (required), seconds, timeout, +1 more. Returns: ok, data, hint, error
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 55 tools
Every tool targets a distinct capability, and the descriptions actively pre-empt confusion between near-neighbors: client_verdict vs log_verdict, world_state vs world_entities, client_chat vs client_type, world_action vs world_exec, and knowledge_find vs knowledge_show are all explicitly differentiated. Even the largest families (11 world tools, 11 client tools, 7 knowledge tools) have no functional overlap.
All 55 tools follow a predictable snake_case domain_prefix_suffix pattern (knowledge_*, world_*, client_*, ui_*, asset_*, server_*, bridge_*, job_*, log_*, mod_*, project_*), so the domain of any tool is identifiable at a glance. Minor deviations: compound suffixes like world_time_set, world_weather_set, and client_compile_check, plus a mix of verb suffixes for actions and noun suffixes for read-only queries (status, state, tree, menu).
55 tools is more than double the 25-tool threshold the rubric treats as too many, and an agent must navigate families of 11 world tools, 11 client tools, and 7 knowledge tools in a single selection space. The scope is genuinely broad and every tool earns its place, but the surface could be consolidated by 30-40% (parameterized client input, merged environment setters, combined job operations) without losing capability.
The toolchain covers the full modding pipeline end-to-end: knowledge indexing, lint/build, the complete asset pipeline (export, binarize, check, convert), server lifecycle, bridge management, world manipulation, client automation, and UI interaction, with observability at every stage via jobs, logs, and verdicts. Minor gaps remain: full player inventory cannot be read (only hands), UI testing lacks wait-for-widget and scroll operations, and bridge attachment stays a manual profile edit.
Maintenance
Related MCP Connectors
An MCP server that provides agents access to the KeldynAI platform
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server for Arma Reforger and Enfusion engine modding that enables users to create mods, search API classes, and generate scripts through natural language. It provides a comprehensive suite of tools for scaffolding addons, generating prefabs, and building projects using the Workbench CLI.67 npm14-
- AlicenseAqualityCmaintenanceMCP server for DayZ Enforce Script that gives AI coding assistants deep knowledge of the DayZ scripting API with semantic search, code validation, class hierarchy, and reverse call graphs.81MIT
- AlicenseAqualityCmaintenanceAn MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.3170 npm18MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that helps AI agents inspect Minecraft project evidence (crash logs, mod files, datapacks) before writing development code.2-