Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Weird Loaded Saved Game Glitch

I'm just writing out my thoughts as a reminder for myself, so I know what trail to pursue next time I come back to this.

I think I see the, or a, problem with the multi slot scripts and why attacking bugs out in a loaded game.
There's a variable that is initialized on a new game, but either isn't written-to or read-from the save file. So when the game loads the variable is null, and it bugs out because it doesn't know what to do in that situation.

There are a few approaches I could take to fix it.
There is a method call that'll to fix it. I could add it in somewhere after loading the game to make sure it works. Although I don't understand why the variable isn't saved. Like, maybe it was never meant to be part of the save data in the first place, and was a huge oversight on the creator's part. Or it could be something else, I'd have to study it more.

If variables are set to null, that might explain why the Daily Life script would load games as night screen. Maybe defaulting to a night setting in the presence of a null variable. Just a theory.

I should test the scripts in a separate projects to see if they do that on their own. But i can't believe whoever made them wouldn't have save/loaded a game in the process of testing them.
 
That's interesting...
I have a theory for the save cancer, since in my project folder theres 40.sav files, but those aren't saved games, when i save a game that .sav file becomes an rxdata file and then the game is saved and registered/loadable, would this method of .sav to .rxdata thing be the cause of it? And if so, what script is doing this? Is it in the Moonpearl scripts?

This is my theory, perhaps both are the problem?
 
I just talked with the other guy that had save/load related bugs.
The solution/problem was that there were too many save methods. and things were loading out of order.
Something about "the magic number" which is how the system knows if changes have been made to the project after creating a save files.

So they just removed all the save/load methods down to 1.

You have something like 3 scripts with identical save/load functions. At least, I thought they looked identical. I'll have to take a closer look. Prune them down to 1, and see it the problem persists.
 
Cassandrainbows":16m384tl said:
That's interesting...
I have a theory for the save cancer, since in my project folder theres 40.sav files, but those aren't saved games, when i save a game that .sav file becomes an rxdata file and then the game is saved and registered/loadable, would this method of .sav to .rxdata thing be the cause of it? And if so, what script is doing this? Is it in the Moonpearl scripts?

This is my theory, perhaps both are the problem?

I'm not sure. I thought I ruled out the MP scripts by taking them all out.
And the multi-slot system works fine by itself.

I tried deleting all but one of the read/write methods. but i'm still getting null variables.
 
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
# This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# * Fix equiped item if user load saved game
#--------------------------------------------------------------------------
alias g7_ms_scene_load_read_save_data read_save_data
def read_save_data(file)
g7_ms_scene_load_read_save_data(file)
$game_actors.order_items # Order armor when you load a saved game in
# case it is an old game
end
#--------------------------------------------------------------------------
# * End of CLASS: Scene Load
#--------------------------------------------------------------------------
end

Could it be in this?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top