These simfiles have modifiers that are scripted to happen at various points of the song. The difficulty can range between "trivial to read" to "may as well memorize the chart".
Often called "Modfiles" or "Modcharts".
These usually use the FGCHANGES or BGCHANGES of a simfile to load the lua files (if any are used).
Disclaimer: Make sure you've got making a chart down before starting to make modcharts! Good mods can't save a bad chart!
There are a few ways to go about this, and it varys depending on what version of SM is being used.
ApplyGameCommand is a GameState function that provides a way to send modifiers among other commands. The first paramter is the command type followed by the parameters. (In this case, a modstring) The second parameter is what player to apply the command (1 = player 1). If not specified, it applies to all players.
GAMESTATE:ApplyGameCommand("mod, *0.5 420 beat", 1)
While it's still available in SM5 (including OutFox), it's not recommended because it applies mods to the "Preferred" ModsLevel, which means modifiers apply instantly (no transition), and they persist outside of the simfile. SM5.2 Doesn't even have this function available.
Old modfiles used to require going into marathon mode to play the scripted modifiers. Unlike most things, this is time-based due to charts being able to have stops.
#MODS:TIME=0.000:END=10.000:MODS=*0.5 420 beat;
#MODS:TIME=5.000:LEN=1.600:MODS=*2 50 stealth;
(ex: Beat starts at 0 seconds and ends at 10. Stealth turns on at 5 seconds and ends 1.6 seconds later)
Nowadays, this is considered obsolete in favor of lua-powered modifiers. It's still usuable in SM5.
Allows for the application of modifiers similar to what course files have. The syntax is exactly the same, just with MODS becoming ATTACKS.
#ATTACKS:TIME=0.000:END=10.000:MODS=*0.5 420 beat;
#ATTACKS:TIME=5.000:LEN=1.600:MODS=*2 50 stealth;
nITG accepts #ATTACKS or #MODS inside the .sm file, while SM5 only accepts #ATTACKS in sm & ssc.
These do not load in course mode, however.
A dedicated function for applying modifiers without needing the processing overhead and "mod, " that ApplyGameCommand does.
GAMESTATE:ApplyModifiers("*0.5 420 beat", 1)
Often used as a replacement for ApplyGameCommand in nITG modfiles.
Every modifier has a setter function in PlayerOptions. This can be used in place of other functions. These are case-sensitive, though. If using strings, they'll have to be parsed to make use of these functions.
local po = {GAMESTATE:GetPlayerState(0):GetPlayerOptions('ModsLevel_Song'), GAMESTATE:GetPlayerState(1):GetPlayerOptions('ModsLevel_Song')}
po[1]:Beat(4.2, 0.5)
This function works by resetting the PlayerOptions for the given level, and setting it according to the string.
GAMESTATE:GetPlayerState(PLAYER_1):SetPlayerOptions('ModsLevel_Song', '*0.5 420 beat')
Because it resets PlayerOptions, it might not be so useful for applying scripted modifiers.
Like how ApplyModifiers is specifically for modstrings in nITG, FromString provides direct access to the string parser used for modifiers in ApplyGameCommand, and works very much like how ApplyGameCommand would.
local po = {GAMESTATE:GetPlayerState(0):GetPlayerOptions('ModsLevel_Song'), GAMESTATE:GetPlayerState(1):GetPlayerOptions('ModsLevel_Song')}
po[1]:FromString("*0.5 420 beat")
Def.PandaTemplate is an Actor that provides an easy interface for adding eased mods as well as set mods. If you are familiar with the ease template, the Def.PandaTemplate Actor should be straightforward to use.
local mods = {
{0, 3, '*1 flip', 'len'}
}
local eases = {
{4, 4, 0, 100, 'drunk', 'len', Tweens.easeInOutSine}
}
return Def.ActorFrame {
Def.PandaTemplate {
OnCommand = function(self)
self:PopulateBeatMods(mods)
self:PopulateEases(eases)
self:sleep(math.huge)
end,
}
}
Starting to make a modfile can seem really daunting if one does not know how to begin. Luckilly, there are many templates out there to help with creating modfiles.
Ones made for SM3.95 and Open/NotITG are usually done with .xml files, and some rare .lua files.
Ones made for SM5 and Project OutFox are almost always .lua files.
Sudospective's Ichigo Template
Sudospective's Kitsu Template
MTK's OutFox port of Exschwasion's easing template
Exschwasion's easing template
XeroOl's "Mirin" template
Sudospective's Lunar Template
TaroNuke's "Wow! It's Made" template
Daikyi's simple template
Ky_Dash's template
FMS_Cat's template
XeroOl's Galaxy Mod Loader (XGML) template
BrotherMojo's template
WinDEU's template
Cering's template (forked from exsch?)
HeySora's template
FMS_Cat's Automaton template
Jaezmien's template