Procedural Maps Generator

Status
Not open for further replies.

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Cool! I hope you enjoy it.
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
743
Reaction score
473
First Language
Polish
Primarily Uses
RMMV
@Lantiz , I'm not sure is that only me, but there seems to be a problem with world map generation. I've got:
Uncaught TypeError: Cannot read property 'push' of undefined
 

Nanaya

Veteran
Veteran
Joined
Jun 5, 2016
Messages
76
Reaction score
18
First Language
French
Primarily Uses
RMMV
Could you be more specific? What does the Debug Consol (F8 while in game) says?
Also, could give a list of all plugin you're using?
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Could you be more specific? What does the Debug Consol (F8 while in game) says?
Also, could give a list of all plugin you're using?
Yeah this is useful to help finding the problem [:

BUT, I guessed it would be something related to the new event spawning function and I found the problem... I forgot to add a word there :x
It's fixed now, I've updated the link on the OP.
 

Nanaya

Veteran
Veteran
Joined
Jun 5, 2016
Messages
76
Reaction score
18
First Language
French
Primarily Uses
RMMV
Doing such a plugin must be hard. Easy enough to leave bugs there. ^^
Thanks for the update.
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
It was hard to learn back when I started, I'm messing with these things since ACE.
But yeah, s##t happens :b
 

Rishi Raj Jain

Pokemon MV Maker
Veteran
Joined
Jul 2, 2017
Messages
204
Reaction score
50
First Language
English
Primarily Uses
RMMV
Procedural Maps Generator sounds interesting, till now only heard of it Unity.

It may be a raise of the new era for MV. Best of Luck @Lantiz
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Thank you! I hope people finds it to be useful as well.
 

Rehwihola

Villager
Member
Joined
Mar 19, 2018
Messages
10
Reaction score
2
First Language
Finnish
Primarily Uses
RMMV
Thank you for the awesome plugin! Is there a way to make it generate maps infinitely as I keep travelling? Would be nice if it generated a new (or old) map whenever I reach the edge of the map. btr_map_core.js has this `Event note tags` section, but I don't understand how to implement those events.
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Thank you for the awesome plugin!
Hey there! Thank you for your kind words.

Is there a way to make it generate maps infinitely as I keep travelling? Would be nice if it generated a new (or old) map whenever I reach the edge of the map.
No, not using these plugins.
It may be doable but would take a fair amount of work to acomplish this in RM.

Also, these plugins stores all visited maps and saves all information whenever the player saves the game.
A better approach for your desired generation style (something I shouldn't change at the current stage) would be to use a system based on player choosen seeds. This way the game would save only the seed and could generate the same word again using the same seed. An example of this system is No Man's Sky, they just don't let us enter the seed but they still use id. [:

btr_map_core.js has this `Event note tags` section, but I don't understand how to implement those events.
Check the extensions help section as well, they have specific tags.
As an example, if you're using btr_map_world.js check it's help section.

So, lets assume you want to spawn events on the water tiles, you'd add this note tag to the event:

Code:
<tile:water><rate:5>
This means the event has 5% chance to be spawned on each water tile.
Now lets assume you want to spawn it in between 2 and 5 tiles only:

Code:
<tile:water><min:2><max:5><rate:50>
Note that when using "<max>" you still need to set the "<rate>" for each spawn attempt.
You can also set fixed values like:

Code:
<tile:water><min:3><max:3><rate:50>
So it would spawn exactly 3 events.
 
Joined
Mar 16, 2018
Messages
1
Reaction score
1
First Language
english
Primarily Uses
RMVXA
I really like this idea but is it possible export a map?

I really want to use this tool but it'd be a heck of a lot easier if I could use it to take a lot of the grunt work out of map making.

EDIT: Also, i noticed that I can't seem to generate maps larger than 40x40, though the shadow layer will generate the proper size...I'm very confused about this and I can't seem to find the code that specifies the map size.

EDIT2: I found the solution to both problems. Somehow the original transfer event got messed up and was pointing to a map that didn't exist anymore (yet somehow still generated, i don't know). I found where the maps get stored. I then just pulled the json in save/file#/file into my other project. I'll still credit you. Thanks for your excellent work.
 
Last edited:

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Hey! I'm sorry to be late, but I'm glad that you found the solutions for your problems.
I was about to suggest this exact same process to export a map, but keep in mind you'll need to make sure the tilesets are the same.

Thanks for your kind words.
Have fun! :D
 

Rehwihola

Villager
Member
Joined
Mar 19, 2018
Messages
10
Reaction score
2
First Language
Finnish
Primarily Uses
RMMV
Removing this code block from btr_core.js might improve the compatibility with other plugins. I just noticed it caused an issue with Frog Talents plugin's loops.

Code:
Array.prototype.sameAs = function(arr) {
    return this.length == arr.length && this.every(function(u, i) {
        return u === arr[i];
    });
};
By the way, I managed to get this plugin to generate new maps on the fly. For example if I exit a map from the right edge, I will appear at the new map's left edge at the same Y coordinate. And if the map exists already it will just load it. With my exploration pace it generates map data at about 50kB/min, which I'm okey with. It's not optimal by any means, but I'm quite happy with it. =)
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Removing this code block from btr_core.js might improve the compatibility with other plugins. I just noticed it caused an issue with Frog Talents plugin's loops.
Cool, this function is not even used in these plugins anyway.
I'll remove this function on the next upload. Thanks.

