The Mirin Template

The NotITG Mirin Template. Easily create modfiles using Lua.


Project maintained by XeroOl Hosted on GitHub Pages — Theme by mattgraham

Back to main page

Getting Started

This document will walk you through how to begin modding using the Mirin Template.

Table of Contents

  1. Install NotITG
  2. Download the Template
  3. Setting up the Song and .sm
  4. Check your work
  5. Default Mods
  6. Setting Mods
  7. Smooth Transitions
  8. Conclusion

Install NotITG

If you already have the game, you can skip this step. If you don’t have NotITG already, you can install NotITG from noti.tg. Download the full setup, unzip it, and then make a shortcut to the NotITG executable. Make sure where you unzipped it doesn’t require admin privileges. If everything went right, you should be able to start up the game by running the NotITG.exe file in the Program/ folder.

Download the Template

To start, you need to find the folder that NotITG is installed in. Download the Mirin Template Code from GitHub and unzip it into a song pack in your Songs folder. When you’re done, the structure should be something like this (except My Song Pack would be filled in with whatever information you want):

NotITG
└── Songs
    └── My Song Pack
        └── notitg-mirin-master
            ├── lua
            ├── readme.md
            ├── Song.ogg
            ├── Song.sm
            └── template

Now, if everything went right, you can launch the game and find the “Mirin Template” song in the song wheel.

Setting up the Song and .sm

You probably don’t want to make mods for the provided Song.sm and Song.ogg, so you can use your own.

Using an existing simfile

If you already have a .sm and audio file you want to use, you can delete the provided Song.sm and Song.ogg, and use your own file. Inside your .sm, you need to set #FGCHANGES: to the following:

#FGCHANGES:-10.000=template/main.xml=1.000=0=0=1=====;

Now you’re ready to move on to modding.

Adapting the provided Song.sm

First, convert your song into the ogg audio format, and replace the Song.ogg file with your own. Next, open Song.sm in a text editor. I recommend using the Notepad++ editor, but any text editor works. With Notepad++, you can right click on the file, and choose “Open With Notepad++”. Inside, there are a couple of things to change:

NOTE: Only edit the .sm while the game is closed. To make the game reload changes to the .sm file, you need to delete the Cache folder before re-opening the game. After you’ve put all of the metadata into the .sm, you’ll need to replace the default provided chart by writing your own chart. I’m not going to cover how to do this here, but here is a good resource.

Check your work

Before you go any further, you’ll want to check that things are prepared correctly. Here’s what to do:

  1. Open up NotITG, and then find your song in the song wheel.
  2. Play the song. If the template is loaded, you should see the theming elements dissappear at the beginning of the song. (If the lifebar and score and stuff is still there, something’s wrong)

If that works, you’re finally ready to start modding!

Default Mods

In NotITG:

  1. Go to Edit Mode
  2. Select Group
  3. Select Song
  4. Select Steps (usually Expert steps)
  5. Choose “Edit Existing”

This is the editor view. Use the arrow keys to scroll through the chart. You can use the space bar to select the bounds on a range, and then use the p key to play the song at that range. Turn off the measure lines in Esc > Preferences > Show Measure Lines. Make sure to press enter to save your changes.

Open up lua/mods.lua in the text editor. Under the line -- your code goes here here:, add this:

setdefault {2, 'xmod', 100, 'overhead', 100, 'dizzyholds', 100, 'modtimer'}

This sets the scroll speed to 2x, sets the perspective to “overhead”, and does a couple of other things. The setdefault function takes in pairs of numbers and mods, and sets the mod to that amount. More information about setdefault can be found on its documentation page.

Setting Mods

Now that you’ve set some base mods, you can now schedule mods to change at different beats of the song. To do that, you can use the set function. The set function works just like setdefault, except for an extra beat number at the beginning. Try choosing a mod from the list, and applying it with set. Here’s an example that turns invert on at beat 4, and turns it back off at beat 8.

-- on beat 4, set 100% invert
set {4, 100, 'invert'}

-- on beat 8, set 0% invert
set {8, 0, 'invert'}

This example used invert, but set works with any mod. You can try changing out invert for another mod from the list, or find more information can be found on set’s documentation page.

Smooth Transitions

If you tried the previous example, you’ll notice that there’s no animations; the mods instantly turn on and off. Sometimes that’s okay, but lots of the time, you’ll want to choose an animation to use. That’s where the ease function comes in. The ease function works like set, except it needs two more arguments: a length, and an ease function.

-- ease {beat, length, ease, percent, mod}

Here’s an example that that turns invert on at beat 12, and turns it back off at beat 16 smoothly.

-- on beat 12, for 2 beats, use the `outExpo` animation to set 100% invert
ease {12, 2, outExpo, 100, 'invert'}

-- on beat 16, for 2 beats, use the `outExpo` animation to set 0% invert
ease {16, 2, outExpo, 0, 'invert'}

This example used a length of 2, and the outExpo ease, but you can try changing the ease to another one from the ease list, and you can change the length. You can find more information about ease on its documentation page.

Conclusion

Now you have everything you need to begin modding. The main page has links to other functions you can read about.