Continuous Maps
Authors: Blizzard
Version: 1.5
Type: Custom Map System
Key Term: Environment Add-on
IntroductionThis Script will allow you to make the game simulate a continuous map using smaller maps. The system displays the current map and the neighbor maps. Walking over a map border will cause the new map to be loaded as main map and the neighbor maps will be changed.
This work is licensed under BSD License 2.0:
QuoteCopyright (c) Boris "Blizzard" Mikić
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
QuoteContinuous Maps licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić
Alternatively, if your font doesn't support diacritic characters, you may use this variant:
QuoteContinuous Maps licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic
In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Continuous Maps created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.
Features- virtually creates one continuous map from any number of map fragments
- easy to configure
v1.2- fixed bug where transferring into a non-configured map would crash the game
- fixed bug when teleporting into another set of maps would mess up everything
v1.3- added compatibility with Tons of Add-ons' Catepillar
v1.4- fixed crash caused by compatibility fix with Tons of Add-ons' Catepillar
- added code for proper fog handling
v1.41- fixed bug with Blizz-ABS enemy positions
v1.5- added new license
- added usage and crediting instructions
Screenshots(http://img707.imageshack.us/img707/3899/snap059s.th.png) (http://img707.imageshack.us/img707/3899/snap059s.png)
(http://img693.imageshack.us/img693/6196/snap060.th.png) (http://img693.imageshack.us/img693/6196/snap060.png)
(http://img693.imageshack.us/img693/6840/snap061.th.png) (http://img693.imageshack.us/img693/6840/snap061.png)
DemoContinuous Maps (https://downloads.chaos-project.com/scripts/Continuous Maps.zip)
ScriptJust make a new script above main and paste this code into it.
Script Download (https://downloads.chaos-project.com/scripts/Continuous Maps.txt)
InstructionsInside the script in the first comment.
Compatibility95% compatible with SDK v1.x. 80% compatible with SDK 2.x. WILL corrupt old savegames. Compatible with Blizz-ABS. Compatible with Tons of Add-ons' catepillar. Not compatible with Intelligent Passability from Blizz-ABS, it's being turned off. Not compatible with Blizz-ABS's caterpillar.
Credits and Thanks
Author's NotesIf you find any bugs, please report them here:
http://forum.chaos-project.com
That's it! N-Joy! =D
Yayz!
<3
Works with Blizz-ABS. <3
wow this is really what I needed, I'm terrible at mapping and can make decent small maps, now I can make several small maps and link them together
And I'm planning to improve it as well. I'll add an option to load only the border of neighbor maps rather than loading the entire neighbor map to reduce lag. And I'll add a segmentation option for big maps. It will treat the big map as if it was composed of many small maps. This will also reduce lag. <3
Blizz, you are the best person EVA
Hey blizz, I had an idea kinda similar to this a while ago, and wanted to know if it was possible: Only loading small portions of a big map at a time, specifically, only what is in ABSEAL range. My thoughts were that it would probably cause even more lag because the only way that I could see to do it would be to load to region into a new map each time the screen moves =/
Quote from: Blizzard on December 14, 2009, 06:43:07 pm
And I'm planning to improve it as well. I'll add an option to load only the border of neighbor maps rather than loading the entire neighbor map to reduce lag. And I'll add a segmentation option for big maps. It will treat the big map as if it was composed of many small maps. This will also reduce lag. <3
Errr... Is that what segmentation is? :P
If not...
In CP the game, Blizz has a way of only loading the parts of the map to where you can travel. It's so cool :o
do you come up with a way for it to be compatible with RMX-OS? :naughty:
Making it compatible with RMX-OS would require to change the server itself and I'm not going to do that.
@winkio: Like Aqua said, that's what I meant with map segmentation. :)
okay. I didn't know if that meant chopping it up into small maps with small neighboring maps, or dynamically loading the map inside an area.
Yay ! no more transfer events !
blizz rules ! :evil:
Well, this doesn't substitute map transfer events as you can't really combine different tilesets except if you use multiple tilesets in the same tileset.
This looks so cool! I'm definitely going to have to try this out some time. :D
Ok, help me out here... I can´t get this work in my game. I´m propably just configuring it wrong, so tell me how to properly confirgure this script... I want to use this, since i suck alot at making big maps... small and medium maps i manage...
There's a demo for reason.
Thanks, I really like this. I may be using RMXP-OS to make a game soon, so this will help me a lot-I suck at mapping-big time.
RMX-OS dose not work with this script...
Blizzard said so when I asked him...
What...I thought you weren't scripting completely new things anymore. Oh well. Delightful surprise. <3
Regardless, such a script like this deserves a very warm welcome. How do events correspond to the map borders? Are they able to cross them?
Quote from: Blizzard on December 18, 2009, 12:27:40 pm
There's a demo for reason.
I´m still unable to confirgure it... I´ll take another look, if i´d notice something that would help me...
I love you for this. :3 <3
EDIT: I get errors when trying to use this with BABS. something about [] nil class
Script '(*) Continuous Map' line 257: NoMethodError occurred.
undefined method '[]' for nil:NilClass
which of course takes me to
You didn't start a new game or have a map in your configuration that doesn't exist.
Quote from: Starrodkirby86 on December 18, 2009, 11:07:50 pm
What...I thought you weren't scripting completely new things anymore. Oh well. Delightful surprise. <3
Regardless, such a script like this deserves a very warm welcome. How do events correspond to the map borders? Are they able to cross them?
Yes, they are. Reloading a submap into the full map will not load an event again if it was originally in another submap. Events are removed when they are in a submap that is being removed.
Ahh a new game helped but now all of my enemies that I have on one map appear on the beginning map and not the area they are...If that makes sense?
IE:
I have no enemies on map one but enemies on map 2. The enemies on map 2 are on map one when I start the game.
Yeah lol I need a manual. >_> I fail at continuous maps. :(
EDIT: This also seems to create a problem in babs when switching the player.
Whenever I switch with the script in I get the following:
Script 'Blizz ABS pt 2' line 2854: ArgumentError occured.
wrong number of arguments (3 for 2)
which of course takes me to:
center(player.x, player.y, true) if $game_system.caterpillar
Try changing the line to
center(player.x, player.y) if $game_system.caterpillar
No, it's a problem with the script order. I'll fix it ASAP. The order is fine, the script needs to be fixed.
Alrighty after finally kinda sorta figuring out how to use this. (Negative numbers included) I've encountered another bug I can't teleport to another map. Let's say like an interior. I have to have every single map linked. Its not really a problem par se its just I like the interior transition (fade to black) but without it I get an error. I can't remember the exact error at the moment but ill post it when I have comp. Access.
Teleporting to another map doesn't work? Then I have to check that.
Quote from: Blizzard on December 22, 2009, 09:27:05 am
Teleporting to another map doesn't work? Then I have to check that.
It doesn't because I get the following error:
Script (*) Continuous Map' line 255: NoMethod Error occurred.
undefined method 'each' for nil:NilClass
which of course takes me to line 255
CTMAPS::MAPS[@map_id].each {|data|
That's because there is no configuration for that map.
But see its a teleported map. Its an interior map. Or y'know what I could just link the map to itself right?
EDIT: Okay linking the map to itself worked but now events from other maps are showing up. Like map 9 is the interior map and like events from 39 are showing up because its another map linked to itself.
As I said, I need to test and fix it. :P
I´ve tested this, and seems like there is a bug related to teleporting: when the player teleports from map A to map B (event), the events from map A also teleport to the map B and so on. It´s not always, but pretty frequently.
Hope I said something useful :)
(someone pointed that bug out like two posts ago x.x)
and wow, this is a great script Blizz! It'll really help with the large ocean map the players are going to have to be sailing on (like the ocean in wind waker). It's also pretty cool that events can walk between the barriers of different maps!
-edit-
by the way, do you plan on making this compatible with blizzABS' Intelligent Passibility? Also, I'm sure you already know this, but the current version of the blizzABS manual doesn't mention this script in its compatibility section.
Again, awesome script :D
I just haven't added it yet.
Making it work with Intelligent Passability could be quite a hassle. But I might do it eventually.
I figured you just hadn't put it in yet. But I thought I'd point it out in case you'd forgotten (I probably would have forgotten >.>)
And if making it work with it is such a hassle, I wouldn't. You implementing segmentation will reduce lag enough to make up for loosing Intelligent passibility
Question ...
Could there be a way to change the screen tone of the neighbor maps for indoor purposes??
Like in the older style games, when you would walk through a door, the map you came from would get dark, while the room you were currently exploring was fully illuminated.
Use events.
neat.
How do you do that through events? I mean ya, you can change the color of the whole screen with events, but how would one change the screen tone only for the neighbor maps (and change the current map's screen tone to something different)? While I don't think it's a crucial feature, and if it's not possible to implement (or it'll take too long to impliment), that's totally understandable. It's just it would really be cool to make the rooms you're not in while indoors have a separate screen tone.
Oh wait, you meant darkening a part of a map? That's not really easy to make since you would be darkening parts of the map. :/
I suppose it could be done with fogs (haven't tested it). Just have, for each map, a fog the size of the room, and toggle it's visibility when you're in the room.
Yes, it can be done that way, but that's a RAM and HDD devourer. ._.
EDIT: HAHA! I'VE GOT IT! Since you need to use a combined tileset to combine maps, you can simply use two tilesets. One tileset is where the outer region is the main region. All other regions are darkened in the tileset itself. The other tileset is where the interior is the main region so the outer region is darkened. I can't remember exactly how I made it work, but I think as soon as you switch maps, the tileset is also switched. You basically need to have two tilesets for each interior/exterior combination where always one part is darkened.
Wow o.o clever. Granted, that means we'd have to add building interiors to most tilesets, but seeing as how you're not going to find the satanic temple in every region (just to use your game as an example :P), it should work rather well. I'll have to experiment to try getting it to work. (I'm still trying to figure out how to resolve this with showing the exterior as well, but I'm sure I can come up with something :P (I mean I want to see the pretty front of a building :( )
Good thinking blizz, and thanks for such an awesome script :D
You could use 2 sets of maps that are connected. You'd just have to teleport from one to another. I didn't add the option to have a map within a map, but you can always simply put a few maps around the house with the house as middle map.
Ah ok. Well if we can't have maps within maps, it'd eliminate my purpose in using continuous maps for houses in the first place (it'd simplify people calling for the guards while you're indoors). But This is a really great system, I'm glad you made it :D
No really. Just surround your inner map by 4 maps instead.
Oh, I see what you're saying. I'll try that out when I make my cities, and tell you how it goes :D
Have you already improved the script to divide bigger maps?
I really need this feature, but i'm bad in scripting.
my worldmap is to big (250x250) and it lags really bad =(
No, I haven't had time to work on it.
i found a bug while using Blizz-abs it buts all the enemies in ur starter map
It does what?
I think he meant it puts all the enemies you made in linked maps in the map you start in, wasn't that an error with transfer player events before?
yea thats what i meant lol
Ah, ok. As I said, I'll take a look at that when I have time.
A: It might help to post the error.
B: Blizz don't support this anymore, or anything else for that matter, and I'm not sure anyone else understands this script well enough to fix bugs like that.
Actually, he still supports all of his scripts. Sometimes he'll answer, sometimes he won't.
Oh, right. Didn't know that. You gotta envy the guy's patience.
Ah, right. I completely forgot that I haven't gotten rid of all the bugs in this scripts.
Yup. I've tried using it, but there's something about 'each' or something, I'll have to try it again to tell you.
Yeah, that's about what happens to me, except I don't even get to start the game.
You didn't configure it properly if you didn't even get to start the game. That happens during the translation of the configuration you put together to a format that is easier to access within the script.
Quote from: Blizzard on August 02, 2010, 03:29:18 pm
You didn't configure it properly if you didn't even get to start the game. That happens during the translation of the configuration you put together to a format that is easier to access within the script.
Translation of the configu-what the fuck? Sorry, really don't understand that last sentence. I'll look at the config again at a later date.
Doesn't, matter. Just make sure you did the config right. Refer to the few examples I left in there.
Ok, thanks. I think it might save on people asking about this if you removed the script from the original post and put a note in saying that they need the demo because this is hard to configure.
Yes, except after the very last bracket.
Not sure if this has been resolved.
Regarding the 'Transfer Player' & 'Events' problem. And also the one with the interior building problem
I added the interior map with x and y offset set to 0 sample below
Map ID = 2 is an interior map
Quote
MAP_DATA = [
[1, 3, 20, 0],
[2, 2, 0, 0],
]
When using transfer player to another map, you might have problem with events.
Example: You transferred player from map 1 to map 2, all events existing in map 1 and 3 will also be present in map 2.
So...
in the Game_Map section I had these modifications:
Added:
Quotedef name
$map_infos[@map_id]
end
Added:
Quotelast_map_name = $game_map.name
(below last_map_id = @map_id )
changed:
Quotesetup_continuous_events(last_maps, last_map_id, last_map_name)
to:
Quotesetup_continuous_events(last_maps, last_map_id, last_map_name)
changed:
Quote def setup_continuous_events(last_maps, last_map_id)
correct_event_positions(last_maps) if last_maps[@map_id] != nil
delete_removed_events(last_maps, last_map_id)
shift_events_from_last_map(last_maps, last_map_id) if last_map_id != 0
shift_events_for_new_map
add_new_events(last_maps, last_map_id)
end
to:
Quote def setup_continuous_events(last_maps, last_map_id, last_map_name)
correct_event_positions(last_maps) if last_maps[@map_id] != nil
delete_removed_events(last_maps, last_map_id)
shift_events_from_last_map(last_maps, last_map_id) if last_map_id != 0
shift_events_for_new_map
if last_map_name != $game_map.name
delete_all_events
end
add_new_events(last_maps, last_map_id)
end
And added:
Quote def delete_all_events
@events.each_key {|key|
@events.delete(key)
}
end
Hope this helps.
There, I fixed it.
K, Blizz. Got a little problem now that I've finally got the script working. If I try to view four maps at once, I can only see three. The one I'm on and the two beside it. The one diagonally across doesn't show up.
Connect the fourth to the first one. You need to define it in the configuration so the map actually shows up since the maps are supposed to be visible at the same time.
Thanks very much. I should've guessed, I really should XD
Solved my problem shortly after posting. Become something of a habit recently. >_>
Oh well, still gives me a chance to say what a great script this is. Perfect for world maps.
I have a map where there is a rat. Two maps over (connected) there is a guardsman on patrol.
They both have default detection range of 5 squares set, but for some reason the guard keeps running over two maps to kill the rat and then starts patrolling where he finishes up.
Firstly is there a way to stop this? If the rat happened to wander over to him he can kill it, (that's what he is there for) but I dont want him going looking for it. I dont understand how he can see a rat 90 squares away with just a 5 square detection range. Hearing range is 40%. Maybe that has something to do with it?
Secondly, if he does wander off, is there a way to make him go back to where he is meant to be?
Thirdly, if I kill the rat myself, its corpse appears on the next map over. Of course this is not entirely desirable.
i have a problem with this script, i have a common event set up that records the players y position on the map, then returns at a custom windows index depending where abouts the player is on the map, heres my event:
(http://img16.imageshack.us/img16/9708/commonevent.png)
so as you can for map id 34, it splits the map in half and returns at index 174 or 155 depending whether the character is on the top or bottom half of the map, the problem is it constantly returns at index 174 no matter where you are on the map, and yes its defiantly this script, i removed it and it worked perfect :/
hello,
I recently downloaded this script, and I find it amazing, I would like to know if there is the possibility of replacing a map based on a game variable.
example
map 1 is connected to map 2, change the value of a variable during the game, then the map 1 is connected to the map 3 instead of map 2
something like this
MAP_DATA = [
# [MAP_ID1, MAP_ID2, X_OFFSET, Y_OFFSET]
[1, $game_variables[5], 17, 0], # connected map 1 and 2 where 2 has an X, Y offset of 25, 0
[$game_variables[5] , 4, 20, 10],
]
sorry for bad English :shy:
No, you can't do it like this. All map data is initialized before the game runs. If you then change a variable, it won't have any effect. Besides, if you use this code as is, it will definitely crash your game right away as $game_variables doesn't exist when you start the game.
this script very perfect and useful to me much ,but I have a problem:
I use your party caterpillar system that included in Tons of Add Ons collection
then, when the party move from a map to another the caterpillar's member gather in the leader place
because it actually the other map is loaded so the caterpillar system return from start.
So, I want a way make the party when move between maps those seems as one map not to dissapear and restart whenever go to new map without bugs.
Of course this should be no hard to you because really you are the most prefect scripter I see in RPG world, and I need this necessarily else I will not be able to use those systems togather and will left one of them.
Reverted title to original topic's name to avoid confusion. ~ gameus
I'll take a look at it. If it's an easy fix, I'll add it.
EDIT: I have fixed it and updated the script to v1.3.
I waI use Blizzard party caterpillar system of tons of add ons ,but there is a compitability problem between this script and that system, Where when moving from a map to nearby map the party member disappear and gather in leader's position as the party caterpillar system return again.
So ,I want this not to happen ,but the caterpillar continue walking normally as long as the party doesn't transfer from map to another with default feature in RMXP.
I wish my [roblem to be understood and be corrected due to its important in using this perfect systems togather
That's exactly what I have done yesterday. :)
Quote from: Blizzard on November 17, 2012, 04:31:52 am
I'll take a look at it. If it's an easy fix, I'll add it.
EDIT: I have fixed it and updated the script to v1.3.
Very thanks gor your fast response.
I sure it'll done perfectly....
Hello, good evening.
I'm sorry this topic up.
This script works perfectly but when I save my game, I apply a change in the editor (RMXP) and I restart the game, the map is displayed in the wrong place. So to put it right, I'm up and down the character and do the same on both sides full of ... Do you have an idea to fix this?
(My game screen is changed, it went from 640x480 to 256x192.)
PS: Sorry for my English, it's Google Translation ...
Demo crashes for me. Also crashes using the most up to date version of the script from the OP.
Line 248: NoMethodError
undefined method `<' for nil:NilClass
Question:
How well does this script work with Fog when crossing between maps?
I haven't tried any fog.
I'll check on the crash.
EDIT: I have both fixed the crash and added proper support for fogs. Keep in mind that the fog might behave differently if you change it from the default fog of the map. But apart from that, the fog will support proper positioning, even when scrolling. Generally you're not supposed to connect maps with different tilesets/fogs anyway.
Hi everyone,
The script works perfectly but there is a serious problem with the b-abs (v.2.84) : when you puts enemies on differents map, only ennemies in the map you spawn will be displayed. However, any other events doesn't have this problem. If i turn caterpillard or intelligent passability off, it doesn't change anything. How to fix that ??
Thanks to help me :)
(ps: I'm not english so I perhaps made mistakes but i hope you'll be able to understand everything)
I will have to take a look at this. Usually all enemies should be displayed as they are nothing else than events.
Thank you :)
I have taken a look at it and found the problem. It was a simple fix. I uploaded v1.41.
Hi!
I'm a huge fan of Continous maps script and of Custom Resolution script as well (by ForeverZer0), but unfortunately they dont work together! D: I tried copying it into the continous maps demo and while teleporting to the second map consisting of few smaller maps game crashes and shows that in the line 427 "+" is an undefined method for Nil class or something. I tried different resolutions but i aim into 1300x740.
I was wondering - is there a way to make these two scripts compatible with each other? That would be so awesome! :D
Sorry for mistakes in english, and many thanks to you for making wonderful scripts for rpg maker xp. :)
To be honest, I am not entirely sure why this would happen. While there are a few potential problems with the compatibility of these scripts, it doesn't seem to me that there should be any since this script isn't really dependent on screen resolution. I would have to look deeper into this, but I don't really have the time. :/
Just for clarification, that error is pointing to the Custom Resolution script at this line:
return $game_map.priority_data[@x, @y] + z
In the demo, the error occurs after choosing to teleport from the crystal to the next map. I used a series of prints to see what values we're getting.
Quote
$game_map.priority_data.xsize = 50
$game_map.priority_data.ysize = 15
[@x, @y] (which are Game_Character variables) = [18, 26]
The 50 and 15 are indeed Map003's width and height. But the coordinates (18,26), which belong to the pink-haired girl on Map003, is after the maps have all been combined together.
So, from what I'm seeing, either the solution is to convert the Game_Character coordinates
temporarily to fit within the range of the priority_data table or combine all the maps' priority_data into one table. The latter sounds easier.
If I remember my script right, I combined all tile data into one big table, too. So combining priority data would be a natural extension of that. I'll take a look at it in the next few days.
Would it be possible to connect maps with differents tilesets ?
Nope. Due to the nature of how RMXP handles maps, all map data is merged into one virtual map during display. Otherwise it would need much more RAM and it would lag like hell.
Nevermind, thanks for your help
Hi, I think i found an other bug: when using blizz abs with this script, ennemies can move from a map to an other one (if they are neighbor) but if you kill an ennemy wich is not on his map, sometimes you earn infinity experience and drop infinity items. You have to move to a nehibor map to stop it :???:
any idea ? :)
Im using the last version of all the scripts
I'll have to look into that.
I just noticed, that the map doesn't update properly while loading a saved game after adding some new events or changing existing events in the editor.
I have to re-enter the map to update the events on the map.