Json files recreating fnf

So im creating friday night funkin and im not familiar with using json files in gdevelop, how do i make the game read the json files and spawn arrows based on the timings in the json file.

That would require advanced knowledge. I don’t know how the FNF’s JSONs are structured, but the basics of what you need to do are of this:

You want to create a loop that goes for each character of the JSON and finds starting and ending points of each property in the JSON, then stores the text between that start and end point wherever you need them. It’s a decoding loop. I’ve made plenty of these in the past, but it varies deeply in the file you are decoding.

I hope you find more specific help.

Hey!

It’s actually much simpler than you’d think, so long as you are comfortable with structure variables. Attached I have an image of how you would load the .json file.

Please note, At the beginning of the scene can be replaced with whatever conditions you’d like.

In case you or anyone reading does not know, a structure variable has children, each like its own variable under its parent. Basically, a parent is the category, and the child is like a box under that category, containing information matching that category. For example, I could have a parent variable with called Player_Stats, and one of its children may be Health. To access the Health variable, I would write it like this: Player_Stats.Health, or in a condition (works in both conditions / actions): Player_Stats.Health is greater than 50 --> some action.

Child variables can also have children (and grandchildren, and so on). For example, Player_Stats.Money.Silver_Coins, or in a condition (works in both conditions / actions): Player_Stats.Money.Silver_Coins is less than 20 --> some action.

For @ItsIceCreeperPE, you can load any .json file from ninjamuffin’s github and save it in a scene variable. Then you use the debugger to look through all the information, such as BPM, section notes, length in steps, etc. I tested on my PC using the .json files for blammed, and all seemed to work.

Sorry, that was a lot! If you have questions please let me know, I’ll try my best to answer them. I’m far from the most advanced user here, so I’m sure if I can’t answer it, someone else on this forum can! :grin:

OB

1 Like

Now that’s some sort of answer I was waiting for!

alright will try to do that