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:Chicken

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

Colors Affected by Name

Taken down until statistically proven.

Testing: naming chicken 'pebbles', 'white' and 'kfc' for 200 chickens each, will give results in ±2 week. Currently testing slingshot damage with various items as well, sorry if it takes a rather long time. --Thebluestyx (talk) 10:38, 5 April 2016 (EDT)

I went over the game's code and couldn't find anything to suggest the name has anything to do with it. From what I can tell each animal has a default product. White chickens default to white eggs and brown chickens to brown eggs.
if (type == "WhiteChicken")
    this.defaultProduceIndex = 174; // item id for white egg
if (type == "BrownChicken")
    this.defaultProduceIndex = 180; // item id for brown egg

Then at the start of the day the game runs through several checks and some RNG to determine if the animal produces the product for that day and whether or not it is "upgraded" to another item, such as a large egg. Even then, white eggs upgrade to large white eggs and brown eggs to large brown eggs.

// ...checks if the animal should produce, like if it was fed the previous day and is an adult...
num = num = this.defaultProduceIndex;
// ...stuff about rabbits, ducks, and dinos...
if (Game1.random.NextDouble() < (double)this.friendshipTowardFarmer / 1200.0)
{
    int num3 = num;
    if (num3 != 176) // if is not white egg
    {
        if (num3 == 180) // if is brown egg
        {
            num += 2; // id becomes 182, large egg (brown)
        }
    }
    else // if is white egg
    {
        num -= 2; // id becomes 174, large egg (white)
    }
}
I haven't found any code that suggests that they ever change color from their default. All of the references I've found to the animal's name are only used to complete strings, such as "Bob is looking happy today!" I don't see anything to indicate that the name has any effect on the products. --Samutz (talk) 13:25, 5 April 2016 (EDT)
The first 12 'white' that I bought had 7 brown, first 12 'kfc' had 3 brown, first 12 'pebbles' had 8 white. Looks like it's just a myth. It's all purely RNG. Should I continue? I think not. --Thebluestyx (talk) 00:09, 6 April 2016 (EDT)

Colour assigned on hatching

I just went through a day that got completely messed up and had to restart it. A chick had hatched yellow that morning, but on the restarted day it hatched blue, showing that the colour is assigned at hatching time. Added this to the page. --GlassDeviant (talk)18:48, 16 January 2017‎

I'm unsure if this changed during an update? I've restarted 5 times, and each time gotten a brown chicken. Did put brown egg in incubator. Sora20XX (talk) 01:31, 11 August 2017 (BST)

Chicken Color and Egg Color

In my first edit of this day, I expanded the lead to include the text "Specifically, the color of a chicken has no influence on the color of the eggs it produces.". This was a guess based on what the existing material seemed to imply. But I've been having my doubts. Now, in checking discussions, I think there are further questions, all unanswered. I don't know the answers definitively, but the colorations matter to game play and should be mentioned in the article. All my experience indicates that the color of the animal is what determines the color of the egg, and it seems that others have at least called this a "default".

So, I'm going back and changing my new sentence to say "white chicken/white egg and brown chicken/brown egg" without conditions. Please correct that if you have a definitive answer, but until someone has at least an experience to contradict me, I think it's good to establish solid definition of the matter in the article text, and I think this is safe enough. It can be corrected easily enough if the truth is more complex. But at least we'll now remember to look and state the information in the article. Butterbur (talk) 16:30, 20 May 2017 (BST)

I always assumed blue chickens produced white eggs, but I can't find it in the code anywhere. Each animal has a "default produce index" but I can't find where it's actually assigned, only where it's read. I sure do wish there were someone else willing to look at game code and edit the wiki. HINT HINT.  ;) margotbean (talk) 20:51, 20 May 2017 (BST)
It could be a constant data member of the animal's class (not kept with the instance). In that case, it's the compiler that assigns the value at compile time, and code is never needed to make the assignment. Btw, I take the "default produce index" to mean the (table) index of the default produce (Egg, for chickens), in contrast with the alternate produce type, Large Egg. It doesn't necessarily have anything to do with the color - in fact, it probably doesn't. Color seems likely to be derived from a different mechanism.
I don't yet have any direct experience with blue chickens, and was guessing there might be some reason someone would seek to get a chicken of that color (namely, that it could produce eggs of either color). But if you've had some of them and never found one of them to turn up a brown egg, that would seem to shoot down that idea. Feel free to make an edit if you feel confident of your experience. Another edit can always be made if something contrary turns up in the code. Butterbur (talk) 10:52, 21 May 2017 (BST)
From Data\FarmAnimals.xnb, blue chickens produce white eggs, both regular and large sized. I've added the info. to the page. margotbean (talk) 21:33, 21 September 2017 (BST)

