Skip to content

AI: cross-check against the AIDLL_r debug build (names, TU placement) - #2

Merged
kr4uzi merged 1 commit into
mainfrom
ai/aidll-r-crosscheck
Nov 5, 2026
Merged

kr4uzi merged 1 commit into
mainfrom
ai/aidll-r-crosscheck

Conversation

@kr4uzi

@kr4uzi kr4uzi commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Follow-up to the review notes on B2BF#68 (comment 6640411985).

AIDLL_r.dll is DICE Canada's BoosterPack2 debug build of the AI DLL (2006-05-04, asserts and __FILE__ paths, no PDB). It's older than 1.50 but already has the 1.50 AI features. This PR uses it only as evidence for names, enum values and source-file placement; behaviour stays matched to retail 1.50 (libaidll.so / AIDLL.dll).

Names

  • WTSticky → WTC4 (assert wInfo->getWeaponType() == WTC4).
  • Information::isOfType(InformationType) (DICE's name, from the assert !targetPrimaryInfo->isOfType(ITSoldier)). The single-bit object-type flag tests now use it with the IT* names, which resolves the [UNRESOLVED] flag notes. BotMain::event_airborn tests ITAir and then ITHelicopter, as retail compiles it.
  • Kit types: 6 is KTAT, 7..12 KTExtended1..6. The review comment's "anti-tank = KTExtended1" was wrong.
  • 89 member and parameter renames from assert expressions, each checked by the field offset the assert reads and by its use in the tree.

Source placement (from __FILE__ paths)

  • Moved: Aimer, BotScript.h, UrgencyMerger, AIMineManager, WeaponInfoManager, CustomCurve, AerialHeightMap, UserOrderManager, AILandingZoneManager, InformationManager.
  • Split, functions moved unchanged: the SensingAgent patterns, SCurve, IAIMain, IAIPathfindingSetup, IBotManagerModifier.
  • Code/Build/aidll_sources.txt, Code/Tests/syntaxcheck.cmd and the Code/Tests/aidll fixtures follow the moves and renames.

Corrections to the review comment: SCurve lived in CustomCurve.cpp, not inline in BBCallForMedic/BBMedicAssist. IBotManagerModifier was in IBotManager.cpp. Only about 6 of the "33" notes were object-type bits. boxTools has no 1.50 counterpart, so it isn't added.

Testing: built and smoke-tested on macOS (bf2_aidll; vtable audit unchanged; 16-bot round, no stops). The Windows-only Code/Tests/aidll fixtures were updated as text and not compiled; CI on this PR covers the Windows and Linux builds. No behaviour change intended.

AIDLL_r.dll is a DICE Canada BoosterPack2 debug build of the AI DLL
(2006-05-04, asserts and __FILE__ paths, no PDB). It is older than 1.50 but
already has the 1.50 AI features. It is used as evidence for names, enum
values and source-file placement only; behaviour stays matched to retail 1.50
(libaidll.so / AIDLL.dll). Follows the review notes on B2BF#68.

Names
- WTSticky -> WTC4 (assert "wInfo->getWeaponType() == WTC4", BBC4.cpp).
- Information::isOfType(InformationType), DICE's name (assert
  "!targetPrimaryInfo->isOfType(ITSoldier)"). The single-bit object-type flag
  tests use it with the IT* names (enum-to-string switch 0x100D3010), resolving
  the [UNRESOLVED] flag notes. BotMain::event_airborn tests ITAir, then
  ITHelicopter, as retail compiles it (ELF 0x18D740).
- Kit types documented: 6 is KTAT, 7..12 KTExtended1..6.
- 89 member and parameter renames from AIDLL_r assert expressions, each
  checked by the field offset the assert reads and by its use in the tree
  (BotNavigation, BotMain, SquadManager/Formation, SAI, AIStrategicObject*,
  AISettings, BotManager, QuadTree/ClusterGraph, ...). Evidence addresses are
  in the comments.

Source placement (AIDLL_r __FILE__ paths)
- Moved: Aimer, BotScript.h -> AIBotActionPlan/; UrgencyMerger -> AIBot/;
  AIMineManager -> AIKnowledge/; WeaponInfoManager, CustomCurve -> AIUtils/;
  AerialHeightMap -> AIPathFinding/AerialHeightMap/; UserOrderManager ->
  AIStrategicEntity/UserOrders/; AILandingZoneManager, InformationManager ->
  Main/.
- Split, functions moved unchanged: SensingAgentPatterns into the Soldier,
  Turret, MouseFreeLook and Null pattern TUs; SCurve out of CustomCurve;
  IAIMain, IAIPathfindingSetup and IBotManagerModifier into their own TUs.
- Code/Build/aidll_sources.txt, Code/Tests/syntaxcheck.cmd and the
  Code/Tests/aidll fixtures follow the moves and renames.

No behaviour change intended: where AIDLL_r and the tree were compared, they
agree with 1.50 apart from asserts. Built and smoke-tested on macOS
(bf2_aidll, vtable audit unchanged, 16-bot round); the Windows fixtures were
updated as text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kr4uzi
kr4uzi merged commit 34944ed into main Nov 5, 2026
3 checks passed
@kr4uzi
kr4uzi deleted the ai/aidll-r-crosscheck branch November 15, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant