Does anyone know how event speeds work?

The basic speed settings according to RPG Maker MZ say this:

1: 8x Slower
2: 4x Slower
3: 2x Slower
4: Normal
5: x2 Faster
6: x4 Faster

I've done some pitifully limited testing with custom speeds beyond the default using stuff like:
$gameMap.event(4).setMoveSpeed(3.6921)

And this appears to set a movement speed to 3.6921 for that event, whatever that corresponds to.
I can tell that this is clearly slower than Speed 4 (Normal), and also faster than Speed 3.5, and faster than Speed 3.6, faster than 3.65, etc. Exactly as you'd expect, but how much faster? This got really confusing when I started to look at speeds below 2.5 for reasons I'll get to now.

Most decimal values work and function perfectly well as long as they aren't too fast (ie: Speed 14+ will clip through everything and likely isn't functional without lots of careful attention) or too slow (Speeds below 2.5 behave very strangely and can be confusing/unintuitive/inorganic). But for the most part, I haven't had any issues with custom speed values in my own projects. My question is really just how they work or why they work that way.

Speeds ~2.415 to ~1.415 are all equal to Speed 2
Speeds ~1.415 to ~0.830 are all equal to Speed 1
Speeds ~0.830 to ~0.415 are all equal to whatever comes after Speed 1 (Speed 0.5?)
Speeds ~0.415 to ~0.093 are all equal to whatever comes after that (Speed 0.25?)
Speeds from 0.000 to ~0.093 are all equal to Speed 0

Part of the weirdness is that the slower speeds aren't twice as slow as the previous speed.
I haven't rigorously tested them (or referenced them much since I don't know where to start looking), but it seems like the lowest speed is only a teeny bit slower than the 2nd lowest speed. Like 20-25% slower or something. The next lowest speed (3rd lowest) might also not be "half as fast" as Speed 1 even though it seems reasonably close.

The parts in bold are what I'm super clueless about, as well as how speed is implemented in the first place with respect to fps and all that.

Speed 0 = 16x slower (0.00 to ~0.093)
Speed 0.25? = ??x Slower? (~0.093 to ~0.415)
Speed 0.5? = ??x Slower (~0.415 to ~0.830)
Speed 1 = 8x Slower (~0.830 to ~1.415)
Speed 2 = 4x Slower (~1.415 to ~2.415)
[from here on, all decimal values work perfectly, like 2.6 being faster than 2.55 but slower than 2.81114, which is slower than 3]
Speed 3 = 2x Slower
Speed 4 = Normal
Speed 5 = 2x Faster
Speed 6 = 4x Faster
Speed 7 = 8x Faster
Speed 8 = 16x Faster
Speed 9 = 32x Faster
Speed 10 = 64x Faster (this is the fastest speed that doesn't seem to break my movement routes, but I'm sure YMMV)


Does anyone know how these event speeds work?
The relevant function is
JavaScript:
Game_CharacterBase.prototype.distancePerFrame = function() {
    return Math.pow(2, this.realMoveSpeed()) / 256;
};

So, speed of 3.6921 would be (2^3.6921)/256, or about 0.05 tiles per frame.
Okay so the lowest speed (Speed 0 i guess) is approximately (2^0)/256 = ~0.0039 tiles per frame which is half as fast as Speed 1, and I shouldn't call it the lowest speed because that functionally does not exist

Any negative speed seems to do the same thing as the positive speeds.
So anything between Speed -1.41503 to -2.41503 just acts exactly like Speed -2.00000
what you're forgetting here is the frequency setting.

The frequency of movement determines how often an opportunity to move is skipped.
At highest setting the event will move at every opportunity, which is why you need to set the frequency to highest if an event should move the same as the player on the same speed.

the lower the frequency setting, the more opportunities to move will be skipped, reducing the effective movement speed per second.
sorry, I have no numbers but that is likely to have an impact on your statistics as well if you haven't set your events to max frequency.
I like using this to get the amount of frames it takes for a character to move 1 tile which you can use as a reference for wait frames (movement speed of 4 would take 16 frames per tile):
JavaScript:
const num = 2 ** (8 - $gameMap.event(1).moveSpeed());
this.wait(num);
As stated above, frequency will affect your timing as well. A setting of 5 (highest) would return 0, or, no stop count before executing next movement code:
JavaScript:
Game_Event.prototype.stopCountThreshold = function() {
    return 30 * (5 - this.moveFrequency());
};
Zombie randomly wanders into a thread...sees that they are doing the Mathsis...wonders why would he want to do this...and shuffles away...confused...Urgh...Argh...

