- 
                Notifications
    You must be signed in to change notification settings 
- Fork 26
[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
      
      
            anysad
  wants to merge
  5
  commits into
  FunkinCrew:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
anysad:custom-albums-info
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            5 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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]`. | ||
| - 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> | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still references character
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, will fix that