acdream/docs/research/vtank-kb
Erik a3b4a8e2e5 fix(vt): H test-restoration + disabled-rule refusal + double-side gate
Item H (slice-1 fix round), six sub-parts:

1. Restored VtankMetaProfileSerializerTests.LoadsKnownTypedCondActRecord
   and SignedHighBitLandblockIdRoundTripsExactly (the latter adapted from
   the deleted RoundTripPreservesEveryVtankConditionActionAndEmbeddedNav's
   LandblockEquals/LandcellEquals coverage of unchecked((int)0x8B370000u)),
   both deleted as collateral damage of an unrelated file move in commit
   0d10399e0. Neither calls the deleted VtankMetaProfileSerializer.Save
   writer (demoted to import-only in 3ff9461ef) — both are pure reader
   assertions.

2. MetafSerializer.SaveMeta now refuses (throws InvalidOperationException
   naming the count) to silently drop a disabled MetaRule: real VTank/
   metaf has zero concept of "disabled" (confirmed: metaf_monolithic.py
   has no "enabled"/"disabled" occurrences anywhere), so
   MetaRule.Enabled is a MossTank-only extension with no metaf-compatible
   marker. A new SaveMeta(profile, dropDisabledRules: true) overload lets
   a caller accept the loss explicitly.
   MossTankMetaProfileStore.WriteLegacyExport (the .af convenience mirror
   beside MossTank's own fully-fidelity JSON storage) deliberately does
   NOT opt in — it leaves that mirror stale and logs a warning via its
   existing try/catch rather than losing the rule. Recorded as gap 6 in
   docs/research/vtank-kb/07-meta-and-expressions.md section 5.

3. New VtankProfilesDefault (src/AcDream.App/Plugins/): the graphical
   host's default VtankProfiles root (<DataDirectory>/vtank), extracted
   out of Program.cs's inline Path.Combine call into its own pure,
   injectable-root function specifically so the "Path.Combine only, never
   a hard-coded Windows path" guarantee is a real, failable Linux-path
   unit test (VtankProfilesDefaultTests.ResolveIsBuiltWithPathCombineOnly)
   rather than something only checkable by reading the source — the
   pattern item F's VtankProfileDirectory rewrite removed when
   Resolve/PortableDefault moved out of the plugin.

4. New BuffedDoubleRequirementDoesNotApplyBonusWhenBaseKeyIsAbsent: the
   KeyExistsDouble gate (ComputedItemInfo.cs:234) already existed in
   BuffedDouble, but only the int side
   (BuffedIntRequirementDoesNotApplyBonusWhenBaseKeyIsAbsent) had a
   pinning test.

5/6. DoubleSpellBonuses gained an explicit Change field (KB doc 05
   section 2.2: "additive unless the static table's Change==1, in which
   case multiplicative", ComputedItemInfo.cs:244), replacing
   BuffedDouble's prior `(int)bonus.Bonus == 1` magnitude-based proxy —
   that proxy only worked because every multiplicative bonus in the
   current 19 rows happens to fall in [1.0, 2.0) and every additive one
   happens to be under 1.0; it would have silently mis-branched on a
   future row like an additive 1.5 or a multiplicative 2.0+. Every
   existing row's Change value was derived mechanically from its old
   proxy result (no behavior change for the current table), and
   BuffedDoubleRequirementAppliesAdditiveBonusWhenBaseKeyExists/
   AppliesMultiplicativeBonusWhenChangeIsSet pin both branches through
   the real named field.

Full MossTank suite: 574 -> 581. App.Tests
(Plugin|LaunchOptions|RuntimeOptions filter): 135 -> 137. Core.Tests
(Plugin filter): 50/50 (no change, no Core-side edits this item).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 23:20:20 +02:00
..
01-settings-and-profiles.md docs(vt): VT1 catalog 01 — VTank settings, defaults and the .usd profile format 2026-09-06 19:33:06 +02:00
02-scheduler-and-actions.md docs(vt): VT1 catalog 02 scheduler/actions and 03 combat from the VTank decompile 2026-09-06 19:29:22 +02:00
03-combat.md docs(vt): fold the citation-pass corrections into KB 03 (DebuffScheduler.cs path, DebuffScope, six-member l enum, offhand enum, pet comparison owed) 2026-09-06 19:59:25 +02:00
04-buffs-and-vitals.md docs(vt): VT1 catalog 04 — VTank buffs, item enchantments, helpers and vitals 2026-09-06 19:44:02 +02:00
05-looting-and-utl.md docs(vt): VT1 catalog 05 — VTank loot flow and the Classic Looter .utl format 2026-09-06 19:48:33 +02:00
06-navigation-and-nav.md fix(vt): A ptl/tlk carry two coordinate triples, jmp direction loss recorded 2026-09-06 22:13:48 +02:00
07-meta-and-expressions.md fix(vt): H test-restoration + disabled-rule refusal + double-side gate 2026-09-06 23:20:20 +02:00
08-ui-views.md docs(vt): VT1 catalog 08 — VTank UI views from its own view XML and VVS semantics 2026-09-06 19:23:04 +02:00
09-commands-and-interop.md docs(vt): VT1 catalog 09 — /vt commands, chat sinks, and VTank's plugin interop surface 2026-09-06 19:42:51 +02:00
README.md docs(vt): land KB doc 07, VT2 gap audit draft, slice-1 contract; metas/navs move to metaf .af 2026-09-06 19:56:45 +02:00

VTank knowledge base (Campaign VT, VT1)

Written 2026-09-06 from the decompiled oracle under refs/ (gitignored; see docs/plans/2026-09-06-campaign-vt-vtank-oracle.md for what is there and how to regenerate it). Every behavioral claim cites file:line into refs/vtank/decompiled/ (VTank), refs/vtank-classiclooter/decompiled/ (Classic Looter) or refs/vvs/decompiled/ (VirindiViewService). Decompiled code is never pasted; behavior is re-implemented from these docs. When the older wiki-derived research (docs/research/2026-07-29-vtank-plugin-automation-requirements.md, docs/research/2026-08-26-mosstank-vtank-utilitybelt-research.md) disagrees with a doc here, the doc here wins.

Each doc ends with a MossTank gap section (ranked by player impact) and a Could not determine list. VT2 consolidates the gap sections into the implementation order.

# Doc What it pins Oracle files most cited
01 settings and profiles All 137 settings (type, default, tab control, consumer), the self-describing .usd table grammar, profile naming/selection, /vt opt f3.cs (typed accessors), gy/cw/bd/y.cs (table reader), defaultsettings.usd
02 scheduler and actions The single-winner priority list (24 rule classes, 45 instantiations, sentinels), 293 ms heartbeat + event poke, force-combat-mode ga.a and stuck-state recovery, IdlePeace in full uTank2/cLogic.cs, ga.cs, f9.cs, cm.cs, fz.cs
03 combat Target acquisition/selection (3 methods, ghost/blacklist), monster rules, weapon/damage/ammo choice, attack execution, the hardcoded 12-debuff order, pets dz.cs, hi.cs, b4.cs
04 buffs and vitals Buff plan and per-tick re-evaluation, item enchantments (-1 "no buffs"), helper buffs, the nine recharge thresholds, kits/potions/food, dispel, worn-item mana eq.cs, fz.cs, ba.cs, ai.cs, dy.cs, a5.cs, MySpell.cs
05 looting and .utl The .utl format and all requirement types, EarlyMatch identify-avoidance, ComputedItemInfo, VTank's corpse selection/approach/open/loot rules, ownership-denial regexes VTClassic cLootRules, UTLBlock_*; VTank fo.cs, d0.cs, el.cs, hv.cs
06 navigation and .nav uTank2 NAV 1.2 byte-for-byte (10 waypoint types), route types, steering/creep band, jump, door/lockpick, recall, priority interactions, 240 m/unit x.cs, ca.cs, fd.cs, bi.cs, b7.cs, g8.cs
07 meta and expressions .met format, FSM semantics, the expression language and built-in table, views created by metas ExpressionEvaluator.cs, ch.cs, a7.cs, cLogic.cs:191-196
08 UI views Every control of the nine tabs and three secondary views (type, geometry, binding), VVS control semantics our markup must offer, the markup extension needed (multi-column lists) uTank2.ViewXML.*.xml, VVS HudList/HudCombo/HudTabView, Decal3XMLParser.cs
09 commands and interop The /vt verb table (~48 documented + 15 parser-only), chat sinks and dedup, the three-tier export API, Classic Looter SPI, MosswartMassacre's real usage uTank2/PluginCore.cs, d5.cs, ah.cs, eExternalsPermissionLevel.cs

Owner amendment 2026-09-06 — metas and navs use metaf .af. Docs 06 §1 and 07 §1 document VTank's binary .nav/.met layouts; MossTank does not implement them. It reads and writes the human-readable metaf format (the reference converter is C:\Users\erikn\source\repos\metas\metaf_monolithic.py, see claude-memory/reference_metaf_af_format.md). The semantics sections of 06/07 (execution, FSM, expressions, views) remain the behavior oracle.

Local companion note (not committed): refs/vtank/notes/2026-09-06-idlepeace-fcm-trace.md — the line-level trace of the combat-mode choke point, the eight drop-to-peace sites and the wield sequencing.

Corrections folded in by the lead during spot-checks are marked in place ("lead verification 2026-09-06"). Files written by agents into the main checkout by mistake were moved here; check git status in the main checkout after any catalog session.