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.

Tsukasa No Bullets


Specifications


  • Versions: 1.00a
  • Stage: Tutorial 1st Market 2nd Market 3rd Market 4th Market 5th Market 6th Market End of Market Challenge Market

What happens


Tsukasa can stops shooting bullets on her first spell. This effect does not take place in the other stages.

Marisa fighting against Tsukasa on her first spell-card
Figure 1: A screenshot of Tsukasa's first spell-card showing not many bullets. More rows are supposed to spawn but they fail to spawn.

How it happens


The player must repeatedly die on Tsukasa's first spell. This actions must be done at specific times, particularly right after Tsukasa shoots her large bullets. This must be done until 2,000 bullets have prematurely been cleared.

Why it happens


Tsukasa's first spell creates invisible bullets that spawn after a few game frame. The invisible bullets count towards the bullet cap, which is set at 2,000. If the bullet cap of 2,000 is reached and enemies tries to fire its pattern, no bullets will be shot.

The bullets use an ECL instruction called etEx. This ECL instruction adds a transformation to the bullet, which is set with etEx's argument type. In this glitch, this value is equal to 67108864, or 0x04000000 in hexadecimal.

For simplicity, I will use a MERLIN macro that makes it easier to understand the explanation. Using the macro, the value 0x04000000 corresponds to etExDelay. This bullet transformation hides the bullet for time. During this time, it will be invisible, not move, and not have a hitbox.

The flag isDelayedSpawn


When a bullet of transfomation 0x04000000 is set, the bullet sets an internal flag called isDelayedSpawn. While this flag is set, the bullet will be invisible and not have a hitbox. This flag is cleared once time frames have passed.

When a bullet with etExDelay is spawned, the following sequence of events happen:

  1. The bullet is created by the boss and is linked to the bullet list
  2. The bullet's internal flag isDelayedSpawn is set to true.
  3. The bullet waits until time frames have passed.
  4. The bullet's internal flag isDelayedSpawn is set to false. The bullets is now visible and tangible.

Removing the bullet from the bullet list


The bullet list is a list of all bullets that have been fired by enemies and are currently active. This list is updated every game-frame and has a capacity of 2,000. In other words, at most 2,000 bullets can exist at once. If this limit has been reached and any more patterns are shot, the new bullets will fail to appear. This list also keeps track of bullets of transformation 0x04000000 despite those bullets visually not having appeared yet.

When a bullet is destroyed, the following sequence of events happen:

  1. The bullet is destroyed (by dying or cancelling).
  2. The bullet's state variable changes from 1 (normal) to 4 (in the process of being cleared).
  3. If the flag isDelayedSpawn is not set, then the bullet is removed from the bullet list.

The last step checks if flag isDelayedSpawn is not set to prevent any animation-related bugs.

Clearing the bullet while the flag isDelayedSpawn is set


We can now combine the knowledge of the previous two sections. Suppose that the bullet is cleared while the flag isDelayedSpawn is true. The following sequence of events happen:

  1. The bullet is created by the boss and is linked to the bullet list
  2. The bullet's internal flag isDelayedSpawn is set to true.
  3. The bullet waits until time frames have passed.
  4. Before time frames have passed, the bullet is destroyed.
  5. The bullet's state variable changes from 1 to 4.
  6. The flag isDelayedSpawn is set, therefore the bullet is not removed from the bullet list.

Since the state variable is 4, some transformations that are set by etEx are skipped, which includes the transformation 0x04000000. In the example of etExDelay, it means that any instructions related to the time variable are skipped. As a result, the bullet's internal flag isDelayedSpawn cannot change and will stay true.

The result of this is that the bullet remains in a state taking up a slot in the bullet list while never visually appearing on-screen and being intangible.



Videos