MZ (MZ & MV) Random Maps during Playtime (June Update)

@Cymaiden by default, my plugin is not doing that. Usually, those errors come from "pseudo-blank" objects from your Decoration map. What do I mean by "pseudo-blank" ? My plugin checks for the blank tile on the Decoration map, that is the one tile on the top left on sheet B. On all layers, ground layer and upper layer. Sometimes people accidentally pick another blank tile that is not the top left on sheet B.

Some people use the floodfill tool and randomly fill into the blank area on the decoration map to hunt for incorrectly placed blank tiles. Sometimes it helps to create a fresh new decoration map.
@Cymaiden by default, my plugin is not doing that. Usually, those errors come from "pseudo-blank" objects from your Decoration map. What do I mean by "pseudo-blank" ? My plugin checks for the blank tile on the Decoration map, that is the one tile on the top left on sheet B. On all layers, ground layer and upper layer. Sometimes people accidentally pick another blank tile that is not the top left on sheet B.

Some people use the floodfill tool and randomly fill into the blank area on the decoration map to hunt for incorrectly placed blank tiles. Sometimes it helps to create a fresh new decoration map.

Yeah, sorry, that was a goof on my end now that you point it out.
@Cymaiden don't worry, that happens to a lot of people 🙂
For some reason, the door won't open even though I've set everything up correctly in the event window. Doesn't lead anywhere yet, just testing at this stage.

Screenshot from 2022-05-14 02-13-45.pngScreenshot from 2022-05-14 02-16-24.png
Hi @Cymaiden

my Event spawning system randomly assigns Event Ids. E.g., when you have one door on your Decoration Map and let it spawn 3 times, those have the Ids somewhat like 11, 12, and 13. Move Events in which you make a specific Event to move will target at wrong Events or just into the void.

TL;DR please change your Move Event from "Door" to "this Event"
Hi @Cymaiden

my Event spawning system randomly assigns Event Ids. E.g., when you have one door on your Decoration Map and let it spawn 3 times, those have the Ids somewhat like 11, 12, and 13. Move Events in which you make a specific Event to move will target at wrong Events or just into the void.

TL;DR please change your Move Event from "Door" to "this Event"

Thanks! That fixed the problem.
Great plugin, but how does roads work on metamaze? Can't figure out how to make it create a road form south to north :S

Thanks!
Great plugin, but how does roads work on metamaze? Can't figure out how to make it create a road form south to north :S

Thanks!
Thanks for your message!

When creating the Meta Maze, you can use "grid(1, n") whereas n is the length of your roads OR in other words, how many maps your road has.

E.g.
Code:
$metaMaze.grid(1, 5)
.withExit('top')
.withExit('bottom')
.apply()
.enterAt('bottom');

If you're using the snippet-based approach, you need to change your JS code as explained in Step 3 here: https://aerosys.blog/meta-maze

Let me know if that helps and if not, you may provide some screenshots of your JS codes.

PS:
Your profile says that you are using MV; tell me if you've upgraded to MZ in the meantime.
Thanks for your message!

When creating the Meta Maze, you can use "grid(1, n") whereas n is the length of your roads OR in other words, how many maps your road has.

E.g.
Code:
$metaMaze.grid(1, 5)
.withExit('top')
.withExit('bottom')
.apply()
.enterAt('bottom');

If you're using the snippet-based approach, you need to change your JS code as explained in Step 3 here: https://aerosys.blog/meta-maze

Let me know if that helps and if not, you may provide some screenshots of your JS codes.

PS:
Your profile says that you are using MV; tell me if you've upgraded to MZ in the meantime.
Best plugin ever 😀
Edit: Fixed!
@Sarandiel I'm glad it's working now and thanks for the feedback! 🙂
Hello friends,

it's been a while, but this time a lot of cool features come to you! So cool, that I decided to increment the major version number.

The Plugin Manager​

You can define all the rules of your Dungeons in the Plugin Manager. This makes it so much easier and more intuitive and we will no longer struggle with huge JS commands!
1655024374656.png


