This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Talk:Cauliflower

From Stardew Valley Wiki
Jump to: navigation, search
This talk page is for discussing Cauliflower.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Price Generation by Infobox Template

It is clear from trying to edit the article that the Infobox template is calculating all prices from the base price, regular quality. No other is editable. However, it is doing the calculations wrong. This doesn't show up in every case, because truncation hides the differences behind the integer values, but it does show for Cauliflower if you have silver quality and sell while you are eligible for the Tiller profession bonus.

This, and *all calculations*, must be done in the following manner to arrive at the correct price.

  1. Calculate the quality price bonus (if any) first, truncate the result. Of course, no calculation is needed if you have regular quality.
  2. Take the (truncated) price resulting from the first calculation as the input to the second. Calculate the Tiller bonus, truncate the result. That result is the price for higher-quality plus Tiller.

Please note:

  • The calculation must always be truncated, not rounded.
  • It must always be done in these two stages, with first stage as input to the second, meaning two truncations. Direct fractional calculation from the base price, without intermediate truncation, can yield an incorrect value (sometimes, as in this case). That is why the template now tells you the silver quality with Tiller price is 240g. It is not; it is 239g. Try it out at Pierre's. Look at what the game tells you the selling price is just before you complete the sale.
  • No incorrect pricing now shows up unless there are two bonuses that need to be included.
  • This methodology applies for all quality-plus-profession bonus combinations.
  • It matters which bonus is applied first. Do quality first.

I have already noted this calculation method, and analysed the alternate possible methods, somewhere else on the Wiki (another talk page, I can't remember where). That analysis is a mathematical proof that the method here is the only possible one that produces the prices that the game actually uses. This particular example can be used as the single test case to prove that the calculation is correct, as long as the methodology applies to all two-bonus combinations. Butterbur (talk) 17:04, 25 April 2017 (BST)

Tada! The page says 239! See Template talk:Qualityprice#Fixing the values. Nebulous Maestress (talk) 04:30, 31 August 2020 (UTC)