From 3278b382a1580e45ba915b64ad283168ab9ea7e1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 25 Nov 2026 13:14:50 +0400 Subject: feat(ai): recruit free groups before assigning their target Handler(25) TAKE_ALL_FREE takes the free roster in order and returns ERROR for an empty group. Target selection now belongs to Handler(28), so the script can form a group first and then issue its attack. Attack orders remain associated with their group; cleanup preserves a subsequent order. Coverage counts recruitments by clan and mode, including empty results. Original GOG ai.dll RVA 0xab85 confirmed membership across classes, busy and reserved exclusions, assignment updates, order and the empty result. Validated with Rust order-lifecycle checks, a licensed test that waits on the stock empty clan before a deliberate debug roster transfer, workspace fmt/check/test, and 900-second simulations of all 29 missions. Mission 12 ran from stock start in the window with clean Vulkan validation. The debug transfer verifies the attack mechanism, not a mission playthrough. Occupancy and routing remain approximate. Group orders for other classes fail explicitly. Script stops remain in missions 15 (71/72), 19 (Problems0 orders) and 29 (building counters/construction and Handler 40). --- docs/tomes/06-behavior.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/tomes') diff --git a/docs/tomes/06-behavior.md b/docs/tomes/06-behavior.md index 4b0a8a99..0b97644f 100644 --- a/docs/tomes/06-behavior.md +++ b/docs/tomes/06-behavior.md @@ -362,6 +362,15 @@ FParkan пропускает его при следующем поиске. Вы «Двух крепостях» захватчик идёт к зданию, а группа получает приказ патрулировать вокруг самого захватчика. +Режим `TAKE_ALL_FREE` набирает группу без порога силы и без цели. Он идёт +по реестру клана и берёт все записи со свободным назначением `0xffffffff` +в исходном порядке. Ограничения по классу здесь нет: вызов оригинальной +DLL включил в группу свободные варботы, транспорт и завод, пропустив занятые +и зарезервированные записи. Пустой набор вернул `ERROR`. +Цель и действие задаются следующим `Handler(28)`, поэтому набор не привязывает +группу к объекту заранее. Действующий приказ атаки удерживает юнита в группе +так же, как патруль. Освобождение старой группы сохраняет новый приказ юниту. + В GOG `ai.dll` обработчики находятся по RVA `0xab85` и `0xba01`. SHA-256 DLL `c19cd6cd31cd2896f8c4ba0f0e700dd3408aec8182daaf4863d98a7d233a2abc`. -- cgit v1.2.3