aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/mission-offers.md (7433B)


Mission offers

The backyard3000 mission booth now returns one browsable contract through the original 14.9.1 selection window. Opening, generating and accepting are separate operations. Generation charges credits but does not grant a mission, key, item, XP or reward credits. CreateQuest acceptance now persists the selected contract and its first key separately from generation.

Content and scope

server/gamedata/missions.yaml defines a fixed Blue Book of Secrets contract for booth56001/3221228472. Its objective uses original QL1 item40822 and its destination uses the nearby Surveillance Office entrance56006/3221228472 in playfield3000 at89.302162,115.144440,151.160873. The objective item's original payload SHA256 is 645b946ec12830a3695e1c27659dc37676dbc2b884cb1f19e4fda1692e7066fe. The original item and exterior placement establish those assets, not a recovered complete contract. The narrative and48-hour duration are provisional reconstruction choices. Current shared starter contracts advertise level-scaled cash and a selected item, with both completion XP fields zero. The initial displayed100 XP promise has been removed because hand-in does not award it. The shared starter document describes the current content scope.

The authored booth catalog and shared template Use criteria still control admission. Both opening and generating use the same playfield, five-metre distance, equipment/trade, team, free-slot and template eligibility checks. Only this booth has offer content. A valid request without eligible content or enough credits receives a complete empty selection reply and incurs no fee. Malformed, foreign or stale-session requests produce no offer.

Difficulty1..11 and six signed dimensions in[-100,100] are validated and echoed. They do not yet change this fixed content, its quality or its rewards. Style selectors remain authored data, not invented destination IDs.

The shipped cd_image/text/help/The Mission Window.txt explicitly describes mission difficulty relative to the character's current level. This supports player-level/difficulty-dependent generation, not a constant level for all missions. It does not supply the numeric selection curve, encounter variation or reward-QL rules. Those remain separate TODO checks before replacing the fixed starter offer; item rewards should use the shared reviewed quality path.

Native protocol and evidence

REA/Ghidra12.1.2 observations of the original binaries and full provenance are retained in local/mission-offers/kkr-evidence.json and ddr-evidence.json. Recovered pseudocode needs native corroboration; it is not original source. kkr.dll SHA256 is 241b2e665dcd127399b7686cddda8a5b0876d9cde9b3af7a73940dd0b86ecaa7; ddr.dll SHA256 is 7e8f49d5fca11a601febece4f9bbb93acbaf0cbad2ca75bd8f4e3891944cbf50.

QuestAlternative0x5c436609/version4 contains difficulty, six signed dimensions, seed, originator and booth identity, then an offer count. Each offer carries quest identity56003/seed, a complete Quest14 record and a selection byte. The serializer includes the NUL-terminated description, RewardBox5, Action19 and all empty lists/trailing fields. Native empty encoded lists use1009. RewardBox5 holds cash at offset+8 and XP at+12 in the recovered native object.

Action19 matches item template and QL; its serialized WorldPos at offset108 supplies playfield identity40016/3000, integer origins and local XYZ. Original kkr.dll!0x360c5960 establishes item matching and0x36027ab0 reads the first action's position for coordinate upload. This does not establish whether the objective completes on pickup, inspection or return. A native map check confirms the displayed exterior marker; no geometry-to-private-interior mapping is claimed.

ddr.dll!0x2b086450 requires Cash/stat61 at least Level/stat54 before requesting a mission and checks two free slots (evidence ev_fddab598e19ab179caf9cf2458edfda9246bf36e243fe667685a3aba96a484bd). The server charges Level credits for a supported generation, committing the wallet before sending Cash and the offer. The native code proves the affordability precheck; the corresponding original server debit was not captured. The chosen fee is a reconstruction consistent with that precheck.

ddr.dll!0x2b0867b0 selects an offer and uploads coordinates without accepting. kkr.dll!0x360217c0 expands the native selection-list identity/index/seed layout; 0x36021ac0 constructs CreateQuest. Clicking Accept in the real client captured key0x291f361b/version2 with payload 0206000000000000c70a4af5050000dac1c0000bb800: difficulty6, neutral dimensions, offer seed0xc70a4af5, origin5, booth56001/3221228472 and selection index0. That initial capture preceded the acceptance handler. Its window closed with an empty journal. The current handler and verified journal/key replay are covered in mission acceptance.

Verification

The focused Go run passed14 roots/104 test results across offer serialization, native socket dispatch, admission, fee persistence failures/retry, booth tests, original asset linkage and adjacent bank/shop/insurance/door regressions. The separate concurrent-request test verifies that two requests with one credit produce one charged offer and one empty rejection, with a cold balance of zero. Failure injection covers aborted writes, ignored updates and failed commits. Every signed dimension axis is checked at-101,-100,100,101. Difficulty endpoints, level-based affordability and all three destination coordinates are checked. The full gamedata package also passed.

Headed Chromium using the GPU and real WASM client displayed the book icon, description, cash20/XP100 and an uploaded map marker northwest of the player at the authored entrance. The details also say XP is received with a token; token eligibility and settlement remain open. Dragging native advanced sliders captured difficulty11 and dimension0=-100. Three generations reduced a controlled five-credit fixture to two credits. SQL snapshots and a cold restart/reconnect without fixture edits retained level1, XP0, two credits and no items. The native accepted journal stayed empty after browsing, cancellation and the unimplemented Accept request. These controlled funds do not establish an earned-income loop.

Moving away closed the native selection window automatically. The later click at its former Request position did not send a generation request, so it is not claimed as a manual server-range rejection; direct Go tests cover that rejection. Page exception lists remained empty and no adapter crash was observed. Startup logged HTTP404 responses whose URLs were not identified; this does not establish a completely error-free page load. Wire captures, screenshots and accounting are retained in local/mission-offers/.

Next integration

Acceptance now authenticates the session offer and persists its immutable values, journal, first key and exterior destination before publication. Private instances need explicit isolation across all world consumers before admitting players. An arbitrary existing Blue Book must not satisfy a new contract. Completion needs verified objective/token rules and atomic rewards through shared progression and inventory paths. See remaining integration and the Missions section of feature backlog.