Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/frtk-table-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,50 @@ Addresses, byte buffers, masks, offsets, memory ranges, and guarded transaction
operations remain host-internal. Raw memory diagnostic methods are separate and
retain their existing contracts.

## Live recruiting service

`createLiveRecruitingService({ client, generation })` wraps the typed API for
the Brooks-verified existing-row recruiting surface. The caller's save-backed
model supplies the `UserRecruitTarget`, RecruitingBoard, existing pitch, and
existing visit row numbers. The hook supplies live catalog discovery, decoded
reads, authority checks, and guarded transactions:

```js
const { createClient, createLiveRecruitingService } = require('@cfb27/lua-hook');

const client = createClient({ pid });
await client.loadFrtkProfile({ profile, layout });
const { generation } = await client.discoverFrtkCatalog();
const recruiting = await createLiveRecruitingService({ client, generation });

const state = await recruiting.readState({
targetRow: selected.userRecruitTargetRow,
boardRow: selected.recruitingBoardRow,
pitchRow: selected.activePitchRow,
visitRow: selected.activeVisitRow,
});

await recruiting.setContactAction({
transactionId: `recruiting.dm.${Date.now()}`,
targetRow: selected.userRecruitTargetRow,
boardRow: selected.recruitingBoardRow,
action: 'dm-player',
enabled: true,
});
```

The service also exposes `setNilOffer`, `rewritePitch`, and `rewriteVisit`.
Contact actions are exactly `dm-player`, `browse-social-media`, and
`friends-family`; each contact bit and its RecruitingBoard assigned-hours delta
share one field transaction. `rewritePitch` preserves the row's current
intensity and cost. Every mutation accepts `dryRun: true` and returns a decoded
summary without exposing the internal field changes.

`LIVE_RECRUITING_TABLES` exports the sanitized identities and field definitions
needed by a save-backed profile builder. The builder still supplies its own
local fingerprints. This API never allocates or frees a row and does not add or
remove pitches, visits, or board members.

Stable FrTk errors are `FRTK_PROFILE_INVALID`, `FRTK_DISCOVERY_FAILED`,
`FRTK_DISCOVERY_TIMEOUT`,
`FRTK_CATALOG_STALE`, `FRTK_FIELD_INVALID`, and
Expand All @@ -86,3 +130,6 @@ progress object: phase, public Unique ID or `null`, zero-based fingerprint
ordinal or `null`, completed fingerprint count, elapsed milliseconds, and
bounded cumulative page, chunk, scanned-byte, candidate-window, and capped-match
counters. It never exposes private memory or fingerprint material.

The recruiting wrapper additionally reports `RECRUITING_ACTION_UNSUPPORTED`
and `RECRUITING_HOURS_INSUFFICIENT` for its two domain-specific failures.
21 changes: 21 additions & 0 deletions docs/research/runtime-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,24 @@ After the earlier live session, both applications were closed and the supported
uninstall restored the game and MMC active proxies. Independent SHA-256 checks
of both files returned
`3E87682118E593F334BA665826E2A6AB85BA460F2E1FE95B173A7199863AD454`.

## Imported live recruiting evidence on July 14, 2026

The existing-row recruiting SDK surface imports sanitized behavioral evidence
from Brooks's `cfb27-dynasty-modding` commit
`b2b5a7ce4216c5838f1dbd2fb5a76dba6d67e7fe`, layout version `1.2.0`. Runtime
write authority requires the exact current-build table ID, persistent Unique ID,
and record size shown here; file profiles remain `discovery_only`.

| Table | Table ID | Unique ID | Record size | Imported operation |
|---|---:|---:|---:|---|
| UserRecruitTarget | 4168 | 3987156317 | 36 | Contact booleans and `CurrentNILOffer` |
| ActiveVisitInfo | 4176 | 3093586546 | 4 | Rewrite an existing visit's week, week type, and activity |
| ActiveRecruitingPitch | 4190 | 1559900276 | 4 | Rewrite an existing pitch enum while preserving intensity |
| RecruitingBoard | 4251 | 220276943 | 12 | Read total/processed/assigned hours and atomically adjust assigned hours with contacts |

This delivery excludes allocation and freelist changes, `SendTheHouse`,
scholarships, scouting, board membership, pitch-intensity changes, and pitch or
visit creation/removal. Verification for this import is automated and offline;
no additional installed-host, CFB27, MMC, weekly-advance, or autosave gate was
performed.
Loading
Loading