Coding Help Help with hats on horses

cajcbell

Newcomer
Hello! I am the creator of this horse mod, and currently in the middle of fixing all the horse heads so that they have a proper 1.6 carrot chewing animation. While I'm at it, I wanted to fix the way that hats sit on my horses heads... they are taller than the Vanilla horse, so hats sit right in the middle of their face instead of on top. I am imagining some kind of code that tells the game to raise the height of hats by maybe two whole pixels... but I'm not sure how to go about it. Also, do you think it would effect all "hats on pets?"
Thank you for any advice!

- CC
 

cajcbell

Newcomer
Hello all! I answered my own question and will post it here in case it's helpful for anyone else.
Basically, hats are loaded onto pets through a file under the Farmer folder titled hats_animals. It's possible to adjust the height of hats by using an "EditImage" action with Content Patcher, if you extract the png from the xnb and adjust each hat in the image. However, for horses, the game specifically uses the same hats file as the farmer. Basically, the farmer and the horse are the exact same height... so if you follow the same steps for the basic hats (xnb and png), you will be able to raise the height of hats on horses. But also, on the farmer. Which looks ridiculous, for example, the daisy floats about four pixels above the farmer's head when it also sits perfectly on the horse's head.

So I am giving up on this particular coding endeavor- someone with better coding skills than me might know how to tackle this. Thanks!
 
Last edited:
Top