Select realistic ready-rack dual-shell loadouts for AI tanks on the local
server, inject them natively on bot spawn, and switch between anti-armor
and soft-target shells in battle:
- Add the loadout section to tuning/ground-ai.jsonc (lowReadyRackThreshold,
topUpAmmoCount, primaryAmmoPct, secondaryMinRounds,
penetrationCompareDistM), validated in ground-ai-tuning.ts.
- Add the tank-bot-ammo v2 dataset (apps/server/src/game-data/datasets/
tank-bot-ammo.ts) reading primary cannon weapon name, capacity,
firstStage/autoLoad shell ready-rack counts (excluding separate charges),
and selectable shell modifications (using Lanz-Odermatt kinetic fields,
cumulativeDamage, armorpower, and transitive reqModification chains).
- Add selectBotTankLoadouts (apps/server/src/battle/bot-tank-loadouts.ts):
carry ready-rack count when >= 15 (top up to 22 when smaller or absent,
clamped to gun capacity), skip SPAA/belt autocannons, pick highest-tier
APFSDS/anti-armor primary (~80%) plus HE/HESH/HEAT secondary (~20%, min
3 rounds) when available, and attach required addModification entries and
per-tank wtoAmmo_<unit> strings to customBots when mode != stock.
- Hook Unit::changeAircraft (already located dynamically on .37 and .58) in
native/wto-net/src/local_mp_loadout.c to assign the 24-byte
ChangeUnitReflection.bullets entries via bullet_vec_assign for LocalMP
bot spawns (async == 0, non-local bot MPlayer), leaving player spawns
untouched.
- Track soft-target vs anti-armor shell classes in wto_ai_specs_common.das
and write gun.nextBulletType in wto_ai_fire_common.das to queue HE/HESH
against light/narrow targets and APFSDS/AP against MBTs/heavy armor.
Verified MSVC build of wto_ws.dll (0 warnings in project C sources), root
and launcher type checks, 14/14 check-patches on 2.61.0.58, 12/12 LocalMP
module installation, clean daScript load (wto_ai_runtime.das loaded in
211 ms, 0 compile errors), and real 2.61.0.58 loadout selection on
cn_ztz_96a (18 APFSDS + 4 HE), germ_leopard_2a4 (12 DM23 + 3 HEATFS),
ussr_t_80bvm (22 3BM60 + 6 HE), us_m1a2_abrams (14 M829A2 + 4 HEAT-MP),
ussr_t_34_1941 (18 APHEBC + 4 HE), and ussr_zsu_23_4 (stock belt kept).
Live battle acceptance begins in Step 9.