2. Choosing the character

The weighted draw, the item slot, promotion, and the special code

日本語 | English | Français | Español | Italiano | 한국어

First two bits: the item check

The first two bits of the stream are bit 0 of d7 and bit 0 of d12, which is to say "is d7 odd" and "is d12 odd". If both are odd the code falls into the item slot and produces a recovery capsule, a senzu bean, a dragon ball and so on instead of a character. The other three cases out of four give a character.

The item slot then runs the same shape of weighted draw on the next eight bits (weights again summing to 60), choosing between senzu beans, King Kai, the one- through seven-star balls and the rest. Items have no stats, so the calculation stops there.

Next eight bits: the weighted character draw

The following eight bits are read as a single byte (0–255) and reduced modulo 60. That remainder (0–59) is walked down a weight table summing to 60, which fixes the base character. Think of it as sixty raffle tickets, handed out like this:

Base characterWeight (/60)Base characterWeight (/60)
Goku5Android 163
Yamcha5Android 173
Trunks4Android 183
Gohan4Android 193
Tien4Raditz2
Chiaotzu4Ginyu2
Piccolo4Zarbon2
Vegeta4Saibaman2
Krillin4Frieza (1st form)1
Cell (1st form)1

Note who is absent from this table: Super Saiyan Goku, Frieza's 2nd through 4th forms, and the rest. They are never drawn. They can only appear through promotion.

Promotion: strong stats transform you

After the stats are computed (page 3), the result is compared against thresholds fixed per base character. If HP, BP and DP are all at or above the threshold, the character is replaced by its upgraded form.

Base characterThreshold (HP / BP / DP)Becomes
Goku55000 / 30000 / 30000Super Saiyan Goku
Piccolo52000 / 27000 / 27000Super Piccolo
Gohan50000 / 30000 / 20000Super Saiyan Gohan
Vegeta55000 / 30000 / 28000Super Saiyan Vegeta
Trunks56000 / 29000 / 21000Super Saiyan Trunks
Frieza (1st form)40000 / 22000 / 20000Frieza (2nd form)
50000 / 26000 / 25000Frieza (3rd form)
60000 / 30000 / 30000Frieza (4th form)
Cell (1st form)32000 / 20000 / 20000Cell (2nd form)
60000 / 30000 / 30000Cell (3rd form)

Frieza and Cell are evaluated in stages, and end up as the highest stage they clear. That structure lets you work backwards. To get, say, "Cell stuck at 2nd form but as strong as possible", you have to hold DP under 30000 so the code deliberately fails the promotion to 3rd form (the worked answers are on the strongest barcode page). Why Frieza's 3rd form is so rare is covered in the notes.

The special code: a fixed result built into the game

When the scattered registers match one specific pattern, neither the draw nor the stat calculation runs, and a fixed result is returned instead. Exactly one arrangement of the ten effective digits hits it, and the code recorded with a product name against it is the product code of the Super Famicom game Dragon Ball Z: Super Butouden, 4902425373737. It yields Super Saiyan Goku, HP 59000, BP 49990, DP 49990, special move Lv.4.

Because the leading two digits and the check digit are ignored (page 1), a code such as 4502425373739 with the prefix swapped gives the same Super Saiyan Goku. Counting the prefix, exactly 100 valid EAN-13 codes produce this result.

BP and DP of 49990 cannot be produced by the normal calculation at all: BP and DP are normally halved, capping them at 48750 and 49750. It is tempting to read this as a reward for children who bought the company's own game, but the developers' intent is not something this analysis can recover. What it can show is that one code, belonging to a Bandai title, was singled out for special treatment.

→ Page 3: computing the stats