546 - bombShield(int a, int script)


Sets the bomb invulnerability flag (a=0 false, a=1 true), the caller's ANM script will change to script when a bomb is active.

611 - etEx(int etId, int async, int type, float a, float b)


Adds bullet transformation to bullet manager etId, Transformation of flag type determines the specific behaviour of the bullet. Documentation can be found here.

BulletEffectType-67108864 - etExDelay(string et, string isAsync, string time)


Hide the bullet for time frames. During this time, it will not move, will be invisible and won't have a hitbox. If used as a first transformation, can be used to delay when the bullet actually appears.

6 - isDelayedSpawn


While this flag is set, the bullet will be invisible and not have a hitbox. This flag is cleared once the delay timer ends.

4 - short_timer


Integer value between -1 and 15 inclusive (by default -1). If non-negative, shooters using short_timer shoot their bullets and timer increments by 1 per frame until 15 is reached. Once 15, timer reset to -1 or 0 depending on Z key state.

5 - long_timer


Integer value between -1 and 120 inclusive (by default -1). If non-negative, shooters using long_timer shoot their bullets and timer increments by 1 per frame until 120 is reached. Once 120, timer reset to -1 or 0 depending on Z key state.

503 - flagClear(int n)


Clears flag(s) according to n. Refer to the flag table here for exact values.

91 - floatTime(int slot, float var, int time, int mode, float start, float final)


In time frames using mode mode, variable var changes from start to final. slot is used to set the slot to be used by this ins, every enemy has 8 slots.

-9980 - F1


Local float variable, inherited by spawned enemies.

-9984 - I1


Local integer variable, inherited by spawned enemies.

-9989 - ANGLE_PLAYER


Angle from the enemy to the player.

-9962 - BOSS_Y


Final Y position of the boss.

-9990 - PLAYER_Y


Player's Y position.

-9963 - BOSS_X


Final X position of the boss.

-9991 - PLAYER_X


Player's X position.

81 - circlePos(float varX, float varY, float angle, float radius)


Performs following operation: varX = cos(angle) * radius and varY = cos(angle) * radius

-9981 - F0


Local float variable, inherited by spawned enemies.

300 - enmCreate(string sub, float x, float y, int hp, int score, int item)


Creates an enemy using subroutine sub at coordinates (x, y) (relative to position of the parent), health of created enemy is hp, score bonus is score and item drop is item.

601 - etOn(int etId)


Shoots bullet(s) using properties from bullet manager etId.

23 - wait(int time)


Stops sub execution for time frames.

1 - delete()


Returns to the top of current call stack.

2 - GAME_SPEED


The value controls by how much faster the game speed is run. This variable is often set to a number between 0 and 1. This value is often changed when a (final) boss dies or when a photo is taken. Its default value is 1.

-9985 - I0


Local integer variable, inherited by spawned enemies.

-9983 - I2


Local integer variable, inherited by spawned enemies.

-9982 - I3


Local integer variable, inherited by spawned enemies.

-9954 - ENEMY_HP


Enemy's current HP.

3 - goheiExists


A flag that determines if a gohei exists on-screen or not. Flag is set to true by active gohei. Flag is set to false if gohei goes off-screen or is despawning.

-9926 - GI0


Global integer value. Value is initialised to 0 on stage load but not on stage reset.

-9925 - GI1


Global integer value. Value is initialised to 0 on stage load but not on stage reset.

-9924 - GI2


Global integer value. Value is initialised to 0 on stage load but not on stage reset.

-9923 - GI3


Global integer value. Value is initialised to 0 on stage load but not on stage reset.

17 - distortion(int a)


Triggers distortion effects on the edge of the screen. The meaning of the argument is not entirely clear. SA uses a value of 1 to create distortion at the bottom of the screen, while UFO uses this same value to create distortion at the top.

539 - spell3(int id, int timeRate, int unused, string name)


Declares a spell-card with id id and name unused. The ID passed to the spell-creating function is id + difficulty - 2 (with easy=0, normal=1, ..., overdrive=5). timeRate determines how much time the spell circle takes to shrink (in frames), as well as how fast the spell bonus decreases.

514 - setInterrupt(int slot, int hp, int duration, string subroutine)


Sets an interrupt on slot slot. Once caller's HP reaches hp or duration frames have passed since this instruction was called, the caller will terminate all subroutines it's currently running and execute subroutine subroutine.

270 - enmCreate270(string sub, float x, float y, int hp, int score, int item)


Creates an enemy using subroutine sub at coordinates (x, y) (relative to position of the stage background camera), health of created enemy is hp, score bonus is score and item drop is item.

115 - timer_callback_threshold(int time)


Calls the callback function timer_callback_sub after time frames have passed.

10022 - SELF_TIME


Integer value that increases by 1 every in-game frame. This value is used by bosses and by functions such as timer_callback_threshold.

