Open fmatthew5876 opened 5 years ago
Result: Nothing happens
music_stopping == 1
Result: X plays again
music_stopping == 1
Result: After load the save, BGM is playing and music_stopping == 0
:exclamation:
So while this chunk exists in the LSD data, it always gets cleared on load game!
EV01 parallel
Wait 0.0s
Wait 0.0s
OpenSaveMenu
OpenSaveMenu
EraseEvent
EV01 parallel
Wait 0.0s
Battle, interrupt if escape
Sw1 off
EraseEvent
EV02 parallel
Wait 0.0s
Save
EraseEvent
Save | EV02 current command | EV02 abort on escape |
---|---|---|
1 | 2 | 1 |
2 | 3 | 0 |
3 | 4 | 0 |
This SaveSystem::transparent
(0x37) chunk. I'm at a loss for what it does or if it's even a real chunk.
I hacked it into my save game as 1 and I don't notice anything change. I checked messages and the player sprite.
Any ideas?
Cherry answered "as far as I know it says whether the messagebox is set to be without background."
There is a RPG::System::messageTransparent
in dynrpg which maybe maps to this? Need to investigate further.
So this chunk actually maps to RPG::System::messageActive
in dynrpg. So maybe this is what we call Game_Message::IsMessagePending()
?
I'm not sure if it's ever possible to save your game while the message window is up.
And it looks like you can call scenes while messages are up.
EV01 trigger
MessageOptions: Allow Events to Continue
Switch 01 On
Msg: Hello
EV02 parallel, from Sw 01
OpenSaveMenu
The save scene will call repeatedly while the message animates and displays.
This feature appears broken, because if you load your game, the message will be gone. We don't emulate this at all in player. It's also not known what else is allowed when "Allow events to continue" is set.
This needs more investigation.
So far in dynrpg version I have discovered that this flag is:
CommandShowMessage()
CommandShowChoices()
CommandNumberInput()
I set a break point on reads and I couldn't find anything reading this variable except when you save your game.
The flag never gets reset on the map, even after the message box closes. It doesn't reset if you enter a menu or teleport to another map. It doesn't get set in 2k3 battles for any messages except those caused by events. It gets cleared before the end battle messages.
Looks like an unused / incomplete feature?
For the abort_on_escape
flag, the interpreter checks it at the beginning of it's main loop.
When the interpreter runs, it checks if this flag is set, and then it checks the battle state to see if the previous battle succeeded or not.
if (abort_on_escape) {
abort_on_escape = 0;
if (last_battle_result == escape) {
EndEvent();
return;
}
}
RPG_RT does this on the next frame after the battle when the interpreter. Player does it in a continuation immediately upon finishing the battle.
So there is a subtle timing difference of 1 frame of when this event interpreter is active vs when it is not, which could cause a bug in some games.
For messageActive
I've discovered something.
When you do ShowMessage, ShowChoices, or ShowNumInput, this flag gets set to 1, and then message is spawned.
When you do other things which spawn messages, such as level up, class change, battle messages, etc.. RPG_RT appends the text to some global variable at 004CDC30.
This thing is likely a pascal TStrings or TStringList object: https://wiki.freepascal.org/TStringList-TStrings_Tutorial
This global is checked when the foreground interpreter is run, if any text is pending in this object, the interpreter breaks out of the loop, sets messageActive=0
and then spawns the message box.
So it looks like this flag might actually mean "Message was created by event".
I still have not found any code which reads or otherwise switches on the flag, other than the code which saves it to LSD.
SaveInventory::turns
RPG_RT will write the
SaveInventory::turns
chunk to LSD with the number of turns the last battle consisted of.No idea how this is used, but we should write the chunk to be compatible with 2k and 2k3 battles.
SaveSystem::music_stopping
Signals whether we should replay or not the same BGM as current bgm if requested??
SaveSystem::transparent
???
SaveEventExecState::abort_on_escape
Used by interpreter to abort execution if configured to do so on escape.