Devs may stay at the JS commands they are familiar with as I did not remove them (maybe slightly adjusted). However, old Plugin Commands have been changed a lot and may not work as expected.

Map Export​

In the free Sample, you find a Plugin that allows you to export generated maps to edit them in the Maker. (Actually, you can export any Map as it has no clue whether a Map is generated or not. Yeah, I don't know how this note was beneficial)

Teleport Device​

In the Addon Sample, you find an Item that allows the player to memorize their location and return to it later. This item calls a Common Event and, hence, is fully readable and you can modify it just as you like. In other words, it's just a small free gift for you!
1655024390374.png




Note​

You will need some time to learn how RNGMaps works with the Plugin Manager. Tutorials will be updated over the next few days. If you struggle or don't like it at all, you may go back to the older version - I will not take it down.

Happy Game Making!

Aero
Hey Aero -
Great set of plugins.

I have found two issues.
The first is a general issue - every now and then, when I go to a new map, and generate the dungeon when I get there, I get an error of "displayname" is undefined. I've popped in and looked at your code and notice that you're copying the dataMap object, doing your thing, and sticking the copy back in the datamap object. Current theory is that sometime during that process, rmmz tries to access the displayname of the map and can't.

Now the second issue is...strange. Put together a snippet map (my first - all the rest have been snippetless (to excellent effect!)) - and when I try to have it put any event on the map via the Assets map, the player can't move. I can access menu, including debug menus, but my character is just stuck. Normally, when you're stuck, you can at least turn in place - but not in this case.

I've tried following your tutorial exactly, and with some tweaks to see if I could figure something out. My first thought was that it was specifically to do with the Exit event I was trying to place. But when I try to place ANY event using a region the player just gets stuck.

I have a hojillion plugins installed, including the majority of the extended Visustella suite, so I definitely need to go through the process to see where a conflict may be. But, if my explanation of the problem can give you any ideas on what could be causing it, well, that would be super helpful.

[edit - all of ten minutes later]
Well, crap. I got it to work.
I have VS Events and Move Core installed, and the in game debugger. So, I went to see if my exit event even spawned. It did. With an ID of ZERO. So, on a hunch, I put an empty event on the space map.

Ran it again - this time, the event spawned with ID 002 (as it should have), and the player is free to move about the maze. So there you go. If that gives you any ideas about potential bugs, or if someone complains about it in the future....the more you know 🙂
Hey @poorrabbit

thanks for your message, I will look at the issues as soon as possible!
Hey Aerosys!

1: Your plugin gets incredibly grumpy when Visustella spawns events. Commenting out line 265 in MKCore will prevent it from crashing entirely, but also slows down loading somewhat as your plugin adds some assets with region tags, then Visu spawns some events on them, your plugin files a bunch of complaints to the console, and then the process repeats until the map is done generating.
Q1: Can you say what `toReturn` is used to manage elsewhere in your plugins so that I can keep an eye on the log to make sure I haven't broken anything in your system?
Q2: How much of that error generation can be safely commented out before it starts becoming a problem for the rest of your plugins?(300+ "errors" makes the console a noisy place when trying to isolate distinct properties of objects)

2: I ran into an odd issue where "spawnpoint" wasn't present. It first happened in the snippetless generator, and was rare enough I couldn't reproduce it enough to begin debugging in a meaningful fashion. Recently, while building a snippet map, I got the issue to happen more reliably.(about 60% for "bottom" and about 30% for "top") I can't tell yet if it is an issue with the tileset I'm using, one of the other plugins interrupting your generator or interfering with the random placement, or if the issue is being caused by booting the player to a holding map where a common event sends them to "randmapid" and begins generating the map.
Q1: Do you have any idea where in the js I should begin snooping to rule out my tilesets? (In the snippetless version the "walls" were an A2Ground tile with a decoration tile on layer2 and in the snippet version the tileset has neither A3 nor A4 tiles to draw from)
Q2: In your demo project, the map generates reliably. Is there some hangup on transferring between maps before generating the dungeon that you can think of?

3: This plugin set is a work of art! Aside from places where other people's plugins irritate it, it's gorgeous, clean, and efficient. It is ~so-ho-ho~ much better than Rand1-1000 and kick player to that map Id for making rogue-like elements, and for that I owe you thanks. *cries a little at the number of hand-drawn maps that are now homeless* I'm limited to the trial version for now, but plan on picking up the premium version in the near future.

4: Thank you again, you've made some serious magic happen. ^_^
1: Your plugin gets incredibly grumpy when Visustella spawns events. Commenting out line 265 in MKCore will prevent it from crashing entirely, but also slows down loading somewhat as your plugin adds some assets with region tags, then Visu spawns some events on them, your plugin files a bunch of complaints to the console, and then the process repeats until the map is done generating.
Q1: Can you say what `toReturn` is used to manage elsewhere in your plugins so that I can keep an eye on the log to make sure I haven't broken anything in your system?
// Alias MK.alias.event = Game_Event.prototype.event; Game_Event.prototype.event = function() { const toReturn = MK.alias.event.call(this); if (!toReturn) { const dataMapInfo = $dataMapInfos[$gameMap.mapId()]; const text = dataMapInfo ? "Map Name (retrieved from RPG Maker's code): " + dataMapInfo.name : "Map Id is " + $gameMap.mapId() + " but this Map is not defined!"; console.error(text); console.error("$dataMap.events -> "); console.error($dataMap.events); console.error("$gameMap.events() -> "); console.error($gameMap.events()); console.error("$gameMap._events -> "); console.error($gameMap._events); throw Error ("FATAL: Wanted to access Event '" + this._eventId + "' but it does not exist in $dataMap.events!\n" + "Open Debug Console for details."); } return toReturn; };
This code block is an "Alias" that doesn't really do something, it only checks if data is consistent and, if not, quits the game. When everything is fine, this function basically doesn't do anything. Visustella Plugins have a setting that "swallows" errors and let the game continue. Disabling this setting may help.

There's no "standard" for us developers to spawn Events in RPG Maker, this is why spawning Events is difficult. Especially when you use Visustella AND my Plugin to spawn Events. I recommend you not to use Visu to spawn Events on generated maps but instead create Events on the "Assets Map."

How much of that error generation can be safely commented out before it starts becoming a problem for the rest of your plugins?(300+ "errors" makes the console a noisy place when trying to isolate distinct properties of objects)
You can kick out the full function, but as explained, it's function is to display errors, no more no less.

2: I ran into an odd issue where "spawnpoint" wasn't present. It first happened in the snippetless generator, and was rare enough I couldn't reproduce it enough to begin debugging in a meaningful fashion. Recently, while building a snippet map, I got the issue to happen more reliably.(about 60% for "bottom" and about 30% for "top") I can't tell yet if it is an issue with the tileset I'm using, one of the other plugins interrupting your generator or interfering with the random placement, or if the issue is being caused by booting the player to a holding map where a common event sends them to "randmapid" and begins generating the map.
Q1: Do you have any idea where in the js I should begin snooping to rule out my tilesets? (In the snippetless version the "walls" were an A2Ground tile with a decoration tile on layer2 and in the snippet version the tileset has neither A3 nor A4 tiles to draw from)
Q2: In your demo project, the map generates reliably. Is there some hangup on transferring between maps before generating the dungeon that you can think of?
You can dm me with screenshots of your map and tileset setups 🙂
So far, I can tell you that the plugins check for possibility, so setting them appropriately in the Tilesets always helps.
3: This plugin set is a work of art! Aside from places where other people's plugins irritate it, it's gorgeous, clean, and efficient. It is ~so-ho-ho~ much better than Rand1-1000 and kick player to that map Id for making rogue-like elements, and for that I owe you thanks. *cries a little at the number of hand-drawn maps that are now homeless* I'm limited to the trial version for now, but plan on picking up the premium version in the near future.

4: Thank you again, you've made some serious magic happen. ^_^
Thank you for your nice feedback! It always makes me happy to see that other people appreciate my work 🙂
>.< Immediately explains why I couldn't find toReturn anywhere else.

Kay, thank you for your explanations, I'll double-check passability and what layer things are on before bugging you any further on the spawn point thing. (would be my luck the transparent tile I'm using to keep the player in-bounds was the culprit all along.)