7 - has_been_inbounds


This flag is set when the enemy has been within bounds. The default value is false.

8 - is_in_bounds


This flag is set when the enemy is currently within bounds. This flag is false if it is out of bounds.

Bomb Pause Desync


Specifications


  • Versions: 1.00 - 1.01 - 1.02 - 1.02a - 1.02b - 1.02c - 1.02d - 1.02e - 1.02f - 1.02h
  • Difficulty: Easy - Normal - Hard - Lunatic - Extra
  • Mode: Main game - Practice mode
  • Shottype: ReimuA - ReimuB - MarisaA - MarisaB

What happens


By pausing in-game, this may result in a desync. The desync may be noticeable, as the player uses a bomb in the replay while not having used a bomb during gameplay. This desync can happen at any point.

How it happens


The desync is caused by holding the bomb button X while the game is exiting out of the pause menu and while having at least 1 bomb in stock. In particular, the player commonly holds X when pressing on the "Resume to game" option in the pause menu.

Why it happens


This desync comes down to how the game transitions from the pause state back into active gameplay while evaluating button events.

In EoSD, PCB, and IN, input handling does not fully freeze when the game is paused. Instead, the game continues updating the internal key state buffer even while gameplay logic is halted. When unpausing, the game resumes comparing the current key state against the immediately previous recorded state to determine whether a press occurred.

Input interpretations


There exist four input interpretations:

  1. Key is held: Active
  2. Key is not held: Inactive
  3. Key is pressed (Rising edge): Inactive -> Active
  4. Key is released (Falling edge): Active -> Inactive

Most common actions are done when a key is held. Examples:

  • Player shooting
  • Player moving
  • Skipping through dialogue (by using Ctrl button)

Some actions are done when a key is pressed. Examples:

  • Skipping through dialogue (by using Z button)
  • Player bombing

There are some issues that can arise from when key is pressed, which is explained below:

Live playthrough


Consider the following table of a player pausing mid-game with at least 1 bomb in stock:

Global timer 1 2 3
4
5
6
7 8
In-game timer 1 2 3
3
3
3
4 5
Is X button held?

The Global timer is a value that increases by 1 every frame.
The In-game timer is a value that increases by 1 every frame unless the game is paused.
The Is X button held? is a value that is either True (marked with ) or False (marked with ).

The three highlighted columns indicate that the game is paused The game is paused in the Global Timer interval [4, 6]

When bombing by using the X button, The X key must be pressed This means that one frame before X is "", X must be "". for it to be a X press.
When the Global timer is equal to 7, the game is no longer paused. The game then checks if X is pressed. For this, the game checks the following two conditions:

  1. Is X button held? = on Global timer = 7;
  2. Is X button held? = on Global timer = 6.

The second condition is not met, so X is not pressed This means that no bomb is used while playing the game yourself.

Replay mode


Consider the same table from before:

Global timer 1 2 3
4
5
6
7 8
In-game timer 1 2 3
3
3
3
4 5
Is X button held?

Now, the game does not take into account the three highlighted columns since those inputs have never been saved into the replay. Because of this, we instead look at the value of In-game timer.

When the In-game timer is equal to 4, the game is no longer paused. The game then checks if X is pressed. For this, the game checks the following two conditions:

  1. Is X button held? = on In-game timer = 4;
  2. Is X button held? = on In-game timer = 3.

All two conditions are met, so X is pressed on In-game timer = 4, which can lead to a bomb being used only while in replay mode.

Conclusion


Holding X while unpausing does not use a bomb in the live playthrough, but it does use a bomb in its replay mode, causing a desync. In the live playthrough, the X input is seen as a held state but in the replay mode the X input is seen as a rising edge. This discrepancy causes the game to handle the bomb logic differently, leading to a desync.


Replays


  • Replay Liz by "Mechanical Lizard". Extra, MarisaB, 1.02h. 「March 17, 2026」. Download link (Note: Replay desyncs on Flandre's 7th non-spell)
  • Replay Liz by "Mechanical Lizard". Extra, MarisaB, 1.02h. 「March 17, 2026」. Download link (Note: Replay fix of Flandre's 7th non-spell desync)

Videos


This section has no content yet. Would you like to add to this section? Contact me if you are interested!

Other


If you believe your replay desynced because of this cause, please contact me and I can fix the replay !

All The Embodiment of Scarlet Devil pages:
Boss Attack Skip · Dialogue Pause Desync · Bomb Pause Desync · ReimuA No Sound · Nightbird on Easy Difficulty · Bomb Despawning Enemies · Laser Midpoint Bug · Remilia's 2nd non-spell timer · MarisaB Backward Laser · Bullet Displacement Bug · Max power at 127 power · Persisting Bat State
All Desync-related pages:
All Menu-related pages:
All Bombs-related pages:
Bugs with similar cause: