One of the core aspects that I wanted to add to Hometown Hero is the ability for towns to grow and change over time. However, due to the map system that comes with RPG Maker MV, you can only achieve this with lots of complicated events. As a result, I’ve created a plugin to make this easier.
My first attempt at this was to use events to bind images of the houses on top of the map base of just the grass and other background. The houses themselves sit below the characters, with the peaks of the roofs and shadows below the weather so they show on top of the characters.
As the houses gain “levels” and grow, the images for the houses are swapped out for larger buildings, while additional events around the event are turned on at the same level as the characters, so that they can’t walk through the sides of the building.
This results in a ridiculous large number of events necessary to frame out a whole town, as well as a lot of management of loaded images on top of the map – both of which negatively impact performance. The first plugin I created to resolve this enables events that are larger than one tile. This way, I could frame an entire block – say 3 tiles by 5 tiles – with one event to block the character’s passage. This still is laborious, however.
Digging in a bit, I found that RPG Maker MV stores map data as JSON files – it does not pre-generate any map images. This means that we can modify the data used to generate the map when it’s loaded to change the contents. My new approach is to use the map editor to generate each house as its own small map, and merge that onto the main map into the correct location. I’ve created another plugin that automates this process, allowing authors to specify other maps to merge onto the current one, at a specified location, given a set of conditions.
This make for a much quicker process using the native RPG Maker MV tools, rather than mucking around in Photoshop. The only minor drawback is that autotiling does not automatically detect the surrounding tiles in the parent map. This means that if you insert a map into another, there’s no way to automatically fix edges – the round corners and other transitions that RPG Maker MV creates for you normally. The solution is to make sure that the inserted map appears exactly how you want it in the destination.