Custom Hats

**Custom hats** are a way for you to play with your own art without having to install mods. Custom hats that are created as described here will show up for other players in online multiplayer matches.

## How to create hats

### Simple hats

Normal hats can be made as a PNG file with an image editor such as paint.net, GIMP or Adobe Photoshop. Simple hat images are of size 32x32 (normal hat), 64x32 (normal and quack) or 96x32 pixels (normal, quack and cape).

Hat images are segmented into several blocks, as can be seen in this template:

(click here to get the original PNG)
The first area (red) is the normal duck, the second area (blue) is while pressing quack, the third (green) is the cape.

This basic template can be used for making new hats. Be sure to remove the ducks and guides before saving your .png. If you don't want a cape you can simply crop out the last 32 pixels on the right side of the template (marked green).

### Duck Game 1.5 update: Rocks, Offset

Players can now customize their rock: An additional 24 pixels are added below the normal hat (resulting in an image height of 56 pixels).

Additionally, the hat can be offset by up to 16 pixels in x and y direction by usingmetapixels. An additional row is added to the right of the hat image (resulting in 33, 65 or 97 width) and two pixels added:

* One with color code RGB 0, 0, 0 (enable "HatIsTail")
* One with RGB 1, offset 128-x, offset 128-y (offset pixel with coordinates).

A pixel with values 1,128,134 would move the hat upwards by 6 pixels (128-128 = 0 offset on the x axis; 128-134 = -6 on the y axis). Values bigger than 128 +/- 16 will simply appear at the maximum allowed offset. See the image on the right for an example.

## Where to put hat files

Depending on whether you played the game before/after the 1.5 update (and kept the local save files), your <Duck Game User Data> folder will reside in one of these directories (Note: after 2020, game checks for both location, and if both exist it's unclear which will be prioritized, so better keep only one of them, the one you prefer (before deleting, synchronize with the other or make a backup)):

* (Before 2020) `%USERPROFILE%\Documents`\DuckGame
* (After 2020) `%APPDATA%`\Roaming\DuckGame

The .png (or .hat) files can be then placed in: `<Duck Game User Data>\Custom\Hats`

### Legacy hats directories

Duck Game will also load hats from inside <Game Installation> folders, which is an outdated method and not recommended anymore. Nowadays ".png" hats are more popular and are easier to share, and promoting legacy location for hats (one of which doesn't support .png hats) will cause confusion.

Another reason it is not ideal is that hat files are mixed with game files: .exe, .manifest, .dat and whatever else is there, so it makes it harder to work with. For intermediate file explorer users it won't matter, other than that they can't "select all" when working with hats, or filtering by first letters will output game files next to hats. But novice users could easily make a mistake and delete critical files, so the developer is guiding players away from there, into dedicated folders. On some file systems, user might not even have permissions to work in the program files folder.

* <Steam Library Drive>\Steam\steamapps\common\Duck Game\Hats
* (.hat files only) <Steam Library Drive>\Steam\steamapps\common\Duck Game

In any case, if the "Hats" folder does not exist you can simply create it.

Before the Duck Game 1.5 update in November 2020, the PNG image file had to be converted to a .hat file with tools such as the Quackhead website or Duck Game Hat Tool . This is no longer necessary; existing .hat files will continue to work. Any .hat can be converted back to .png using appropriate tool listed on DuckSheet, so there's no reason to use a .hat file over .png one, as it also makes hat making process simpler, and easier to edit later.

## Hat special effects and Metapixels

Some standard hats, such as Fridges and Senpai, have effects (sounds, water drops, sparkling etc.) when pressing quack. This can be done through metapixels (like hat offset described above), but the remaining options are (as of yet) not fully understood and not documented in an easy-to-read format.

Particles can be added in the small squares in this template:

(click here to get the original PNG)
By default they will emit a frame at random when quacking and fall while shrinking.

## Links

* Steam Community: (ENG) Metapixels Tutorial for Duck Game
* PNG/HAT files to PNG/HAT files, metapixels reader: https://remmoze.github.io/DuckGameHats/

## References

1. ↑ Duck Game Discord channel #changelog "November 15 Patch"
2. ↑ Developer website, metapixels.txt: https://www.wonthelp.info/metapixels.txt