By the way, I managed to get this plugin to generate new maps on the fly. For example if I exit a map from the right edge, I will appear at the new map's left edge at the same Y coordinate. And if the map exists already it will just load it. With my exploration pace it generates map data at about 50kB/min, which I'm okey with. It's not optimal by any means, but I'm quite happy with it.
Yeah, it can even keep re-generating the same map file forever.
e.g. You can teleport the player from the right corner to the right corner generating a new pattern.
I'm glad it worked for your game [:
 

Eurritimia

Villager
Member
Joined
Aug 27, 2017
Messages
23
Reaction score
23
First Language
Portuguese
Primarily Uses
RMMV
Hey, this is a great plugin but i found an error on It. When the map is set to regenerate as true and you enter the menu, the map changes itself and the player sometimes get stuck on wall/ceiling tiles
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Hey, thanks for reporting the issue.
It has been fixed on the new version, please download it again.
 

Icey1992

Villager
Member
Joined
Feb 14, 2017
Messages
7
Reaction score
2
First Language
enlish
Primarily Uses
RMMV
I'm confused as to how the entrance and exits at the end of the path to work? like events that will send you back to map 1 and the other that sends you to map 3. i can get an event to spawn on the path but i want them at the ends of the paths... sorry if i overlooked something simple.
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,074
First Language
Portuguese
Primarily Uses
Other
Hey!

It's pretty simple: just create an event and add the note tag <entrance> so when the player is teleported to the procedural map he will be spawned over that event.

For the exit, use the <exit> note tag.

Those events wont need the <min>, <max> and <chance> note tags.
 

Icey1992

Villager
Member
Joined
Feb 14, 2017
Messages
7
Reaction score
2
First Language
enlish
Primarily Uses
RMMV
My bad, I figured it out. you mean put is as a comment in the event. I was putting it in the note box up on the top, next to the name for the event. Thanks, and amazing work!! ^_^
 

Icey1992

Villager
Member
Joined
Feb 14, 2017
Messages
7
Reaction score
2
First Language
enlish
Primarily Uses
RMMV
Also does this ignore switches in the entrance and exit events? I'm trying to get it so you can go back and forth so i need the exit to switch to the entrance and vice versa. I've tried a couple things but it seems like the events are being placed on top of one another or stopping one another from appearing.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,096
Members
137,587
Latest member
Usagiis
Top