If this is the same as the script I previously investigated, Game_Event has a link to a sprite which is why it's trying to save the bitmap.
Rpg maker vx ace Marshall_dump error
RGSSx Script SupportSixth!!!!!! You`re a genius!!!! - Marshal.dump(make_save_contents, file) - I deleted that and it works now. So what do I do next?
That's... not what I wrote. You just wrecked the entire save system.
You can see this method in the DataManager module:
Or in another custom script of yours. Search for it with CTRL + SHIFT + F in the script editor (use the keyword make_save_contents for the search, and if it's a method definition line, you will have to do the debugging there) .
Comment out the lines one at a time in that method, except for the ones I marked in it. After each line, start the game, select new game, do the stuff that breaks the save system, and try to save.
If it's still broken, restore the line you commented out before, and comment out the next line below it. Repeat the play-test, and rinse-repeat until the saving works again. When that happens, write down the line you commented out the last time. That line will point to the object which contains the source of the issue.
It will most probably be the line with $game_map or $game_player, but $game_actors, $game_party and $game_system can also be it. The rest of them are usually not touched for adding in anything that would result in your error, so start with the lines I listed just now.
Report back when you are done with this.
You can see this method in the DataManager module:
Code:
def self.make_save_contents
contents = {} # <--Don't touch this line!
contents[:system] = $game_system
contents[:timer] = $game_timer
contents[:message] = $game_message
contents[:switches] = $game_switches
contents[:variables] = $game_variables
contents[:self_switches] = $game_self_switches
contents[:actors] = $game_actors
contents[:party] = $game_party
contents[:troop] = $game_troop
contents[:map] = $game_map
contents[:player] = $game_player
contents # <--Don't touch this line!
end
Comment out the lines one at a time in that method, except for the ones I marked in it. After each line, start the game, select new game, do the stuff that breaks the save system, and try to save.
If it's still broken, restore the line you commented out before, and comment out the next line below it. Repeat the play-test, and rinse-repeat until the saving works again. When that happens, write down the line you commented out the last time. That line will point to the object which contains the source of the issue.
It will most probably be the line with $game_map or $game_player, but $game_actors, $game_party and $game_system can also be it. The rest of them are usually not touched for adding in anything that would result in your error, so start with the lines I listed just now.
Report back when you are done with this.
Why not just try this?
Code:
def check_dump
[$game_system, $game_timer, $game_message, $game_switches, $game_variables,
$game_self_switches, $game_actors, $game_party, $game_troop, $game_map,
$game_player].each do |obj|
begin
Marshal.dump(obj)
msgbox "Dump success"
rescue
msgbox "Error on #{obj.class}"
end
end
end
This should track which class (not which script) that mess the save system.
And we can try to work from there.
Ok I got a little to excited lol. I restored what I deleted and I did what you said (hopefully) and commented out
contents[:system] = $game_system -- and it worked
If Game_System was causing the trouble, then try to search by CTRL + SHIFT + F, write "class Game_System"
And post the screenshot of the search result. It should be something like this
And post the screenshot of the search result. It should be something like this
Wow, $game_system? That might make this a whole lot easier, since that one shouldn't contain many nested objects.
Now you will have to search for class Game_System with CTRL + SHIFT + F.
Carefully check every method inside that class in every script where this line is present. You should look for Sprite.new or Bitmap.new lines.
Hopefully, the sprite/bitmap is created there and not just passed there from an outside object, because if it comes from an outside object, it will get more complicated.
Now you will have to search for class Game_System with CTRL + SHIFT + F.
Carefully check every method inside that class in every script where this line is present. You should look for Sprite.new or Bitmap.new lines.
Hopefully, the sprite/bitmap is created there and not just passed there from an outside object, because if it comes from an outside object, it will get more complicated.
Ok I just did it and I attached the screenshot
Since Sixth said that mog's is likely not the cause, you can ignore mog's script
Now you're down to check those weather, parallax, and anti animation lag
If you have a link to those scripts, we can help you to check
Now you're down to check those weather, parallax, and anti animation lag
If you have a link to those scripts, we can help you to check
Which Parallax and Weather scripts are those? Those are the most suspicious ones.
Btw, screenshots like this won't help much. We need the name and author of the scripts (and links to them for quickest solution).
Btw, screenshots like this won't help much. We need the name and author of the scripts (and links to them for quickest solution).
well all of them on that search are Mog`s scripts. weather parallax i just named it the others i copy and paste it from the name all the way down to the script.
l found sprite.new nd bitmap in parallax script by mogunter. I found sprite.new in the weather but bitmap is not in weather however sprite.new and bitmap.new is in the parallax
None of Moghunter's scripts should generate this issue by themselves, at least I can't seem to trigger it in his demo.
Try to add this snippet in a new script at the bottom:
And test the saving.
Remember to restore that $game_system line you commented out before the test.
Let me know if it works or not.
Note that this will break some things upon loading a saved game (the treasures on map from Mog's script will respawn, for example), but that is expected.
I just want to see if this is what's causing your issue.
What exactly do you do to get this issue? Is there something specific you must do to trigger this error or you just have to change maps and it happens for sure?
You could upload a demo too with all the script you are using and with your settings, maps and events, that would speed this up for sure.
Try to add this snippet in a new script at the bottom:
Code:
class << DataManager
alias fix_test8826 save_game_without_rescue
def save_game_without_rescue(index)
pres = $game_system.pre_set_events
$game_system.pre_set_events = []
val = fix_test8826(index)
$game_system.pre_set_events = pres
return val
end
end
Remember to restore that $game_system line you commented out before the test.
Let me know if it works or not.
Note that this will break some things upon loading a saved game (the treasures on map from Mog's script will respawn, for example), but that is expected.
I just want to see if this is what's causing your issue.
What exactly do you do to get this issue? Is there something specific you must do to trigger this error or you just have to change maps and it happens for sure?
You could upload a demo too with all the script you are using and with your settings, maps and events, that would speed this up for sure.
Double-post notice: @KOC-316
Or maybe, the error is not located in Game_System at all?
Yes, the demo would speed things up if anyone could look at it.
Chance is the Bitmap / Sprite object is stored in really twisted and nasty place that a simple instruction like these might not help.
Yes, the demo would speed things up if anyone could look at it.
Chance is the Bitmap / Sprite object is stored in really twisted and nasty place that a simple instruction like these might not help.
I restored everything and added that script part Sixth and now everything works fine.
No, that was just a test to see if your issue comes from a rather weird method I found in Moghunter's script.
That little snippet breaks some things, like I mentioned before, but seeing that the source is indeed the methods I suspected, I rewrote them completely in a more safe way.
Remove the previous snippet from your game and try this one now:
Put this below Moghunter's Schala Battle System script.
I have no idea why he saved entire events there, he only needed an array from them. Ohh, well, with this snippet, it will only record the used array from events, which should prevent any malfunction from other weird things (still no idea what) coming from event objects.
I also have no idea what those things actually do (I can only guess), I just followed Moghunter's method and "converted" it to function without the entire event objects.
I didn't test this much, only the bare minimum, but it seems to work.
Your old save files will not be usable anymore, you won't even be able to load them, but new save files should work fine.
That little snippet breaks some things, like I mentioned before, but seeing that the source is indeed the methods I suspected, I rewrote them completely in a more safe way.
Remove the previous snippet from your game and try this one now:
Code:
class Game_System
def record_events
@pre_set_events[$game_map.map_id] = {}
$game_map.events.each do |id,ev|
@pre_set_events[$game_map.map_id][id] = ev.defeated
end
end
def restore_events(transfer = false)
return if $game_system.pre_set_events[$game_map.map_id].nil?
$game_map.events.each do |id,ev|
time = $game_system.pre_set_events[$game_map.map_id][id][1] rescue nil
if time.nil?
ev.defeated = [false,0]
else
respawn = $game_system.playtime - time
if respawn >= SCHALA_SYSTEM::ENEMY_RESPAWN_TIME_FOR_TRANSFER
ev.defeated = [false,0] if transfer
else
sdt = $game_system.pre_set_events[$game_map.map_id][id]
ev.defeated = sdt.clone
ev.erase if ev.defeated[0]
end
end
end
end
end
I have no idea why he saved entire events there, he only needed an array from them. Ohh, well, with this snippet, it will only record the used array from events, which should prevent any malfunction from other weird things (still no idea what) coming from event objects.
I also have no idea what those things actually do (I can only guess), I just followed Moghunter's method and "converted" it to function without the entire event objects.
I didn't test this much, only the bare minimum, but it seems to work.
Your old save files will not be usable anymore, you won't even be able to load them, but new save files should work fine.
It works fine with that new snippet.
Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-vx-ace-marshall_dump-error.92477/