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

Modding:Hat data

From Stardew Valley Wiki
Jump to: navigation, search

Index

This page explains how the game stores and parses hat data. This is an advanced guide for mod developers.

Raw data

Hat data is stored in Content\Data\hats.xnb, which can be unpacked for editing. Here's the raw data as of 1.5.1 for reference:

Data 
{
  "0": "Cowboy Hat/The leather is old and cracked, but surprisingly supple. It smells musty./false/true",
  "1": "Bowler Hat/Made from smooth felt./false/true",
  "2": "Top Hat/A gentleman's classic./false/true",
  "3": "Sombrero/A festively decorated hat made from woven straw./false/true",
  "4": "Straw Hat/Light and cool, it's a farmer's delight./false/true",
  "5": "Official Cap/Looks like it belonged to a postman or policeman. Either way, it's still very soft and smells okay./false/true",
  "6": "Blue Bonnet/Harken back to simpler times with this prairie bonnet./false/true",
  "7": "Plum Chapeau/Looks alright./false/true",
  "8": "Skeleton Mask/The red eyes are glowing mysteriously./true/true",
  "9": "Goblin Mask/Freak out the neighborhood with this creepy mask. Rubber ear joints for effect./true/true",
  "10": "Chicken Mask/You'll be sure to get them grinning with this one./true/true",
  "11": "Earmuffs/Keep your ears toasty. Lined with artisanal velvet from Castle Village./true/false",
  "12": "Delicate Bow/Little pink jewels glisten as you examine it./true/false",
  "13": "Tropiclip/It's shaped like a little palm tree./true/false",
  "14": "Butterfly Bow/This one is very soft./true/false",
  "15": "Hunter's Cap/The wool lining should stay warm deep into the forest./false/true",
  "16": "Trucker Hat/Mesh in the back to keep your head cool./false/true",
  "17": "Sailor's Cap/It's fresh and starchy./false/true",
  "18": "Good Ol' Cap/A floppy old topper with a creased bill. Looks like it's been through a lot./false/true",
  "19": "Fedora/A city-slicker's standard./false/true",
  "20": "Cool Cap/It looks really faded, but it used to be a vibrant blue./false/true",
  "21": "Lucky Bow/The middle is made of solid gold./true/false",
  "22": "Polka Bow/This one's sure to be turn heads./true/false",
  "23": "Gnome's Cap/This gnome had a very large head./false/true",
  "24": "Eye Patch/You can't tell if it's real or just from a costume shop./true/true",
  "25": "Santa Hat/Celebrate the magical season./false/true",
  "26": "Tiara/This one has a big amethyst encircled by gold./true/true",
  "27": "Hard Hat/Keep your dome in one piece./false/true",
  "28": "Sou'wester/The shape helps to keep sailors dry during storms./false/true",
  "29": "Daisy/A fresh spring daisy to put in your hair./true/false",
  "30": "Watermelon Band/The color scheme was inspired by the beloved summer melon./true/false",
  "31": "Mouse Ears/Made from synthetic fibers./true/true",
  "32": "Cat Ears/Whiskers included./true/true",
  "33": "Cowgal Hat/The band is studded with fake diamonds./false/true",
  "34": "Cowpoke Hat/For dairy experts./false/true",
  "35": "Archer's Cap/Fashionable whether you're an archer or not./false/true",
  "36": "Panda Hat/A lovely panda hat./false/true",
  "37": "Blue Cowboy Hat/A denim cowboy hat in cool blue./false/true",
  "38": "Red Cowboy Hat/An eye-catching cowboy hat in red suede./false/true",
  "39": "Cone Hat/A curiosity from a distant land./false/true",
  "40": "Living Hat/It absorbs moisture from your scalp. No watering needed!/false/true",
  "41": "Emily's Magic Hat/Made with love by Emily. It's 100% organic!/false/true",
  "42": "Mushroom Cap/It smells earthy./false/true",
  "43": "Dinosaur Hat/A hat fashioned to look like a small dinosaur./false/true",
  "44": "Totem Mask/Don't worry, it won't warp your face.../true/true",
  "45": "Logo Cap/A red cap with a logo on the front./false/true",
  "46": "Wearable Dwarf Helm/A slightly larger, human sized version of the helmets worn by dwarves./hide/true",
  "47": "Fashion Hat/A fashionable hat with a feather in the brim./false/true",
  "48": "Pumpkin Mask/This must have been a pretty big pumpkin once.../hide/true",
  "49": "Hair Bone/A prehistoric version of the hair bow./true/false",
  "50": "Knight's Helmet/It looks just like the real thing!/hide/true",
  "51": "Squire's Helmet/The face is exposed to increase air flow./hide/true",
  "52": "Spotted Headscarf/A red polka-dot scarf tied around the head./hide/true",
  "53": "Beanie/A warm hat with a pretty tight fit./hide/true",
  "54": "Floppy Beanie/A warm hat with a looser fit./hide/true",
  "55": "Fishing Hat/The wide brim keeps you shaded when you're fishing on the riverbank./false/true",
  "56": "Blobfish Mask/Just as spongy as the real thing!/true/true",
  "57": "Party Hat/A goofy red hat that makes any celebration more fun./false/true",
  "58": "Party Hat/A goofy blue hat that makes any celebration more fun./false/true",
  "59": "Party Hat/A goofy green hat that makes any celebration more fun./false/true",
  "60": "Arcane Hat/The type of cowboy hat worn by a wizard./false/true",
  "61": "Chef Hat/The traditional hat worn by a head chef./hide/true",
  "62": "Pirate Hat/A captain's hat with a horrible skull on the front./false/true",
  "63": "Flat Topped Hat/An old style of hat once considered very fashionable./false/true",
  "64": "Elegant Turban/A fine black silk turban with gold trim./false/true",
  "65": "White Turban/A fine white silk turban with blue trim./false/true",
  "66": "Garbage Hat/It's a garbage can lid 'upcycled' into a hat.../false/true",
  "67": "Golden Mask/A faithful recreation of the Calico Desert relic!/true/true",
  "68": "Propeller Hat/A goofy hat with a propeller on top./false/true",
  "69": "Bridal Veil/The traditional headwear for a bride./false/true",
  "70": "Witch Hat/A pointy hat popular with witches./false/true",
  "71": "Copper Pan/You place the copper pan on your head.../false/true",
  "72": "Green Turban/A green silk turban with a gold ornament on the front./false/true",
  "73": "Magic Cowboy Hat/It's shimmering with prismatic energy/false/true/Prismatic",
  "74": "Magic Turban/It's shimmering with prismatic energy/false/true/Prismatic",
  "75": "Golden Helmet/It's half of a golden coconut./false/true",
  "76": "Deluxe Pirate Hat/Only the most infamous pirate could pull off this look./false/true",
  "77": "Pink Bow/This huge bow makes quite a statement!/true/false",
  "78": "Frog Hat/A slimy friend that lives on your dome./hide/true",
  "79": "Small Cap/It's a more aerodynamic style of cap./false/true",
  "80": "Bluebird Mask/Wear this to look just like your favorite island trader./hide/true",
  "81": "Deluxe Cowboy Hat/A cowboy hat with a more extreme shape./false/true",
  "82": "Mr. Qi's Hat/A replica of Mr. Qi's iconic hat./false/true",
  "83": "Dark Cowboy Hat/A cowboy hat in fashionable black./false/true",
  "84": "Radioactive Goggles/Doesn't actually provide any protection from radiation./true/true",
  "85": "Swashbuckler Hat/The classic swashbuckler look./false/true",
  "86": "Qi Mask/???/hide/true",
  "87": "Star Helmet/A red hat with stars on it./false/true",
  "88": "Sunglasses/These give you a relaxed look./true/true",
  "89": "Goggles/These will make you look very safe./true/true",
  "90": "Forager's Hat/It's a forager's delight./false/true",
  "91": "Tiger Hat/Makes you look like a beautiful tiger./hide/true",
  "92": "???/???/hide/true",
  "93": "Warrior Helmet/An Ostrich eggshell repurposed into a helmet./false/true"
}

Format

Hats have a hard-coded category of -95 (Hats.cs::Load)

Index Field Example Value
0 Name Trucker Hat
1 Description Mesh in the back to keep your head cool.
2 skipHairDraw false
3 ignoreHairstyleOffset true
4 Name (for language files other than English) Truckerhut

If skipHairDraw is "true", then the game will not change the character's hairstyle when they put on the hat. If set to "false", the player's hairstyle may change when they put on the hat.

If ignoreHairstyleOffset is set to "true", it means that the game will position the hat regardless of the hairstyle your character has. For instance, for a hat such as the Butterfly Bow, you will want to have it set to "false" so that the bow will adjust position to be attached to your character's chosen hairstyle. However, for something like the Eye Patch, that should be kept in the same position on your character's head no matter what hair you have chosen, so it should be set to "true".