What data Tilemap class asks for?

The documentation for the Tilemap class is like this:

setData ( width height data )
Where data is "The one dimensional array for the map data"


I'm having troubles figuring out what one dimensional array is expecting, so far I have my code like this:

var actor = new Tilemap();
actor.setData(576, 384, ImageManager.loadCharacter("Actor1"));
actor.tileHeight = 48;
actor.tileWidth = 48;
actor.update();


When I'm trying to get the length of the actor.bitmaps it returns 0, what am I doing wrong?
I figured out the data attribute is just an id and a number like 1 : 512 inside a ".data()" and the data attribute is just a parameter to check the type of tile from a predefined list, from here to create a custom tilemap I would need to add some extra code to the list of predefined tiles. So the image goes into the bitmaps attribute once everything is setup. However I couldn't figure a way to slice the image with this class so I think for my purpose it might be better to use PIXI directly. Maybe this class is just to organize tiles, I don't really know.

Hope this helps someone that gets stuck here like I did.
mmm ... not sure what you're saying here.

The data attribute comes from $dataMap and it is the width x height x 6 (?) that contains all the tile ids, shadows, and flags for the entire map.


Tilemap is for drawing the map. It has nothing to do with drawing actors (at least from what I recall when I looked into it last). You are doing something very weird here. Perhaps you should take a big step back, and state what you are trying to do, because the above is not the way to go about it.
Oh I see, thank you for your answer. I'm trying to create custom size tilesets to create an animation plugin for the Medieval Interior assets that are 128,128 each tile, I couldn't find the class the actors use to slice and store the tiles for the animations.

My progress on this is that I'm using PIXI to do it. The only problem I'm currently facing is that the PIXI that comes with a new project doesn't come with the PIXI.loaders to preload the images so I'm worried about the performance.

If there is a plugin that I'm missing that already do this or any advice, I will really appreciate it, I bought rpg maker 4 days ago so I am a little bit lose.
I'm a little lost, are you trying to change the cell size? I mean the tile data is getting the width/height of each cell and the tile_map of the room.
Not really change the cell size, the characters are normally 48,48 but the Medieval Interior characters are 128,128, so rpg maker doesn't slice the character sheets to create event animations like a kneel animation, I tried with "more character frames" plugin but I only managed to get the walking animations.
I found the solution I was looking for, after doing some more research, the "Sprite()" class from rpg maker has the frame function from pixi.
I really need to read a little bit more of the documentation.
I am still confused.

The Medieval pack is from PV Games, correct? The tiles are all 32x32 for Ace and 48x48 for MV.

I think what you're talking about is characters, not tiles - in the img/characters folder. Those are not drawn on the map. They are placed with events. And they animate by you adding move routes or turning on stepping animation.

You should not have to change any scripts in order to use those, and if you do, the script mods should be provided as part of the package.
Indeed it is the character tiles I was talking about, sorry if I didn't express myself properly.



The white rectangle is the sprite that rpg maker is trying to take, the medieval interiors package doesn't have any plugin and the documentation mentions modifying the files with gimp or a similar program to make them work in rpg maker mv, but that would take me a lot of time compared to create a plugin.

Now with the sprite class I managed to make it all work and with the scene_boot I'm preloading the assets.
Are those the sprites that have many, many rows? There must be a plugin to allow you to use them. Go to the PV Games forum and search - it might be a plugin in that part of the forum, rather than one that comes with each individual pack.

I'm also not sure if the PV Games resources are sized for MV or Ace. I know they used to be for Ace, but I don't know if they're now making MV resources as well.

If you still can't find anything, then make a post in that part of the forum and Jesse will answer you. Or report your first post here and ask for it to be moved to the PV Games section.

You do NOT have to write your own script/plugin for this.

Edit: just checked the product page, and they are indeed MV resources.

This would be a good thread for you to go through:
https://forums.rpgmakerweb.com/inde...ools-list-useful-for-pvgames-resources.63602/
Thank you Shaz. The Quasi Sprite on that thread fix my issue and is very easy to setup.

Original thread: https://forums.rpgmakerweb.com/threads/what-data-tilemap-class-asks-for.85360/