Unlimited Graphically Layered Maps

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
"it's parallax mapping in scripting form" - EvilEagles


Unlimited Graphically Layered Maps

Introduction

This script allows users to add "additional graphical layers" onto various coordinates of certain maps, allowing them to create something closer to "parallax mapping" without having to use an external image editor.

Unfortunately/fortunately (depending on how you look at it), the data that's included with each tile such as priority, passability, terrain, and such doesn't get included here which means you might have to use the map editor as a way to design the base of your map.

Features

  • Place graphics such as tiles, pictures, text, tiles from other tilesets, and rects onto your maps!
  • They will scroll as if they were a part of your map. (Unless you change their scrolling formula.)
  • Change certain properties of each graphic you place such as their angle, blend type, bush depth, color, hue, mirror flag, opacity, tone, zoom, & z.
  • Provides an alternative to the well-known Parallax Mapping technique.

Screenshot



Take a look at the bottles.


Script

Unlimited Graphically Layered Maps (RMVXA)

Instructions

Instructions on how to set your maps up is in the script's header.

Thanks

If it wasn't for me porting Woratana's Pictures script to RPG Maker XP and RPG Maker VX Ace, as well as Arevulopapo's Particle Engine over to RPG Maker VX and RPG Maker VX Ace, my old dream of somehow having "unlimited layers," and always hearing about a technique called "Parallax Mapping," I wouldn't have made this script. Thanks, community!

Author's Notes

Giving maps "unlimited layers" was something I always wanted to see someone scripted for RPG Maker XP when I was younger, but I was so far from capable of pulling that off. I kind of hate how I'm scripting this 7 years a little too late, but I hope someone enjoys it all the same.

This idea came about right after I was done porting Woratana's Picture Below Characters script to XP/Ace, making a script that allowed pictures to scroll along the map, porting Arevulopapo's Particle Engine to VX and Ace, and attempted to work on my own implementation of Ace's "Shadow Pen" for XP and VX.

License

Free to use for commercial and non-commercial purposes. Just credit me.
 
Last edited by a moderator:

Bird Eater

Boredom is just another thing you want to avoid
Veteran
Joined
Mar 22, 2012
Messages
272
Reaction score
27
First Language
Dutch
Primarily Uses
This is such a great 'trippy map' assistant!

Great job :) !
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,807
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
I love this, and your screenshot here illustrates it better than the previous one. How difficult would it be to port this to XP?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,807
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
And your point is? Am I not allowed to comment on the same script on multiple forums?

The screenshot used here IS better than the one used in that thread to illustrate the script. And I did not ask about an XP version in that thread.

Why are you confused?
 
  • Like
Reactions: PK8

Bird Eater

Boredom is just another thing you want to avoid
Veteran
Joined
Mar 22, 2012
Messages
272
Reaction score
27
First Language
Dutch
Primarily Uses
And your point is? Am I not allowed to comment on the same script on multiple forums?

The screenshot used here IS better than the one used in that thread to illustrate the script. And I did not ask about an XP version in that thread.

Why are you confused?
Because I thought you asked how difficult it would be to port this script to XP, while it was initially made in XP, and you even commented on that thread.

But apparently you're only talking about the screenshot, so I misunderstood, sorries.

Anyway, it's still a nice script to have in all makers :x
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,807
Reaction score
14,021
First Language
English
Primarily Uses
RMMV
haha! Now I can see what I've done, and I'm sorry for the confusion.

I THOUGHT I'd first seen that script on the other forum, and that it was an Ace script. I didn't even realize that it was an XP script!

Thanks for correcting me - you can stop scratching your head now :D
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,906
Reaction score
458
First Language
April Fools
Primarily Uses
N/A
Off Topic a little: Is there a way to add a foreground layer to battles so it would be above the characters on the layers?
 

Tukang_Sapu

Ambassador of Eronesia
Member
Joined
Mar 16, 2012
Messages
10
Reaction score
1
First Language
Indonesia
Primarily Uses
is this gonna compatible with mode07 script on VXAce ? :D
 
Joined
Dec 27, 2012
Messages
145
Reaction score
7
First Language
German, English
Primarily Uses
Other
hi there..
sry for some necro.. but..

Is there a way to change those additional layers during runtime?
 
Last edited by a moderator:
Joined
Dec 27, 2012
Messages
145
Reaction score
7
First Language
German, English
Primarily Uses
Other
is anyone to know a way to change tiles during runtime?
 
Joined
Dec 27, 2012
Messages
145
Reaction score
7
First Language
German, English
Primarily Uses
Other
Still needing a way to replace Tiles of this system at runtime ._.
*push*
 

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
I can't provide detailed support right now due to having had a hiatus on all things RPG Maker for about a year, which means that I can barely read and understand my own code at the moment. (I should be able to provide better support for it again really soon.)

