|
| 1 | +# Creating a Note Style |
| 2 | + |
| 3 | +## Note Style Assets |
| 4 | + |
| 5 | +In order to create your own note style, you will need up to 4 assets: |
| 6 | +- `notes`: The general notes that are displayed in the chart, as well as in-game the player needs to hit. |
| 7 | +- `noteStrumline`: The notes on the strumline, along with their corresponding animations, such as it being `static`, the strumline note being `pressed`, `confirming` the note hit. |
| 8 | +- `noteSplashes`: The special effect when the player gets `Sick!` rating. |
| 9 | + - Currently is buggy, since it doesn't use the asset you provided. |
| 10 | +- `holdCover`: The special effect when the player is holding a note. |
| 11 | + - Currently is buggy, since it doesn't use the asset you provided. |
| 12 | + |
| 13 | +## Note Style Data |
| 14 | + |
| 15 | +A custom note style requires creating a new JSON file in the `data/notestyles` folder. |
| 16 | + |
| 17 | +Below is the "funkin" (aka the default) note style json file `assets/data/notestyles/funkin.json`[^notestylesource] |
| 18 | + |
| 19 | +```json |
| 20 | +{ |
| 21 | + "version": "1.0.0", |
| 22 | + "name": "Funkin'", |
| 23 | + "author": "PhantomArcade", |
| 24 | + "fallback": null, |
| 25 | + "assets": { |
| 26 | + "note": { |
| 27 | + "assetPath": "shared:notes", |
| 28 | + "scale": 1.0, |
| 29 | + "data": { |
| 30 | + "left": { "prefix": "noteLeft" }, |
| 31 | + "down": { "prefix": "noteDown" }, |
| 32 | + "up": { "prefix": "noteUp" }, |
| 33 | + "right": { "prefix": "noteRight" } |
| 34 | + } |
| 35 | + }, |
| 36 | + "noteStrumline": { |
| 37 | + "assetPath": "shared:noteStrumline", |
| 38 | + "scale": 1.55, |
| 39 | + "offsets": [0, 0], |
| 40 | + "data": { |
| 41 | + "leftStatic": { "prefix": "staticLeft0" }, |
| 42 | + "leftPress": { "prefix": "pressLeft0" }, |
| 43 | + "leftConfirm": { "prefix": "confirmLeft0" }, |
| 44 | + "leftConfirmHold": { "prefix": "confirmLeft0" }, |
| 45 | + "downStatic": { "prefix": "staticDown0" }, |
| 46 | + "downPress": { "prefix": "pressDown0" }, |
| 47 | + "downConfirm": { "prefix": "confirmDown0" }, |
| 48 | + "downConfirmHold": { "prefix": "confirmDown0" }, |
| 49 | + "upStatic": { "prefix": "staticUp0" }, |
| 50 | + "upPress": { "prefix": "pressUp0" }, |
| 51 | + "upConfirm": { "prefix": "confirmUp0" }, |
| 52 | + "upConfirmHold": { "prefix": "confirmUp0" }, |
| 53 | + "rightStatic": { "prefix": "staticRight0" }, |
| 54 | + "rightPress": { "prefix": "pressRight0" }, |
| 55 | + "rightConfirm": { "prefix": "confirmRight0" }, |
| 56 | + "rightConfirmHold": { "prefix": "confirmRight0" } |
| 57 | + } |
| 58 | + }, |
| 59 | + "holdNote": { |
| 60 | + "assetPath": "NOTE_hold_assets", |
| 61 | + "data": {} |
| 62 | + }, |
| 63 | + "noteSplash": { |
| 64 | + "assetPath": "", |
| 65 | + "data": { |
| 66 | + "enabled": true |
| 67 | + } |
| 68 | + }, |
| 69 | + "holdNoteCover": { |
| 70 | + "assetPath": "", |
| 71 | + "data": { |
| 72 | + "enabled": true |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +} |
| 77 | +``` |
| 78 | + |
| 79 | +There is quite a lot to unravel, let's break it all down. |
| 80 | +- `version`: The version number for the Note Style data file format. Leave this at `1.0.0`. |
| 81 | +- `name`: The readable name for the note style, used in places like the Chart Editor. |
| 82 | +- `author`: The author of the note style, aka the artist who created the assets. |
| 83 | +- `fallback`: The note style to use as a fallback/parent, providing a default option when the note style you are using is not available. Optional, defaults to `null`. |
| 84 | +- `assets`: A list of asset data for each of the assets for the note style. |
| 85 | + - See [list of assets](#note-style-assets) that you can provide the data for. |
| 86 | + |
| 87 | +Asset data is structured like so: |
| 88 | +- `assetPath`: The main asset path to use for this asset. |
| 89 | +- `scale`: Specify the size of the asset relative to the original size. For example, `2.0` makes the sprite twice as big. Defaults to `1.0` if unspecified. |
| 90 | +- `offsets`: Some animations may need their positions to be corrected relative to the idle animation. |
| 91 | + - Use an array of two decimal values, the first for horizontal position and the second for vertical position. |
| 92 | +- `isPixel`: Specify whether to display this asset as being pixel (disabling texture smoothing). Optional, defaults to `false`. |
| 93 | +- `data`: The structure of note style asset data objects that depends on the asset you are going to edit. |
| 94 | + |
| 95 | +Note Style Asset data is structured like so: |
| 96 | +- For `note`: List of animation data for the `left`, `down`, `up` and `right` arrows. |
| 97 | +- For `noteStrumline`: List of animation data for each direction and it's variations, such as `<direction>Static`, `<direction>Press`, `<direction>Confirm`, `<direction>ConfirmHold` replacing `<direction>` with it's each and every corresponding direction. |
| 98 | + - As you may see from the [example](#note-style-data)[^notestylesource] that was given, animation data for the `confirm` and `confirmHold` match up, however you can make it have unique animations. |
| 99 | +- For `holdNote`: Currently has no list of animation data that can be set. |
| 100 | +- For `noteSplash`: There is currently no list of animation data available that can be set. It is likely to be added in the future. |
| 101 | + - `enabled`: Specify whether to display the asset. Optional, defaults to `true`. |
| 102 | +- For `holdNoteCover`: There is currently no list of animation data available that can be set. It is likely to be added in the future. |
| 103 | + - `enabled`: Specify whether to display the asset. Optional, defaults to `true`. |
| 104 | + |
| 105 | +Animation data is structured like so: |
| 106 | +- `prefix`: The animation name as specified by your spritesheet. |
| 107 | + - 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. |
| 108 | + - For Animate Atlases, use either the frame label or the symbol name of the animation you want to play. |
| 109 | +- `offsets`: Some animations may need their positions to be corrected relative to the idle animation. |
| 110 | + - Use an array of two decimal values, the first for horizontal position and the second for vertical position. |
| 111 | +- `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. |
| 112 | +- `flipX`: Whether to flip the sprites of this animation horizontally in-game. |
| 113 | +- `flipY`: Whether to flip the sprites of this animation vertically in-game. |
| 114 | +- `frameRate`: A frame rate value, defaulting to `24`. |
| 115 | +- `frameIndices`: Optionally specify an array of frame numbers (starting at frame 0!) to use from a given prefix for this animation. |
| 116 | + - For example, specifying `[0, 1, 2, 3]` will make this animation only use the first 4 frames of the given prefix. |
| 117 | + |
| 118 | +[^notestylesource]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/data/notestyles/funkin.json> |
0 commit comments