Skip to content

feat: give every CustomCrops crop the same death chance - #85

Merged
XxFran10xX merged 1 commit into
mainfrom
balance/equal-crop-death-rates
Oct 23, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
balance/equal-crop-death-rates

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Every CustomCrops crop now has a 12% chance to die per grow at fertility 78, the median province fertility under the 671 crops planted on Main (scanned from TFMC_Map/customcrops/*.mcc on 2026-10-23).
  • The per-update random value is solved per crop from its stage count and its Cooking affection: p = g(1-s) / (s + g(1-s)), with g = 0.78^affection and s = 0.88^(1/k), where k is the number of stages that roll death. Stages, drops, growth conditions and affection are unchanged.
  • The 12 crops that regrow from stage 2 after harvest (apple, banana, cactusfruit, cherry, grape, lemon, lime, olive, orange, peach, pistachio, plum) now only roll death from stage 2 up (point-more-than: 1; checked in CustomCrops 3.6.56 as a strict >). Both the first grow and every regrowth then carry 12%. Strawberry regrows from stage 0 and keeps the normal rule.
  • Main currently runs hand-tuned rates (2.5–14.4% per update, never committed). Dev, Tutorial and this repo run a flat 5%. This replaces both.

CustomCrops checks death before growth on every crop update while the crop is unripe, so slower growth (low fertility or dry soil) means more death rolls. Affection is kept on purpose. Crops end up equal on good land and only drift apart on poor land:

Crop Stages Rule Affection Per update F100 F78 F50 F25
apple 5 stage 2+ 0.60 3.61% 10.4% 12.0% 15.3% 21.9%
banana 4 stage 2+ 0.40 5.64% 11.0% 12.0% 14.1% 18.0%
basil 3 all 0.50 3.70% 10.7% 12.0% 14.7% 19.9%
blackpepper 3 all 0.70 3.53% 10.2% 12.0% 15.9% 24.2%
cactusfruit 4 stage 2+ 0.12 6.02% 11.7% 12.0% 12.6% 13.6%
cherry 4 stage 2+ 0.60 5.38% 10.5% 12.0% 15.2% 21.8%
cinnamon 4 all 0.65 2.69% 10.3% 12.0% 15.6% 23.2%
corn 3 all 0.80 3.45% 10.0% 12.0% 16.6% 26.5%
cucumber 3 all 0.65 3.57% 10.3% 12.0% 15.6% 23.0%
garlic 3 all 0.40 3.79% 10.9% 12.0% 14.1% 18.0%
grape 5 stage 2+ 0.55 3.66% 10.6% 12.0% 15.0% 20.9%
lemon / lime / orange 4 stage 2+ 0.55 5.44% 10.6% 12.0% 14.9% 20.8%
lettuce 2 all 0.70 5.26% 10.2% 12.0% 15.9% 23.9%
mustard 4 all 0.55 2.75% 10.6% 12.0% 15.0% 21.0%
nutmeg 4 all 0.70 2.66% 10.2% 12.0% 15.9% 24.3%
olive 4 stage 2+ 0.30 5.77% 11.2% 12.0% 13.5% 16.3%
onion 2 all 0.35 5.71% 11.1% 12.0% 13.8% 17.1%
peach 4 stage 2+ 0.60 5.38% 10.5% 12.0% 15.2% 21.8%
pineapple 3 all 0.45 3.75% 10.8% 12.0% 14.4% 19.0%
pistachio 3 stage 2+ 0.35 11.11% 11.1% 12.0% 13.7% 16.9%
plum 5 stage 2+ 0.60 3.61% 10.4% 12.0% 15.3% 21.9%
rhubarb 2 all 0.50 5.51% 10.7% 12.0% 14.7% 19.8%
rice 3 all 0.85 3.40% 9.9% 12.0% 16.9% 27.7%
spiceleaf 2 all 0.55 5.44% 10.6% 12.0% 14.9% 20.8%
strawberry 2 all 0.65 5.32% 10.4% 12.0% 15.5% 22.8%
tomato 3 all 0.75 3.49% 10.1% 12.0% 16.2% 25.3%
vanilla 4 all 0.75 2.62% 10.1% 12.0% 16.2% 25.4%
yeast 3 all 0.25 3.93% 11.3% 12.0% 13.3% 15.5%

Figures assume natural growth, soil kept wet and the fertility gate on. Bone meal can skip a stage, which also skips that stage's death roll. Trade-off: a regrowing crop at stage 0–1 no longer dies, so on fertility 0 or dry soil it waits instead of withering.

Documentation impact

Contract

  • Affected behavior: CustomCrops death-conditions only. Drops, stages, grow conditions and Cooking crops.yml affection are unchanged.
  • Tests run (mvn test, or why not): not run. Config-only change outside src/. Every file was diffed against Main's live copy; the only differences are the death-rule lines.
  • Player wiki (ProvinceSystem /wiki/cooking or related pages): no change. It does not mention crop death.

Notes

  • Applies via the plugins/CustomCrops/contents/crops/ files on each server, not the Cooking jar. Rollout: Dev first, then Main as an agreed live change.

🤖 Generated with Claude Code

Each crop now has a 12% chance to die per grow at fertility 78, the
median province fertility under the 671 crops planted on Main. The
per-update rate is solved from each crop's stage count and Cooking
affection, so stage counts, drops and affection stay unchanged.

Crops that regrow from stage 2 after harvest only roll death from
stage 2 up (point-more-than 1), so each regrowth also carries 12%.
Strawberry regrows from stage 0 and keeps the normal rule.

Main ran hand-tuned rates (2.5-14.4% per update) that were never
committed; this replaces both those and the flat 5% kept here.

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

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 28af30ad-b2f7-44ba-82a5-35503e806428
📥 Commits

Reviewing files that changed from the base of the PR and between 728599e and 8d27081.

📒 Files selected for processing: 30
  • CustomCrops/contents/crops/apple.yml
  • CustomCrops/contents/crops/banana.yml
  • CustomCrops/contents/crops/basil.yml
  • CustomCrops/contents/crops/blackpepper.yml
  • CustomCrops/contents/crops/cactusfruit.yml
  • CustomCrops/contents/crops/cherry.yml
  • CustomCrops/contents/crops/cinnamon.yml
  • CustomCrops/contents/crops/corn.yml
  • CustomCrops/contents/crops/cucumber.yml
  • CustomCrops/contents/crops/garlic.yml
  • CustomCrops/contents/crops/grape.yml
  • CustomCrops/contents/crops/lemon.yml
  • CustomCrops/contents/crops/lettuce.yml
  • CustomCrops/contents/crops/lime.yml
  • CustomCrops/contents/crops/mustard.yml
  • CustomCrops/contents/crops/nutmeg.yml
  • CustomCrops/contents/crops/olive.yml
  • CustomCrops/contents/crops/onion.yml
  • CustomCrops/contents/crops/orange.yml
  • CustomCrops/contents/crops/peach.yml
  • CustomCrops/contents/crops/pineapple.yml
  • CustomCrops/contents/crops/pistachio.yml
  • CustomCrops/contents/crops/plum.yml
  • CustomCrops/contents/crops/rhubarb.yml
  • CustomCrops/contents/crops/rice.yml
  • CustomCrops/contents/crops/spiceleaf.yml
  • CustomCrops/contents/crops/strawberry.yml
  • CustomCrops/contents/crops/tomato.yml
  • CustomCrops/contents/crops/vanilla.yml
  • CustomCrops/contents/crops/yeast.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Gameplay Changes
    • Adjusted how likely crops are to die without water, with the chance now varying by crop.
    • For some crops, added a minimum growth-point requirement before dehydration can cause death.

Thirty crop definitions change the random threshold in their no_water death condition. Twelve definitions also require the crop point value to be greater than 1.

Changes: Crop no-water conditions

Layer / File(s) Summary
Update crop no-water conditions
CustomCrops/contents/crops/*.yml
Each crop definition changes its no_water random threshold from 0.05 to a crop-specific value. Twelve definitions also add a point-greater-than-1 condition and retain their existing upper point limit.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: carolinebondhus

Merge Risk: ⚪ Minimal · up to 8d270

No actionable merge-blocking issue was established in the reviewed crop configuration changes.

- [ ] 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:M 30-99 effective changed lines (tests excluded in mixed PRs). label Oct 22, 2026
@XxFran10xX

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@XxFran10xX
XxFran10xX merged commit fc18d4b into main Oct 23, 2026
3 checks passed
@XxFran10xX
XxFran10xX deleted the balance/equal-crop-death-rates branch October 23, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant