RMMZ Is it possible to access or add autotiles via plugin script

GreenTree-Studios

Creator of Dragon Bones
Veteran
Joined
Feb 3, 2021
Messages
36
Reaction score
11
First Language
English
Primarily Uses
RMMV
I am trying once again to create the Excavating system for my game, Dragon Bones, but this time my plan is to utilize autotiling wherever any of my tools hit the surface.

So is it possible to access autotiles and draw one or more of the same tile on a custom scene. Of course I can assume this could require using Scene_Map.

Thanks in advance.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,302
Reaction score
10,169
First Language
German
Primarily Uses
RMMV
you'll need a full plugin for that, because by default changes to maps are not saved on map change.
but there are plugins to do that, I just don't have a link to the MZ ones.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
771
Reaction score
736
First Language
german
Primarily Uses
RMMZ
Unfortunately, there's no function in the JS codes to perform Autotiling. In fact, the editor computes the Autotiles, so we cannot access its function - only replicate.

Right now, I don't know any stand-alone script that one could use. But I know of 3 plugins that deal with Autotiling, where you can "have a look" and check if you can extract something useful for you.

 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
930
Reaction score
1,071
First Language
Finnish
Primarily Uses
RMMZ
I once ALMOST completed procedural in-game map generator. But before it's release my PC and it's HD decided to retire... and of course I had no backups in any external media (how stupid was I).

Only thing that is left for it is below...

Shortly this will set tile to anything you like: $dataMap.data[[(z * $dataMap.height + y) * $dataMap.width + x]] = tile_id

When setting tile then you should scan tiles around said x y and set 'edges' for it. For B-E tiles it won't be necessary thing to do ofc.

And THEN you might want to update passability for said tiles... Which can found from $dataTilesets[$dataMap.tilesetId].flags

Manipulating maps in-game is easier said than done ;D

Edit: I just tested what I wrote here and it seems that passabilities are automatically updated o_O
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
930
Reaction score
1,071
First Language
Finnish
Primarily Uses
RMMZ
Hello!

I decided to make in-game autotiling plugin for everybody. This plugin won't need OcRam_Core.js and it's free-to-use with credits. Official release link below.


This plugin provides JS calls to paint tiles in-game and for saving / loading edited map data and it has no overrides at all so it should be very low in your plugin list.

Set plugin parameter "Auto save/load" to true if you wish all edits are saved automatically. Install it in editor like you would install any other plugin.

@GreenTree-Studios - Please let me know if this worked for you.


Happy RPG Making!

EDIT: Fixed some bugs (accidently deleted few characters while posted that here)
EDIT 2: Released the plugin!
 
Last edited:

Latest Threads

Latest Profile Posts

working on an A/V sync system for my game! was NOT expecting the first roadblock to be accessing a variable from a public class!! Computers are so finicky sometimes :kaosigh:
For the first real time since my game's inception I found myself actually having fun playing around with my party's skills while testing out some battles! So much so, that I actually forgot what I was doing for a minute and had to force myself to move on to the next thing! :guffaw:

That's got to be a good sign considering it only has place holder animations, enemy skills, troop comps, etc. right now. Feels good!
Bex
Finally upgraded to RMMZ.
ScreenShot_11_28_2022_7_52_34.png
FINALLY, I figured out how to get the "tail" to appear IN the window and not directly below it lol. now it looks like it's part of the window and not hanging from the bottom of it.
Twitch! Stream is about to go live with some Dark Souls 2! Feel free to drop by!

Forum statistics

Threads
126,923
Messages
1,182,388
Members
166,755
Latest member
Hahah520
Top