Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and Fix saving and loading of SaveMapEvent chunks #1499

Closed
fmatthew5876 opened this Issue Nov 18, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Nov 18, 2018

Player does not correctly save and load SaveMapEvent data. This data needs to be loaded for the player, all 3 vehicles, and any map events.

On symptom can be observed by simply by saving and loading in Player before EasyRPG/liblcf#279 is merged. Games saved by Player with this liblcf will incorrectly save animation_type to 1 for the player and all map events. If you load the save game in RPG_RT, you'll see all events including the player walking in place (correct load of bad data). If you load the save game in Player, the player and map events will be standing in place (incorrect load of bad data). This is because animation_type is never actually loaded from the SaveMapEvent data and applied to the Game_ C++ objects.

In the previous paragraph we observed bugs with animation_type, but its likely that other SaveMapEvent fields also have bugs.

SavePartyLocation and SaveVehicleData conceptually inherit from SaveMapEvent. This relation needs to be respected and the common SaveMapEvent chunks need to be saved and loaded correctly for player, vehicles, and map events. Some of the logic to deal with SaveMapEvent is in Game_Event instead of the Game_Character base.

Fixing this properly might require some new inheritance construct in the liblcf schema for these 3 types.

@fmatthew5876 fmatthew5876 changed the title Refactor SaveMapEvent Refactor and Fix saving and loading of SaveMapEvent chunks Nov 18, 2018

@Ghabry Ghabry closed this in #1502 Dec 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.