Can choose % chance for Pokémon Stadium transformations (1.02) [flieskiller]
^ Code with basic Vanilla Melee settings of 25% chance each transformations, but can be customized, explained below.
Always a certain Pokémon transformation (AR code version) (1.02) [flieskiller]
(x = transformation ID, choices below)
The first 04 number replaces the maximum random number when choosing a transformation. Instead of choosing between 0 and 3 (number for all 4 transformations), it will randomize between 0 and 99 (custom code adds +1 to that number so that 0 = impossible) for being able to choose between 0 and 100 (because it's easier to count probabilities on 100%)
The three green numbers are the probabilities between the transformations. Numbers are in hexadecimal, so:
0x19 = 25
0x32 = 50
0x4B = 75
The transformations ID are these:
0 = fire
1 = grass
2 = rock
3 = water
Here is how it works, and how you can decide which % you want for each transformations:
To choose the first transformation, it checks if the number is not greater than the first number (here is 0x19), so if the number is between 1 and 25, load the number 0 and resume normal code.
After that, it checks for the grass transformation, and compare with number 50 or above, which means it will select the grass transformation if the number is between 26 and 50. (It does not include between 0 and 25, because it wouldn't have reached there because of the first transformation being checked first)
Rock transformation for the number between 51 and 75 and water transformation if no other elements are chosen (which is between 76 and 100)
If you want to exclude a transformation, set that number to 00
Here are some example of combinations for different probabilities for stages:
fire 0x14 (20)
grass 0x3C (60)
rock 0x46 (70)
^ Comparing with the basic code, it means replacing 19 with 14, 32 with 3C and 4B with 46.
fire 0x0F (15)
grass 0x41 (65)
rock 0x00 (impossible)
^ Comparing with the basic code, it means replacing 19 with 0F, 32 with 41 and 4B with 00.
So that is it, I hope the explanation and examples help for those that has difficulty in these kind of things or are new to hexadecimal maths.