MaFi-Games / Captain-of-Industry-issues

Public issue tracker for Captain of Industry video game
21 stars 4 forks source link

Greenhouse mechanics incorrect or description misleading #797

Open SillySMS opened 1 year ago

SillySMS commented 1 year ago

Issue description

Right now, the description of the greenhouse II claims "Has 50% increased crop yield relative to the basic farm. Crops also require 25% extra water and fertility"; this is much the same for the greenhouse I, but with smaller modifiers.

People would expect this to mean "+25% fertilizer and water inputs, +50% crop outputs", but due to how it is implemented, this is only true for fertilizer at a target of 100%, and is (probably) never true for water. This means either that the description is oversimplified and incorrect, or that the current mechanics do not behave according to developer expectations.

The key issue is that modifications are applied to the crop's consumption rates rather than the building's consumption rates, and there are additional mechanics at play (natural fertility restoration, rainwater) which mean this is not a 1:1 equivalence.

Fertilizer: Tests and Analysis

Fertilizer is potentially the more egregious one. Some tests with the in-game predictions (on Sailor), an irrigated farm, a greenhouse II, and a potatoes-wheat rotation.

Unfertilized Irrigated Farm: predicted 5.1 yield/min, fertility equilibrium 65% Unfertilized Greenhouse II: predicted 6.6 yield/min, fertility equilibrium 56.3%

Irrigated Farm, 80% Fertility Target: 6.3 yield/min, fertility needed 4.5%/60s Greenhouse II, 80% Fertility Target: 9.3 yield/min, fertility needed 7.1%/60s

Irrigated Farm, 100% Fertility Target: 7.8 yield/min, fertility needed 10.5%/60s Greenhouse II, 100% Fertility Target: 9.3 yield/min, fertility needed 13.1%/60s

Irrigated Farm, 140% Fertility Target: 10.9 yield/min, fertility needed 21.3%/60s Greenhouse II, 140% Fertility Target: 16.3 yield/min, fertility needed 25.9%/60s

Without fertilizer, the greenhouse only yields +29% more crops, versus an expectation of +50%. The most egregious example of this is a soybeans-only rotation, where the irrigated farm actually yields nearly 3x more than a greenhouse II!

At the 80% target, the greenhouse consumes 58% more fertilizer than the irrigated farm. Yield is as expected, but the fertilizer input needed to get there is well above the +25% expectation. This effect is strongest when the fertility equilibrium is close to the fertility target: a soybeans-only rotation consumes only 34% more fertilizer.

The 100% target is the only point where the expectation of "+25% input" is met. This is because at this point, natural fertility restoration is exactly zero, thus there actually is a 1:1 equivalence between changing the crop values and changing the building values.

At the 140% target, the greenhouse needs just 22% more fertilizer. At this point, while the greenhouse II needs 25% more fertilizer to satisfy the crop's fertility consumption, both the farm and greenhouse need an identical amount of fertilizer to counteract natural fertility decay.

The Fix For Fertilizer

Assuming the intent was a strict 25% more inputs for 50% more output, there is a very simple fix for this. Rather than having crops consume 25% more fertility, have each unit of fertilizer restore 20% less fertility. With this, equilibrium fertility values should remain the same between irrigated farms and greenhouses, you just need 25% more fertilizer input to restore the same amount of soil fertility.

Water

While I haven't tested this, I suspect a similar problem is at play with rainwater. If an irrigated farm needs 40 water/min, and you get 20 water/min from rain, the irrigated farm will need 20 water/min from the irrigation pipe. The greenhouse II, though, needs a total of 50 water/min. Assuming both greenhouses and irrigated farms get the same amount of rainwater, the greenhouse II needs 30/min from the pipe, an increase of 50% (versus the expectation of +25% input) versus the irrigated farm.

Assuming this is the case, a similar fix can be applied: keep the soil water consumption constant, but just require 25% more from the irrigation tank to restore a unit of soil water. It should be also be equivalent if greenhouses magically collect 25% more rainwater and have 25% higher soil water capacity.

Expected behavior

Greenhouses yield +25%/+50% output for +13%/+25% inputs, as compared to an irrigated farm. Actual behavior: Variable, with the most common outcome being more inputs than expected.

Reproduction steps

Put down a greenhouse and an irrigated farm, give them the same crop rotation, and observe how fertilizer inputs change with the fertility target.

A similar effect with water is untested, but seems likely.

Game version

v0.4.11

Attachments

No response

SillySMS commented 1 year ago

For now, it would help to know if developer intent is a strict 1.25x fertilizer for 1.5x crop, or if the current more complicated behavior is intended.

Partially for the edification of other players, it may help to have another explanation on what's going on from the fertilizer side:

At any fertility target below 100% and above equilibrium fertility, there is a constant amount of natural fertility restoration (N). Then, with crop-based fertility depletion (D), you get an amount of fertilizer usage (F), where F = D-N.

With irrigated farms, this is Fi = Di-N. Note the lack of subscript on N; greenhouses have the same natural fertility restoration as irrigated farms.

With greenhouses, Fg = (1.25*Di) - N.

Divide the two, and Fg/Fi = [(1.25*Di) - N] / (Di - N). For positive values of Di and N where Di > N, you're guaranteed to have Fg/Fi > 1.25.

Now that I think about it this way, another fix (assuming the whole thing isn't intentional) would be to scale up natural fertility restoration (and decay) by the same 1.25x. With that, Fg/Fi = [1.25*(Di-Ni)] / (Di-Ni). The (Di-Ni) cancels, and you're left with Fg/Fi = 1.25.

Prometheus0000 commented 1 year ago

Honestly, I just want the greenhouses to be better than the irrigated farm. What's the point in using them if they work way worse? Not to mention, more workers and maintenance and build cost.

MaciejPolanski commented 1 year ago

@SillySMS Ach. So the problem is that Fertility Depletion is raised by 25%, while Fertility Restoration is not. So increase in fertilizer consumption is bigger than 25%. Especially for low fertility targets, where Fertility Depletion value was close to Fertility Restoration, so increase in difference is large, may be even several times.