Yeah, event spawning looks like a hassle and three-quarters. (although, when it doesn't crash due to MK_Core wanting access to an event that isn't in mapData, yours and visu's plugins do work surprisingly well together. 🙂 )
Hello there,

Great set of plugins ! Have been willing to purchase it for a while and now it's done.

There is something bugging me, however ; i'm creating a worldmap, and wish to have more control over the "spawning" rate, of, per say, the mountains.

I thought I could do it in the Plugin Manager>RNGMaps_withoutSnippets>Templates, sadly there is no option there.
Do I have to create my own template or smthg ?
Hello there,

Great set of plugins ! Have been willing to purchase it for a while and now it's done.

There is something bugging me, however ; i'm creating a worldmap, and wish to have more control over the "spawning" rate, of, per say, the mountains.

I thought I could do it in the Plugin Manager>RNGMaps_withoutSnippets>Templates, sadly there is no option there.
Do I have to create my own template or smthg ?
Hi Luth,

the rules for the mountains are written in MK_RNGMaps_MapAlgorithms.js. With some knowledge of JS, you can simply open and edit this file. Around line 130, there's the implementation of the mountains.

You are right, there are no options in the Plugin Manager regarding mountains right now. When I implemented this part of my plugin, I was unsure what parameters I should add; maybe I will add some more soon.

Alternatively, you can create Mountains the way how forests are created:
  1. rename your Map "Mountains" into "Mountains2" for example
  2. In the Plugin Manager, you may copy-paste my "Worldmap" template and call it e.g. "My Worldmap"
  3. In this Template, go to "Post-Processing" and copy-paste the "Forest"
  4. Click on this line, and then
    1. change its name into "Mountains"
    2. go into the "Shadings" settings and set "Mountains2" as Map Name
Let me know if you like my reply or if you need further support.
Hi Luth,



the rules for the mountains are written in MK_RNGMaps_MapAlgorithms.js. With some knowledge of JS, you can simply open and edit this file. Around line 130, there's the implementation of the mountains.



You are right, there are no options in the Plugin Manager regarding mountains right now. When I implemented this part of my plugin, I was unsure what parameters I should add; maybe I will add some more soon.



Alternatively, you can create Mountains the way how forests are created:

rename your Map "Mountains" into "Mountains2" for example
In the Plugin Manager, you may copy-paste my "Worldmap" template and call it e.g. "My Worldmap"
In this Template, go to "Post-Processing" and copy-paste the "Forest"
Click on this line, and then
change its name into "Mountains"
go into the "Shadings" settings and set "Mountains2" as Map Name
Let me know if you like my reply or if you need further support.
Thanks for your quick response ! I like the fact that you answered anyway 🙂

I'm currently at work, I have yet to try it.

About the moutains parameters, in addition of the number of tiles they spawn on, setting a specific way of filling the Map would be nice : such as cluster, maze, thin, fractal...

Cluster : Big chunks full of mountains

Maze : chunks of mountains, where some areas are free of them

Thin : a long narrow mountains path (think about the Andes cordillera)

Regarding generation overall, including landmass (for worldmaps), being able to set such parameters would be neat :
For instance a 40*40 map would generate only one landmass, where 100*100 generates 3-4.

I would like to get a hand over this, perhaps forcing landmasses to spawn, or being able to set the numbers of desired continents, their global size or even their shape (cluster/archipelago/pangea...).

Being able to merge some landmasses would be cool aswell, so we can have a continent with ice/sand/grass in specific areas.

Anyway this is above my knowledge. The only things I know about procedural generation is from the games I play, and most of them have this kind of parameters so If you managed to introduce those that would be nuts !

Have a good day 😉

Original thread: https://forums.rpgmakerweb.com/threads/mz-mv-random-maps-during-playtime-june-update.109537/