Simply-Love / Simply-Love-SM5

a StepMania 5 theme for the post-ITG community
Other
189 stars 143 forks source link

feature: let players change SpeedMod before 1st note in CourseMode #542

Closed quietly-turning closed 1 month ago

quietly-turning commented 2 months ago

This allows players to increase/decrease their speed mods before their first JudgmentCommand at the start of each song in CourseMode gameplay.

It was requested by a local player who wants to play courses in ITGm, but prefers to stick to DDR-style XMods in increments of 0.25.


I went with increments of:

I also specified upper limits of:

to match the upper limits currently enforced in ScreenPlayerOptions.


Some design considerations:

  1. In my InputHandler function, I use event.button == "MenuRight" and not event.MenuButton == "MenuRight" to ensure the player has pressed a dedicated MenuButton that is separate from their dance pad.

    This has the unfortunate effect of making this feature inaccessible to players who navigate using their dance pad with OnlyDedicatedMenuButtons=0, but that seems preferable to them accidentally changing their speed mods while tapping out the beat at the start of gameplay (as would happen with DDR X Raw Thrills cabs 😖).

  2. I've specified RepeatRate=30 under [ScreenGameplay] in metrics.ini, the same SL uses for [ScreenPlayerOptions]. This allows players to hold MenuLeft or MenuRight and change their speedmod at the same rate seen in ScreenPlayerOptions (i.e. a rate they're possibly familiar with).

  3. The increments for MMod and CMod are (usually) much finer-grain than 0.25x and this is intentional. The quick RepeatRate should allow players to rapidly change their MMod or CMod.

  4. I've updated ScreenGameplay's DisplayMods.lua to reset the self:sleep(5):decelerate(0.5):diffusealpha(0) on the mod-string BitmapText each time the player changes their speed mod.


https://github.com/Simply-Love/Simply-Love-SM5/assets/1253483/74ee7fdd-61dc-4eef-b1b5-ae293dd1989a

quietly-turning commented 2 months ago

As I've had more time to think, I'm wary of how these changes will conflict with modcharts that involve using MenuButtons prior to the first note, like Jumper from R.I.G.H.T.S 1.

Let's discuss, but I think I'm in favor of moving the code I've got in ChangeSpeedModBeforeFirstNote.lua to a module that players can install at their discretion.

teejusb commented 2 months ago

I think this feature is totally fine, and if we restrict it to just course mode then I don't think we'd have that many issues since your example would need it to be a course of mod charts which I think is already way rarer.

quietly-turning commented 2 months ago

I think that sounds fine. I force-pushed an update that changed

af[#af+1] = LoadActor("ChangeSpeedModBeforeFirstNote.lua")

to

if GAMESTATE:IsCourseMode() then
   af[#af+1] = LoadActor("ChangeSpeedModBeforeFirstNote.lua")
end

which should restrict the behavior to CourseMode.

teejusb commented 1 month ago

Looks good to me! Thanks for the work on this!