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

Saves continued from an RPG_RT save become broken for RPG_RT (switches load improperly) #1360

vgperson opened this Issue May 7, 2018 · 2 comments


None yet
5 participants
Copy link

vgperson commented May 7, 2018

Name of the game:

Witch's Heart (

Player platform:


Attach files (as a .zip archive or link them)

Describe the issue in detail and how to reproduce it:

Load this save (made in EasyRPG), and the ladder exists. Load it in RPG_RT, and the ladder does not exist, and you can't progress the game. This is because Switch 5000, used by the game as an "is night" flag, is loaded as "on" in EasyRPG but "off" in RPG_RT. Though harder to demonstrate, switches 4992+ are probably all loaded as "off" in this situation.

This is because the problem save has written an incorrect switch size: the value in the 0x1F chunk is slightly smaller than the accurate length in 0x20. I'm guessing EasyRPG considers the 0x1F chunk irrelevant and thus has no problems, whereas that's what RPG_RT actually uses for the size.

The circumstances: I loaded an old save (made in RPG_RT) in EasyRPG. This save had the switch size A6 7F, or 4991. But it's not 4991 because the switch data count of 5000 used to be smaller - it turns out that in RPG_RT, the switch size is increased dynamically as higher switches are set, whereas EasyRPG simply starts it at the max value. I advanced a little, up to the point where Switch 5000 is first turned on, then saved right after. But EasyRPG did not update the old switch size, and so it remained A6 7F, which RPG_RT takes to mean "no need to load switch values past 4991."

No amount of switch setting in EasyRPG will fix a save that's like this, but RPG_RT will fix it as soon as 5000 is turned on, due to its dynamic increase behavior. I'm also going to guess variables work the same way.

@Ghabry Ghabry added the Savegames label May 7, 2018

Zegeri added a commit to Zegeri/Player that referenced this issue Aug 8, 2018

Emulate more closely the behaviour of switches size
This sets Main_Data::game_data.system.switches_size to the largest
switch id used. This should fix EasyRPG#1360.

This comment has been minimized.

Copy link

CherryDT commented Oct 12, 2018

Note that this also means that you can use more switches or variables than "existing" (as in: having names and being selectable in the editor), by using a pointer variable. This is actually used in some games, for example there is a "self-switch-like" system somewhere which uses an "array" of variables above the named ones to store information for each event on each map.

For example, I could set variable #1234567 to 123 (which I could never select in the editor) simply using:

<> Change Variable [0001] = 1234567
<> Change Variable [V[0001]] = 123

This comment has been minimized.

Copy link

carstene1ns commented Nov 10, 2018

The original issue likely was fixed by #1475 and some LSD refactor.

Also, old savegames can be fixed by simply saving with 0.6 again.

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.