Skip to content

Add to the yard: kinds, drawings, effects and scenery ​

Purpose ​

  • Change or add what is in the yard without touching the code that runs it.
  • Content and artwork files describe the yard. Most additions reuse the existing rendering rules:
WhatWhereRead by
The catalogue: fish, bugs, flowers, gifts, trees, keepsakes and the garden's stagessrc/content/catalog.jsonthe page (src/yard/catalog.js) and the backend (src-tauri/src/pets/content.rs, built in)
The scenery's composition: curves, the lake, the field, the layers painted from back to frontsrc/content/yard.jsonthe page (src/yard/layout.js, src/yard/backdrop.js)
Seasonal events: when, what they add to the scenery and how they looksrc/content/events.jsonthe page (src/yard/events.js, src/yard/festival.js) and the backend (its gifts' dates, content.rs)
Drawings: plant stages, flowers, gifts (and any fish or bug that has its own)src/art/<folder>/<id>.svgthe page (src/yard/art.js), as symbols
Colours of the seasons, the light and the weathersrc/styles/scenery.cssthe stylesheet, the painter and every drawing
Names and linessrc/core/strings/<language>.jsthe page
  • The code holds what things do:
    • the painters (backdrop.js, trees.js, lake.js)
    • the drawers for fish and bugs (creatures.js)
    • the effects (effects.js and their rules in garden.css)
    • the rules (when fish bite, when a gift comes)
  • Changing one of those changes everything that uses it.
  • A content addition within an existing schema usually reuses that code.
  • New rendering or activity rules need their own implementation and tests.

Prerequisites ​

  • You finished Set up a development environment and run the app.
  • pnpm test passes.
  • To see the result without the app, use the isolated browser fixtures in scripts/visual-audit.mjs.
  • Native E2E and the normal screenshot script launch the real app.

Steps ​

Add an album entry: the checklist ​

Every album book is a list in src/content/catalog.json; its kinds are named by the key in NAME_KEYS (src/yard/catalog.js):

BookListName keyDrawing comes fromIts own rules
Flowersflowersgarden.kind_<id>src/art/collection.json or a flower SVGEach season grows as many flowers as the others; add one per season (Add a flower)
Aquatic life, Bugsfish, bugscatch.fish_<id>, catch.bug_<id>src/art/collection.jsonAdd a fish or a bug
Giftsgiftsdecor.kind_<id>, decor.visit_<id>a gift SVG or src/art/collection.jsonAt the end of the list, before the winter lights' gifts (Add a gift)
Treestreestree.<id>assets/discovery/ART-SOURCES.jsonThree stages and seasonal art (Planted trees)
Keepsakestreasurestreasure.<id>src/art/collection.jsonrarity, and length in cm, which sizes it out of the album; the drawing stands on the bottom of its box
Footprints, Spring shootstracks, shootstrack.<id>, shoot.<id>their own SVGsFootprints, Spring shoots
  1. Add the entry to its list, and its name to all four string tables (ko, en, ja, zh-hans). Friends read the same names when they talk about the yard (src-tauri/src/chat/today.rs); its test fails while one is missing.
  2. Keep the painted sheet in assets/art/ with its prompt and provenance (assets/sources/<date>/accepted-art.json), record its crop, then run pnpm run art:pack. It makes the wrappers, trims the sheets, and makes the shipped WebP and the album card previews. Packing again with nothing new changes nothing.
  3. Update the words that count the album. tests/album-copy.test.mjs lists each sentence that holds a number (the README, the guide in every language, src-tauri/src/chat/guide.rs), and fails until it matches the catalogue. Add the new kind's name to any list the guide gives, such as the flowers by season or the trees you can plant.
  4. Add a line under ## [Unreleased] in CHANGELOG.md.
  5. Run the checks in Verification.
  • The landing and the site's album page count from the catalogue; they need no change.
  • The backend keeps at most KINDS_MAX kinds a book (pets/album.rs); a test keeps every book under half of it.
  • A new book is one more row in NAME_KEYS, an entry in the album's BOOKS (src/panel/album.js), a field in Album (pets/album.rs), and its line in the content test of pets/content.rs.

Add a fish or a bug ​

  1. Add an entry to fish or bugs in src/content/catalog.json. Copy a close one and change:

    FieldForMeaning
    idbothLowercase and _
    seasons, periodsbothWhen it can bite or fly
    weightbothHow often, among those that can bite or fly then; a bug's is a whole number (the backend reads it as one)
    sizefish[shortest, longest] in cm; the backend refuses a longer catch
    rainfishMore likely in rain (a multiplier)
    rainbugtrue for a ground kind (beetle or cricket) that also comes out in rain, mornings and middays outside winter; in rain only these come (wildlifeGroup in catalog.js)
    kindbugbutterfly, dragonfly, firefly, beetle or cricket
    lengthbugIts length in cm as drawn (a butterfly's or a dragonfly's wingspan); it sizes the bug out of the album (finds out)
    lookbothThe colours the drawer paints it with; each drawer's fields are in creatures.js. tests/look-alikes.test.mjs fails when two bugs of one kind and about one size share every colour and marking
    look.sizebugIts size in the yard against others of its kind (1 when absent), in its art and in the plain drawing before the art loads; a small flier such as the damselfly is drawn smaller than the dragonfly beside it
    look.blinkfireflyIts flash in the yard: ms between flashes (2100 when absent, 0 for a steady light). tests/look-alikes.test.mjs keeps every two fireflies apart by rhythm or size
  2. To draw it yourself instead, add "art": "fish/<id>.svg" and put the drawing there (see "Drawings" below).

  3. Add its name to every string table: catch.fish_<id> or catch.bug_<id>.

  • The new fish or bug then shows in the album and bites or flies in its seasons and hours.
  • The backend counts it.

Add a flower ​

  1. Add an entry to flowers with an id and:

    FieldMeaning
    seasonThe season whose seeds grow into it
    artflowers/<id>.svg
    colorspetal, petal-hi, petal-lo, heart. The drawing paints with var(--petal) and so on, so the same drawing can come in other colours
    weight (optional)How often seeds of its season grow it, among that season's flowers; a whole number, 1 if left out
    event (optional)An event's id: only seeds planted while the yard shows that event grow it (seasonFlowers in growth.js). It does not count towards its season's everyday flowers, and the album marks it Rare
    stature (optional)How much taller than others it stands once grown
    foot (optional)Where the stem ends, as a share of the drawing's height from its top, when that is above the drawing's edge; outdoors and on the desktop the flower in bloom stands there. 1 if left out
    patch (optional)A patch of the flower drawn as one picture: art (flowers/patch-<id>.svg), size in catalogue units and foot. Outdoors and on the desktop the flower blooms as this patch unless the person picks One bloom in its menu; in the workshop it stays one bloom in a pot
  2. Draw it in src/art/flowers/<id>.svg. The garden's stages before the bloom are shared (src/art/plants/).

  3. Add garden.kind_<id> to every string table.

  • Seeds planted in a season grow one of that season's flowers at random (flowerFor in src/yard/growth.js).
  • weight makes a flower more likely.
  • The backend accepts only flowers in the catalogue.

Add a gift ​

  1. Add an entry to the end of gifts, or, for an event's gift, just before the winter lights' block, which stays last (tests/content.test.mjs). The first gifts arrive in list order, and a friend's memento is picked from the first 16 everyday gifts (MEMENTO_KINDS in pets/garden.rs), so a gift added in between would change mementos already given.

    FieldMeaning
    artdecor/<id>.svg
    flatTrue if it lies on the ground under plants and friends, like the pond
    stand"on" if friends stand on it, like the bench. Without it, friends stand beside it
    effectsSee below
    size[width, height] in catalogue units, in the drawing's shape. Usually its SVG view box; furniture may need a different footprint. The desktop draws the gift at this size too (gift_size in pets/content.rs)
    eventAn event's id. The gift comes only during that event. Several gifts of one event come in catalogue order, one each time a gift is due
    shown"christmas": shows in the yard and on the desktop from November 15 to January 7, and is hidden with its state kept otherwise, unless its seasons show it. Put away, it waits in the album (boxed), and its card sets it out again. The windows are SHOWN in src/yard/decor-shown.js
    seasonsShows while the yard shows one of these seasons; never in a place without seasons (seasonalEffects: false, the garden workshop). The season the yard shows is yardSeason in src/yard/decor-shown.js. A kind with both shown and seasons shows when either says so: the Christmas gifts show from November 15 to January 7 and in any winter yard (why)
    builttrue: never brought by a friend; it comes from building it (the snowman)
    ballThe drawing a built kind is rolled from
    stack[base ball width ÷ box width, base ball bottom ÷ box height]
    dress[{id, art, at: [x, y, w]}], in drawing order; at is the centre and width as fractions of the box, and the backend reads only the ids
    footWhere the drawing ends, as a share of its box's height from the top, when its lowest pixels are above the box's edge; the gift stands there, in the yard and on the desktop (gift_foot in pets/content.rs). 1 if left out
    shade[width, height, y, x?] of the contact shadow it stands on, as fractions of its box: centred where the drawing ends (foot), at least as wide as its base; x only when the base is off the middle (src/yard/decor.js). Every gift has one but those drawn as ground (the pond, the stepping stones)
    feetFurniture on spread legs seen at an angle (the bench, the swing): [[x, y, width]] of each leg's tip and the leg's width, as fractions of its box. Each gets a small dark shadow, and shade becomes the wide soft one under them all, so it holds every foot; the front foot is at foot
    hooksWhere ornaments hang on this drawing, as fractions of its box; only xmas_tree has them, and ORNAMENT_HOOKS in garden.rs is their count
    baublesWhere the drawing's painted baubles are, [x, y, width] like a hook; only xmas_tree and its night have them. tests/content.test.mjs keeps each hook on a painted bauble or clear of them all
    nightThe gift's Christmas night look; only xmas_tree has one. Read by src/yard/christmas-night.js (see below); its hooks name the same places on the grand tree
    • At most four kinds use shown or seasons.
    • A built kind is never set out from the album nor sent to the desktop, and putting it away removes it.
    • What can hang and where: flowers, trees, gifts and keepsakes found in the album. The rule is hang_ornament in garden.rs and src/yard/ornaments.js.

    night holds:

    KeyMeaning
    artThe grand drawing, standing on the same foot point as the gift's own
    star, bulbsFractions of that drawing's box: where the star swells, and where single bulbs glint
    sleighA drawing shown as a mirrored silhouette over the moon
    guestsGift kinds that must also be out; they look up in this order
    • It plays in a winter yard, at evening or night, while it snows, on any date.
    • It plays each time that night comes together while the yard is seen; a restart the same night shows it grand without the change. A night runs until 05:00.
    • The desktop draws the same grand look (src/yard/grand-tree.js, worn.css) while the yard says it stands grand (decorNight).
    • Hidden kinds still count toward DECOR_MAX.
  2. Draw it in src/art/decor/<id>.svg.

    • Preserve the drawing's aspect ratio.
    • Furniture and friends share the same yard zoom, independent of display density. Do not multiply layout sizes by devicePixelRatio.
  3. Add decor.kind_<id> (its name) and decor.visit_<id> (a list of things friends say when they visit it) to every string table.

Let an album book's finds come out ​

A fish, a bug or a treasure comes out of its album card on its own: a kind with no drawing of its own that holds one find, set out as a gift is (design).

  1. Add an entry to findsOut in src/content/catalog.json, with a gift's size and foot but no art or shade, and:

    KeyMeaning
    holdsThe album's book it holds from, as the album names it: fish, bug, treasure or track. One kind per book (find_out_for in pets/content.rs)
    listThe catalogue list its finds are in (fish, bugs, treasures); they are looked up and named from it (src/yard/find-out.js)
    poke (optional)How its finds answer a click on the desktop, when not by their own poke or, for a bug, by its kind: a motion src/overlay/overlay.css draws, such as swim or twinkle
    slotsWhere the find is drawn, one [x, y, width, height] as shares of its box
    growIts size by the find's length: [[cm, scale], [cm, scale]], the shortest and longest ends of a log scale over its box. A fish's length is its longest size, anything else's its length; tests/finds-come-alive.test.mjs checks every find has one. The page (findScale) and the desktop (find_scale in pets/content.rs) read it alike
  2. Point its album book's action in src/panel/album.js at findButtons (src/panel/album-actions.js), and add its book to holds in pets/content.rs and take_out_find in pets/garden.rs.

  3. Add decor.visit_<id> to every string table: what friends say when they visit it. A find out is named for the find, so it needs no decor.kind_<id>.

Drawings ​

Collection art:

  • Current collection art uses generated transparent atlases and SVG crop wrappers.
  • src/art/collection.json records each specimen's atlas, reviewed crop and display size.
  • A firefly also has yard: a crop of the bug alone inside its album crop. The yard draws it small under the firefly's light (ambient-art.js); the album keeps the full crop.
  • scripts/pack-collection.mjs reproduces each wrapper. A keepsake's drawing sits on the bottom of its box, so it stands on the ground.
  • Both packers clear what no drawing cuts from a sheet a keepsake comes from (scripts/sheet-trim-lib.mjs); run pnpm run assets:optimize on it afterwards, and the next pack keeps it as long as its pixels are the same.
  • Keep the PNG atlas in assets/art/ with its prompts and provenance, then run pnpm run assets:webp; the wrapper's <image> names the .webp copy in src/art/ (shipped WebP).
  • Measure each crop rather than assuming equally spaced generated cells.
  • Review the whole body, the alpha, the isolation from neighbouring cells and the real album and yard size.
  • See assets/art/COLLECTION.md and the related specimen and atlas tests.
  • The original vector and procedural drawings stay as fallback and reference material.

Vector drawings:

  • One SVG per file, with a viewBox from 0 0.
    • The view box is the drawing's size in the yard.
    • A plant's 40 × 60 units stand 50 × 75 pixels in a full-size yard.
    • A gift's unit is 1.05 pixels.
    • Its foot is at the bottom centre.
  • Paint with the yard's colours (style="fill:var(--leaf)") so the season, the light and the weather tint the drawing. The names drawings use now:
    • --leaf, --leaf-hi, --leaf-lo, --pine, --pine-lo, --trunk, --blade, --rock, --rock-hi, --soil, --soil-hi, --stem, --wood, --wood-hi, --wood-lo, --iron, --sky-a
    • --sky-m: a water surface mirroring the sky
    • --lamp: warm from evening on
    • --bird: 1 by day, 0 at night and in rain or snow; use it as an opacity
    • a flower's --petal, --petal-hi, --petal-lo, --heart
  • A fixed colour (fill:#c45c4a) stays the same in every light.
  • The shipped drawings now wrap painted atlases (an <image> of a WebP cell) and use none of these names.
  • The names are still how a vector drawing takes on the yard's light.
  • Move a drawing the content no longer names to assets/sources/, out of src/art/, which ships inside the app.
  • Nothing in a drawing runs. Scripts and on… attributes are stripped when it loads, and a test refuses them.

Give a gift an effect ​

Name it in the gift's effects. The existing effects:

EffectWhat it does
glowLit from evening on: a warm pool of light around it, and it is not dimmed at night
chimeRings when a friend visits it (the chime sound in soundmix.js)
  • A lit gift's halo is round the top of the middle of its drawing. Where its light is elsewhere (a lamp hung to one side, a cart's lantern), give light: [x, y] as shares of the drawing's width and height.

To make a new effect:

  1. Add an entry to EFFECTS in src/yard/effects.js, shaped { name: { layer, visited } }.
    • layer: a function of the gift's light (or nothing) that returns markup drawn with the gift.
    • visited: what happens when a friend visits it.
    • Both are optional; leave both out if the effect is only a rule.
  2. Put its rules under "Effects" in src/styles/garden.css, selecting .decor[data-effects~="<name>"].
  • Every gift that names the effect gets it.

Change the scenery ​

  • The normal backdrop comes from src/content/worlds.json and accepted raster environments.
  • For geometry, lighting and capabilities, follow Add a place.
  • src/content/yard.json describes the procedural fallback for loading and errors, and the shared composition:
KeyWhat it describes
curvesThe hills, as cubic curves in fractions of the yard (x across, y down): a start point, then two control points and an end point for each piece
fieldTopWhere the field friends stand on starts while the painted land stands in for the picture (a fraction of the yard's height)
lakeWhere the lake starts and ends across (from, to), its far shore's height at the middle (top) and the curve that hides its near half (under)
layersWhat is painted, from back to front. Each names its painter (paint) and that painter's settings
  • lake: the far shore is half an oval whose ends sink behind the under curve, so the water shows between the two points where they cross.
  • The painter and fishing share this shape (layout.js lakeShape).
  • layers:
    • seed makes a layer come out the same each time. Change it to get another arrangement of the same parts.
    • when paints it only in a weather, a season or a time of day ("snow", "winter", "night", or "bloomy" for when flowers are out).
  • The painters and what each takes are in src/yard/backdrop.js (PAINTERS).
  • Things that stand on the field (standing layer, things) are tree, maple, bush, rock and cedar (THINGS).
  • Colours in a layer are the palette's names ("back-hi"), or { "mix": [a, b, amount] }, { "shade": [a, amount] }, { "light": [a, amount] }.
  • To paint something new, add a painter to PAINTERS (or a thing to THINGS) and use it from yard.json.

Add a seasonal event ​

  1. Add an entry to src/content/events.json with id, from and to, and what it brings.

    • from, to: month-day ("04-01"), as seen north of the equator.
    • South of the equator, the event comes six months later unless "fixed": true (as for the winter lights and the new year).
    • fixed also means the event's gift is asked for whatever season the yard shows, in every place.
    • "south": {"from": "MM-DD", "to": "MM-DD"} gives an event dates of its own south of the equator, for when six months on would fall under a fixed event (the rainy season: January 8 to 19). The page (events.js) and the backend (content.rs) both read it; add its boundaries to tests/fixtures/event-dates.json.
    • An event's gifts are the catalogue kinds with its event, in catalogue order. Add them to catalog.json with "event": "<id>"; they are not everyday gifts.
    FieldWhat it brings
    sceneThe scene that calls it up on any day when the season is picked by hand: seasons, and periods and weathers when it asks for them (values from the scene picker). Its look, boost, fish and bugs come then; its gifts keep to from–to
    boostMore small life while it is on: petals, butterflies, fireflies (each a multiplier; fireflies stay at 8 or fewer, fireflyCount in scene.js)
    looksNames of looks; each is a class on the yard (look-<name>) whose rules go in src/styles/scenery.css. The harvest moon's fullmoon makes the moon big and golden on the nights around the event's first real full moon, when sky.js also sets moon-full
    artA drawing for its card, if it has no gift (the new year's sunrise)
    rainThe share of Auto's weather blocks that rain while it is on (the rainy season's 0.55); the season's own share otherwise (autoWeather in scene.js)
    pilesLeaf piles on the grass while the yard shows it: art, size in yard units and count (leaf-piles.js). A friend jumps into one now and then, or when the person clicks it
  2. A fish, a bug or a flower that comes only then: add it to the catalogue with "event": "<id>".

  3. Something painted only then: give a layer in yard.json "when": "<id>" (the winter lights' fairyLights).

  4. Add event.<id>.name, event.<id>.about (the card's words), event.<id>.gift (the card's line about its gifts, shown only on its dates) and event.<id>.lines (what friends say) to every string table.

  • While the event is on, the scene label shows it.
  • The first time each year, a card says it has begun.
  • Friends talk about it.

Add an animal's footprints ​

  1. Add an entry to tracks in src/content/catalog.json, copying a close one:

    FieldMeaning
    idLowercase and _
    printprints/<id>.svg, the mark laid in the snow and shown in the album
    tailtracks/tail_<id>.svg, the tail that peeks out at the bush
    birdtrue for a bird: it flutters off instead of whisking away
    gait.grouptrue for a bounder whose prints fall in one line; false for a walker whose prints alternate sides
    gait.stepDistance between prints, before the yard's zoom
    gait.sideHow far a walker's prints sit off the line; ignored when group is true
    gait.sizeSize of one print
    findsKeepsake ids the animal likes to leave in the dig
    lengthThe animal's length in cm; it sizes the animal out of the album
  2. Put the drawings in src/art/prints/ and src/art/tracks/. trailArt lists the shared bush, twigs and puff drawings.

  3. Add the animal's name to every string table.

  • A print is a 24-unit vector mark with fill="currentColor", so the snow shade colours it.
  • A tail is a rear-only crop, so the animal is never whole.
  • finds weigh TRAIL_LEAN (pets/content.rs) times more in a trail dig than in an ordinary one.
  • The album's Footprints book lists every track.
  • tests/print-art.test.mjs and the content tests check the references.

Change the colours of a season or a time of day ​

  • Change the custom properties in src/styles/scenery.css, per season, time of day and weather.
  • The painter and every drawing read them.

Verification ​

bash
pnpm test
pnpm run lint
pnpm run test:e2e
  • tests/content.test.mjs says what is missing: a name or a line in a language, a drawing file, an effect, a painter, a curve, a colour, an event's words or gift, or a look's rules.
  • tests/events.test.mjs checks when each event is on, north and south of the equator.
    • Its days are in tests/fixtures/event-dates.json.
    • The backend's content.rs test reads the same file, so the page and the backend agree on an event's dates.
    • When you add an event or change its dates, add cases there for the days around its first and last day, north and south.
  • tests/lake.test.mjs checks that, when the composition's lake changes (lake or the curve it names in under), the water still shows between the far shore and the hill in front at several yard sizes.
  • The backend's content::tests checks the catalogue it built in.
  • To see an event outside its dates, set the date in the screenshot harness or the e2e run.
  • In the app, the system clock decides.
  • Look at it: build and run the app as in getting started, then set the time of day and weather from the scene label to see the new thing in each light.

Troubleshooting ​

SymptomCauseFix
A new gift never comesNo one did anything with a friend today, the everyday wait (every other day) is not over, or not every earlier gift has come yet. A full yard (DECOR_MAX in pets/garden.rs) does not stop gifts: they wait in the album (boxed), one of each kindPlay with a friend; gifts come in the catalogue's order, every other day (gifts from friends)
A new fish is refused (error.bad_request)The backend was built before the catalogue changedBuild the app again: the backend builds the catalogue in
A drawing does not showThe path in art does not match the file, or the file has no viewBoxtests/content.test.mjs names the file
A drawing is black or a single colourIt paints with a colour name the yard does not setUse the names listed under "Drawings"

Keep discovery information accurate ​

Shared pools:

  • The website's discovery guide reads the app's catalogue and locale strings.
  • eligibleKinds, fishWeight, relativeChances and bugChances in src/yard/catalog.js define the shared pools.
  • bugChances(season, period, weather, event, kinds) takes a catalogue from the guide.
  • At runtime it defaults to the loaded app catalogue.

Bug odds:

  • Percentages describe one spawned individual.
  • In daylight, the families mix as butterflies 55%, dragonflies 25%, beetles 10% and crickets 10%.
  • The mix renormalizes when a family is unavailable.
  • Species weights then apply within each family.
  • Do not normalize both families to 100% independently.
  • Clear autumn evenings and nights have only crickets: a couple at a time, from the bugs of kind cricket whose periods include that hour.
  • Rain, snow and unavailable seasons return an empty bug pool.
  • Each family holds a fixed share, so a family with many species in one season dilutes each of them; keep at most about two ordinary beetles or crickets in a season, or an ordinary one falls under 5% (tests/collection-goal.test.mjs).
  • A fish's or a bug's explicit rarity: "rare" gives it the album's rare badge.
  • Anything with an event (fish, bug or gift) is rare in the album, and its hint gives the event's dates.
  • Over a year, a rare fish has to bite less often than every ordinary one (tests/collection-goal.test.mjs); a fish that comes in few seasons or hours needs a higher weight.

Fish odds:

  • Percentages are species odds for a fish that has landed, separate from the chance of landing one.
  • Clicking water starts manual fishing.
  • Play's Fish action uses a 75% automatic landing chance.
  • An idle friend at bond level 3 may start fishing on its own every 12–25 minutes, while the visible yard has no competing activity.
  • Species odds do not promise a waiting time.

Guide labels:

LabelChance
“often”At least 20%
“sometimes”5% to below 20%
“rarely”Below 5%
  • Probability labels in the guide describe only the selected context.
  • Selecting an event assumes it is active and shows the species odds during it, not the chance that the festival happens.
  • Event dates and hemisphere rules are in events.json.
  • Event gifts stay tied to the calendar.
  • Gifts follow a deterministic sequence, not a loot probability.
  • The cap of 12 placed decorations pauses deliveries.
  • Removing a decoration keeps its album entry, so every gift can be collected over time.

Reachability:

  • Keep every album entry reachable across valid contexts.
  • tests/discovery-guide.test.mjs enumerates fish and bug pools across seasons, times and events.
  • It also checks that flower, tree and keepsake chances are positive, and that each event gift maps to its calendar dates.
  • When you add an appearance rule, update the shared helper and tests before the guide.
  • Do not retune gameplay so that every collection can be finished in one sitting.

Planted trees and discoveries ​

Trees:

  • Trees in catalog.json have an ID, three stages (seedling, young, mature), an optional seasonArt map for mature art, and a footprint root ellipse in authored pixels.
  • An optional stature sets how tall a grown tree of the kind stands against the stage's size (treeSizes), 1 by default: about (height in metres / 10) ** 0.3, so a metasequoia is 1.45 and a lilac 0.75. A young tree takes half of it, and a seedling none. The yard (catalog.js treeSize) and the desktop (content.rs tree_size) read it.
  • New species need a tree.<id> string in every language.
  • Drawings use a bottom-centre anchor and share the yard zoom.
  • A tree's field coordinate stays fixed through growth and season changes.
  • planted-trees.js owns these saved trees.
  • trees.js is still the procedural scenery painter.

Tree moments:

  • A tree names its grown moments with an optional moments list, at most one per season and one of each kind; the fields table is in the tree moments design.
  • Every moment names its season and may name weather (["clear"] when absent).
  • kind is visit (a friend walks over to look up at the tree, src/yard/tree-moments.js) or harvest (fallen fruit, src/yard/fallen-fruit.js); MOMENT_KINDS in tree-moment-rules.js lists them.
  • A harvest moment gives art and size (the fallen fruit, packed like other discovery art) and title, a string key for its button's title.
  • lines names string keys of friend lines in every language: say for a visit (three or four lines), pick (three or four) and first (two or three) for a harvest.
  • tests/content.test.mjs checks the kinds, seasons and sizes, the drawing, the title and the lines; the backend ignores the field.

Keepsakes:

  • Keepsakes use the treasures list, an art path and rarity (common or uncommon), plus treasure.<id> in every language.
  • Each tier uses the item weights within that tier.
  • Tier odds and timing limits are in pets/discovery.rs, and the backend exposes them.
  • The page fallback and the website guide share core/limits.js.
  • Its test compares those values with Rust.

Spring shoots:

  • Spring shoots use the shoots list: id, season, art and size, plus shoot.<id> in every language.
  • The backend's is_shoot and album.shoots read the same list; no string may say how to pick or eat one (tests/i18n.test.mjs).

Affinity:

  • Trees and keepsakes may include affinity: { seasons: ["spring"], weather: ["rain"], places: ["woodland"] }.
  • Each matching axis doubles the base weight within its own reward category.
  • Items that do not match stay available.
  • Built-in place preferences use woodland, courtyard or lakeside.
  • Imported outdoor scenes keep neutral place weights and still use season and weather preferences.
  • Write readable habitat clues in the existing four-language strings instead of repeating prose for each species.
  • The page and site share src/yard/discovery-rewards.js.
  • The backend allows one uncommon reward per rolling 24 hours, across all friends and places, based on saved dig history.
  • During that window, the 3% uncommon share becomes common keepsakes.
  • See the environmental discovery contract.

Places and ground:

  • A tree belongs to its world ID.
  • Existing flowers and decorations stay shared across places.
  • The ground profile is a local geometry snapshot of the current floor, the projected water and the placed roots and props. It is not inferred from the image.
  • The optional capabilities.soil of an imported background controls digging and tree planting, independently of sky transparency.
  • The creator skill and the import validator keep it.

Ground bugs:

  • Beetles crawl and crickets hop near the floor.
  • Keep their specimen heads pointing up in the atlas so heading rotation stays correct.
  • They share the clear-daytime appearance rules but stay on the ground.
  • Crickets also come out on clear autumn evenings and nights.
  • kind sets how a bug moves, not its family name: a mantis crawls as a beetle.
  • The native album shows ground habitat clues.
  • ambient-art.js loads each referenced bug atlas once and invalidates its canvas when decoding finishes.
  • Exact probabilities stay internal.
  • The album and the guide that players see show conditions, a rough frequency and waiting status.

Free and open source under the MIT license. Not affiliated with OpenAI; ChatGPT and Codex are trademarks of OpenAI.