Skip to content

Family separation and precepts - #710

Merged
neeerp merged 1 commit into
masterfrom
v83/family-separation
Oct 22, 2026
Merged

neeerp merged 1 commit into
masterfrom
v83/family-separation

Conversation

@neeerp

@neeerp neeerp commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Family slice 2, from reports b048 (client) and b049 (server mechanics).

Server

  • CHANGE_FAMILY_MESSAGE (0x98): only the leader can set the precepts (at most 200 characters). The whole family then gets INFO again.
  • Separating. Report b048 corrects b039 on which opcode is which:
    • SEPARATE_FAMILY_BY_SENIOR (0x94, the junior's id) is sent when cutting off a junior.
    • SEPARATE_FAMILY_BY_JUNIOR (0x95, empty) is sent when leaving your senior.
  • The directory adds the online levels, then db::family::separate runs in one transaction. It locks the senior, the junior and the senior's senior in id order.
    • Fee: (d + 2500) * d mesos, where d is the level gap. The initiator pays. If they can't, FAMILY_RESULT 0x50 or 0x51 gives the amount.
    • Rep: the senior loses 2X and the senior's senior loses X, where X = (L/20 + 10) * L for the junior's level. Rep never goes below 0.
  • On success the initiator gets the meso stat update and FAMILY_RESULT 1, and the whole old family gets INFO.
  • If the two are no longer related, or the DB fails, the initiator just gets INFO again.

Client

  • BtBye is enabled on your own tree. It uses the selected senior or junior; with nothing selected it asks for a name.
  • Double-clicking a filled senior or junior box does the same.
  • There is a single Yes/No (0x146d-0x1470 plus the 0x146c fee line), and either answer clears the selection.
  • FAMILY_RESULT 1 shows "You have severed ties with %s." with the remembered name.

Verified

  • Harness families passes 2/2. The new test covers the precepts, a 0x51 shortfall, a paid 0x95 with the 2nd senior's loss, and a paid 0x94.
  • The game lib unit tests pass, and the HC dbg ctest (tests/family.cpp) passes 152/152.
  • The GUI was checked against a server built from this branch:
    • the Yes/No reads "440 Reputations for the Senior… Fee:25100 Mesos";
    • with 10000 mesos, the 0x50 dialog says 25100 are needed;
    • with 100000 mesos it shows the severed-ties dialog and the tree empties. In the DB, meso is 74900 and the senior's rep is 1000 → 560.
  • Docs: agent_docs/families.md.

…corrects b039's direction), 0x98 leader-only precepts; BtBye, double-click and name prompt with one Yes/No in the client
@neeerp
neeerp merged commit 5e6dcdb into master Oct 22, 2026
1 check passed
@neeerp
neeerp deleted the v83/family-separation branch October 22, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant