Talk:Pig

From Stardew Valley Wiki
Revision as of 03:58, 18 January 2022 by Glad Wrap (talk | contribs)
Jump to navigation Jump to search
This talk page is for discussing Pig.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Truffles Per Day

The statement that the average amount of truffles in a day is three for a max happiness pig comes from the claim that the first truffle is pretty much guaranteed and susequent ones have a likeleyhood of 1000/1500 or 2/3.

The first truffle therefore has probalility 1 while the second one has 2/3, the third (2/3)^2 the fourth (2/3)^3 etc.

The average amount of truffles then becomes an infinite geometric series.

1 + 2/3 + (2/3)^2 + (2/3)^3 +....

We call this S and perform some calculations:

S = 1 + 2/3 + (2/3)^2 + (2/3)^3 +....

S*(2/3) = 2/3 + (2/3)^2 + (2/3)^3 + (2/3)^4 +....

S - S*(2/3) = S*(1/3) = 1

S = 3

I did this same calculation and arrived at 2.5 at first becuase I did 1000/1500 in my head and somehow got 3/5. This should be right though. Viktor36 (talk) 22:44, 17 May 2021 (UTC)

Hi Viktor36, I have a question, so I was attempting to make a program to calculate the amount of truffles for a given friendship and I got 3 EXTRA truffles at max happiness, whereas you got 3 total truffles, I am not good at math but when I was looking at your calculations I noticed that between the S = 1 + 2/3 + (2/3)^2... Step and the S*2/3 = 2/3 + (2/3)^2... Step, the 1 seems to dissappear, is that a mistake? If not an explanation of the math would be very helpful. Thanks Glad Wrap (talk) 03:22, 18 January 2022 (UTC)

Apologies, Viktor36 I have reviewed the math and I have seen that that step makes sense, though I still would appreciate an explanation of the math so I can figure out my program. Glad Wrap (talk) 03:58, 18 January 2022 (UTC)

Bug and Floors and pathes

It seens like there's a bug that Pigs inside of Fences kann drop the Truffles outside of the area they have acces to. Example: There's a Pig wich cannot move because 8 Fences are directly next to it. The Pig will produce the Truffles and they will be outside of the Tile, the Pig is standing in.

|=Fence; +=Pig; "=Truffle:
   |  |  | 
"  |  +  |
   |  |  | 
      "


Of course it also works if there are multiple Pigs in a big enclosure. I can upload a image too if needed...

Also truffles can be dropped on flooring (craftable wood floor in my case), the page sais the opposite. Botautal (talk) 20:37, 19 May 2021 (UTC)

Hi Botautal, I think truffles spawning outside fences is the way ConcernedApe intended it to work. The alternative is that no truffle spawns at all, so I would say it may be better as a "note" rather than a "bug" on the page.
It's entirely possible that ConcernedApe fixed the flooring bug in v1.5 and forgot to put it in the change notes. I'll remove it from the page. Thank you, margotbean (talk) 20:44, 19 May 2021 (UTC)
Hi, that Pigs can dig up truffles outside of fences looked very, very strange for me :D but what you say makes sense. thanks ;) Botautal (talk) 21:07, 22 May 2021 (UTC)