Good to know. But I'm trying to avoid using terrain tags, passability, damage, etc as much as possible.
What I'm currently trying to do is: make the script read other images from a tileset (preferrably objects: B to E, since apparently - and correct me if I'm wrong here - MV lets us stack up to 1 terrain and 2 visible objects in the same tile). If I can do this, I can replicate the method used by Masked and apply it to cubes that form the ceiling and floor, independently.
I think this approach is somewhat safe, since one can stack an event on top of all that, and treat it as a visible object (maybe a sphere? A table? Or any custom Blender 3D object that can be called by Babylon, but let's not get too carried away yet, hehe....) - plugin commands should be the best shortcut for this, IMHO.
Textures to be applied:
Terrain -> tag (floor or wall) [to either]
Object 1 -> ceiling [to ceiling]
Object 2 -> ground for wall, if it has transparencies [to ground only | place Obj1 if block needs a ceiling texture]
3D objects:
event (calls)
(via) plugin commands
(a Babylon function) which spawn 3D object
(that, according to args) may be sphere, column, cylinder, cube, etc, or custom
(dis gunna b heavy...)
Terrain -> tag (floor or wall) [to either]
Object 1 -> ceiling [to ceiling]
Object 2 -> ground for wall, if it has transparencies [to ground only | place Obj1 if block needs a ceiling texture]
3D objects:
event (calls)
(via) plugin commands
(a Babylon function) which spawn 3D object
(that, according to args) may be sphere, column, cylinder, cube, etc, or custom
(dis gunna b heavy...)
Just came to my mind that there may be a specific tileset format for this kind of implementation. Masked may just have standardized FPLE's own tileset format (hence files such as "img/textures/1_0-1.png" and so: they do not necessarily correspond [visually] to anything near any tiles in "img/tilesets/FPLE.png").
With some code from Masked (which I blatantly copied and edited to make map data fit)
I tested some things and here's what I got:
layer 0 = terrain
layer 1 = (terrain overlay?)
layer 2 = mid
layer 3 = top
layer 4 = Shadows (nobody uses them? lol)
layer 5 = Regions
Code:
mapdata = [];
var width = $dataMap.width;
var height = $dataMap.height;
var data = $dataMap.data;
for (var z = 0; z < 6; z++) {
mapdata[z] = []
for (var x = 0; x < width; x++) {
mapdata[z][x] = [];
for (var y = 0; y < height; y++) {
mapdata[z][x][y] = data[y * width + x + (z*width*height)];
}
}
}
I tested some things and here's what I got:
Code:
-wood under flag:
mapdata[2][0]
[0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
mapdata[3][0]
[0, 291, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-wood over flag:
mapdata[2][0]
[0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
mapdata[3][0]
[0, 291, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
layer 1 = (terrain overlay?)
layer 2 = mid
layer 3 = top
layer 4 = Shadows (nobody uses them? lol)
layer 5 = Regions

