-
Notifications
You must be signed in to change notification settings - Fork 4
3 ‐ Making a Capsule
We already covered adding your capsule to the registry, now let's give that Capsule some data to process! There are a total of 11 fields your capsule can have, but only four are required!
In your capsule.json
file, four fields are required and must be specified, or the capsule will be skipped over:
-
titleImage
: This field looks for the file path to your logo(like the Friday Night Funkin logo). It is relative to theassets
folder (root directory of your mod) and does not take sparrow spritesheets, only static pngs. -
grahpic
: This field looks for the file path to your graphic, which is usually a static png of the main character of your mod, but doesn't have to be. It is relative to theassets
folder (root directory of your mod) and does not take sparrow spritesheets, only static pngs. -
state
: This field takes in onlyFlxState
, which you need to input as a string containing the name; this is the state your capsule will switch to when selected. There is no filepath needed, just the name of your state. Again, make sure your state extendsFlxState
. -
background
: This field looks for the file path to your background. It is relative to theassets
folder (root directory of your mod) and does not take sparrow spritesheets, only static pngs.
There are multiple optional fields you can specify for your capsule:
-
titleScale
: The value to scale your title image by. This takesFloat
, NOTArray<Float>
. Defaults to 1 if left unspecified. -
graphicScale
: The value to scale your graphic image by. This takesFloat
, NOTArray<Float>
. Defaults to 1 if left unspecified. -
backgroundScale
: The value to scale your background image by. This takesFloat
, NOTArray<Float>
. Defaults to 1 if left unspecified. -
anchorColor
: This value determines the color of the background of your capsule(not the background of the menu). Takes hex codes inString
form, formatted with 0xFF, such as0xFF000000
for the color black. Defaults to black if left unspecified. -
requireType
: The type of requirement to lock the capsule behind. Can either be "song" or "level". Defaults to unlocked if left unspecified. -
requireID
: The ID of the requirement to lock the capsule behind. If you specified song earlier, put the song's ID here. Same for level. Defaults to unlocked if left unspecified. -
script
: The name of your Capsule's specific class, as a string(NOT the file path to the script), used if implementing custom behavior. This is covered more in depth in Custom Behavior. Defaults toSelectMenuCapsuleObject
, a normal capsule with no custom behavior, if left unspecified.