Battle Garegga/Advanced Rank
See Battle Garegga for the main page.
Contents
Overview
Rank in Battle Garegga is a bounded integer. Its maximum value is 15,728,640, and its minimum value is 2,097,152 for "normal" DIP switch settings and "Arcade" mode in the Battle Garegga Rev.2016 port.
In the arcade release, rank is hidden from the player. However, the Battle Garegga Rev.2016 port allows the player to track rank as a percentage in real time in the "rank graph" M2 gadget. The rank% displayed in the rank graph is a simple linear conversion from the rank variable stored by the game:
rank% = 100 * [(max-rank)/(max-min)]
max = 15,728,640 (0xF00000 in hexadecimal)
min = 2,097,152 (0x200000 in hexadecimal)
Note that rank% is 0.0% when rank=max and 100.0% when rank=min. Thus, high rank means low difficulty and vice versa.
For a rank change from any given source, the conversion goes:
Δrank% = 100 * [Δrank / (max - min)]
Rank is updated every frame according to a value called the frame rank as well as other specific events. These events are firing the ship's main shot, firing an option, picking up an item, deploying the ship's special weapon, sealing an enemy bullet, and dying.
Note: The rank graph only displays rank% with one significant figure, which is larger than many rank changes throughout the game. Thus, tables of rank% will display more significant figures than encountered in game for the sake of accuracy.
HP Scaling
One of the most noticeable effects of rank is how it influences enemy HP. When an enemy spawns, its maximum HP is calculated by the formula:
HP = ((0x300 - 2*(rank >> 16)) * base) >> 8
In this formula, base is the default enemy HP. Note that changing rank will not update the HP values of any enemies on screen, only new enemies that spawn under the new rank value.
What this means in practice is that enemy HP scales linearly from x1-x3 of the base HP value as the absolute rank decreases and rank% increases. Enemies will spawn with their base HP value when rank is the maximum value of a 24-bit integer, 0xFFFFFF. However, the default rank value (i.e. 0.0%) is 0xF00000 so the base HP values are never actually encountered during gameplay. When rank reaches half of a 24-bit integer, 0x800000, this scaling is x2 and enemies spawn with double their base HP. If rank were to reach the minimum value of a 24-bit integer, 0x0, the scaling would be x3 and enemies would spawn with triple their base HP. However, the minimum rank value (i.e. 100.0%) is 0x200000 so enemies with triple HP are also never encountered. (Setting the DIP switch to "hardest" will lower the minimum rank to 0x80000, but since this is considerably greater than 0x0 enemies will still spawn with less than triple HP.)
A summary of enemy HP scaling encountered in game is displayed in the following table:
Rank (hexadecimal) | Rank% | HP Scaling |
---|---|---|
0xF00000 | 0.0 | x1.125 |
0xC00000 | 23.07692 | x1.5 |
0x800000 | 53.84615 | x2 |
0x200000 | 100.0 | x2.75 |
0x80000 | 111.53846 | 2.9375 |
Frame Rank
The frame rank is a value applied to the rank on every frame during a playthrough. Like rank, it is hidden from the player in the original arcade release, but displayed in the upper left-hand corner of the rank graph on the Battle Garegga Rev.2016 port. The frame rank is a singular value the game tracks and updates as needed. However, it can be useful to think of the frame rank as dependent upon two components:
Frame Rank = Base Value + Extras
Base Value
The base value depends on the highest autofire rate activated during the credit. Its default value is equal to 22 for the "normal" DIP switch setting on the Japanese arcade release and the "Arcade" mode of the Battle Garegga Rev.2016 port. Note that returning to a lower fire rate will not lower the frame rank to a previous value, so it is worth carefully considering when to increase the autofire rate.
Note: Because the frame rank is a small number, the total rank% change per second is included as well in the following table.
Autofire Rate | Base Value (decimal) | Base Value (hexadecimal) | Rank% | Rank% per second |
---|---|---|---|---|
8.6 Hz | 22 | 0x16 | 0.00016 | 0.00968 |
10 Hz | 22 | 0x16 | 0.00016 | 0.00968 |
12 Hz | 33 | 0x21 | 0.00024 | 0.01453 |
15 Hz | 44 | 0x2C | 0.00032 | 0.01937 |
20 Hz | 66 | 0x42 | 0.00048 | 0.02905 |
30 Hz | 88 | 0x58 | 0.00065 | 0.03873 |
60 Hz* | 110 | 0x6E | 0.00081 | 0.04841 |
*Note: 60 Hz autofire is only accessible through a glitch and will activate if you tap the shot button on the frame you respawn. In practice, this means you have a 50% chance of activating it if you hold down a 30 Hz external autofire button after dying. Miyamoto can trigger this glitch without needing to die by holding 30 Hz autofire after bombing.
Extras
The extra additions are small values added to the current frame rank upon obtaining certain power ups. Levelling up the main shot with a small shot power up (including the special shot level up) increases the current frame rank by 1. Activating a secret option formation (except for wide formation, which does not affect frame rank) increases the current frame rank by 2. These values are added every time one of the conditions is fulfilled, even if you have already activated the power up or formation during the current playthrough. Losing the power up or option formation will not decrease the current frame rank by the value that was added.
Activation | Frame Rank Increase | Rank% | Rank% per second |
---|---|---|---|
Shot Lv Up w/ small shot power up | +1 | 0.000007 | 0.00044 |
Special Shot Lv Up | +1 | 0.000007 | 0.00044 |
Activate shadow option formation | +1 | 0.000007 | 0.00044 |
Activate homing/search option formations | +2 | 0.000015 | 0.00088 |
Changing Autofire
When changing the autofire rate, the new frame rank will be:
- the current frame rank, or
- the new base value,
whichever is greater. This means that it is advantageous to change the autofire rate after powering up with small shot power ups or special option formations, since the extra additions will be "absorbed" into the new base value if changing to 12 Hz or higher autofire.
Main Shot
The value of the rank increment applied whenever firing the main shot depends on the number of bullet "clusters" in the shot level of the ship being used and whether the cluster is of non-penetrating or penetrating bullets. The increment at any individual shot level is unique for each ship. In addition, if the sprite limit for player shots on screen has been reached due to a high autofire rate, the rank increment for shots not fired will still be applied.
Note: Because the rank increment per shot is a small number for each ship and shot level, the rank% increase per second for each autofire rate is included in the tables below.
Silver Sword
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
3 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
4 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
5 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Special | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Grasshopper
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
3 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
4 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
5 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
Special | 220 | 0xDC | 0.00161 | 0.01388 | 0.01614 | 0.01937 | 0.02421 | 0.03228 | 0.04842 |
Flying Baron
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
3 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
4 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
5 | 100 | 0x64 | 0.00073 | 0.00631 | 0.00734 | 0.00880 | 0.01100 | 0.01467 | 0.02201 |
Special | 100 | 0x64 | 0.00073 | 0.00631 | 0.00734 | 0.00880 | 0.01100 | 0.01467 | 0.02201 |
Wild Snail
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
2 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
3 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
4 | 140 | 0x8C | 0.00103 | 0.00883 | 0.01027 | 0.01232 | 0.01541 | 0.02054 | 0.03081 |
5 | 220 | 0xDC | 0.00161 | 0.01388 | 0.01614 | 0.01937 | 0.02421 | 0.03228 | 0.04842 |
Special | 220 | 0xDC | 0.00161 | 0.01388 | 0.01614 | 0.01937 | 0.02421 | 0.03228 | 0.04842 |
Gain
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
3 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
4 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
5 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Special | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Chitta
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
3 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
4 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
5 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Special | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
Miyamoto
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
3 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
4 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
5 | 100 | 0x64 | 0.00073 | 0.00631 | 0.00734 | 0.00880 | 0.01100 | 0.01467 | 0.02201 |
Special | 100 | 0x64 | 0.00073 | 0.00631 | 0.00734 | 0.00880 | 0.01100 | 0.01467 | 0.02201 |
Bornnam
Shot Level | Rank (decimal) | Rank (hexadecimal) | Rank% | Rank% per second (8.6 Hz) | Rank% per second (10 Hz) | Rank% per second (12 Hz) | Rank% per second (15 Hz) | Rank% per second (20 Hz) | Rank% per second (30 Hz) |
---|---|---|---|---|---|---|---|---|---|
1 | 60 | 0x3C | 0.00044 | 0.00379 | 0.00440 | 0.00528 | 0.00660 | 0.00880 | 0.01320 |
2 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
3 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
4 | 80 | 0x50 | 0.00059 | 0.00505 | 0.00587 | 0.00704 | 0.00880 | 0.01174 | 0.01761 |
5 | 120 | 0x78 | 0.00088 | 0.00757 | 0.00880 | 0.01056 | 0.01320 | 0.01761 | 0.02641 |
Special | 120 | 0x78 | 0.00088 | 0.00757 | 0.00880 | 0.01056 | 0.01320 | 0.01761 | 0.02641 |
Option Shot
A rank increment is applied for every individual option bullet fired. The value of this increment is the same for all ships except for Gain and Miyamoto, whose option bullets have larger rank increments.
Ship | Rank per bullet (decimal) | Rank per bullet (hexadecimal) | Rank% per bullet |
---|---|---|---|
Garegga ships, Chitta, Bornnam | 20 | 0x14 | 0.00015 |
Miyamoto | 60 | 0x3C | 0.00044 |
Gain | 240 | 0xF0 | 0.00176 |
Items
The value added to the rank when collecting an item depends on the item, with two exceptions. The first exception is when collecting a shot power up, option, or weapon fragment at max capacity, which will increase the value added to rank. The second exception is when collecting a small shot power up or small weapon fragment that levels up the main shot or fills a weapon stock, which will also increase the rank added.
The total rank increase from collecting 40 small weapon fragments is also included in the table below for an easy comparison to collecting a single large weapon fragment.
Small Shot Power Ups
Pickup Type | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
Normal | 2048 | 0x800 | 0.01502 |
Max Shot Level | 10240 | 0x2800 | 0.07512 |
Shot Level Up | 10240 | 0x2800 | 0.07512 |
Large Shot Power Ups
Pickup Type | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
Normal | 8192 | 0x2000 | 0.06010 |
Max Shot Level | 16384 | 0x4000 | 0.12019 |
Small Weapon Fragments
Pickup Type | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
Normal | 2048 | 0x800 | 0.01502 |
Max Bomb Stocks | 10240 | 0x2800 | 0.07512 |
Weapon Level Up | 67584 | 0x10800 | 0.49579 |
40 Fragments | 147456 | 0x24000 | 1.08173 |
Large Weapon Fragments
Pickup Type | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
Normal | 65536 | 0x10000 | 0.48077 |
Max Bomb Stocks | 73728 | 0x12000 | 0.54087 |
Option Power Ups
Pickup Type | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
Normal | 65536 | 0x10000 | 0.48077 |
Max Options | 73728 | 0x12000 | 0.54087 |
Medals
Value | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
100 | 8192 | 0x2000 | 0.06010 |
200 | 18432 | 0x4800 | 0.13522 |
300 | 28672 | 0x7000 | 0.21034 |
400 | 38912 | 0x9800 | 0.28546 |
500-4000 | 118 | 0x76 | 0.00087 |
5000+ | 119 | 0x77 | 0.00087 |
Note: Only the rank amounts up to value 400 were originally intended to be used as rank values, the remaining medals use a subsequent data table for their rank amount due to a bug.
Special Weapons
A rank increment is applied to the rank whenever activating the ship's special weapon. This value is applied regardless of whether a full bomb stock was used.
Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|
16384 | 0x4000 | 0.12019 |
Sealing Bullets
A rank increment is applied for each individual bullet sealed. For the total rank increase, multiply this value by the number of bullets sealed for enemies that fire many bullets at once.
Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|
2048 | 0x800 | 0.01502 |
Dying
The rank increment upon death depends on the number of extra lives the player has on hand.
Extra Lives | Rank (decimal) | Rank (hexadecimal) | Rank% |
---|---|---|---|
5 | 261120 | 0x3FC00 | -1.91556 |
4 | 391680 | 0x5FA00 | -2.87335 |
3 | 522240 | 0x7F800 | -3.83113 |
2 | 655360 | 0xA0000 | -4.80769 |
1 | 785920 | 0xBFE00 | -5.76547 |
0 (Game Over) | 785920 | 0xBFE00 | -5.76547 |
DIP Switches
Changing the DIP switch in the arcade version or in "Custom" mode of the Battle Garegga Rev.2016 port changes two things, the minimum rank and the base values that determine frame rank.
Because of the different minimum rank, the maximum in-game difficulty will change between settings even though the starting difficulty will remain the same. Even though the minimum rank changes, the rank% will still be calculated using the minimum rank of the "normal" DIP switch setting. As a result, the maximum possible rank% will change to a number greater or lower than 100.0% depending on the DIP switch setting.
DIP Switch Setting | Minimum Rank (decimal) | Minimum Rank (hexadecimal) | Maximum Rank% |
---|---|---|---|
Easy | 4,194,304 | 0x400000 | 84.6 |
Normal | 2,097,152 | 0x200000 | 100.0 |
Hard | 1,048,576 | 0x100000 | 107.6 |
Hardest | 524,288 | 0x80000 | 111.5 |
Because of the different base values, the frame ranks encountered at different autofire rates will change accordingly.
Easy
Autofire Rate | Base Value (decimal) | Base Value (hexadecimal) | Rank% | Rank% per second |
---|---|---|---|---|
8.6 Hz | 16 | 0x10 | 0.00012 | 0.00704 |
10 Hz | 16 | 0x10 | 0.00012 | 0.00704 |
12 Hz | 24 | 0x18 | 0.00018 | 0.01056 |
15 Hz | 32 | 0x20 | 0.00023 | 0.01409 |
20 Hz | 48 | 0x30 | 0.00035 | 0.02113 |
30 Hz | 64 | 0x40 | 0.00047 | 0.02817 |
Hard
Autofire Rate | Base Value (decimal) | Base Value (hexadecimal) | Rank% | Rank% per second |
---|---|---|---|---|
8.6 Hz | 28 | 0x1C | 0.00021 | 0.01232 |
10 Hz | 28 | 0x1C | 0.00021 | 0.01232 |
12 Hz | 42 | 0x2A | 0.00031 | 0.01849 |
15 Hz | 56 | 0x28 | 0.00041 | 0.02465 |
20 Hz | 84 | 0x54 | 0.00062 | 0.03697 |
30 Hz | 112 | 0x70 | 0.00082 | 0.04930 |
Hardest
Autofire Rate | Base Value (decimal) | Base Value (hexadecimal) | Rank% | Rank% per second |
---|---|---|---|---|
8.6 Hz | 36 | 0x24 | 0.00026 | 0.01585 |
10 Hz | 36 | 0x24 | 0.00026 | 0.01585 |
12 Hz | 54 | 0x36 | 0.00040 | 0.02377 |
15 Hz | 72 | 0x48 | 0.00053 | 0.03169 |
20 Hz | 108 | 0x6C | 0.00079 | 0.04754 |
30 Hz | 144 | 0x90 | 0.00106 | 0.06338 |
References & Contributors
- ST: Battle Garegga, https://shmups.system11.org/viewtopic.php?f=5&t=351
- Battle Garegga Rank Percentages, https://docs.google.com/spreadsheets/d/1--_IPOmSNxo6ShxzS2Up_q-DNEo2wPCHbuQMyj9NIwE/edit#gid=0