Save-Point
Dynamic Maps Expanded - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Dynamic Maps Expanded (/thread-6869.html)

Pages: 1 2


Dynamic Maps Expanded - DerVVulfman - 07-27-2017

Dynamic Maps Expanded
Version: 1.5


Introduction
This script allows the user  to allow  the contents  of their maps retain their settings prior to exiting or teleporting.   This means  that events that have moved on a map, or have changed their graphics through a simple self-switch, do not reset if the player leaves the map and later returns.


Screenshots
Yeeeaaahhhhh.... no.   Nothing visible for a screenie.


Script
Here there be Dragons!


Instructions
Post this Below Scene_Debug and above Main.  If used with either Big Maps (by DerVVulfman) and/or Fog of War (by Wachunga), it must be below 'em'.  It should take effect after that.


FAQ
I only did this rewrite after testing Near's early 2007 era work, only to see it didn't function properly between different game saves under specific conditions.


Compatibility
Designed for RPGMaker XP.   As a bonus, compatible with my Big Maps at no extra cost.


Recommended
The Charlie Mini-Map / Dynamic Maps Patch if this script is in use with the Charlie's Mini-Map Extended system.


Credits and Thanks
Credits definitely to Near Fantastica for the initial work and Wachunga for his edit to make Near's original work more compliant with other map scripts.  And lastly, credit to Melana for a a request to clear map data, and in detection of a logic error involving ignored maps.


Terms and Conditions
Free for use, even in commercial projects.  Due credit is required, not only for me but for Near Fantastica, Wachunga and Melana.


RE: Dynamic Maps Expanded - DerVVulfman - 06-18-2020

BUMP
to version 1.1

This script now includes two new script calls that lets you clear dynamic map data, returning the map to its default settings rather than hold onto the saved settings.  If a map event was 'erased' and this condition was saved by the dynamic map system, running these commands nullify this.


RE: Dynamic Maps Expanded - DerVVulfman - 06-18-2020

BUMP
to version 1.2

Oops. There was a hiccup with one of the two new script calls. One of the values/variables was mis-named and would crash the game if it was invoked.

But this issue was simple, and easily fixed. Enjoy the new version.


RE: Dynamic Maps Expanded - DerVVulfman - 06-30-2020

BUMP
to version 1.3

A nice new feature has been added now, a module where you can list those maps that may be skipped by the system or those that may be the only ones that are used.

Yes, you can limit the Dynamic Maps now.

The first array is called the "IGNORED_MAP_IDs". Here, you can list the IDs of maps that will never be dynamic maps. In the default script, it currently has maps 1 and 2 blocked. They are NOT dynamic and will never be. It can be set to 'nil' instead of having an array of map IDs if you wish.

The second array is called the "REQUIRED_MAP_IDs". Here, you can list the IDs of maps that must be dynamic maps, this under the assumption that maps not listed are 'not' dynamic maps. Currently, it is set to 'nil'. However, if this value was set to an array like REQUIRED_MAP_IDs = [4,5,7,8], then these four maps are the ONLY ones that would be dynamic maps.

Saving games with Dynamic Maps does create larger game save files, not only with this system but others (I am not gonna plug any names). However, this new feature should allow mitigation and lessen the resulting file size.


RE: Dynamic Maps Expanded - kyonides - 06-30-2020

Then let me ask you a question that might be interesting for users like Melana herself.
What if anyone added the same map to both arrays by mistake?
Will it trigger the dynamic maps? Or would it be cancelled altogether by the latter?


RE: Dynamic Maps Expanded - DerVVulfman - 07-01-2020

Then the map will not be a dynamic map, the array holding the IDs of excluded maps confirming this.


RE: Dynamic Maps Expanded - Mel - 09-27-2020

I noticed that the IGNORED_MAP_IDs feature doesn't seem to work.
If I include a map in the array, it will still save it's state and won't reset after leaving.


RE: Dynamic Maps Expanded - DerVVulfman - 09-28-2020

Aaarrgh!

 ONE  [Image: Dizzy.gif]
    STUPID  [Image: Nervous.gif]
        LINE!!!!  [Image: Thud.gif]

BUMP
To Version 1.4

One single line within the code performed a test on the WRONG value, testing the existence of the Required Maps array instead!  Ugh... 

Well, that's been fixed, and I changed the 'names' of the alias commands for the last couple of methods of this script.  Seripusly, I had 'LYCAN' in one of the alias commands which woulda been a problem if anyone used this with my ABS.


RE: Dynamic Maps Expanded - Mel - 10-24-2020

Hmm I noticed that in the newest version of this script all maps reset after leaving them regardless if they are in the IGNORED_MAP_IDs array or not
It doesn't happen in the old 1.1 version.

EDIT: It was my bad..I forgot to set the REQUIRED_MAP_IDs array to nil.
Everything works as it should now.


RE: Dynamic Maps Expanded - Mel - 07-05-2021

Uhm I just noticed that if you save and load a savegame all maps will reset.
Right now I'm able to respawn all defeated enemies and all other erased events simply by leaving a map and reloading the game.
I don't think this should happen at all? :o

It's funny that I never noticed this until now after testplaying my game for more than 50 hours the last months.^^

Edit: I managed to save the dynamic maps into the savegames now to prevent the respawning of events after loading with these lines of code in the save and load methods for now:

Code:
Marshal.dump($game_map_d, file)
Code:
$game_map_d = Marshal.load(file)

Do you think this will cause any trouble?
It works for me so far..