Seriously though, is there a practical application for this? I'm not even going to try to digest the math part. Just curious about the application part.
Zombie randomly wanders into a thread...sees that they are doing the Mathsis...wonders why would he want to do this...and shuffles away...confused...Urgh...Argh...

Seriously though, is there a practical application for this? I'm not even going to try to digest the math part. Just curious about the application part.
If you want events to move at different speeds to a finer degree than the whole number default choices. I definitely use it in my ABS on-map battles.
Yeah.
And while I'm not using ABS, I'm mainly interested in using speeds between 1.5 and 2.5 for very fine cutscene control. Everyone's game is different, and it is true that my NPCs are really only 32x40 but they fit into the same default 48x48 default tiles and that's what I'm using. So I understand that my own graphics will have needs that might be outside the normal bounds but this seems like a potentially common desire that could affect other people besides myself.

Normal (4) is much too fast for most NPCs in my cutscenes.
Slower (3) is around the maximum I'd like for a character walking at a brisk pace. Usually this is a bit too fast for my liking, however.
Slow (2) is far too slow, and seems appropriate only for very slow-moving elderly NPCs that aren't in much of a hurry for anything. This speed almost always stands out in my cutscenes even for very small movements (like half a tile of movement would still be a bit too much to wait for an NPC at speed 2 to traverse for it to be worth it. It feels like I'm better off skipping that movement entirely and continuing with the next "thing" that happens any time I find a situation where I'm waiting for a Speed 2 NPC to move even one single tile, and I end up just cutting that movement from the cutscene before it's finished.

Having the wrong speed just barely ruins the immersion and forces me to look for other options to hide the fact that I can only make NPCs move at a select few speeds. Perhaps if I looked into toying with frequency settings I could come up with some clever solutions to overcome these issues, but at the moment I'm basically just playing with maximum frequency on everything (since I'm primarily eventing cutscenes there is no reason to have NPCs stagger their movements unless that's a desired old-school jrpg effect your game is going for. Generally speaking, mine is not. Smooth movement at virtually all times if possible, and if I had time I'd accelerate/decelerate many scripted movements I'm using in my game as long as the control was available to me.

The problem is that I don't seem to have access to speeds between 1.4 and 2.4 (they are all set to exactly 2), and speeds between 0.8 and 1.4, which would be useful.

I'd like to make a crowd of NPCs all moving at slightly different speeds, like:
2.9 = brisk pace (fastest in the crowd)
2.6 = somewhat normal/standard walking speed
2.5 = slightly slower
2.4 = normal-ish lower limit because anything below 2.42 will turn into a different speed
2.3 = inaccessible speed I don't have access to (since it's below 2.42 and above 1.42)
2.2 = slowest speed I'd like to incorporate regularly (ie: the slowest person in a crowd)

Having five or six different movement speeds even for a large crowd of npcs at scale gives the mass of NPCs some fantasic movement that looks great, but I can't justify adding any npcs moving at Slow (speed 2) to the group since they look out of place and stick out like a sore thumb. The difference is much too great between the next-slowest available speed (Speed 2.42, the slowest I can get before it jumps down to speed 2.0 for some reason). On the other hand, using any custom speed above 2.42 works perfectly and really enhances my cutscenes (at least in my opinion).

It is true that I could frame my scenes differently and adjust everything so that 2.42 is the clear slowest speed that NPCs might "walk" at without reaching the staggaringly inappropriate crawl speed of Speed 2 (Slow), but it feels like I'm making everyone move slightly faster to compensate and it isn't ideal.

Furthermore, for very slow movements like getting out of a chair, walking around a fireplace, or calmly taking a step around a room during some enchanting monologue it is perfectly acceptable to use speeds below 2.0, but the next-slowest speed is Speed 1, because anything below Speed 2 is going to either adjust itself to be equal to speed 2, or equal to Speed 1 (or one of the three speeds beneath Speed 1 that are excruciatingly slow).

The negative speeds function identically and for no discernable reason. There is functionally no limit to how slow I can make my NPCs move, but there isn't a practical reason to desire that control, either. So the speeds I'd like to have access to are really the ones between 1.8 and 2.4 or so, because each of those just sort of truncate/round to Speed 2 instead of functioning properly like most other numbers do.

EDIT: Sorry for rambling. The answers I've gotten so far have helped me understand how it works, although I'm still curious if anything can be done outside of some intrusive javascript that might ruin my project (at least temporarily) in case something goes wrong
Yeah.
And while I'm not using ABS, I'm mainly interested in using speeds between 1.5 and 2.5 for very fine cutscene control. Everyone's game is different, and it is true that my NPCs are really only 32x40 but they fit into the same default 48x48 default tiles and that's what I'm using. So I understand that my own graphics will have needs that might be outside the normal bounds but this seems like a potentially common desire that could affect other people besides myself.

