Skip to content

3 ‐ Making a Capsule

requazar edited this page Sep 1, 2025 · 6 revisions

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!

Required fields

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 the assets 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 the assets folder (root directory of your mod) and does not take sparrow spritesheets, only static pngs.

  • state: This field takes in only FlxState, 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 extends FlxState.

  • background : This field looks for the file path to your background. It is relative to the assets folder (root directory of your mod) and does not take sparrow spritesheets, only static pngs.

Optional Fields

There are multiple optional fields you can specify for your capsule:

  • titleScale : The value to scale your title image by. This takes Float, NOT Array<Float>. Defaults to 1 if left unspecified.

  • graphicScale: The value to scale your graphic image by. This takes Float, NOT Array<Float>. Defaults to 1 if left unspecified.

  • backgroundScale: The value to scale your background image by. This takes Float, NOT Array<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 in String form, formatted with 0xFF, such as 0xFF000000 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 to SelectMenuCapsuleObject , a normal capsule with no custom behavior, if left unspecified.

Clone this wiki locally