For the complete documentation index, see llms.txt. This page is also available as Markdown.

Soil System

Introduction

MaskyCrops adds an optional soil health system on top of CustomCrops. Its goal is to reward crop rotation and land recovery without replacing the standard CustomCrops systems.

Enable this on settings

The system is fully optional. With soil-enabled: false, all existing CustomCrops gameplay works exactly as before.

settings.yml

settings:
  soil-enabled: true

Water and Hydration

Water management remains the responsibility of CustomCrops.

  • The pots retain their water capacity, water bar, watering can, rain, and nearby water absorption.

  • MaskyCrops does not fill or consume water from the pot.

  • A crop still requires a valid pot and the normal watering conditions configured in CustomCrops.

The soil system is an additional layer: water and nutrients are handled separately.

Game Cycle

  1. A player plants a CustomCrops crop in a pot.

  2. If that ID is included in soils.<id>.crops, MaskyCrops creates or restores the plot's state.

  3. During growth, soil fertility and chemistry determine how many growth points the crop receives.

  4. When a mature crop is harvested, the plot loses fertility and consumes/restores nutrients based on its profile.

  5. An unused plot slowly regains fertility and soil chemistry.

  6. The player can use configured fertilizers to restore the soil.

All state data is saved in H2, within plugins/MaskyCrops/database/soil.

Fertility and Growth Curve

Fertility is the general value inherited from the initial system, typically between 0 and 100

The curve is interpolated between points. For example, with a fertility level of 50, the crop achieves 65% of the required growth points before applying soil chemicals.

Soil Chemistry

Each plot stores the following values:

Value
Current function

Nitrogen (N)

It affects the rate of growth.

Phosphorus (P)

It limits the effective absorption of nutrients.

Potassium (K)

It is saved and remains available for performance/quality analysis.

Organic matter

It stabilizes the growth multiplier.

pH

It limits absorption; each crop has an ideal pH and a certain tolerance range.

Compaction

It reduces growth efficiency.

The N/P/K, organic matter, and compaction values use a scale of 0–100. The pH uses a scale of 0–14

Currently, the chemical growth multiplier combines nitrogen, phosphorus, pH, organic matter, and compaction. The system also provides a yield multiplier based on P/K, but it does not yet automatically modify MythicMobs drops; a specific harvest/drop hook is required for that.

Crop rotation

The crop rotation bonus requires:

  • a family different from the last crop harvested, and

  • a different root depth.

For example, pepper → eggplant is not a good rotation: both are nightshades. Alternating a shallow-rooted Brassica with a deep-rooted crop from another family can earn the bonus.

Legumes can restore nitrogen:

Fertilizers

Soil fertilizers are configured in fertilizers

Radius: 1 covers an area of 3×3 pots. The fertilizer increases fertility and applies the configured chemical values.

CustomCrops’ native fertilizers—such as quality_1, yield_increase_1, or speed_grow_1—remain mechanics independent of the pot. It is not recommended to register them as soil fertilizers as well, unless a dual effect is deliberately desired.

Technical note: Cooldown is loaded in seconds. It must be enforced by the fertilizer listener/manager to prevent repeated use; verify this before announcing it as an active limitation in production.

Deterioration of the pot

When fertility reaches “depleted-at,” the original pot is saved and replaced with the configured block. When it recovers to “recovered-at,” MaskyCrops restores the original pot.

If a player breaks or replaces that deteriorated block, MaskyCrops removes the status from the plot and never overwrites the player’s block.

Agricultural Governance

It is designed to transform the land-use system into a territorial system using “Lands.” The idea is to separate agriculture into two layers: a broad strategic decision and a specific, active policy

“development-philosophies” defines the agricultural philosophy of the state or nation

firts example:

This represents the long-term direction. For example, sustainable farming yields less, but it restores the soil more effectively and requires less maintenance. Industrial farming yields more, but it takes a greater toll on the soil and is more expensive to maintain.

second example

A policy has:

type
description

philosophy

the philosophy to which it belongs.

category

type of policy, such as ecological, economic, labor, or territorial.

transition-days

the time required to switch from one policy to another.

requirements

conditions for using it.

maintenance

costs or fees to maintain it.

effects

gameplay modifiers.

consequences

descriptive text for documentation or future GUI.

agricultural-governance isn't just a list of buffs. It's a framework that allows each territory to have its own agricultural identity: sustainable, industrial, specialized, communal, nomadic, etc. First, it defines the direction in which the agricultural civilization is heading, and then it defines how that strategy is being implemented on a day-to-day basis.

Configurations

Soils Configuration

Crop Profiles Configuration

Fertilizers Configuration

Agricultural Governance Configuration

Lands Integration

Enable this on settings

settings.yml

How this works?

  1. MaskyCrops detects that `settings.lands.enabled` is true and that the Lands plugin is installed.

  2. When planting, harvesting, fertilizing, or reclaiming a plot, MaskyCrops queries Lands: “Which claim does this location belong to?”

  3. If the plot is within a claim, its H2 status is grouped under that claim’s ID.

Every cache-refresh-seconds, MaskyCrops recalculates the claim’s statistics:

Placeholders

Info

%maskycrops_land_soil_health%

Shows the overall agricultural health of the claim, on a scale from 0 to 100. It combines fertility, N/P/K, organic matter, pH, compaction, and diversity.

%maskycrops_land_crop_diversity%

Shows the agricultural diversity of the claim, on a scale from 0 to 100. It increases when you harvest crops from different families, such as nightshades, brassicas, legumes, or grasses.

%maskycrops_land_average_nitrogen%

Displays the average nitrogen level for all plots recorded within the claim, on a scale from 0 to 100. A low value reduces effective crop growth.

%maskycrops_land_specialization%

Shows the predominant crop family in the claim based on the most recent recorded harvests. For example: nightshades, legumes, grasses, or “none” if there are no harvests yet.

Last updated