SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

C&N Crops

KBy KenigVovan

Simple crops breeding

C&N Crops

Description

Inspired by the Minecraft mod AgriCraft. Crops carry a genome that mutates, recombines and is selectable.

Companion content pack

C&N crops itself ships only the framework - genome, cross-breeding, weeds, mutation rules engine. New plants live in separate content packs that depend on it.

The companion mod C&N crops additionals adds:

  • Mushrooms — shade-tolerant, grow in darkness, showcase the lightSensitivity: 0 path.
  • Aurelia, Ferru, Resin cassava, Sulfur wheat — new crops with their own mutation chains and condition-gated cross-breeds.

Install cancropsadditionals alongside cancrops to get this content. Other authors can ship their own content packs the same way - plants_jsons and mutations_jsons are picked up from any mod's assets.

Genome stats

Each seed carries five inheritable stats (0–10). Each stat has a dominant and a recessive allele; the value expressed by the plant is derived from the pair via a configurable rule (statTraitLogic: MIN / MEAN / MAX, default MAX — the higher allele wins).

<table style="border-collapse: collapse; margin: 0.5em 0;"> <tbody> <tr> <td style="padding: 2px 12px 2px 0;">Gain</td> <td>Amount of drops when the crop block is harvested.</td> </tr> <tr> <td style="padding: 2px 12px 2px 0;">Growth</td> <td>Reduces hours required to reach the next growth stage.</td> </tr> <tr> <td style="padding: 2px 12px 2px 0;">Strength</td> <td>Extends harvested-drop perish time (+8% per stat level by default).</td> </tr> <tr> <td style="padding: 2px 12px 2px 0;">Resistance</td> <td>Widens the cold/heat tolerance window (&plusmn;0.4 &deg;C per level by default).</td> </tr> <tr> <td style="padding: 2px 12px 2px 0;">Fertility</td> <td>Probability of being chosen as a parent during cross-breeding.</td> </tr> </tbody> </table>

Cross-breeding &amp; mutations

Place selection sticks between two adjacent crops. Over time the sticks pick the most fertile neighbours, combine their genomes and either spawn a clone or attempt a registered mutation.

Each mutation rule lives in JSON (assets/&lt;mod&gt;/recipes/mutations_jsons/*.json) and may attach conditions that gate when the cross is allowed. A condition returns one of three results:

  • FORBID &mdash; mutation cannot happen here, overrides any FORCE.
  • PASS &mdash; soft requirement; the mutation's chance roll proceeds.
  • FORCE &mdash; perfect spot; the chance roll is skipped, the mutation triggers.

Built-in condition types: light, climate (temperature + rainfall), neighbour_block (require N copies of a block in a relative box), and biome (match against landform codes). Mods can register their own condition types.

Shade-tolerant crops

Plant JSONs accept a lightSensitivity field (0..1, default 1). Crops with 0 grow in full darkness without penalty &mdash; useful for indoor farms and underground gardens. The mushrooms from the C&amp;N crops additionals companion mod use this for cellar/cave farming.

Weeds

Crops can develop weeds that progress through stages and spread to neighbouring farmland. Higher Resistance reduces both the chance of weeds appearing and the chance of spread. Use the Hand Cultivator to clear weeds, or the Anti-weed item for a temporary protection window. The whole system is configurable (weedSpreadingActivated, weedAppearanceChance, weedSpreadChancePerStage, weedPropagationDepth, ...).

Selection workflow

Same as AgriCraft and as shown in the screenshot. Place selection sticks between mature parents; over a few in-game days you'll see new crops on the farmland - either a clone or a mutation. The sticks are consumed once the crop spawns.

Configuration highlights

  • statTraitLogic &mdash; MIN/MEAN/MAX for how allele pairs express their value.
  • activeStatMutator &mdash; strategy used for stat drift across generations: default, none, hill_climb (biased upward via statMutationUpBias), gaussian (normal noise with statMutationSigma), or reset_on_low (re-roll zeroed stats with statResetOnZeroChance).
  • statMutationChance, statMutationStep &mdash; how often and how strongly stats drift across generations.
  • crossBreedTickChance &mdash; per-tick probability that valid sticks attempt a cross-breed.
  • cloneMutations &mdash; whether sticks may also produce a pure clone of a parent.
  • seedMergeStrategy &mdash; tolower or mean for how parent stat pairs are combined into the child genome.
  • coldResistanceByStat, heatResistanceByStat, strengthFreshHoursPercentBonus &mdash; gameplay scaling factors.

Commands

    Read the full description on Vintage Story ModDB →

    Ratings & reviews

    No ratings yet

    Sign in to leave a rating or comment.