--[[
some background:
i wanted lua-style scripted mods to be accessible to as many people as possible,
including those who aren't lua gurus like taronuke, puuro, windeu, and the like
the old format was easy to use but required hella lua knowledge to actually make anything with
this is made to be more lightweight and less lua-construct heavy,
and to look similar to the old .crs format for familiarity
above all else, trying to be pretty but flexible at the same time
the reason I wanted to implement this in lua is because the language allows a lot of
powerful things
let's say you wanted to make a stealth blink effect
under normal circumstances, that would span out a bunch of lines
depending on how long the effect lasted
with lua, it's as easy as making a for loop
mod{ beat=10, finish=1, mods='*5 stealth'}
for i=0, 1, 0.1 do
mod{ beat=10 + i, len=0, mods='*999 50% stealth' }
end
and if you wanted this for multiple sections, you could make a function for it, and so on
i always felt the standard .crs format was limiting, and the mod readers
made by other stepchart artists didn't do much for readability or usability either
(no offense to your guys' work, which I was ultimately inspired by! :D)
writing mods in pure lua with a little bit of a helping hand
should make things a lot less painful for people who want awesome simfiles
and that's my goal.
]]
-- this file, mods.lua, is to be loaded and read by the default.lua,
-- which is the actual implementation
-- these are pretty much set in stone
mod{ beat=0, finish=9999, mods='*999 3x' }
mod{ beat=31.5, finish=59.5, mods='*999 150% beat' }
mod{ beat=59.5, len=0, mods='*999 no beat' }
-- can also use "time=" instead of "beat=", beats are internally converted to time
-- (as are len/finish if beat is used)
-- len=0 mods are run for exactly one frame (in theory)
-- here so the script doesn't break, lua isn't implemented
function lua() return function() return function() end end end
-- concept 1
lua{ beat=63, len=1 }{ PlayerP1, PlayerP2 }{'rotationz', 30}
lua{ beat=63, len=1 }{ PlayerP1, PlayerP2 }{'vibrate'}
lua{ beat=63, len=1 }{ PlayerP1, PlayerP2 }{'effectmagnitude', 30, 30, 0}
lua{ beat=64, len=0 }{ PlayerP1, PlayerP2 }{'rotationz', 0}
lua{ beat=64, len=0 }{ PlayerP1, PlayerP2 }{'stopeffect'}
-- concept 2
lua{ beat=63, len=1 }{ PlayerP1, PlayerP2 }(function(actor)
actor:rotationz(30):vibrate():effectmagnitude(30, 30, 0)
end)
lua{ beat=64, len=0 }{ PlayerP1, PlayerP2 }(function(actor)
actor:rotationz(0):stopeffect()
end)
-- support for both is possible
Really wish we had spoiler tags.