Skip to content

Commit 0ea1352

Browse files
KoloInDaCribKade-github
authored andcommitted
Add json docs bout freeplay styles
1 parent 2d8181c commit 0ea1352

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[tags]: / "intermediate,ui,json"
2+
3+
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.
4+
5+
This chapter goes over adding custom freeplay styles, while also ensuring that they appear in the Freeplay State and telling the game when to use them for playable characters.
6+
7+
## Freeplay Style Data
8+
9+
A custom freeplay style requires creating a new JSON file in the `data/ui/freeplay/styles` folder.
10+
11+
Below is the "pico" freeplay style json file `assets/data/ui/freeplay/styles/pico.json`[^pico]
12+
13+
```json
14+
{
15+
"version": "1.0.0",
16+
"bgAsset": "freeplay/freeplayBGweek1-pico",
17+
"selectorAsset": "freeplay/freeplaySelector/freeplaySelector_pico",
18+
"numbersAsset": "digital_numbers_pico",
19+
"capsuleAsset": "freeplay/freeplayCapsule/capsule/freeplayCapsule_pico",
20+
"capsuleTextColors": ["#CC6600", "#CC9900"],
21+
"startDelay": 1.45
22+
}
23+
```
24+
25+
Lets break it all down:
26+
27+
- `version`: The version number for the Freeplay Style data file format. Leave this at `1.0.0`.
28+
29+
- This will increase if the data file format changes, and tell the game whether additional processing needs to be done for backwards compatibility.
30+
- `bgAsset`: The asset path for the background to use for the Freeplay Style.
31+
- `selectorAsset`: The asset path for the difficulty selector sprites.
32+
- `numbersAsset`: The asset path for the score numbers.
33+
- `capsuleAsset`: The asset path for the song capsules.
34+
- `capsuleTextColors`: A list of two hex codes representing the colors for the capsule song name text outlines.
35+
36+
- The first color is for when the capsule is deselected, whereas the second one is for when the capsule is selected. As of now, the first color is unused.
37+
- `startDelay`: The amount in seconds for the time needed to pass before switching to PlayState.
38+
39+
# Using a Custom Freeplay Style
40+
41+
To use a freeplay style, you must first have a [Playable Character](1.CustomPlayableCharacters.md). You can set the value of the field `freeplayStyle` in your custom playable character to use your custom freeplay style or modify the value of other playable characters by using [JSONPatch](../Introduction/5.AppendingAndMerge.md#merging) to modify the `freeplayStyle` value of that character.
42+
43+
[^pico]: <https://github.com/FunkinCrew/funkin.assets/blob/main/preload/data/ui/freeplay/styles/pico.json>
44+
45+
> Author: [KoloInDaCrib](https://github.com/KoloInDaCrib)

0 commit comments

Comments
 (0)