Normal (4) is much too fast for most NPCs in my cutscenes.
Slower (3) is around the maximum I'd like for a character walking at a brisk pace. Usually this is a bit too fast for my liking, however.
Slow (2) is far too slow, and seems appropriate only for very slow-moving elderly NPCs that aren't in much of a hurry for anything. This speed almost always stands out in my cutscenes even for very small movements (like half a tile of movement would still be a bit too much to wait for an NPC at speed 2 to traverse for it to be worth it. It feels like I'm better off skipping that movement entirely and continuing with the next "thing" that happens any time I find a situation where I'm waiting for a Speed 2 NPC to move even one single tile, and I end up just cutting that movement from the cutscene before it's finished.

Having the wrong speed just barely ruins the immersion and forces me to look for other options to hide the fact that I can only make NPCs move at a select few speeds. Perhaps if I looked into toying with frequency settings I could come up with some clever solutions to overcome these issues, but at the moment I'm basically just playing with maximum frequency on everything (since I'm primarily eventing cutscenes there is no reason to have NPCs stagger their movements unless that's a desired old-school jrpg effect your game is going for. Generally speaking, mine is not. Smooth movement at virtually all times if possible, and if I had time I'd accelerate/decelerate many scripted movements I'm using in my game as long as the control was available to me.

The problem is that I don't seem to have access to speeds between 1.4 and 2.4 (they are all set to exactly 2), and speeds between 0.8 and 1.4, which would be useful.

I'd like to make a crowd of NPCs all moving at slightly different speeds, like:
2.9 = brisk pace (fastest in the crowd)
2.6 = somewhat normal/standard walking speed
2.5 = slightly slower
2.4 = normal-ish lower limit because anything below 2.42 will turn into a different speed
2.3 = inaccessible speed I don't have access to (since it's below 2.42 and above 1.42)
2.2 = slowest speed I'd like to incorporate regularly (ie: the slowest person in a crowd)

Having five or six different movement speeds even for a large crowd of npcs at scale gives the mass of NPCs some fantasic movement that looks great, but I can't justify adding any npcs moving at Slow (speed 2) to the group since they look out of place and stick out like a sore thumb. The difference is much too great between the next-slowest available speed (Speed 2.42, the slowest I can get before it jumps down to speed 2.0 for some reason). On the other hand, using any custom speed above 2.42 works perfectly and really enhances my cutscenes (at least in my opinion).

It is true that I could frame my scenes differently and adjust everything so that 2.42 is the clear slowest speed that NPCs might "walk" at without reaching the staggaringly inappropriate crawl speed of Speed 2 (Slow), but it feels like I'm making everyone move slightly faster to compensate and it isn't ideal.

Furthermore, for very slow movements like getting out of a chair, walking around a fireplace, or calmly taking a step around a room during some enchanting monologue it is perfectly acceptable to use speeds below 2.0, but the next-slowest speed is Speed 1, because anything below Speed 2 is going to either adjust itself to be equal to speed 2, or equal to Speed 1 (or one of the three speeds beneath Speed 1 that are excruciatingly slow).

The negative speeds function identically and for no discernable reason. There is functionally no limit to how slow I can make my NPCs move, but there isn't a practical reason to desire that control, either. So the speeds I'd like to have access to are really the ones between 1.8 and 2.4 or so, because each of those just sort of truncate/round to Speed 2 instead of functioning properly like most other numbers do.

EDIT: Sorry for rambling. The answers I've gotten so far have helped me understand how it works, although I'm still curious if anything can be done outside of some intrusive javascript that might ruin my project (at least temporarily) in case something goes wrong
The eval() itself is already intrusive so just inject away. Haha.

Anyways, if you are up for it, change the value 256 to a different integer in the code that Mac gave you (save it as a plugin to overwrite the corescript):
JavaScript:
Game_CharacterBase.prototype.distancePerFrame = function() {
    return Math.pow(2, this.realMoveSpeed()) / 256;
};
Use values that are divisible by 16 (224, 240, 272, 288, etc.) and check and see if that custom speed works better or breaks your movement. Worth a shot but I only recommend this if you feel like you can navigate through it yourself as well.

Edit: I just tested decimal speeds on events and they are all working fine: 1.415 is slower than 2.1 and 0.753 is much slower than those. Be sure to check your self-switches/switches and see if there is anything that may be interrupting the flow of your code.
The basic speed settings according to RPG Maker MZ say this:

1: 8x Slower
2: 4x Slower
3: 2x Slower
4: Normal
5: x2 Faster
6: x4 Faster

I've done some pitifully limited testing with custom speeds beyond the default using stuff like:
$gameMap.event(4).setMoveSpeed(3.6921)

