animated autotiles getting off sync after 3 images MZ

I have been analyzing how tiles work with my own logic and using Gimp found out mostly how they work but i found an issue with one of them.

its a water animation with a stone in the middle as a variation when i zone in in test play the animation is fine for the first 3 frames i figure they should be linked together properly in the file by overlapping them with transparency to see that they all match and ar in the correct order, so i came to realize that maybe the side ones with the stone are "Stepping" differently then the ones to the left maybe one set is "stepping" 1-2-3-2-1 and the other is stepping 1-2-3-1-2-3 ? as i said the first 3 frames are sync when i zone in the area then it goes of sync but they are properly placed. Anyone else has that issue? Maybe their is a way maybe as a plugin to change the stepping so that doesn't happen anymore?

Added a few pictures to help you understand what i am talking about.

image.pngFor-RPG-Forum.png

Other then having wrong stepping order i don't know what else could be wrong, let me know if you can figure it out.
I have also made an extra test and counted the "stepping" frames and i thing my logic is correct.
Normal "stepping" : (123)(212)(321)(232)(123)(212)(321)
123 "stepping" : (123)(123)(123)(123)(123)(123)(123)

Counting the frames they where on synch the first 3 frames... then went on sych again after 9 frames for an extra 3 frames and i noticed a single frame of synch in the middle... so i am pretty sure about the stepping being handled wrong is their any fix to this?
I am not knowledgeable in Javascript so i cant read all of that... but might the answer be in this portion of the core file?
I see the regular stepping there as an array 1-2-3-2 (-1 as zero is a value makes it 0-1-2-1)
For-RPG-Forum2.png
Gofofo_Kefu, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
might the answer be in this portion of the core file
Yes, it is.

The first line shows that for non-waterfall tiles, it goes in a 0-1-2-1 pattern. The last line shows that for waterfall tiles, it goes in a 0-1-2-0-1-2 pattern.

It's just as you thought in your first post.

You cannot combine the waterfall tiles and the water tiles and hope for them to stay in sync. You need to use a different water tile slot for the version with the stone.

If you REALLY want to use the waterfall tiles, you could try changing that last line to this instead (I have not tested this):
Code:
by += [0,1,2,1][this.animationFrame % 4];
but that is going to affect ALL your waterfalls.
Gofofo_Kefu, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
Thank you for the specification, i have not used forums much in the paste i will do this next time.
Yes, it is.

The first line shows that for non-waterfall tiles, it goes in a 0-1-2-1 pattern. The last line shows that for waterfall tiles, it goes in a 0-1-2-0-1-2 pattern.

It's just as you thought in your first post.

You cannot combine the waterfall tiles and the water tiles and hope for them to stay in sync. You need to use a different water tile slot for the version with the stone.

If you REALLY want to use the waterfall tiles, you could try changing that last line to this instead (I have not tested this):
Code:
by += [0,1,2,1][this.animationFrame % 4];
but that is going to affect ALL your waterfalls.

That code works as you say it affects waterfall tiles so it sometimes looks like the water id going up instead of down, i did not include any waterfall in my game yet but if i do they would not look right, guess another option would be to modify the set so only the stone would show on top of the water instead... alternatively i tried to mod the the tile file to replicate the top 2 sets... but it did not work as planned...
For-RPG-Forum3.png

The result is actually pretty bad why is it so different? If i follow the top 2 set's logic this should work.

For-RPG-Forum4.png
but this is the actual test play result im curious as how it is that the top 2 works but not his one. Maybe the rampancy is not the same in Gimp that what is recognized in RPG maker?

The other alternative would be to make the water animation itself follow the waterfall animation and do 1-2-3-1-2-3 instead of 1-2-3-2-1... for this i guess i should just remove the 1 at the end if the array ... that should make it cycle 1-2-3 instead or dribbling it like stepping... so i will try this...
Code:
const waterSurfaceIndex = [0, 1, 2][this.animationFrame % 4];
see if that makes them sych together...

No that definitively glitches out...
For-RPG-Forum5.png

So that doesn't work sadly, how would i make water itself step 123-123 instead of changing the waterfalls then? I am sorry i like to understand the logic behind every mechanisms and i would like to find a way to make this work flawlessly if possible.

Thank you for your help and reply.

Lol ok i found it... i don't know Javascript but but was thinking what if...

Code:
const waterSurfaceIndex = [0, 1, 2][this.animationFrame % 3];

would do it... after all its not 4 choices its 3... so i kind of guessed that % 4 meant 4 entries and changing it to % 3 actually makes the water step the same way as the waterfalls 1-2-3-1-2-3 resolving this issue.

Thank you for your help <3

See you next time.
If you aren't using all the other water autotiles, you could just duplicate the water and add the stone there, then draw using the shift button so it doesn't auto-reformat the tiles around it. No need to change scripts at all.
If you aren't using all the other water autotiles, you could just duplicate the water and add the stone there, then draw using the shift button so it doesn't auto-reformat the tiles around it. No need to change scripts at all.

After testing a few things with the games i was making for fun i noticed why you suggest not to change the code. Trying to use an add-on caused an error.

So i do guess that the best course of action would be to add just the stepping stone as an event above the water or something similar.

Thanks for your assistance i reverted the code back to default.
Are you sure your code change was the cause of the error? It could have been many other things.
In case it helps, I have a plugin, Cae_TileAnimExt, that lets you change the animation rate and frame order of animated tiles:

The result is actually pretty bad why is it so different? If i follow the top 2 set's logic this should work.
Those top 2 are "decoration" slots; the other 6 are animated "waterfall" slots. You can find more details in the help file:
  • Help -> Contents -> Documentation -> Asset Standards (Tileset Details).
Automatic layering places non-decoration page-A tiles on the bottom layer. You can get around this by:
  1. Making use of MZ's manual layer selection - pick a specific layer and paint there; or
  2. Moving the tile to an "upper" tile page, i.e. B, C, D, or E - the tile will not animate like this.

Original thread: https://forums.rpgmakerweb.com/threads/animated-autotiles-getting-off-sync-after-3-images-mz.157681/