Skip to content

feat: bring BreedingBuddies back on Cooking's husbandry engine - #13

Merged
Nowkoo merged 13 commits into
mainfrom
feat/absorb-husbandry
Oct 16, 2026
Merged

Nowkoo merged 13 commits into
mainfrom
feat/absorb-husbandry

Conversation

@Nowkoo

@Nowkoo Nowkoo commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Engine: Cooking's husbandry module replaces the old JSON engine, including Ryan's character ownership, estates (participant ID kept as cooking-animals so open estates carry on), lost-animal snapshots and /animals. Products come from Cooking's food API (feat: food API and husbandry switch for BreedingBuddies Cooking#79, merged).
  • Takeover: the first start copies plugins/Cooking/Data/husbandry.db and its journal; Cooking's files stay as a backup and a failed copy stops startup. Entities and tokens marked with cooking:* keys keep working. Settings are not copied: config.yml starts from BreedingBuddies' defaults, which carry Main's tuned horse maximums. BreedingBuddies refuses to start while Cooking still runs livestock.
  • Trust: care becomes trust, shown as five hearts, earned only by feeding a hungry animal, brushing a dirty one and a daily pet (riding, for mounts). Neglect still costs trust.
  • Mounts: separate health, speed and jump genes, inherited with the old BreedingBuddies roll; parents' trust and the breeding food's stars open the room to beat the better parent. Defaults: 40% base, 50% genes, 10% trust.
  • Living products: cows leave manure (bone meal by default), pigs root for their enchanted dust, chickens moult; milk and extra wool need a happy animal; llamas give leather at slaughter.
  • Menu and effects: the original layout (header, trust hearts, genetics eggs with stars, mount stats with genes), no italics, instructions in the lore, a confirmed give-up button; cherry petals and amethyst chimes for taming and sharing, the foal's cry when neutering a horse.
  • Staff commands: /breedingbuddies (/bb) reload | spawn | save with breedingbuddies.admin.

Deployment notes

  • Requires the published Cooking 0.5.1 release, which includes Cooking#79; cooking.version is pinned to 0.5.1.
  • Give the staff group breedingbuddies.admin (it replaces cooking.admin for animals).
  • Mount shares stay as on Main (40% base, 30% genes, 30% trust), now under mounts.shares.
  • Create plugins/BreedingBuddies/Data before the first start: the server cannot create folders in plugins/ on our hosts (seen on TF Dev).
  • Switch over with a restart: set enabled: false in Cooking's husbandry.yml, install BreedingBuddies.
  • RPCharacters' lock_breeding and breeding XP need no change: its NORMAL-priority cancel runs before BreedingBuddies' HIGH handler, which ignores cancelled breeding.

Tests

mvn clean verify: 303 tests, no failures or skips, 100% line coverage, built against the checksum-verified Cooking 0.5.1 and TLibs 2.6.0 release JARs. Conflicts with main resolved; numeric tab suggestions retain prefix filtering under the new staff command. Tried on TF Dev (2026-10-15): Cooking runs with husbandry off, BreedingBuddies takes over its records and opens the database, /bb save and /animals answer. In-game checks with a player are still to do.

🤖 Generated with Claude Code

