1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug in crop growth times with fertilizer/agriculturist

Discussion in 'Support' started by Chimerarachne, Apr 16, 2019.

  1. Chimerarachne

    Chimerarachne Intergalactic Tourist

    With DSG and Agriculturist, the growth time saved is supposed to be at least 25% + 10% = 35%. Consider applying it to Pumpkins and Starfruit. Both have 13 growth days in five phases: Pumpkins [1 2 3 4 3], and Starfruit [2 3 2 3 3]. 35% of 13 is 4.55 days, which gets rounded up to five days of savings that have to be deducted from the growth phases. They should both take 8 days to grow--Starfruit does, but Pumpkins take 9.

    There's a fencepost error the plant() method where the effects of fertilizer and agriculturist are applied. The code subtracts a day from each phase (except for a one-day seed phase) until the full savings is applied. But because the inner loop goes one iteration too far, a day of savings is incorrectly subtracted from the 99999-day ready-to-harvest phase.

    The calculation is correct for Starfruit since its seed phase is two days. A day is subtracted from each of first the five phases, so [2 3 2 3 3 99999] becomes [1 2 1 2 2 99999] and five growth days are saved. But for Pumpkins, [1 2 3 4 3 99999] becomes [1 1 2 3 2 99998]. Only four growth days have been saved, but the loop terminates because it has done five subtractions. It should go around again and finish with [1 0 2 3 2 99999]. This affects a number of other crops.
     

    Share This Page