EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
991 stars 185 forks source link

New Command: 2049 - SetGameSpeed #3109

Open jetrotal opened 1 year ago

jetrotal commented 1 year ago

Minor experiment, our first new Event Command.


To use it, write in Maniacs TPC: @raw 2049, "", speedIsVar, speed, speedLimitIsVar,speedLimit, hideSpeedMultiplierIsVar, hideSpeedMultiplier

e.g.: @raw 2049, "", 0, 10, 0, 50, 0, 1

The command must be inserted inside a parallel process, because Game_Clock::SetGameSpeedFactor(speed); only changes the speed at current frame.

image image

Any refactor (to improve how it's called or to hide the speed counter) is welcome.

Ghabry commented 12 months ago

What is the motivation behind this command?

I don't want to be too negative but I already see the Yume2 gatekeepers adding this command so you are not playing the game incorrectly like they already did with the ini setting to kill widescreen.

Code wise I don't see anything serious. Could be maybe permanent so it doesn't have to be triggered every frame but this needs more code.

jetrotal commented 12 months ago

I was thinking about cases where a dev would that attach it to a custom button, or select the speed of dialogs only, or even in a minigame that requires faster game speed.

lemme know if this is too specific or if it can annoy other people.

Lemme know if that seems useless...

And yeah, mimigris comented that the 2kki devs already discovered other ways of detect if a game is using easyRPG.

Mimigris commented 12 months ago

What is the motivation behind this command?

On some Maniac games like THUNDER WINDY -Castle of the UndeadKnigh- or Suika's drunk runaway, the Maniac command Set Game Option was used with the setting Set FPS (this changes the speed of the game, a bit like what is done here though it allows another range of values): in the first case, it was done to speed up a game that was created as being slow, while in the latter case, it was done to speed up a loading (which is the generation of a map with the Set Tile command of the patch). This could serve as examples of what could be done with a command like this one.

And yeah, mimigris comented that the 2kki devs already discovered other ways of detect if a game is using easyRPG.

Hopefully they no longer try to detect the Player to do different things when using it nowadays, they just list sometimes the issues that they have in the changelog of the game and on the wiki page of differences, though we still need to keep our eyes on them from time to time to avoid a situation like this to reoccur intentionally.

Ghabry commented 12 months ago

The explanations sounds reasonable so this PR can stay open until I have some time to think about it more

jetrotal commented 11 months ago

The explanations sounds reasonable so this PR can stay open until I have some time to think about it more

Now the command multiplies the current speed value, protecting the FF buttons from any 2kki dev intention. And it also caps at 100x speed, to avoid lagging the engine.