We are in the process of transferring the hosting and maintenance responsibilities of the wiki from Chucklefish to ConcernedApe, which is why the wiki will temporarily be hosted at stardewcommunitywiki.com. Soon the official wiki will resume at stardewvalleywiki.com and will be hosted going forward by ConcernedApe. Prior to the transfer to ConcernedApe we will update this site with the date on which the transfer will occur.
Associated files location
All the sprites for the farmer are stored in "Content/Characters/Farmer". The main sprite for the male farmer is "farmer_base.xnb" and for the female farmer is "farmer_girl_base.xnb".
The farmer sprite is drawn in several layers. On the bottom layer is the head, torso, and boots. The clothing, accessories, hair, and others are all drawn in multiple layers on top in this order:
- Head/Torso/Boots - Bottom layer
- Accessories (e.g. glasses, makeup, earrings, facial hair)
- Arms - Top layer
The placement of layers stored in other files (such as the height of a shirt on the body) is dependent upon the animation, and cannot be modified by editing png files other than by shifting the accessory within its frame.
Farmer (girl) base
The farmer base sprite is divided into three sections. The Head/Torso/Boots layer are in the six columns on the far left. The pants are in the six columns on the far right. And the arms make up the central 12 columns. Each sprite is 16 pixels wide by 32 pixels tall.
The sorting of the sprites seems to be fairly logical with the six pants on the top row lining up with the six torsos on the top row, and similarly all the way down.
With the default shirts and pants, it is unnecessary to have a full torso drawn since the shirts cover most of it up. The pants cover up all of where the legs would go on the torso layer too. However, with mods that add more clothing options for shirts and pants, it can be necessary to have more torso drawn and legs added to the base farmer layer.
When editing the farmer base, it is important to use the appropriate color palettes. The game identifies skin, eyes, boots, pants, arms, and shirt sleeves in the farmer base using the color. The game recolors these depending upon the options chosen during character creation and the color of the boots being worn.
Shirt size difference
Although the torso can be up to 16 pixels wide, shirts (which are stored in a separate file) are only 8x8 and unable to fully-cover a torso wider than that. The Hats, Accessories, and Pants all give full 16-pixel wide columns for covering the head and legs, though.
Hats and Hairstyles
The farmer's hairstyle will sometimes change when a hat is equipped.source
- Hairstyle 3 will change to hairstyle 11
- Hairstyles 22 and 26 will change to hairstyle 7.
- Hairstyles 18, 19, 21, and 31 will change to hairstyle 23
- Hairstyles 0, 2, 4, 7(?), 8, 10, 12, 13, 14, 15, and 16 will change to hairstyle 30.
- Hairstyles 1, 5, 6, 9, 11, 17, 20, 23, 24, 25, 27, 28, 29, and 30 will not change.
Note: It seems strange that hairstyle 7 would change to 30, so it may actually stay the same.