Messages need to be refactored.
Our messaging system needs a refactor. We need to determine frame accuracy for messages and what is / is not prohibited when they are up.
Timing from Cherry:
Main update methods for common events run (they just check if they are parallel process and the condition is met and then invoke the parallel process worker for them)
Main update methods for map events run (they do a bunch of things, described in my previous post - but actually even more, because after the check for whether there is any active event page, they will run their parallel process worker and then check once more for active)
Message window updates
Timer updates
Screen effects update
Pictures update
Foreground worker runs
Panorama updates
Test cases still broken:
- [ ] 17 - message box glitch not fully animated, need to affect on show screen.
- [ ] 27 Test 2 - box doesn't close.
- [ ] 42 - We don't interrupt the message
- [ ] 43 - Currently off by 1 frame.
- [ ] 44 - We set show_message chunk but it gets cleared every frame due to Game_Map::UpdateForegroundEvents() always calling Game_Interpreter::Clear() even when no events run.
- [ ] 45 - Wrong timing
TBD:
- [ ] Do another performance testing pass
- [ ] Test performance of overflow window width.
- [ ] Test show screen against window animation
- [ ] Backspace timing? Peuteris Grey Intro
Things to verify from RPG_RT:
- [x] Move show choice continuation into message class and handle
subcommand_pathproperly. - [x] EV01: Save, EV02: Choices -> Save and load the game message window dissapears RPG_RT bug :exclamation:
- [x] #1707 Test case 6, save game runs an extra frame while message box is closing, before the continuation triggers.
- [x] How is foreground interpreter execution blocked by active message?
- Only when message is pending, not when closing
- [x] How is parallel interpreter execution blocked by active message?
- Only when its own message is pending and visible
- [x] Behavior of "Allow other events to move"
- [x] What event commands blocked by an active message?
- See Test 19
- [x] What active event commands / conditions block a message from starting?
- Only other messages, with specific rules for FG and Parallel
- [x] How does RPG_RT handle message ownership and
show_messagechunk- Caller of message sets this chunk
- Appears to be cleared when message ends?
- [x] When is face reset
- On foreground event finish
- [x] How many frames to open and close message box
- 8 frames
- [x] How does open and closing behave with foreground events?
- New messages can appear instantly if created on last frame, otherwise wait for close
- [x] How does open and closing behave with parallel events?
- New messages blocked until close finishes
- [x] Do messages have any wierd effects when triggered during pre-update?
- No, they just wait until the first frame to start animating
- message update not run during preupdate
- [x] How to messages behave when called when screen is erased?
- [x] When msg is updated in the main loop?
- After all events, before timers
- [x] Frame timing of different message speed settings?
- [x] Can we cleanup and refactor the code to improve code quality?
- [x] When you substitute an actor name with
\n[]and it has an escape character like\^? - [x] Level up message timing
- [x] Class change message timing
- [x] Does the inn use show message chunk?
- [x] Message conditions blocking ShowMessage
- [x] Message conditions blocking ShowChoices
- [x] Message conditions blocking ShowNumberInput
- [x] Message conditions blocking ShowInn
- [x] Change EXP / Level spawning a box while other box active?
- [x] ChangeHP kills party while message is up?
- [x] Check all scenes, what about gameover?
- [x] Race conditions with parallel change system graphic
- [x] Inn cancels pending message
- [x] GetOnOffVehicle behavior with message up?
- [x] VehicleTeleport while message up?
- [x] Interaction with Wait For Key
- [x] Interaction with KeyInputProc
- [x] ChangeClass Message with message
- [x] Can FG run other commands while msg box closing?
- yes
- [x] Message behavior blocking timers?
- [x] Test delay of full width japanese characters
- [x] Figure out skip frame logic for speed 1 w.r.t. wide chars vs half chars
Test Cases 1 - What can run while messages are up?
EV01 parallel Message \v[1] \v[2]
EV02 parallel Var1+1
EV03 autostart Var2+1
| Msg | V1 | V2 |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 75 | 10 |
| 3 | 134 | 20 |
| 4 | 215 | 30 |
Result: Auto start event advances by 10 frames between each message. Parallel runs during the message. The longer you wait to close the message box, the higher var1.
- Change EV01 to
Wait 0.0s
Loop:
Msg: \v[1] \v[2]
| Msg | V1 | V2 |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 471 | 9 |
| 3 | 567 | 18 |
Result: Var2 advances by 9 frames
Test Cases 2 - Message box animations
- parallel event
Message: Hello
Result: Open, "hello", Close, Open, "hello", etc..
- parallel event
Loop: Message: Hello
Result: Open, "hello", Close, Open, "hello", etc..
- autostart event
Message: Hello
Result: Open, "hello", "hello", "hello", etc..
- autostart event
Loop: Message: Hello
Result: Open, "hello", "hello", "hello", etc..
- autostart event
Loop:
Message: Hello
Wait 0.0s
Result: Open, "hello", Close, Open, "hello", ...
Conclusion:
- Repeated messages from autostart events don't wait for the message box to close
Test Cases 3 - Message box timings
- Set this parallel event EV01
OpenSaveMenu
Msg: \^
OpenSaveMenu
| Save | stop count |
|---|---|
| 1 | 0 |
| 2 | 18 |
- Now add 2 more events
EV02 parallel
Var1 + 1EV03 autostartVar2 + 1
| Save | stop count | Var1 | Var 2 |
|---|---|---|---|
| 1 | 0 | 1 | 0 |
| 2 | 18 | 18 | 10 |
Conclusion:
- Message box animations surely take 8 frames. As this example shows 8 + 8 + 2 frames used.
- autostart events appear allowed to to run when message box is closing
- parallel events run the entire time, as the variable value 18 matches
stop_count
Test Cases 4 - Messages and Save Menu
- EV01 parallel
Message: Hello
Sw1 On
EraseEvent
EV02 parallel Page 1
Loop:
OpenSaveMenu
EV02 page 2, activated by SW1
Result: Hello
- Change EV01 to autostart
Result: Save, Save, Hello
Conclusion:
Scene Change is blocked when messagebox is visible.
Test Cases 5 - Message Loadgame Bug
Ev01 parallel
OpenSaveMenu
OpenSaveMenu
EraseEvent
EV02 parallel
ShowMessage: Hello
EraseEvent
- Start a new game and save
Result: Save, "Hello"
| Save | Ev01 current command | Ev02 current command | EV02 show message |
|---|---|---|---|
| 1 | 1 | 1 | 1 |
| 2 | 2 | 2 | 0 |
- Load the first save game
Result: Hello message box does not appear :exclamation:
- Save again after loading
| Save | Ev01 current command | Ev02 current command | EV02 show message |
|---|---|---|---|
| 1 | 2 | 2 | 0 |
Result: show_message chunk gets cleared
Conclusion:
Edge cases allow us to save the game while a message box is pending. The message box will appear after the save scene exits, however there are no LSD chunks for the active message. So loading this save game will cause the message to not appear :exclamation:
The show_message chunk appears to always be cleared when there is no active message.
Test Cases 6 - More timing tests
EV01 parallel
Branch SW1 off
Message: \^
Sw1 On
Var1 + 1
Ev02 parallel
Var2 + 1
- After message box closes, check variables with debug menu
Result: Var2 - Var1 == 18
- Preupdate: EV01 starts message but message not updated, EV02 ticks
- Frame1: Message starts, blocking EV01 for 17 frames, EV02 ticks 17 frames
- Change EV01 to autostart
Result: Var2 - Var1 == 10
- Preupdate: EV01 does not run, EV02 ticks
- Frame1: EV01 starts message, Message starts, EV01 blocks for 9 frames, and then continues running while the message box is closing, EV02 ticks 9 frames
- Change EV01 to parallel, Add
Wait0.0sinside the branch before the message
Result: Var2 - Var1 == 18
- Preupdate: EV01 waits, EV02 ticks
- Frame1: EV01 starts message, Message starts, blocking EV01 for 17 frames
- Change EV01 to parallel, Add
Wait0.0s; Wait 0.0sinside the branch before the message
Result: Var2 - Var1 == 19
- Preupdate: EV01 waits, EV02 ticks
- Frame1: EV01 waits, EV02 ticks
- Frame2: EV01 starts message, Message starts, blocking EV01 for 17 frames, EV02 ticks 17 frames
Test Cases 7 - Message speed timings
EV01 parallel
Branch SW1 off
Wait 0.0s
Message: TXT
Sw1 On
Var1 + 1
Ev02 parallel
Var2 + 1
Var3 = Var2
Var3 -= Var1
Var3 -= 17
- Change the text to
\s[N]for some speed N, followed by some number ofXfollowed by\^
Example \s[3]XXX\^\
This table shows the value of Var3, which is the number of frames taken to render the message
| Msg Speed | \s[N]\^ |
\s[N]X\^ |
\s[N]XX\^ |
\s[N]XXX\^ |
\s[N]XXXX\^ |
\s[N]XXXXX\^ |
\s[N]XXXXXX\^ |
\s[N]XXXXXXX\^ |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 2 | 2 | 3 | 3 | 4 | 4 | 5 |
| 1 | 1 | 2 | 2 | 3 | 3 | 4 | 4 | 5 |
| 2 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 |
| 3 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 |
| 4 | 4 | 7 | 10 | 13 | 16 | 19 | 22 | 25 |
| 5 | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 26 |
| 6 | 6 | 10 | 14 | 18 | 22 | 26 | 30 | 34 |
| 7 | 7 | 11 | 15 | 19 | 23 | 27 | 31 | 35 |
| 19 | 19 | 29 | 39 | 49 | 59 | 69 | 79 | 89 |
| 20 | 20 | 31 | 42 | 53 | 64 | 75 | 86 | 97 |
| 21 | 20 | 31 | 42 | 53 | 64 | 75 | 86 | 97 |
- Other Test Cases
| Msg | Frames | Comments |
|---|---|---|
\s[5]X\s[20]\^ |
23 | |
\s[20]X\s[5]\^ |
16 | |
\s[20]\>\^ |
0 | Removes wait for finish message |
\s[20]X\>\^ |
11 | |
\s[20]\.\^ |
40 | |
\s[20]|\^ |
81 | |
\s[20]\|\>\^ |
61 | |
\s[20]\.\>\^ |
20 | |
\>\.\^ |
0 | \> removes all waits |
X\s[2]X\>\^ |
3 | |
\s[2]X\s[1]X\>\^ |
3 | |
XX\s[2]X\>\^ |
3 | |
X\s[2]X\s[1]X\>\^ |
4 | position of \s[1] characters determines whether we wait 1 frame |
\s[20]$A\>\^ |
21 | Symbols wait longer? |
\s[20]\_\>\^ |
11 | Half spaces are the same |
\s[20] \>\^ |
1 | Waits 1 frame for empty lines |
\s[20]X X\^ |
42 | 11 + 11 + 20 |
\s[20] \^ |
23 | Empty lines 1 + 1 + 1 + 20 |
\s[20] \^ |
53 | Lines with spaces 11 + 11 + 11 + 20 |
XX\>\^ |
1 | |
$AX\>\^ |
2 | |
X$A\>\^ |
2 | |
\_\_X\>\^ |
2 | |
$AXX\>\^ |
2 | |
X$AX\>\^ |
3 | :question: |
- Shift Test
Hold the Shift key while performing any of these tests
Result: Frames == 0
- ExFont Symbols
Test this message \s[N]$A\>\^
| Speed | Frames |
|---|---|
| 1 | 1 |
| 2 | 3 |
| 3 | 4 |
| 4 | 5 |
| 5 | 6 |
| 10 | 11 |
| 15 | 16 |
| 20 | 21 |
\<Symbol
Test this message \s[N]\<\>\^
| Speed | Frames |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 10 | 10 |
| 20 | 20 |
Conclusion
- When
speed == 1- we print 2 characters per frame.
- we always increment after odd characters.
- This only applies to half width characters, and appears to reset after seeing a full width char. So any half width character after a full width will cause a 1 frame delay.
- When
speed > 1, each character prints inspeed / 2 + 1frames. - When the message ends, we wait
speedframes before closing the message box. - Speed is clamped to
[1,20] - Shift key finishes the message instantly, including final wait.
- The
\<waits for 20 frames - The
\.waits for 20 frames - The
\|waits for 61 frames :exclamation: - The
\>skips wait for everything include\|and\. - When
speed == 1Symbols like$Aalways wait for 1 frame - When
speed > 1Symbols like$Await forspeed + 1frames - Always waits 1 frame for empty lines
- Non empty lines add no extra delay
- Trailing whitespace is not skipped
Test Cases 8 - Testing the message end character
- Display this message
\s[20]\^XXXXXXX
Result: "XXXXXXX"
- Press shift will it's displaying
Result: Entire message displays instantly
Conclusion
- The
\^causes the message box to close, but it still waits for the entire text to be displayed before closing. - The shift key causes the entire message to display instantaneously
Test Cases 9 - Gold Window timing
Use the same machinery from earlier
\s[N]\$\>\^
| Speed | Gold | Frames |
|---|---|---|
| 1 | 0 | 1 |
| 10 | 0 | 10 |
| 20 | 0 | 20 |
| 1 | 999999 | 1 |
| 10 | 999999 | 10 |
| 20 | 999999 | 20 |
\s[N]X\$X\>\^
| Speed | Gold | Frames |
|---|---|---|
| 1 | 0 | 3 |
| 10 | 0 | 22 |
| 20 | 0 | 42 |
| 1 | 999999 | 3 |
| 10 | 999999 | 22 |
| 20 | 999999 | 42 |
Conclusion
- Summon Gold window waits
speedframes - Does not depend on how much gold you have
Test Cases 10 - Multiline instant text and shift tests
- Hold shift and display this message
\s[20]XXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX
XXXXXXXXX
XXXX\^
Result: Entire message displayed instantly. 0 frames.
- Hold shift and display this message
\s[20]XXXXXXXXXXXXXXXXX\<XXXX
XXXXXXXXXXXXX
XXXXXXXXX
XXXX\^
Result: First part of message up to the \< displays. Then a pause, and then the rest of the message.
20 frames :question:
- Display this message
\s[20]\>XXXXXXXXXX
XXXXXXXXXXXX\^
Result: First line prints immediately, second line renders slowly
152 Frames
- Display this message
\s[20]\>XXXXXXXXXX
\>XXXXXXXXXXXX\^
Result: Entire message prints instantly
0 Frames
- Display this message
\s[20]\>
\>\^
Result: Entire message prints instantly
0 Frames
Conclusions
- Shift key is not registered while the message window is waiting. Hence the 20 frame delay. Also if you quickly hit shift while the message is rendering sometimes you'll see it won't trigger.
- Shift key is canceled by
\< \<always waitsspeedframes\>effect is cancelled at end of line, but shift key is not.\>also skips 1 frame delay for empty lines
Also worth testing: Do full width characters (Japanese) render the same speed as half width.
Test Cases 11 - Autostart message timings
EV01 autostart
Msg: \s[20]\v[1]\^
Var2 = Var1
Wait 0.0s
Var3 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]\^
Sw1 On
Text \v[1]
EraseEvent
EV02 parallel page 1
Var1 +1
EV02 page 2 - activated by SW1
Result: "2", "49 42 43", "166"
| Frame | Sequence | Var1 |
|---|---|---|
| 1P | EV02 Var1+=1 |
1 |
| 1 | EV02 Var1+=1 |
2 |
| 1 | Upd message | 2 |
| 1 | EV01 ShowMessage |
2 |
| 2 | EV02 Var1+=1 |
3 |
| 2 | Upd message (start open) | 3 |
| 9 | EV02 Var1+=1 |
10 |
| 9 | Upd message (Draw "2", Wait 11) | 10 |
| 20 | EV02 Var1+=1 |
21 |
| 20 | Upd message (EndPage, Wait 20) | 21 |
| 40 | EV02 Var1+=1 |
41 |
| 40 | Upd message (Finish Wait) | 41 |
| 41 | EV02 Var1+=1 |
42 |
| 41 | Upd message (Start close anim, visible = false | 42 |
| 41 | EV01 Var2=Var1 |
42 |
| 41 | EV01 Wait 0.0s |
42 |
| 42 | EV02 Var1+=1 |
43 |
| 42 | EV01 Var3=Var1 |
43 |
| 48 | EV02 Var1+=1 |
49 |
| 48 | EV01 ShowMessage |
49 |
Conclusion
- Variables are substuted into the message when the interpreter runs, not when the message updates. This is demonstrated by the value
2in the first message - If the foreground interpreter creates 2 messages one after another, the message box will not animate closed and instead go right to the next message.
- If there is 1 frame delay or more between 2 messages in the foreground interpreter, it will wait until the first message box closes to start the next one.
Test Cases 12 - Invalid Actor tests
Create at least 12 actors.
\n[1]
Result: "Alex"
\n[0]
Result: "Alex"
\n[A]
Result: Crash
\n[2A]
Result: "Brian" - Trailing characters are discarded
\n[A2]
Result: Crash
\n[2A2]
Result: "Brian"
Var1=11; Msg=\n[\v[1]A]
Result: "Actor11"
\n[\v[0]]
Result: "Alex"
Var3=999; Msg=\n[\v[3]]
Result: Crash
Var3=-999; Msg=\n[\v[3]]
Result: Crash
Var3=0; Msg=\n[\v[3]]
Result: "Alex"
Var3=1; Msg=\n[\v[3]]
Result: "Alex"
Var3=1; Msg=\n[\v[A]]
Result: "Alex"
\n[]
Result: Crash
\n[
Result: Crash
\n[2
Result: "Brian"
\n
Result: Crash
Var1=1; Msg=\n[1\v[1]]
Result: "Actor11"
Var1=1; Msg=\n[\v[1]\v[1]]
Result: "Actor11"
Var1=1; Msg=\n[\v[1]\c[1]]
Result: "Alex]"
Var1=1; Msg=\n[\v[1]\v[0]]
Result: "Actor10"
\n[01]
Result: "Alex"
\n[\v[A]]
Result: "Alex"
\n[0\v[A]]
Result: "Alex"
\n[\v[A]0]
Result: "Alex"
\n[0\v[A]0]
Result: "Alex"
- Give actor 8 the name "X\v[1]X"
\n[8]
Result: "X[1]X"
Var1=11, Var2=1, Msg=\n[\v[\v[2]]]`
Result: "Alex]"
Conclusions
- When RPG_RT see a non-digit within brackets, it will discard it and all characters following it. Returning any numbers that were before.
- If the value resolves to an invalid actor, RPG_RT will crash.
- If an embedded variable query resolves to 0, instead of crashing RPG_RT will use the first actor.
- Multiple variables can be embeded, a long with digits, and all are concatenated.
- Actor name does not allow recursion
Test Cases 13 - Invalid escapes
\X
Result: ""
\X[123]
Result: "[123]"
Conclusions
Unsupported escape characters are ignored.
Test Cases 13 - Multiple messages delay?
- EV01 parallel
Msg: Hello
EV02 autostart
Msg: Goodbye
Result: Open, "Hello", "Goodbye", "Goodbye", ...
- Change EV02 to parallel
Result: Open, "Hello", Close, Open, "Goodbye", Close, Open, "Hello", Close, Open, "Hello", Close, Open, "Goodbye",...
- Change EV02 to autostart and add a
Wait 0.0sbefore the message
Result: Open, "Hello", Close, Open, "Goodbye", Close, Open, "Goodbye", ...
Conclusions:
- If a foreground event wants to spawn a message box on the same frame as a previous box closes, it draws the box right away with no animation
- If the previous box is already closing, the foreground event will wait for it to close before it creates the new box.
- Parallel event always wait for close.
Test Cases 14 - Parallel message timings
EV01 parallel
Msg: \s[20]\v[1]\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]\^
Sw1 On
Text \v[1]
EraseEvent
EV02 parallel page 1
Var1 +1
EV02 page 2 - activated by SW1
EV03 autostart
Var3 = Var1
EraseEvent
Result: "0", "48 48 41", "172"
Test Cases 15 - Parallel message timings (simple version)
EV01 parallel
Msg: \>\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]
EraseEvent
EV02 parallel page 1
Var1 +1
EV03 autostart
Var3 = Var1
EraseEvent
Result: "0", "17 17 10"
Test Cases 16 - Parallel message timings (simple version)
EV01
Var1 +1
EV02 parallel
Msg: \>\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]
EraseEvent
EV03 autostart
Var3 = Var1
EraseEvent
Result: "0", "18 18 10"
Test Cases 17 - Messages and Scenes
Moved to #2079
Test Cases 18 - Messages and Teleport
Moved to #2079
Test Cases 19 - General event commands vs messages
EV01 parallel
Msg: Hello\^
Msg: \v[1]
EV02 parallel
CMD
Var1 +1
EraseEvent
Result: If CMD is blocked by the message, Var1 will not increment and we'll see the value as 0. If CMD is not blocked, we'll see Var1 == 1
| CMD | Blocked? |
|---|---|
| ShowText | Y |
| DisplayTextOptions | Y |
| ShowCoices | Y |
| InputNumber | Y |
| ChangeFace | Y |
| ChangeSwitch | N |
| ControlTimer | N |
| ChangeGold | N |
| ChangeItems | N |
| ChangeParty | N |
| ChangeEXP | N |
| ChangeLevel | N |
| ChangeParameters | N |
| ChangeSkills | N |
| ChangeEquip | N |
| ChangeHP | N |
| ChangeMP | N |
| ChangeState | N |
| RecoverAll | N |
| DamageProcessing | N |
| ChangeActorName | N |
| ChangeActorNickName | N |
| ChangeActorGraphic | N |
| ChangeActorFace | N |
| ChangeSYstemBGM | N |
| ChangeSystemSE | N |
| ChangeSystemGraphic | N |
| ChangeSystemTransition | N |
| BattleProcessing | Y |
| ShopProcessing | Y |
| InnProcess (cost 0) | Y "Hello", Inn sequence, "0" :exclamation: |
| InnProcess (cost > 0) | N :exclamation: |
| NamePrcess | Y |
| TransferPlayer | Y |
| GetPlayerLocation | N |
| MoveToVariableLocation | Y |
| GetOnOffVehicle | N |
| SetVehicleLocation | N |
| SetEventLocation | N |
| SwapEventLocation | N |
| GetTerrainID | N |
| GetEventID | N |
| HideScreen | Y |
| ShowScreen | Y |
| TintScreen | N |
| FlashScreen | N |
| ShakeScreen | N |
| ScrollMap | N |
| WeatherEffect | N |
| Show Pic | N |
| Move PIc | N |
| Erase Pic | N |
| ShowAnimation | N |
| Show/Hide Player | N |
| FlashEvent | N |
| SetMoveRoute | N |
| WaitForAllMovement | N |
| StopAllMovement | N |
| Wait | N |
| Wait (WaitForKey) | Y |
| PlayBGM | N |
| FadeBGM | N |
| MemorizeBGM | N |
| PlayMemorizedBGM | N |
| Play SE | N |
| PlayMovie | Y |
| KeyInputProc (NoWait) | N |
| KeyInputProc (withWait) | Y |
| ChangeTileset | N |
| ChangeParallaxBack | N |
| SetEncounterRate | N |
| ChangeTile | N |
| SetTeleportPoint | N |
| Teleport On/Off | N |
| SetEscapeLocation | N |
| ChangeEscapeAccess | N |
| OpenSaveMenu | Y |
| OpenMainMenu | Y |
| ChangeMenuAccess | N |
| Branch | N |
| Label | N |
| JumpLabel | N |
| Loop | N |
| BreakLoop | N |
| EndEventProcessing | N |
| EraseEvent | N |
| CallEvent | N |
| Comment | N |
| GameOver | Y |
| ReturnToTitle | Y |
| ChangeClass | N |
| ChnageBattleCmds | N |
| OpenLoadMenu | N |
| ExitGame | Y |
| ToggleATBMode | N |
| ToggleFullScreen | N |
| OpenVideoOptions | Y |
Test Cases 20 - Event blocking timing
- EV01 parallel
Msg: \>\^
EraseEvent
EV02 parallel
CMD
SW1On
Msg: \v[1]
EV03 parallel Page1
Var1+1
EV03 parallel Page2 activated by SW1
- Do with EV01 as autostart
- Repeat with EV02 as parallel
- Repeat with EV01 as autostart, add a
Wait0.0sbefore CMD
| CMD | Var1 (autostart) | Var1 (parallel) | Var1 (autostart wait) |
|---|---|---|---|
| DisplayTextOptions | 10 | 17 | 17 |
| ChangeFace | 10 | 17 | 17 |
| BattleProcessing | 18 | 18 | 18 |
| ShopProcessing | 18 | 18 | 18 |
| NamePrcess | 18 | 18 | 18 |
| TransferPlayer | 17 | :question: 17? | 17 |
| MoveToVariableLocation | 17 | :question: 17? | 17 |
| HideScreen, ShowScreen | 17 | 17 | 17 |
| Wait (WaitForKey) | :question: | :question: | :question: |
| PlayMovie | :question: | :question: | :question: |
| KeyInputProc (withWait) | :question: | :question: | :question: |
| OpenSaveMenu | 18 | 18 | 18 |
| OpenMainMenu | 18 | 18 | 18 |
| GameOver | :question: 18? | :question: 18? | :question: 18? |
| ReturnToTitle | :question: 18? | :question: 18? | :question: 18? |
| ExitGame | :question: 18? | :question: 18? | :question: 18? |
| OpenVideoOptions | 17 | 17 | 17 |
Conclusion
- Change Text Settings and Change Face follow the same rules as
ShowMessage.
Test Cases 21 - Check Forground interpreter behavior on closing
EV01 autostart
Msg: \>\^
Loop:
Var1 +1
Wait 0.0s
EV02 parallel
Wait 0.0s
Wait 0.0s
Msg: \v[1]
Result "8"
EV01 executes all frames while message box is closing.
Test Cases 22 - When is face cancelled
- EV01 parallel
Set Face
Wait 0.0s
Wait 0.0s
Msg: Hello
EV02 parallel
Result: "Hello" with face
- Change EV02 autostart
Sw1 On
Result: "Hello" with no face
Conclusion
Face is cancelled when any foreground event exits
Test Cases 23 - GetOnOffVehicle with message
Start the Player in front of the ship
- EV01 parallel
Msg: Hello
EV02 parallel
GetOnOffVehicle
Result: Player boards ship while message is active
Test Cases 24 - MoveRoute with message
- EV01 parallel
Msg: Hello
EV02 parallel
SetMoveRoute: Player, Right
Result: Player moves while message active
Test Cases 25 - Timer interruption
- EV01 parallel
Timer1 Set TIme 1 second
Timer1 Operation: Start
Text: \s[20]X\>\^
OpenSaveMenu
| Save | timer1_frames |
|---|---|
| 1 | 91 |
- EV01 parallel
Timer1 Set TIme 1 second
Timer1 Operation: Start
OpenSaveMenu
| Save | timer1_frames |
|---|---|
| 1 | 119 |
Conclusion:
Timers not affected by message
Test Cases 26 - Inn vs messages
EV01 parallel
Msg: hello
EraseEvent
EV02 parallel
WAIT
Inn (cost > 0)
EraseEvent
- Try different waits
| WAIT | Result |
|---|---|
| Message box appears immediately, inn text, "hello" skipped :exclamation: | |
| 0.0s | Message box appears immediately, inn text, "hello" skipped :exclamation: |
| 0.0s, 0.0s | Message box appears immediately, inn text, "hello" skipped :exclamation: |
| 0.1s | message box animates, inn text, "hello" skipped :exclamation: |
| 0.5s | "hello", then inn text suddenly covers it :exclamation: |

- Add a choices after the message
Result: Same
- Add a number input after the message
Result: Same
- Now change the inn cost to 0
| WAIT | Result |
|---|---|
| "hello", waits for message box to close, then inn runs | |
| 0.0s | "hello", waits for message box to close, then inn runs |
| 0.1s | "hello", waits for message box to close, then inn runs |
| 0.5s | "hello", waits for message box to close, then inn runs |
Conclusions
- Inn command with message never waits and even overwrites the current message!
- Inn command without message appears to wait, but this looks like the command itself processes and just the transition effect and start of the inn effect is blocked until message closes.
- Needs further investigation
Test Cases 27 - Messages and death
EV01 parallel
Msg: hello
EV02 parallel
Change HP -9999 party allow death
Result: Message box appears briefly, then game over
- Add
Wait 0.5sbefore ChangeHp
Result: "hello", then message box suddenly closes and game over

Test Cases 28 - Messages vs Level Up
EV01 parallel
Msg: hello
EV02 parallel
ChangeLevel Party +99 Show message
Result: Behaves correctly
"Hello", waits for player to close message, then level up messages show without waiting for the box to close.