Egg Color and Hatched Chicken Color

While the article states that a chicken's color is randomly assigned at time of hatching, I have significant evidence to the contrary. True, it's "anecdotal", but if the assignments are actually random, then I have run into a circumstance for which the chances are less than 4000 to 1.

White eggs in an incubator do seem to produce chickens of varying colors. But a series of 12 brown eggs has produced nothing but brown chickens, from two different incubators. This combination makes it difficult to get white chickens, if that is what you want to do. The series ran across two game versions (1.2 and 1.3): no apparent differences. Butterbur (talk) 15:24, 17 August 2018 (BST)

You are correct, sir. In AnimalHouse::addNewHatchedAnimal, the game sets brown eggs and large brown eggs to brown chickens. (This is also where dino, duck, and void eggs are set to the correct animal type.) FYI, it also sets white/large white eggs to white chickens, and then calls the FarmAnimal class constructor, which is where white chickens are sometimes changed to blue. margotbean (talk) 16:45, 17 August 2018 (BST)
So you are saying that white eggs of either size always produce either white or blue chickens? I have also seen them produce brown chickens. (That's what I was getting at when I said "varying colors".) The brown chickens were hatched at a time before blue chickens were available. I can't remember if brown ones also appeared after the blues were available. I've been figuring they probably could. But in any case, the white-egg behavior is why I expected that brown eggs could also produce white chickens. Seems unbalanced somehow, as things stand. Butterbur (talk) 07:37, 19 August 2018 (BST)
Once again, you are correct. I missed an important part of the constructor (remember, this is called after white eggs are set to white chickens and brown eggs to brown chickens):
	if (type.Contains("Chicken") && !type.Equals("Void Chicken"))
	{
		type = ((Game1.random.NextDouble() < 0.5 || type.Contains("Brown")) ? "Brown Chicken" : "White Chicken");
		if (Game1.player.eventsSeen.Contains(3900074) && Game1.random.NextDouble() < 0.25)
		{
			type = "Blue Chicken";
		}
	}
This shows approximately a 50% chance for a white egg to produce a brown chicken. Brown eggs still produce brown chickens. Then, in the next line, there is a 25% chance for brown or white chickens to become blue. -- margotbean (talk) 11:29, 19 August 2018 (BST)
Aha! Thanks! This does seem to tell the whole story.
I'll never buy a brown chicken again! If I need one, I'll incubate it. On average, you should get 3 times as many browns as whites over time (assuming you incubate equal numbers of brown and white eggs). For balance, just incubate white eggs. The implication is that brown chickens are fine for producing eggs for food (including mayo), but only for that. White chickens do just as well for food, but you need them specifically to create and maintain the variety that you want in your coop pen. Blues are alternates for whites. If you want complete uniformity, then browns are the way to go (after finishing the Community Center bundles). Butterbur (talk) 18:47, 19 August 2018 (BST)
Well, never let it be said that random behavior is easy to generate in a program - that is, if you want it to behave according to the laws of probability. Just thought I'd mention (anecdotally) that my last six chicks, all hatched from white eggs, were all brown. Mathematically, that ought to be one chance in 64. But actually, I can't remember the last time I hatched a white chick from a white egg. Since I wrote last, I've bought a new computer, so new Steam installation, new game installation, and the six chicks at least were all from SV version 1.3.32. I'm not saying you'll never get white chicks, but I'm not seeing anything close to 50%. And I can't see any reason to suspect the cause is in the code above.
Go figure. Or not. I have little faith left that the randomness features of this game reflect stated mathematical probabilities. Too many fail too many times to come close to likely probabilities. But not all randomness is this far off this consistently. Butterbur (talk) 17:00, 6 December 2018 (UTC)