120 lines
7.1 KiB
Markdown
120 lines
7.1 KiB
Markdown
# FFGO CW workflow comparison, 2026-10-26
|
|
|
|
Reference binary SHA256: `235f5c3567f281cc99613ed84694ef23f492c15298dc868a8e78e6529f0cda86`.
|
|
Embedded revision: `440df54730ba64935e9ad7ecae9147e55ad279a9`.
|
|
This is compiled implementation evidence, not recovered original source or proof
|
|
that every reference handler succeeds in the current Client.
|
|
|
|
## Tea Break entry and selection
|
|
|
|
The recovered Go pclntab contains a complete Bonfire entry path, closing the
|
|
earlier reference's missing-handler gap. Direct calls agree with coherent
|
|
disassembly boundaries and Go runtime helpers; the PE pclntab's zero on-disk
|
|
textStart is resolved to the `.text` section virtual address.
|
|
|
|
| Reference function | RVA | Observed behavior |
|
|
|---|---:|---|
|
|
| OnGridFightEnterBonfireCsReq | `c697e0` | Current run, Bonfire entry, sync notification, persistence, response |
|
|
| gfBonfireEnter | `c69940` | Resync current pending type 11, or create a new Bonfire pending action from the current node's event list |
|
|
| gfPendingAddBonfire | `cbc3c0` | Roll options for every event; capture basic/interest/streak income and node Orb rewards; sync queue head |
|
|
| gfPendingBonfireProto | `cb1760` | Convert offered options, income, drops and selected phase to the pending payload |
|
|
| gfPendingHandleBonfire | `cbb740` | Select option or heal first; separate take-drop step grants income/EXP/rewards, finishes pending, advances node |
|
|
| gfPendingMarkBonfireSelected | `cbc0a0` | Mark selected, serialize the same pending action, sync it again |
|
|
| gfRouteLowerEnemyStars | `cde100` | For every enemy above one star: roll integer 1..100; at configured threshold decrement one star |
|
|
|
|
`OnGridFightEnterBonfireCsReq` sends reference command 8582 after its sync. The
|
|
implementation here resolves `GridFightEnterBonfireScRsp` by the repository's
|
|
named protocol table, rather than importing a numeric alias.
|
|
|
|
The specific Bonfire subset agrees with our existing schema:
|
|
|
|
| Reference meaning | Current generated field | Wire tag |
|
|
|---|---|---:|
|
|
| Bonfire pending arm | CHCHAJIANIM.IIDBLCFAAPC | 1920 |
|
|
| Bonfire request arm | GridFightHandleBonfireHealHpCsReq.IIDBLCFAAPC | 1659 |
|
|
| Pending queue identifier | CHCHAJIANIM.QueuePosition | 6 |
|
|
| Coin basic / interest / streak | NCEPOLNLNKH.EIFICNFGGHI / AHJJJNBOMPG / DANCNIMJOLE | 14 / 11 / 5 |
|
|
| Options / phase / drops | NCEPOLNLNKH.KFNMIEMBJGD / Phase / DJOBNPIAEJP | 13 / 9 / 6 |
|
|
| Option event / selected option | MHCOIBONODA.EventId / HAFOKMHCGFM | 11 / 13 |
|
|
| Select event / option request | LDJOCEMPFBJ.EventId / HAFOKMHCGFM | 1 / 14 |
|
|
|
|
The full reference sync/pending messages contain additional arms absent from
|
|
our revision. Only this scoped verified subset is used; reference response
|
|
bytes are never copied directly into current packets.
|
|
|
|
## Imported implementation reference and current scope
|
|
|
|
`tools/export_ffgo_bonfire.py` reproducibly projects the extracted reference
|
|
tables into `resources/CurrencyWarsBonfire.json`: 38 events, 72 options, three
|
|
chapter heal rows and 17 declarative TeaBreakOption recipes. The resource
|
|
records binary and extraction hashes. Its target identity is a compatibility
|
|
gate against our existing catalog, explicitly **not** a claim of a new Client
|
|
capture. The selected event must also occur in the active Client node.
|
|
|
|
Current event 10200601, option 1, uses reference recipe
|
|
`petpal/bonfire/GridFightBonfire102006011.json`: SetRule `PetPalStarDown`,
|
|
parameter `#1 = 40` from the Excel option. The native reference's string
|
|
cross-reference proves this rule lowers **enemy stars**, not shop stars.
|
|
|
|
Implemented source now creates and persists the real menu before acknowledging
|
|
entry, resumes an existing Bonfire pending action, and validates the selected
|
|
event/option against the saved offer. Selecting this supported option persists
|
|
the rule with phase 1 and syncs the updated pending action. Future enemy layers
|
|
created through pending-action transitions apply the rule once per node;
|
|
the changed enemy stars and the application marker commit atomically.
|
|
|
|
Server rule state lives beside the protocol payload under snapshot `runtime`,
|
|
scoped by run ID. Normal same-run writes inherit it under the existing revision
|
|
CAS and file lock; new runs cannot inherit old rules. Unknown envelope/runtime
|
|
fields and unknown protobuf fields remain intact. Snapshot readers never write.
|
|
|
|
Only supported effects execute. Opening/selecting does not pay income. The
|
|
later continuation below supersedes the initial healing/take-drop boundary;
|
|
unsupported option effects still preserve the active offer.
|
|
|
|
## Remaining node-factory boundary
|
|
|
|
Our transition resource contains captured steps 1-1 through 1-4; it has no
|
|
current 1-5 -> 1-6 LevelWire/next pending/enemy recipe. The reference's static
|
|
route 2801 section 5 is a Monster node, while the active Client node is a
|
|
dynamic Tea Break. Its PetPal effect can replace that static node type. Copying
|
|
the static reference route or a saved reference run would therefore be wrong.
|
|
|
|
Continue from reference `gfPendingAdvanceNode`, `gfRouteCreateNode`,
|
|
`gfRouteFillEliteBranch`, and the PetPal dynamic-node override. The factory must
|
|
resolve the active route section, dynamic Tea Break replacements, layer-specific
|
|
parameters, actual enemy waves/camp, penalty, queue, shop and reward updates.
|
|
The generated factory described below now supplies the current next Boss node.
|
|
|
|
Validation performed: Go compilation and a read-only catalog load confirming
|
|
38/72/17/3 rows and supported event 10200601/1 -> PetPalStarDown 40. No unit tests
|
|
were added or run, no saves were changed by the checks, and no Client menu or
|
|
selection success is claimed until observed after deployment.
|
|
|
|
## Take-drop continuation (2026-10-26)
|
|
|
|
The saved live run was inspected without writing it: revision 531, route 2801,
|
|
chapter 1 section 5, pending queue 530, Bonfire phase 1. Its offer contains basic
|
|
gold 10, interest 5, streak gold 2 and no Orb drops. The old phase-0-only guard
|
|
rejected take-drop before reaching its branch, explaining the repeated 6900.
|
|
|
|
`cwSelectBonfire` now distinguishes selection/healing from take-drop. Healing
|
|
uses the chapter row and caps at maximum HP. Take requires phase 1, pays the
|
|
saved income and resource-defined wave EXP, applies any already-offered Orb
|
|
items, and constructs the next saved route node. The caller commits the entire
|
|
detached result using the existing revision CAS before sending notifications.
|
|
Failure leaves income/inventory/coordinates unchanged; retrying a completed
|
|
queue cannot award again. It does not invent missing Orb rewards for the legacy
|
|
offer. Weighted generation of ordinary node Orb offers remains separate work.
|
|
|
|
New enemy rounds use typed RoundBegin -> ReturnPreparation instead of replaying
|
|
the initial shop capture. Battle settlement retains proven captured transitions
|
|
and otherwise calls the generated node factory with a monotonic revision-based
|
|
queue. Reference penalty rows (114) are stored separately with provenance;
|
|
current-Client captured rules take precedence. Enemy-star rules and their
|
|
once-per-node markers commit with the newly generated layer.
|
|
|
|
See `currency-wars-route-factory.md` for destination-family limits. This change
|
|
does not claim complete CW finalization, all augment effects or all node types.
|
|
Compilation is distinct from live Client acceptance.
|