Spoilered unless you want the objects to be temporarily affected. (They return to normal upon leaving the current map or even Scene_Map)

But I'll try to help. If I remember correctly, you'd have to access the scene's spriteset then adjust an item you created in the script from there. I believe this code should do:
SceneManager.scene.spriteset.uglm[index].property = value

Example code:

SceneManager.scene.spriteset.uglm[1].opacity = 100The changes made are not permanent however. Once you leave the current map or even Scene_Map, it goes back to normal. That's a bug I never really found out about until today.

  • index: Item in the array of the current map ID defined in the script. (The index starts at 0)
  • property: Look up the Proerties section of Sprite for more info on the calls. (Examples: angle, mirror, bush_depth, bush_opacity, bitmap.hue_change(value), opacity, color, tone)
  • value: New value of a property.
Let me know if it helps somewhat. Sorry for my being awful at supporting my own script.

10:18am EST edit

If you'd really like to change the property of an item, you could use the above call and then add this next one. Unfortunately this change permanently affects your game's current session (even when resetting by hitting F12). I didn't really think things through on that.

Here's the code to replace a particular item.

PK8::Unlimited_Graphical_Layers::Map[map_id][index] = [graphic, x, y, { attr => value, attr2 => value }]

  • map_id: ID of the map. Can be found in the bottom right of the editor screen.
  • index: Item in the array of the map ID. (Remember, index starts at 0.)
  • graphic: Can be a tile, picture, text, a tile from another tileset, or something else. (Header has more info)
  • x/y: x/y coordinates of the item. Measured in tiles unless you have the By32 setting turned off.
  • attr: Extra attributes you can set to the graphic. Examples: opacity, bush_depth, angle. (See header for more examples)
  • value: Attribute of the value.

10:45am EST edit

Apply this code directly below Unlimited Graphically Layered Maps.

class Spriteset_Map  def uglm_dispose    @uglm.each { | tile | tile.dispose } if @uglm != nil    @uglm = nil  end   def uglm_initialize    @uglm, uglm_i = [], 0    if PK8::Unlimited_Graphical_Layers::Map[$game_map.map_id].size > 0      PK8::Unlimited_Graphical_Layers::Map[$game_map.map_id].each { | v |        v = v.to_a if !v.is_a?(Array)        tile, x, y, attr = v[0], v[1], v[2], v[3] if v.size == 4        tile, x, y, attr = v[0], v[1], v[2], {} if v.size == 3        tile, x, y, attr = v[0], v[1], 0, {} if v.size == 2        tile, x, y, attr = v[0], 0, 0, {} if v.size == 1        tile, x, y, attr = 0, 0, 0, {} if v.size == 0        @uglm[uglm_i] = Sprite_LayeredTile.new(@viewport1, tile, x, y, attr)        uglm_i += 1      }    end  endendUse these calls to freely dispose and reinitialize UGLM:

SceneManager.scene.spriteset.uglm_disposeSceneManager.scene.spriteset.uglm_initializeUnfortunately, they still permanently affect the graphic in your game's current session but that's all I can do for now. I hope to fix that in a new update very soon.
 
Last edited by a moderator:
Joined
Dec 27, 2012
Messages
145
Reaction score
7
First Language
German, English
Primarily Uses
Other
allright , thanks - it´s a start

can you create a way to not use [index], but use [x][y] ?
that would make it much easier to change tiles acording to the original layers... :/
 

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Agreed but I don't think it's possible with the way I have things set up in the script, though you may have given me some ideas for calls I may want to attempt for a future update, if I get around to scripting things more often again.
 
Joined
Dec 27, 2012
Messages
145
Reaction score
7
First Language
German, English
Primarily Uses
Other
hmm.. okay.. my idea is a second array that stores the index for the PK8 system.. like

$layer_index[x][y][l] == <index for PK8>

so

$layer_index[$game_map.width][$game_map.height][additional_layer_number]  would store all indexes for each tile

Do you think it´s possible to use A Tiles for the layer too?
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.
The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.
Gamedev for relaxing? yes or no?
I've been having a rough couple of months and as such let down some friends of mine in the RPG Maker community. I still need time to get back to my normal self, but it's nice to be back, to read articles, and to design again (albeit at a slow pace). Hope to give updates on Kid Crescent soon.
Friendly reminder that you don't have to be able to do absolutely everything. It's okay to scale back features or assets if things are too much - especially if you're the only one working on the game! And you can always add things in later. <3

Forum statistics

Threads
107,735
Messages
1,031,744
Members
139,871
Latest member
jitomaynez
Top