feat(core): adopt retail's full WeenieError code table
acdream carried 16 status codes, curated by hand out of the CMotionInterp and MoveToManager decompilation passes. The other 362 were unnamed, which made every one of them a cast site waiting to happen. This slice takes the whole table: 372 values under 378 names. The oracle set is finally complete. All six vendored reference repos were empty when the 2026-07-29 enum campaign ran, which is why it deferred this decision; they are re-cloned now, so ACE's WeenieError could be read directly instead of leaning on the UtilityBelt catalog alone. The two agree without a single conflict. ACE has 369 members, no internal value collisions. The catalog has 372, shares all 369 ACE names, and disagrees on none of their values. Its three extras -- IsNowOpenFellowship (0x050B), IsNowClosedFellowship (0x050C), LockedFellowshipCannotRecruit (0x0518) -- each turn up in ACE's separate WeenieErrorWithString enum with a `_` marking the interpolated name, so the catalog is just the less-split view of the same client enum. All three are adopted on agreement between two oracles, not on one. Retail cannot arbitrate any of this. acclient.h has no counterpart enum; its charError (26) is character-creation only. Recorded, not guessed around. Six values keep two names. acdream's NotGrounded, CrouchInCombatStance, SitInCombatStance, SleepInCombatStance, ChatEmoteOutsideNonCombat and ActionDepthExceeded are each anchored to a retail decompilation site, where ACE's names for those values are server-side coinages. Rather than pick, both are declared, acdream's first so ToString() is untouched. Behaviour is unchanged, and there is no way for it not to be: nothing in the tree branches on a WeenieError member. MotionInterpreter's switch is on a motion type and merely returns one of these; WeenieErrorText.For switches on a raw uint; the chat translation table WeenieErrorMessages is keyed on uint throughout, so naming a code does not make it render. The one site that moved is RemoteTeleportHook, where the (WeenieError)0x3Cu cast becomes the now-named WeenieError.ITeleported at the same value. Register row AP-15 is narrowed rather than retired. Its code-catalog caveat is superseded -- an unnamed code is no longer a way for it to bite -- but the sentences are still ACE's doc comments rather than retail's string_table.bin, and that part stands. The enum moved out of MotionInterpreter.cs into its own file at the same namespace. At 372 members it does not belong inside a physics class file. Core tests 3903 passed / 2 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6530585309
commit
f27ad9ee43
6 changed files with 1149 additions and 149 deletions
|
|
@ -130,7 +130,7 @@ AP-94..AP-112 for the confirmed retail-UI completion gaps.
|
|||
| AP-12 | Enchantment family-stacking tiebreak by largest SpellId; retail picks highest Generation, tie-broken by latest cast | `src/AcDream.Core/Spells/EnchantmentMath.cs:89` | `ActiveEnchantmentRecord` doesn't carry Generation; SpellId correlates with generation level in practice | Where spell ids don't track power within a family (or same-generation re-cast), the wrong buff wins — vital-max / stat values diverge from retail | `CEnchantmentRegistry::EnchantAttribute` 0x00594570 (pc:416110) |
|
||||
| AP-13 | `ComputeDamage` is a simplified retail damage formula (no augmentations/ratings) — verified DEAD CODE as of 2026-06-04, M2 scaffolding | `src/AcDream.Core/Combat/CombatModel.cs:184` | Not on the critical path; stubbed from r02 §5 + ACE CombatManager for the future M2 predictive display | If wired into the M2 attack-bar estimate as-is, predicted numbers diverge whenever augs/ratings apply | r02 §5; ACE CombatManager |
|
||||
| AP-14 | Encumbrance multiplier is a rough piecewise-linear stand-in (1.0→50%, ~0.7@100%, 0.1@300%) for retail's exact curve | `src/AcDream.Core/Items/ItemInstance.cs:187` | Hand-fit segments capture the curve's shape for scaffolding | Client-side burden-scaled effects (speed prediction) differ from retail at most burden ratios when loaded | r06 §6 (retail encumbered multiplier curve) |
|
||||
| AP-15 | WeenieError translation table covers only ~30 common codes (from ACE enum docs, not retail string_table.bin); unknown codes render raw hex | `src/AcDream.Core/Chat/WeenieErrorMessages.cs:26` | Untranslated codes are rare, fall back losslessly, 30-second add when reported | Server messages outside the table show as raw hex instead of the retail sentence | retail string_table.bin; ACE WeenieError*.cs |
|
||||
| AP-15 | WeenieError **sentence** table covers only ~30 common codes (from ACE enum docs, not retail string_table.bin); unknown codes render raw hex. The row's older *code-catalog* caveat is superseded: `WeenieError` carried a curated 16-member subset until 2026-07-29 and now holds the full 372-code table, so a code being unnamed is no longer a way for this to bite | `src/AcDream.Core/Chat/WeenieErrorMessages.cs:26` | Untranslated codes are rare, fall back losslessly, 30-second add when reported | Server messages outside the table show as raw hex instead of the retail sentence | retail string_table.bin; ACE WeenieError*.cs; `src/AcDream.Core/Physics/WeenieError.cs` |
|
||||
| AP-16 | Point/spot lights selected per-object / per-cell as the **8 nearest reaching lights** (sphere-overlap, nearest-first) via `LightManager.SelectForObject`, capped at `MaxLightsPerObject=8`; called from `WbDrawDispatcher.ComputeEntityLightSet` (objects) and `EnvCellRenderer.GetCellLightSet` (cell shells). Retail's bake (`SetStaticLightingVertexColors`) sums ALL reaching static lights per vertex with no count cap. Retail's *hardware* path (`minimize_object_lighting` 0x0054d480) DOES cap at 8 per object, so the cap is faithful to retail's hardware path — not to its bake path. The `LightManager.Tick` UBO path survives for DIRECTIONAL (sun) lights only; `mesh_modern.vert`'s UBO loop skips point/spot entries (`posAndKind.w != 0 → continue`) — point lights reach the shader exclusively via the per-object SSBO (binding 5) | `src/AcDream.Core/Lighting/LightManager.cs:234` (`SelectForObject`); `MaxLightsPerObject` ~line 174; call sites `WbDrawDispatcher.ComputeEntityLightSet` + `EnvCellRenderer.GetCellLightSet` | Matches retail's hardware constraint (8 lights per object/cell); selection is nearest-sphere-overlap which faithfully allocates lights to the surfaces that actually see them | Surfaces reached by >8 point lights are dimmer than retail's uncapped bake — rare (a dungeon room has a handful of torches), but real; see AP-35 for the bake-vs-GPU-evaluate architecture difference | `minimize_object_lighting` 0x0054d480 (retail's 8-light hardware cap); `SetStaticLightingVertexColors` 0x0059cfe0 (retail's bake, no count cap) |
|
||||
| ~~AP-18~~ | **RETIRED 2026-07-10 — faithful retail radar port.** Exact `RGBAColor_Radar*` floats were recovered from named static data and `gmRadarUI::GetBlipColor` was re-ported with `_blipColor` overrides plus portal/vendor/attackable-creature/admin/PK/PKLite/free-PK/fellowship precedence. The old implementation was not merely hue-tuned: it also had wrong portal/vendor colors and an incomplete dispatch matrix. | `src/AcDream.Core/Ui/RadarBlipColors.cs` + radar classification tests | — | — | `gmRadarUI::GetBlipColor` 0x004d76f0; static RGBA initializers at named decomp pc:1089736-1089804 |
|
||||
| AP-19 | `PortalSideEpsilon` 0.01 (≈1 cm) instead of retail F_EPSILON ≈ 0.0002 — a documented render-root-lag tolerance, NOT a retail constant. DO-NOT-RETRY: T2 (BR-4) tried the retail value; CornerFloodReplay refuted it | `src/AcDream.App/Rendering/PortalVisibilityBuilder.cs:49` | Retail's tight epsilon only works with eye-exact swept curr_cell tracking; our viewer cell lags the eye by up to ~1 cm at pressed corners. Tighten after the #108-membership family + cdstW near-clip pin land | A 1 cm misclassification band at portal planes can flood or cull a portal the eye hasn't crossed — one-frame leaks / grey flashes at knife-edge doorway/corner positions | F_EPSILON @0x007c8c70; `PView::InitCell` 0x005a4b70 |
|
||||
|
|
|
|||
|
|
@ -177,22 +177,20 @@ CLAUDE.md these are recorded rather than guessed.
|
|||
arrived at 864 property members. **Blocker:** source documents absent. Either
|
||||
they were never committed or they lived in a discarded worktree. Suggest
|
||||
fixing the MEMORY.md index entries to point at this doc.
|
||||
2. **Five of six reference repos are empty** (§1). Everything sourced here came
|
||||
from retail + the UtilityBelt catalog + the weenie corpus. **Blocker:** repos
|
||||
not cloned in this environment. Re-cloning ACE and Chorizite would let the 456
|
||||
single-sourced property members (§3.1) be promoted to two-oracle confirmed.
|
||||
2. ~~**Five of six reference repos are empty**~~ **RESOLVED 2026-07-29.** All six
|
||||
were re-cloned from their upstreams into the main checkout's `references/`
|
||||
(still gitignored). See §7. The 456 single-sourced property members (§3.1) can
|
||||
now be promoted to two-oracle confirmed by a follow-up pass; that pass has not
|
||||
been run.
|
||||
3. **456 of 864 property members are single-sourced.** They are transcribed from
|
||||
the catalog, not invented, but no weenie in the corpus sets them so there is no
|
||||
independent attestation. **Blocker:** needs ACE source, or the client DAT's own
|
||||
`EnumMapper` file type (`acclientlib` has a reader for it — a genuinely retail
|
||||
oracle, and the most promising unexplored lead).
|
||||
4. **`WeenieError` — 362 unadopted status codes.** acdream has 16 members; the
|
||||
catalog's `StatusMessage` has 372, with 10 shared and zero conflicts. Retail's
|
||||
`charError` (26) is a *different* enum — character-creation errors only — so
|
||||
retail cannot arbitrate. Register row **AP-15** already tracks that acdream's
|
||||
translation table covers only ~30 common codes. **Blocker:** needs a decision
|
||||
on importing 362 server-side codes wholesale, and ideally retail's
|
||||
`string_table.bin` for the real sentences. Deliberately not done here.
|
||||
4. ~~**`WeenieError` — 362 unadopted status codes.**~~ **RESOLVED 2026-07-29** by
|
||||
user decision: all 362 adopted. See §8.1. What remains open is only the
|
||||
*sentences* — retail's `string_table.bin` — which stays as register row
|
||||
**AP-15**, now narrowed to the translation table alone.
|
||||
5. **`CombatMode` has no located retail counterpart.** acdream's 7 members match
|
||||
the catalog's `CombatMode` (`Magic = 8`). Retail's `CombatStyle` (25 members,
|
||||
`Magic_CombatStyle = 512`) is a different enum — weapon-style, not combat mode.
|
||||
|
|
@ -258,3 +256,76 @@ absolute paths into `references/`). The method, in order:
|
|||
| `f3e95a3e` | `DamageType` rotation + `ItemType` craft ladder and composites |
|
||||
| `8ccaf72a` | `EquipMask` composites, `TransientState`, `PhysicsState`, `AttackHeight` |
|
||||
| `3efa266a` | `AmmoType`, `CombatUse`, `ItemUseable` |
|
||||
|
||||
---
|
||||
|
||||
## 7. The reference tree, restored (2026-07-29)
|
||||
|
||||
Open question 2 is closed. All six vendored repos were re-cloned from their
|
||||
upstreams into the main checkout at
|
||||
`C:\Users\erikn\source\repos\acdream\references\`, which every worktree shares.
|
||||
`references/*` is gitignored (only `WorldBuilder` is checked in as a gitlink), so
|
||||
none of this enters our history.
|
||||
|
||||
Each candidate URL was cross-checked against the description in CLAUDE.md and
|
||||
`memory/reference_repos.md` before cloning, and the clone was verified to contain
|
||||
the files those descriptions name.
|
||||
|
||||
| repo | upstream | commit | size | how the URL was confirmed |
|
||||
|---|---|---|---|---|
|
||||
| ACE | `https://github.com/ACEmulator/ACE.git` | `65f092dd` | 56 MB | `git remote -v` of the recovered copy at `repos/client/ACE`; the three enum files this slice reads are byte-identical between the two |
|
||||
| ACViewer | `https://github.com/ACEmulator/ACViewer.git` | `c5c54fb3` | 97 MB | cited by URL in `docs/research/2026-07-13-retail-projectile-vfx-pseudocode.md`; also the remote of `repos/ACViewer`. Cloned `--recurse-submodules`, so its `ACE.DatLoader` submodule (`382edb23`) is present as the docs describe |
|
||||
| Chorizite.ACProtocol | `https://github.com/Chorizite/Chorizite.ACProtocol` | `ff7dffd6` | 4.5 MB | Chorizite org + exact repo name; contains the `Chorizite.ACProtocol` + `.SourceGen` projects CLAUDE.md describes as XML-generated |
|
||||
| holtburger | `https://github.com/merklejerk/holtburger` | `a7e806cb` | 25 MB | named by URL in `docs/research/2026-05-10-holtburger-network-stack-study.md`; also the remote of `repos/holtburger` |
|
||||
| AC2D | `https://github.com/deregtd/AC2D` | `3451f0d2` | 17 MB | no URL was recorded anywhere in the repo, so the candidate was verified by content: it is C++, and it holds `cNetwork.cpp`, `cInterface.cpp`, `cPictureBox.h`/`cStaticText.h`/`cEditBox.h`, and `FSplitNESW` in `Landblocks.cpp` — every file the docs attribute to AC2D |
|
||||
| DatReaderWriter | `https://github.com/Chorizite/DatReaderWriter` | `c5359870` | 4.2 MB | cited by URL in `docs/research/2026-04-26-datreaderwriter-reference.md`. Not on the restore list, but it was empty for the same reason and is unambiguously identified |
|
||||
|
||||
---
|
||||
|
||||
## 8. Adoptions made on the restored oracle set
|
||||
|
||||
### 8.1 `WeenieError` — the full 372-code table
|
||||
|
||||
Open question 4, closed by user decision. acdream carried 16 members; it now
|
||||
carries 372 values under 378 names.
|
||||
|
||||
The oracles agree completely. ACE's `WeenieError` has 369 members with no
|
||||
internal value collisions; the UtilityBelt catalog's `StatusMessage` has 372,
|
||||
shares all 369 ACE names, and disagrees on none of their values — it is a strict
|
||||
superset. Its three extra codes are `IsNowOpenFellowship` (0x050B),
|
||||
`IsNowClosedFellowship` (0x050C) and `LockedFellowshipCannotRecruit` (0x0518),
|
||||
and each is independently present in ACE's *separate* `WeenieErrorWithString`
|
||||
enum carrying a `_` where the interpolated name goes. So the catalog is simply
|
||||
the less-split view of what ACE keeps as two enums, and the three are adopted on
|
||||
two-oracle agreement rather than on the catalog alone.
|
||||
|
||||
Retail cannot arbitrate any of this: `acclient.h` has no counterpart enum, and
|
||||
its `charError` (26 members) is character-creation only. That is recorded, not
|
||||
guessed around.
|
||||
|
||||
Ten of acdream's 16 members matched an ACE name at an identical value. The other
|
||||
six sit at values ACE names differently, and acdream's names are the better ones
|
||||
— each is anchored to a retail decompilation site from the A10/R4 passes, where
|
||||
ACE's is a server-side coinage. Rather than choose, the six values carry both
|
||||
names, acdream's declared first:
|
||||
|
||||
| value | acdream (decomp-anchored) | ACE / catalog |
|
||||
|---|---|---|
|
||||
| 0x0024 | `NotGrounded` | `YouCantJumpWhileInTheAir` |
|
||||
| 0x003F | `CrouchInCombatStance` | `CantCrouchInCombat` |
|
||||
| 0x0040 | `SitInCombatStance` | `CantSitInCombat` |
|
||||
| 0x0041 | `SleepInCombatStance` | `CantLieDownInCombat` |
|
||||
| 0x0042 | `ChatEmoteOutsideNonCombat` | `CantChatEmoteInCombat` |
|
||||
| 0x0045 | `ActionDepthExceeded` | `TooManyActions` |
|
||||
|
||||
**Behaviour: unchanged.** Nothing in the tree branches on a `WeenieError`
|
||||
member. The two switches that mention the type switch on something else —
|
||||
`MotionInterpreter.cs:971` switches on a motion type and *returns* a
|
||||
`WeenieError`, and `WeenieErrorText.For` switches on a raw `uint`. The chat
|
||||
translation table `WeenieErrorMessages` is keyed on `uint` throughout, so
|
||||
naming a code does not make it render. The only site touched is
|
||||
`RemoteTeleportHook`, whose `(WeenieError)0x3Cu` cast could become the now-named
|
||||
`WeenieError.ITeleported` — same value, no behavioural edge.
|
||||
|
||||
The enum also moved out of `MotionInterpreter.cs` into its own file at the same
|
||||
namespace; at 372 members it no longer belongs inside a physics class file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue