marshall_dump for class Shadow_Overlay

Sprite cannot be serialized, so this is a problem with the script itself. Khas needs to fix that or we should advise people not to get this script for now...


I have encountered this before with the Projectiles script since I needed to save the projectiles in the map and they use Sprites and Bitmaps both of which cannot be serialized so I needed to find a workaround so I arrived with saving values that I can use to recreate the sprites and bitmaps instead of saving the sprites and bitmaps directly.
It would be possible to serialize bitmaps with a compatibility patch, but it'd probably be pretty slow, because each pixel would have to be read and added to an array. It'd be slow and bad at saving/loading them, but it could potentially work.
Oh dear.  So it looks like until Khas gets here (he is on site, but only answering in the Sapphire Battle thread) then I'm stumped.

I don't fancy a slow patch, or one that is bad at saving/loading.  I do hope that this can be sorted because it's a fair amount of money to buy it.
Hi there! I'm working on a fix right now, I will edit this post soon.

Please be patient, the problem isn't with the Ultra Lighting script.

From all that I've read from this post, the problem is that some script that you're using is attempting to save the game on an inappropriate time. My script uses an sprite as a shadow overlay, so it's needed to be disposed before saving the game.

Edit 1: it's a simple fix btw.
Ooh... then that's fine. Probably his autosave script as when he disabled the posted script, he said the error now points to the autosave script. XD


This is why I asked him if he tried to use the script and save in a blank project...
Yeah, the autosave script saves the moment you load a map.
Done! 😀
 
The problem was the autosave script indeed, as it was calling the save method without disposing the sprites/bitmaps (which can't be dumped). The solution was simple: just dispose, save, and then restore everything.
 
Please note that this compatibility issue wasn't Ultra Lighting's fault, as auto saving isn't a native feature of RPG Maker and scripts like that (saving/loading modifiers) can easily cause issues. The Ultra Lighting is designed to be highly compatible, but if an incompatibility is found, I will offer support on solving the issue 😀
 
Here's the compatibility add-on:

Spoiler
Code:
#-------------------------------------------------------------------------------# * [ACE] Khas Ultra Graphics - Compatibility Add-on (Todd's Autosave)#-------------------------------------------------------------------------------# * By Nilo K. (Khas)# * Version: 1.00# * Released on: 08/21/2015## Blog: arcthunder.blogspot.com# Facebook: facebook.com/khasarc# Twitter: twitter.com/arcthunder# Youtube: youtube.com/c/khasarc##-------------------------------------------------------------------------------# * Terms of Use#-------------------------------------------------------------------------------# This is a free compatibility add-on to Khas Ultra Lighting script.# The Khas Ultra Lighting requires the purchase of a license to be used.# #-------------------------------------------------------------------------------# * Requirements#-------------------------------------------------------------------------------# 1. Todd's Autosave script#    Place the "Autosave" script before "Khas Core Library"## 2. Khas Core Library#    Place the "Khas Core Library" script before this add-on.## 3. Khas Graphics Library#    Place the "Khas Graphics Library" script before this add-on.## 4. Khas Ultra Lighting#    Place the "Khas Ultra Lighting" script before this add-on.##-------------------------------------------------------------------------------# * Instructions#-------------------------------------------------------------------------------# This script makes the Todd's Autosave compatible with Ultra Lighting.##-------------------------------------------------------------------------------# * Requirements#-------------------------------------------------------------------------------unless $khas_graphics && $khas_graphics[:ultra_lighting] >= 1.0  warning = Sprite.new  warning.bitmap = Bitmap.new(Graphics.width,Graphics.height)  warning.bitmap.fill_rect(0,0,Graphics.width,Graphics.height,Color.new(255,255,255))  warning.bitmap.font = Font.new("Verdana", 32)  warning.bitmap.font.bold = true  warning.bitmap.font.outline = false  warning.bitmap.font.color.set(255,144,9)  warning.bitmap.draw_text(0,Graphics.height/2-32,Graphics.width,32,"PLEASE INSTALL",1)  warning.bitmap.draw_text(0,Graphics.height/2,Graphics.width,32,"KHAS ULTRA LIGHTING 1.0",1)  while !Input.trigger?(:C)    Input.update    Graphics.update  end  warning.bitmap.dispose  warning.dispose  exitend#-------------------------------------------------------------------------------# * Scene Manager#-------------------------------------------------------------------------------module SceneManager    def self.dispose_ultra_graphics    if @scene.is_a?(Scene_Map)      @scene.spriteset.dispose_ultra_graphics    else      @stack.reverse.each do |s|        if s.is_a?(Scene_Map)          s.spriteset.dispose_ultra_graphics          return        end      end    end  end    def self.restore_ultra_graphics    if @scene.is_a?(Scene_Map)      @scene.spriteset.initialize_ultra_graphics    else      @stack.reverse.each do |s|        if s.is_a?(Scene_Map)          s.spriteset.initialize_ultra_graphics          return        end      end    end  end  end#-------------------------------------------------------------------------------# * Autosave#-------------------------------------------------------------------------------module Autosave    def self.call    SceneManager.dispose_ultra_graphics    DataManager.save_game_without_rescue($game_variables[ToddAutoSaveAce::VARIABLE])    SceneManager.restore_ultra_graphics  end  end#-------------------------------------------------------------------------------# * End#------------------------------------------------------------------------------- 
This compatibility add-on is also available on my blog.
I'm delighted to say that everything is running smoothly and I can now turn my attention to studying how to get all those awesome effects into my game.

Your help on this is very much appreciated.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

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