Skip to content

[ADDITION] Custom Albums Information #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/08-custom-albums/08-00-custom-albums.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Creating a Friday Night Funkin' Mod - Custom Albums

This chapter will walk you through the process of creating a functioning, fully compatible Friday Night Funkin' mod, using the game's official systems for loading custom content and scripts. Once your mod is complete, you will be able to place it in the `mods` folder in your game install and use its content in-game without overriding the base game content and still maintain compatibility with other mods.

This chapter goes over adding custom albums, while also ensuring that it appears in the Freeplay State.
50 changes: 50 additions & 0 deletions src/08-custom-albums/08-01-creating-an-album.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Creating an Album

## Album Assets

In order to create your own album, you will need 2 assets:

- `albumArtAsset`: The art that shows in Freeplay that represents the album itself.
- `albumTitleAsset`: The asset for the text that shows below the used album in Freeplay.

## Album Data

A custom album requires creating a new JSON file in the `data/ui/freeplay/albums` folder.

Below is the "volume1" album json file `assets/data/ui/freeplay/albums/volume1.json`[^albumsource]

```json
{
"version": "1.0.0",
"name": "Volume 1",
"artists": ["Kawai Sprite"],
"albumArtAsset": "freeplay/albumRoll/volume1",
"albumTitleAsset": "freeplay/albumRoll/volume1-text"
}
```

While there is not a lot, some stuff still need to be shown so you know what is what!
- `version`: The version number for the Album data file format. Leave this at `1.0.0`.
- `name`: The readable name for the album.
- `artists:` The artists of the album, aka the ones who created the assets.
- `albumArtAsset`: The asset path to the album art which will be displayed in Freeplay.
- `albumTitleAsset`: The asset path to the album title which will be displayed below the album art in Freeplay.
- `albumTitleOffsets`: The global offset to the character's position, in pixels. Optional, defaults to `[0, 0]`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still references character

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, will fix that

- Use an array of two decimal values, the first for horizontal position and the second for vertical position.
- `albumTitleAnimations`: A list of animation data objects for the album title. Optional, defaults to `[]`, aka nothing.

Animation data is structured like so:
- `name`: The internal animation name for the game to use.
- `prefix`: The animation name as specified by your spritesheet.
- For Sparrow or Packer, check inside the data file to see what each set of frames is named, and use that as the prefix, excluding the frame numbers at the end.
- For Animate Atlases, use either the frame label or the symbol name of the animation you want to play.
- `offsets`: Some animations may need their positions to be corrected relative to the idle animation.
- Use an array of two decimal values, the first for horizontal position and the second for vertical position.
- `looped`: Whether to loop this animation in-game. If false, the animation will pause when it ends, until the game commands the asset to do something else.
- `flipX`: Whether to flip the sprites of this animation horizontally in-game.
- `flipY`: Whether to flip the sprites of this animation vertically in-game.
- `frameRate`: A frame rate value, defaulting to `24`.
- `frameIndices`: Optionally specify an array of frame numbers (starting at frame 0!) to use from a given prefix for this animation.
- For example, specifying `[0, 1, 2, 3]` will make this animation only use the first 4 frames of the given prefix.

[^albumsource]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/data/ui/freeplay/albums/volume1.json>
7 changes: 7 additions & 0 deletions src/08-custom-albums/08-02-using-the-album.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Using the Album

Albums are defined on a per-song basis, so you have to set the album ID for each song. In order to do this, you first have to make the song the itself. See [Custom Songs and Custom Levels](../02-custom-songs-and-custom-levels/02-00-custom-songs-and-custom-levels.md).

When you are done creating the song, head over to the `metadata.json` of the song where you want to album to appear and check in `playData` for the `album` key.

Once the chart which references your album is in your mod folder, simply start the game with your mod installed.
4 changes: 4 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
- [Modifying an Existing Sticker Pack](07-custom-sticker-packs/07-02-modifying-an-existing-sticker-pack.md)
- [Using a Custom Sticker Pack](07-custom-sticker-packs/07-03-using-a-custom-sticker-pack.md)

- [Custom Albums](08-custom-albums/08-00-custom-albums.md)
- [Creating an Album](08-custom-albums/08-01-creating-an-album.md)
- [Using the Album](08-custom-albums/08-02-using-the-album.md)

# Mod API Systems

- [Migration](09-migration/09-00-migrating-mods-to-newer-versions.md)
Expand Down