Nowkoo and others added 2 commits October 14, 2026 22:03
Replace the JSON engine with the husbandry module from Cooking, including
its character ownership, estates, lost-animal snapshots, /animals and
tests. Products come from Cooking's food API, so Cooking stays the owner
of food. BreedingBuddies refuses to start while Cooking still runs
livestock, and staff use /breedingbuddies with breedingbuddies.admin.
The estate participant keeps the cooking-animals ID so estates already
open carry on. Private build inputs are now MMOCore and MythicLib.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the first start BreedingBuddies copies plugins/Cooking/Data/husbandry.db
(with its journal) and husbandry.yml, which already hold the character
owners, estates and snapshots. Cooking's files stay as a backup, the
database is copied last so an interrupted copy is redone, and a failed
copy stops startup instead of opening an empty database. Entities and
tokens marked with Cooking's keys keep working; new marks use ours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5765608c-ccfd-43c3-91c2-dd5d91ba15c4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:XXL 1,000+ effective changed lines (tests excluded in mixed PRs). label Oct 14, 2026
Nowkoo and others added 9 commits October 14, 2026 23:07
Care becomes trust, shown as five hearts. Happy time no longer raises it
by itself: owners earn it by feeding a hungry animal (trust.feed), brushing
a dirty one (trust.glove) and a daily pet (trust.pet, once per
trust.pet-cooldown). A pet is an empty-handed, standing right-click; for
mounts, riding counts. Staff can still tend any animal, but only owners
build its trust. Neglect still costs trust after decay-grace. The old
care.up and offline-care keys are ignored. The last pet is stored in
last_pet_at, added by column name so Cooking's schema numbering cannot
skip it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mounts carry separate health, speed and jump genes, inherited with the
old BreedingBuddies roll: from a little below the weaker parent up to a
quarter of the headroom above the better one, with very different parents
lowering that ceiling. Parents' trust and the breeding food's stars open
that headroom, so neglected or poorly fed parents cannot produce a better
foal. Wild mounts roll each stat; staff spawns get the chosen value for
all three. The animal's genetics is the average of the three, and records
from before keep their genetics for every stat until bred or reset.
Default shares are now 40% base, 50% genes and 10% trust, so full genes
and full trust reach the type's maximum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cow now leaves manure for the fields (bone meal by default) instead of
leather, which only comes from slaughter. A pig roots about, with dirt
and a rooting sound, before turning up its enchanted dust; a chicken
moults its feathers. Milk and the extra wool from shearing need a happy
animal, like eggs and shedding already did; vanilla sheep wool still
always comes off. Llamas give leather at slaughter rather than feathers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copying Cooking's husbandry.yml would have kept the old leather shedding,
llama feathers and mount shares, so the takeover now copies only the
animal records and config.yml starts from BreedingBuddies' defaults.
Those defaults carry the horse maximums tuned on TF Main (27 health,
0.27 speed, 0.8 jump strength).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The menu follows the original layout again instead of 54 slots of
concrete bars: a header row (owners, name and growth, products, status,
neutered), a row of five trust hearts in red and grey dye, a row of five
genetics eggs with the star rating, and for mounts a row with health,
speed and jump and each stat's gene. Names drop the italics, the status
says what to do (feed, brush, pet or ride) and when trust starts to drop,
and giving an animal up now takes a second click within five seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taming, linking a co-ownership token and gaining a co-owner play the
original cherry petals and amethyst chime. Feeding and brushing play a
softer sparkle, leaving hearts to the trust they earn. Neutering a horse
plays the foal's cry it used to; other animals give a short yelp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shares set health, speed and jump alike, so mounts.speed was a
misleading name inherited from Cooking. mounts.shares is read first;
mounts.speed still loads with a warning to rename it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Trust keeps counting for 30% of a mount's stats, as it does on TF Main
today: 40% base, 30% genes and 30% trust, which still reaches the type's
maximum with full genes and trust.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On TF Dev the server may not create folders in plugins/, so the first
start failed with a missing husbandry.db while copying Cooking's records.
Startup now stops with a message saying to create the folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nowkoo and others added 2 commits October 16, 2026 13:24
Failed Cooking takeovers no longer replay stale WAL records: the database
is staged, residual WAL/SHM files are cleared and the copy is published by
an atomic rename. Failed snapshot recovery keeps the animal, its owners and
its snapshot, marking it missing for retry or staff review instead of
deleting it, and a snapshot without a world names its animal in the log.

Ride trust is awarded at MONITOR after other plugins could cancel the ride.
CompanionPets bodies, tagged companionpets:pet, are left out of chunk-load
and startup cleanup and keep their drops and experience when they die.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Nowkoo
Nowkoo marked this pull request as ready for review October 16, 2026 15:31
@Nowkoo
Nowkoo merged commit 09add99 into main Oct 16, 2026
4 checks passed
@Nowkoo
Nowkoo deleted the feat/absorb-husbandry branch October 16, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant