SpecialAPI-Hat_Loader icon

Hat Loader

Allows you to easily make new hats using special hat files.

Last updated 2 weeks ago
Total downloads 56
Total rating 2 
Categories
Dependency string SpecialAPI-Hat_Loader-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

MtG_API-Mod_the_Gungeon_API-1.9.1 icon
MtG_API-Mod_the_Gungeon_API

Adds the good parts of Mod the Gungeon to BepInEx.

Preferred version: 1.9.1
Alexandria-Alexandria-0.4.17 icon
Alexandria-Alexandria

A combination of old and new APIs, and new tools for the convenience of modders.

Preferred version: 0.4.17

README

Hat Loader

Allows you to easily make new hats using special -hat.spapi files. No code required!

How it's done

Inside of the plugins folder (doesn't have to be directly inside, the files can be in subfolders inside plugins), make files ending in -hat.spapi for each hat you want to make. The files should look like this:

# Name
{name of your hat}

# NorthSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# SouthSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# WestSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# EastSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# NorthwestSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# NortheastSprites
{paths to your hat sprites, relative to the -hat.spapi file}

# XOffset
{your hat's horizontal offset, in pixels} (optional, defaults to 0)

# YOffset
{your hat's vertical offset, in pixels} (optional, defaults to 0)

# FPS
{fps for your hat's animations, if it's animated} (optional, defaults to 4. does nothing if the hat is not animated)

# AttachedToHead
{True if you want the hat to be achored on the character's head, False if you want it to be anchored on the character's eyes} (optional, defaults to True)

# InFrontWhenFacingBack
{True if you want the hat to be in front of the character while facing back, False otherwise} (optional, defaults to True)

# InFrontWhenFacingFront
{True if you want the hat to be in front of the character whlie facing front, False otherwise} (optional, defaults to True)

# FlipOnRoll
{True if you want the hat to flip when the player rolls, similarly to hats in Exit the Gungeon, False otherwise} (optional, defaults to True)

# VanishOnRoll
{True if you want the hat to disappear when the player rolls, False otherwise} (optional, defaults to False. takes priority over FlipOnRoll)

# FlipStartSound
{the sound you want to play when this hat's roll flip starts} (optional, defaults to no sound)

# FlipEndSound
{the sound you want to play when this hat's roll flip ends} (optional, defaults to no sound)

# FlipSpeed
{a speed multiplier for how fast this hat spins during its flip animation} (optional, defaults to 1. setting this to 0 will result in the hat simply bouncing above the player instead of spinning)

# FlipHeight
{a multiplier for how high this hat bounces during its flip animation} (optional, defaults to 1)

# FlipHorizontalWithPlayer
{True if this sprite should be automatically flipped with the player's sprite, False otherwise} (optional, if a value is not given it will be automatically decided based on the hat's directionality)

Properties can go in any order. Optional hat properties do not have to be included in the hat files, in which case they will instead get set to their default values. Not all Sprites properties have to be given in the file, the hat's directionality will be decided based on which sprite directions are given using this table:

Given sprite directions Directionality FlipHorizontalWithPlayer default
SouthSprites None (single direction) True
WestSprites, EastSprites Two way (horizontal) False
NorthSprites, SouthSprites Two way (vertical) True
NorthSprites, WestSprites, SouthSprites, EastSprites Four way False
All sprite directions given Six way False

Multiple sprite paths can be given for a sprite direction, in which case that direction will be animated. Sprite paths are relative to the hat file's folder, so a sprite path of hat_idle_001 for a hat file with the path plugins/YourHat/yourhat-hat.spapi will lead to plugins/YourHat/hat_idle_001.png, a sprite path of SomeSubfolder/hat_idle_001 will lead to plugins/YourHat/SomeSubfolder/hat_idle_001.png, etc. Sprite paths don't need to have extensions.