And this appears to set a movement speed to 3.6921 for that event, whatever that corresponds to.
I can tell that this is clearly slower than Speed 4 (Normal), and also faster than Speed 3.5, and faster than Speed 3.6, faster than 3.65, etc. Exactly as you'd expect, but how much faster? This got really confusing when I started to look at speeds below 2.5 for reasons I'll get to now.

Most decimal values work and function perfectly well as long as they aren't too fast (ie: Speed 14+ will clip through everything and likely isn't functional without lots of careful attention) or too slow (Speeds below 2.5 behave very strangely and can be confusing/unintuitive/inorganic). But for the most part, I haven't had any issues with custom speed values in my own projects. My question is really just how they work or why they work that way.

Speeds ~2.415 to ~1.415 are all equal to Speed 2
Speeds ~1.415 to ~0.830 are all equal to Speed 1
Speeds ~0.830 to ~0.415 are all equal to whatever comes after Speed 1 (Speed 0.5?)
Speeds ~0.415 to ~0.093 are all equal to whatever comes after that (Speed 0.25?)
Speeds from 0.000 to ~0.093 are all equal to Speed 0

Part of the weirdness is that the slower speeds aren't twice as slow as the previous speed.
I haven't rigorously tested them (or referenced them much since I don't know where to start looking), but it seems like the lowest speed is only a teeny bit slower than the 2nd lowest speed. Like 20-25% slower or something. The next lowest speed (3rd lowest) might also not be "half as fast" as Speed 1 even though it seems reasonably close.

The parts in bold are what I'm super clueless about, as well as how speed is implemented in the first place with respect to fps and all that.

Speed 0 = 16x slower (0.00 to ~0.093)
Speed 0.25? = ??x Slower? (~0.093 to ~0.415)
Speed 0.5? = ??x Slower (~0.415 to ~0.830)
Speed 1 = 8x Slower (~0.830 to ~1.415)
Speed 2 = 4x Slower (~1.415 to ~2.415)
[from here on, all decimal values work perfectly, like 2.6 being faster than 2.55 but slower than 2.81114, which is slower than 3]
Speed 3 = 2x Slower
Speed 4 = Normal
Speed 5 = 2x Faster
Speed 6 = 4x Faster
Speed 7 = 8x Faster
Speed 8 = 16x Faster
Speed 9 = 32x Faster
Speed 10 = 64x Faster (this is the fastest speed that doesn't seem to break my movement routes, but I'm sure YMMV)


Does anyone know how these event speeds work?
The script doesn't work... there's no change in speed.
What script? The $gameMap.event(4).setMoveSpeed(3.6921) script?
It changes the movespeed of event #4 on your map to 3.6921, not the player if that's what you were saying does not work.

If you really think it doesn't work, try something like this $gamePlayer.setMoveSpeed(0.1) and tell me it doesn't work, that there's "no change" in speed. You'll notice it. You can't not notice it.
The script doesn't work...
This is not helpful info for people to diagnose the problem. If you are experiencing a problem, you should provide details and screen shots so we can understand what is going wrong.
What script? The $gameMap.event(4).setMoveSpeed(3.6921) script?
It changes the movespeed of event #4 on your map to 3.6921, not the player if that's what you were saying does not work.

If you really think it doesn't work, try something like this $gamePlayer.setMoveSpeed(0.1) and tell me it doesn't work, that there's "no change" in speed. You'll notice it. You can't not notice it.
No no, I want to make an event faster. Not me. I've tried $gameMap.event(4).setMoveSpeed(3.6921), and another thing that was suggested but neither worked.
@DeterminedKid1000 Looks like you started a support thread of your own for this topic. That’s great! The thread you made will be far more tuned in to exactly what you need. Borrowing or “hijacking” (not the nicest word, admittedly) another member’s support thread is discouraged in most circumstances since many support needs are more like siblings rather than twins. I’d absolutely recommend continuing to follow up in your support thread

However, since @redtide89 is here, may I ask…as the thread is a little on the older side, were you able to get the solution/explanation you needed as well? If you did, we’d be happy to get this closed out for you. Thanks in advance!
However, since @redtide89 is here, may I ask…as the thread is a little on the older side, were you able to get the solution/explanation you needed as well? If you did, we’d be happy to get this closed out for you. Thanks in advance!
Go ahead if you must. It'd be nice if someone could let me know if they read through this while searching for something else and could provide some insight, though!
I don’t have to at all if you would like it open for that! Just wanted to check in since it sat for a bit. I appreciate the update! @redtide89

Original thread: https://forums.rpgmakerweb.com/threads/does-anyone-know-how-event-speeds-work.169075/