’Cause all games were better on the GBC

You are not logged in.

- Index
- → Help/Question
- →
**Odd Egg Percentage Calculation**

Pages: **1**

**SinisterHoodedFigure****Member**- Registered: 2011-12-09
- Post 35/66

I found the script for the Odd egg... but the thing that puzzles me is the actual calculation of the percentages.

F.Probabilities

dw $147a ; 92% -> 8%

dw $170a ; 91% -> 1%

dw $3fff ; 75% -> 16%

dw $47ad ; 72% -> 3%

dw $70a3 ; 56% -> 16%

dw $7851 ; 53% -> 3%

dw $9c28 ; 39% -> 14%

dw $a147 ; 37% -> 2%

dw $bae0 ; 27% -> 10%

dw $bfff ; 25% -> 2%

dw $deb7 ; 13% -> 12%

dw $e3d6 ; 11% -> 2%

dw $fd6f ; 1% -> 10%

dw $ffff ; 0% -> 1%

for example, I would like to change all established percentages shown there to 7 percent for 12 pokemon, and 8 percent for the last two, giving the most even percentage value of obtaining specific pokemon (I already made changes to the pokemon that comes out of the egg, including dvs)

How would I be able to calculate that using these byte values?

Crystal Kaizo...

Not the hardest hack, but probably the most... *Sinister*

http://www.mediafire.com/download/q3o60 … +Kaizo.ips

Offline

**comet****Member**- Registered: 2012-04-09
- Post 464/672

If you're looking for even distribution across 14 entries, just multiply a list from 1 to 14 by 0xFFFF/14:

```
.Probabilities
dw $1249
dw $2492
dw $36db
dw $4924
dw $5b6d
dw $6db6
dw $7fff
dw $9248
dw $a491
dw $b6da
dw $c923
dw $db6c
dw $edb5
dw $ffff
```

This is actually how the original probabilities work. It would have went something like this:

```
.Probabilities
prob: macro
prob_total = prob_total + (\1)
dw prob_total * $ffff / 100
endm
prob_total = 0
prob 8
prob 1
prob 16
prob 3
prob 16
prob 3
prob 14
prob 2
prob 10
prob 2
prob 12
prob 2
prob 10
prob 1
```

Offline

Pages: **1**

- Index
- → Help/Question
- →
**Odd Egg Percentage Calculation**