marshall_dump for class Shadow_Overlay

First off, let me say that I am greatly looking forward to being able to use this script.  

However, at the moment it is generating an error message as follows:

Script 'Yan/Eff comp fix' line 21: TypeError occurred.

no marshall_dump is defined for class Shadow_Overlay.

The script it refers to is a small custom compatibility script and is as follows:

Code:
module DataManager    def self.make_save_header    $game_map.ms_effectus_party_pos.default = nil    $game_map.ms_effectus_event_pos.default = nil    $game_map.ms_effectus_etile_pos.default = nil    $game_map.ms_effectus_etriggers.default = nil    header = {}    header[:characters]    = $game_party.characters_for_savefile    header[:playtime_s]    = $game_system.playtime_s    header[:system]        = Marshal.load(Marshal.dump($game_system))    header[:timer]         = Marshal.load(Marshal.dump($game_timer))    header[:message]       = Marshal.load(Marshal.dump($game_message))    header[:switches]      = Marshal.load(Marshal.dump($game_switches))    header[:variables]     = Marshal.load(Marshal.dump($game_variables))    header[:self_switches] = Marshal.load(Marshal.dump($game_self_switches))    header[:actors]        = Marshal.load(Marshal.dump($game_actors))    header[:party]         = Marshal.load(Marshal.dump($game_party))    header[:troop]         = Marshal.load(Marshal.dump($game_troop))    header[:map]           = Marshal.load(Marshal.dump($game_map))    header[:player]        = Marshal.load(Marshal.dump($game_player))    header  end  end

 

 

Could you tell me the code to put in a marshall-dump?  I have tried asking the person who wrote the script, but he seems to have vanished at the moment.  

I shall, of course, perfectly understand if you feel that this is not directly your problem, but I thought I would try, just in case.

 

Many thanks.
Are you using a lightning script or something like that?
Does that project currently have any save files? If so, try moving them to another directory and seeing what happens if there are no save files present.
@Huddell

this is in the new thread for Khas Ultra Lighting script, so yes I am.

@bgillisp

Genius!  I thought that just starting New Game would be enough.  It wasn't but moving the old save files out of the way did it.  

Can you explain why to a scripting idiot?  And can I safely assume that everything will run okay from now on in?
@Huddell

this is in the new thread for Khas Ultra Lighting script, so yes I am.
Ah, once again forgot to check which area the post was on.
From what I can tell, the script was trying to access data in the old save games that didn't exist when it was creating the header (and the header for the old save game is still created even if you intend to just save over it). That was why it crashed.
Well, thas is probably because the script needs to create something new that changed the previous data for some reason making it incompatible with the new one.

There is a discussion about how so many of us argue if this is a good or bad thing, or if it is possible to avoid such things HERE.
But if I choose New Game, which I did, then it should not be trying to access previous data.  That is the bit I don't understand, and why I continue to be a bit anxious about what happens in the future.

EDIT

Back to square one

This script comes in several parts.  I had disabled the various individual scripts so that I could check something else.  When I ran the check that bgillisp suggested I enabled them again - but inadvertently missed the main one!  Now that one is enabled, I get the same error message, so the suggestion does not work.

I think I need the line of code which gives the marshall_dump for that class, but I don't know enough to work out what it should be.  Logically, I suppose, it should be similar in structure to the others, but my experiments have not worked.
But if I choose New Game, which I did, then it should not be trying to access previous data.  That is the bit I don't understand, and why I continue to be a bit anxious about what happens in the future.
The save file has two sections: "header" and "content": The header contains the data that is displayed on the save screen (time, money, characters), while the content has everything else.

If you have a problem with the content of the save, it will give you an error if you try to load that save file. If you have a problem in the header, it may give you an error when you try to save or load any save file.

That script you posted up there is called when saving the header of a save file.
That would explain why the error message occurs when it does - it is when the first map transfer happens, and the autosave kicks in at that point.

However, as you will see from my edit, the solution does not, after all, work and I am back where I started.
That is either a bug or an incompatibility. If you disable Effectus and that one script you shared here, does it work?
Now that might be an error with the autosave script. Does it work fine until then? Can you save and load files ok before that first transfer?
I know you typed out the error, but could you also provide a screenshot of the message that it displays? Unfortunately I don't think you'll get too much support for your issue. Khas' light script is currently only available to Members+, as I understand, and will then be a store product. As a result, there is a limited amount of exposure for the script.

Either way, it seems that one of the lighting script's classes isn't able to be saved, which is happening when it tries to save the map. Without more information there isn't much we can do.
@bgillisp

This is the very first transfer.  What happens is that after the title screen the game opens on a blank map where the player chooses visible/invisible enemies and difficulty level.  Once those choices are made, the player is transferred to the first 'real' map.  It is at that moment that it crashes.

If I disable that little script, then I get exactly the same error message but this time pointing to the Autosave+Yanfly Save Engine (combined script - Todd incorporated an autotsave module into Yanfly's basic script).

EDIT

Here is the error message

error%20message_zpsocoftmmj.png


@Zalerinian

It has just become available in the store today, which is why there is now an ordinary sub-forum for it.  I've been waiting until it went on general sale before posting this query.
Unfortunately, without the script it would incredibly unlikely for me to solve this issue. Right now my only guess is to see if another script also defines the Shadow_Overlay class (you can do ctrl + shift + f to search all script at once, search for class Shadow_Overlay), or the class itself contains procs or lambdas, meaning you can visibly see it have something like

procedue = proc { do stuff here } or

Code:
lamba = -> var1 { do stuff with var1 here }
EDIT: no, wait...
A global search reveals that only Khas Ultra Lighting has Shadow_Overlay - which is what one would expect, otherwise I would have hit this problem before.

Checking through the script, neither proc nor lamba occurs anywhere.

Unfortunately I can't link to the script as it is a paid-for one and there is no publicly available version of it.

@Engr Adiktuzmiko

I have no idea why it is saving those in the header.  I am not a scripter and do not understand most of what I see when I look at a script.
I tried to make a new class and include it in the header and it didn't error...

Does that Shadow_Overlay have a parent class?

class A < PARENT_CLASSCoz if it uses bitmap as a parent for example then that's a problem as you can't marshal bitmaps.PS: Have you tried running it in a game that only has that lighting script and see if it errors or not? That way we will know if it's compatibility error or inherent
My assumption is that Shadow_Overlay probably inherits Sprite or Sprite_Base (or any of the other unserializable classes), which does not offer an implementation for serialization


I would then assume the shadow sprites are being stored with the map or the system, and then trying to be saved.


Sprites should not be saved for the most part and should be generated as needed.


A proper fix would probably require modifying the script so that the script does not attempt to save sprites.
@Tsukihime

This is the sections that most instances of Shadow_Overlay occur in

class Shadow_Overlay < Sprite

and

class Spriteset_Map

Original thread: https://forums.rpgmakerweb.com/threads/marshall_dump-for-class-shadow_overlay.43921/