Jump to content
Vlue

Multiple Map Layers

Recommended Posts

Multiple Map Layers v1.0
By Vlue

Introduction
Ermagerd, I have no idea what to name this. But let's carry on, this script let's you layer one or two maps on top of another! Even if they have like different tilesets! Which is the point. Is this considered parallax mapping? I don't really know what that is... anyways.

Features
- Squish 2-3 maps together to make a mega map.

Screenshots
Maybe later.

How to Use
Instructions in script.

Script
Grab it here! http://pastebin.com/KXbFkx9s

Credit and Thanks
- By Vlue
- Free for use in any project, commercial or non-commercial with credit given, woo

Edited by Vlue

Share this post


Link to post
Share on other sites

Excellent idea! :D

I am receiving this error though.

undefined_method_map_note_by_ctbolt-d6mu

 

The map's note I use is this:
 

<LAYER2 2>

 

Am I doing something wrong? :huh:

Share this post


Link to post
Share on other sites

Did I not.. oops I didn't. I was using a function from another one of my scripts to get the note box for the map until I realized, that that was already in the map, but I forgot to change it. My bad! (It'd work if you had that script in there! :3)

 

Fixed it on the pastebin~

Share this post


Link to post
Share on other sites

If this is what I think it is, this is pretty cool! Quick question (since I'm in school right now. Don't question why I'm online if I'm at school. Lol!) Do the copied maps retain their movement settings? I.E. If a tree base is impassible will it still be impassible when copied over? I hope that makes sense. If not, I'll just try it when I get home tonight.

Share this post


Link to post
Share on other sites

Yes! There won't be any weird invisible walkable trees or anything. Or there better not be. Each map layer is check for passability.

Share this post


Link to post
Share on other sites

Did I not.. oops I didn't. I was using a function from another one of my scripts to get the note box for the map until I realized, that that was already in the map, but I forgot to change it. My bad! (It'd work if you had that script in there! :3)

 

Fixed it on the pastebin~

 

lol, I kinda thought that might have been the issue.

 

Awesome!  :D  Now I can manage to get it to work but it seems like it needs some error checking.

undefined_method_data_by_ctbolt-d6mui4t.

 

The only way I don't receive that error is to modify the script a little.

 

I changed create_tilemap into this and it works great. ;)

  def create_tilemap
    mm_create_tilemap
    @tilemap1 = Tilemap.new(@viewport1)
    
    if $game_map.layer1
      @tilemap1.map_data = $game_map.layer1.data
    end
  
    @tilemap2 = Tilemap.new(@viewport1)
    if $game_map.layer2
      @tilemap2.map_data = $game_map.layer2.data
    end
    
    load_tileset
  end

...so again I have to ask... am I doing anything wrong? :unsure:

Edited by CT Bolt

Share this post


Link to post
Share on other sites

No... stop asking if you're doing something wrong! This is just the results of my extensive and exhaustive unthorough testing process. (You'd be surprised at how little I do actually test these things...)

This one being the result of never starting in a map that didn't have extra layers. It doesn't like that...

Thanks for the report! Fixed up the pastebin for that.

Share this post


Link to post
Share on other sites

No... stop asking if you're doing something wrong!

lol, k... just had to make sure. ;)^_^

 

This is just the results of my extensive and exhaustive unthorough testing process. (You'd be surprised at how little I do actually test these things...)

This one being the result of never starting in a map that didn't have extra layers. It doesn't like that...

lol, ahhh I see I see. Thanks for replying to quickly. :D

 

Thanks for the report! Fixed up the pastebin for that.

No prob. Glad to test such an amazing & innovative script. ^_^:wub:

 

THANK YOU! I will continue to do "tests"; Everything is working wonderfully now. B)

 

Edit:

This isn't really a problem but...

I noticed if the map being placed on top of the base map must be at least as big as the base map or the top map will loop...

Kind of an interesting effect, perhaps you intended it to happen that way?

Edited by CT Bolt

Share this post


Link to post
Share on other sites

Edit:

This isn't really a problem but...

I noticed if the map being placed on top of the base map must be at least as big as the base map or the top map will loop...

Kind of an interesting effect, perhaps you intended it to happen that way?

Actually no... writing the script I only thought in like-sized maps, but it was brought up elsewhere that smaller maps on top get looped, which I have to look into.

Share this post


Link to post
Share on other sites

There we go, cleaned up the script, and now instead of just 1 or 2 silly layers you can have an infinite number of extra maps squishing on top, the only caveat however, is that they all do have to be the same size. As it currently stands, I'm not seeing a way around that, but regardless, minor thing! Enjoy~

 

EDIT: Whoops, broke double-post rule, but see no way to delete this. Sorry >.<

Edited by Vlue

Share this post


Link to post
Share on other sites

You mentioned how the script wasn't "too cleaned up" and that you'd be willing to do so on request... Could you please? This script has been fantastic so far!

Share this post


Link to post
Share on other sites

Already did (wow, almost exactly a year ago, one day from your post).

It was updated and allows for an infinite number of layers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted