I want water tiles with 012 animation instead of 0121

Pix3M

Veteran
Veteran
Joined
Feb 4, 2019
Messages
99
Reaction score
81
First Language
English
Primarily Uses
RMMV
(I think I posted this in the wrong section… oops)

I'm making my own tilesets but water doesn't flow back and forth. I want them to flow in one direction in a 3-frame animation.

So I found this in rpg_core.js

Code:
Tilemap.prototype._drawAutotile = function(bitmap, tileId, dx, dy) {
...
...
        var waterSurfaceIndex = [0, 1, 2, 1][this.animationFrame % 4];
...
...
};
then I pasted that entire function to my plugin, where I change the above line to this:

Code:
        var waterSurfaceIndex = this.animationFrame % 3;
Water tiles still animate from 0, 1, 2, 1 instead of 0,1,2. I saved this even on the original rpg_core.js file, nothing changed.

I checked if i'm editing in the right folder, my game is being booted with the edited files. The plugin is active and running. Whatever is telling the game to do 0,1,2,1 has to be in a spot I missed, but where?
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Also look for ShaderTilemap and make the same change there.

Which one is used depends on the platform you're deploying to.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
I looked at this a while back to no avail, but it seems this might be an appropriate override for ShaderTilemap:
Code:
ShaderTilemap.prototype._hackRenderer = function(renderer) {
    var af = this.animationFrame % 3;
    renderer.plugins.tilemap.tileAnim[0] = af * this._tileWidth;
    renderer.plugins.tilemap.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
    return renderer;
};
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top