Procedural Maps Generator

Discussion in 'JS Plugin Releases (RMMV)' started by Lantiz, Aug 27, 2017.

Thread Status:
Not open for further replies.
  1. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Cool! I hope you enjoy it.
     
    #41
    fizzly likes this.
  2. fizzly

    fizzly Veteran Veteran

    Messages:
    394
    Likes Received:
    272
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    N/A
    @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
     
    #42
  3. Nanaya

    Nanaya Veteran Veteran

    Messages:
    75
    Likes Received:
    18
    Location:
    Belgium
    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?
     
    #43
  4. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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.
     
    #44
  5. Nanaya

    Nanaya Veteran Veteran

    Messages:
    75
    Likes Received:
    18
    Location:
    Belgium
    First Language:
    French
    Primarily Uses:
    RMMV
    Doing such a plugin must be hard. Easy enough to leave bugs there. ^^
    Thanks for the update.
     
    #45
    Lantiz likes this.
  6. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    It was hard to learn back when I started, I'm messing with these things since ACE.
    But yeah, s##t happens :b
     
    #46
    Nanaya likes this.
  7. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    46
    Location:
    India
    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
     
    #47
    Lantiz likes this.
  8. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thank you! I hope people finds it to be useful as well.
     
    #48
  9. Rehwihola

    Rehwihola Villager Member

    Messages:
    10
    Likes Received:
    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.
     
    #49
  10. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Hey there! Thank you for your kind words.

    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. [:

    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.
     
    #50
  11. SuperFineJeans

    SuperFineJeans Warper Member

    Messages:
    1
    Likes Received:
    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: Mar 20, 2018
    #51
    Lantiz likes this.
  12. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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
     
    #52
  13. Rehwihola

    Rehwihola Villager Member

    Messages:
    10
    Likes Received:
    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. =)
     
    #53
    Nanaya and Lantiz like this.
  14. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Cool, this function is not even used in these plugins anyway.
    I'll remove this function on the next upload. Thanks.

    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 [:
     
    #54
    Nanaya likes this.
  15. Eurritimia

    Eurritimia Villager Member

    Messages:
    22
    Likes Received:
    20
    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
     
    #55
  16. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Hey, thanks for reporting the issue.
    It has been fixed on the new version, please download it again.
     
    #56
    Mojo907 likes this.
  17. Icey1992

    Icey1992 Villager Member

    Messages:
    7
    Likes Received:
    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.
     
    #57
  18. Lantiz

    Lantiz Biterkid Veteran

    Messages:
    719
    Likes Received:
    1,064
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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.
     
    #58
    Icey1992 likes this.
  19. Icey1992

    Icey1992 Villager Member

    Messages:
    7
    Likes Received:
    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!! ^_^
     
    #59
    Lantiz likes this.
  20. Icey1992

    Icey1992 Villager Member

    Messages:
    7
    Likes Received:
    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.
     
    #60
Thread Status:
Not open for further replies.

Share This Page