Skip to content

Creating

9thCore edited this page Oct 3, 2021 · 15 revisions

Hoo boy, creating a chart. This will take a while.

STARTING OFF

First, copy the TEMPLATE CHART folder, paste it in Audio > Charts and rename it. (Do note that I plan to change the folder where it's located once CYF 0.6.6 rolls around)

Inside of this folder there are a few stuff I should clarify.

music.ogg/music.wav

The most important part of a chart in a rhythm game is the music. Simply replace this with your music.

!! MAKE SURE IT HAS ONE OF THE EXTENSIONS ogg OR wav !!

chart.stfn

What's the second most important part of a chart? The arrows, of course!

I recommend creating them using ArrowVortex is where I got it from.

To create a stepfile, first open your music.ogg/wav file in ArrowVortex: File > Open

Next, go to Tempo > Adjust Sync and set the Initial BPM (There's also a BPM finder but don't rely on it)

After that, go to Chart > New Chart and click Create (The difficulty doesn't matter as you won't need it)

By default the white arrows will jump two beats. To change their snap, press the left and right arrow keys on your keyboard to lower and increase it respectively.

(You can also zoom in if you want to, hold Ctrl and scroll using your mouse)

Now make the chart. You can place arrows by pressing 1-4 and mines by pressing Shift + 1-4

After you're done, open the music.sm file that has been generated where the music.ogg/wav file resides. From it, you need to copy from the #NOTES section, from the first 4 numbers next to one another up until the end of the file.

Example. Start from where I highlighted and go downwards

Now just copy all of this and dump it into the chart.stfn file (this file is a normal text file. You can open it using Notepad, Sublime Text, Notepad++ etc.)

You're not done yet, though!

You now need to open main.lua and change the stuff at the top of the file to their correct values.

You're now done and can play your chart!

main.lua

This is where your lua for the chart will go.

Note that this file houses the offset, bpm, HP and scrollSpeed variables. They are documented inside of the file itself.

This is how you spice your chart up! Move the arrows around, create distractions, anything!

More information on the lua will come later.

sprites (folder)

Where do I put my sprites, you ask? Why, in the sprites folder, of course!

If you wish to use one of your sprites, put it in there (subfolders work too!) and use the sprites prefix when setting something to your sprite.

Omitting the sprites prefix allows you to select a base-game (base-mod?) sprite!

libs (folder)

But what if you have a library that you found online that you want to use? Not to worry, there's a folder for that as well!

Simply put your libraries in here and use the libs prefix when require()ing one!

Example: require("libs/myLib")

sounds (folder, DOESN'T WORK YET)

What if you want to use custom sounds in your game? Put them here and do Audio.PlaySound("sounds/mySound"), of course!

voices (folder, DOESN'T WORK YET)

If you want to use custom voices use this folder and use [voice:voices/myVoice] when setting the voice of a text!

shaders (folder, DOESN'T WORK YET)

What if you want to use shaders in your mod?

Simply put them here and apply them!

FOR SOME REASON, SHADERS WORK WITHOUT THE shaders PREFIX. I DON'T UNDERSTAND IT EITHER

LUA!

So you wanna spice up your charts with a bit of coding? Well you've come to the right place!

First off, a small warning.

Try to avoid frame-based timers.

Since this is a rhythm game, movements MUST be synced to the music.

Frame timers essentially aren't synced because the mod could always lag just a tiny bit (2-3 less fps is enough) so the whole thing goes to shit.

I recommend using the Time object and GetCurrentBeat() to time your stuff.

...wait, you don't know what GetCurrentBeat() is? Well then!

StepTale offers some functions that I thought would be helpful, one of them being GetCurrentBeat() which returns the, well, current beat.

A nice thing about this is that it's always in-sync with the value in ArrowVortex!

There's a couple more useful functions, but I won't list them here. Instead you can check out USEFUL FUNCTIONS.lua. All functions are documented there.

One more thing, any sprites and stuff you create will be deleted at the end of your chart. (or at least should be)