FunkinCrew / Funkin

A rhythm game made with HaxeFlixel
https://www.newgrounds.com/portal/view/770371
Other
2.97k stars 2.29k forks source link

Bug Report: [0.5.0] The PlayState scrollSpeed doesn't change accordingly #3393

Closed Starexify closed 1 month ago

Starexify commented 1 month ago

Issue Checklist

What platform are you using?

Itch.io (Downloadable Build) - Windows

If you are playing on a browser, which one are you using?

None

Version

0.5.0

Context (Provide images, videos, etc.)

So I have this script to change the scroll speed based on an option, and in the version 0.4.1 of FNF it works just fine. Then when I moved the mod on 0.5.0, it just doesnt work, even tho the PlayState.instance.currentChart.scrollSpeed is set to that number, and even if its over 10 speed, it's always keeping the original chart scroll speed. Why is that happening in 0.5.0? I checked the source code for differences. Nothing about scrollspeed from 0.4.1 is changed in 0.5.0 but somehow it doesn't work? What was really changed to make the method unuseable?

How the function looks basically (save.data.scrollSpeedFactor = 4 in this case):

override function onSongLoaded(event:SongLoadScriptEvent) {
  super.onSongLoaded(event);
  state = PlayState.instance;
  trace("Scroll speed before setting: " + state.currentChart.scrollSpeed);
  state.currentChart.scrollSpeed = save.data.scrollSpeedFactor;
  trace("Scroll speed after setting: " + state.currentChart.scrollSpeed);
}

image The console shows the scrollSpeed change. The onUpdate shows aswell because i made a text here to debug it and it even can be read the scroll speed of the chart is changed from the og to my custom scrollSpeed of 4.

Steps to reproduce (or crash logs, errors, etc.)

  1. Try adding that in a Module class with a custom scroll speed like 10 or something onSongLoaded.
  2. It doesn't change anything and the chart still has the original scroll speed.
lemz1 commented 1 month ago

Strumline.hx has a scrollSpeed variable, so you probably need to set the scrollSpeed for the player and opponent strumline

Starexify commented 1 month ago

Strumline.hx has a scrollSpeed variable, so you probably need to set the scrollSpeed for the player and opponent strumline

Oh yes, thanks, I see they somehow changed it so its now Strumline based instead of currentChart.scrollSpeed for the notespeed. But that should've been changed here in this line tbf because its confusing:

https://github.com/FunkinCrew/Funkin/blob/a27c4ae24f99d7c1eaa0bf48726dd94a420ec012/source/funkin/play/PlayState.hx#L552C1-L556C54

Burgerballs commented 1 month ago

Strumline.hx has a scrollSpeed variable, so you probably need to set the scrollSpeed for the player and opponent strumline

Oh yes, thanks, I see they somehow changed it so its now Strumline based instead of currentChart.scrollSpeed for the notespeed. But that should've been changed here in this line tbf because its confusing:

https://github.com/FunkinCrew/Funkin/blob/a27c4ae24f99d7c1eaa0bf48726dd94a420ec012/source/funkin/play/PlayState.hx#L552C1-L556C54

its cuz its supposed to be the starting scroll speed, if it was changed accordingly i'd have no way to return it back to the original scroll speed