- 25
- Posts
- 17
- Years
- Minnesota, USA
- Seen Jul 19, 2022
I previously was asking what scripts I'd need to change to define what Pokeballs an opposing trainer uses, but I managed to figure it out after further searching. I have turned this into a tutorial for those interested in doing the same (if a mod could please change the [Question] to [Tutorial] that would be appreciated)
Here we go:
In the PokemonTrainers script search for the following:
Below that paste the following:
Next go to the Compiler script and search for:
Below that paste the following:
That is all that is needed script wise. Now if you want to utilize the feature, it is just like defining the traits of any Pokemon, you simply add a number in the 16th spot of the line right after where Shadow Pokemon would be defined. Explanation here (part 4): https://pokemonessentials.wikia.com/wiki/Defining_a_trainer#Defining_an_individual_trainer
The number you put in is 0-23 which each corresponds to a certain Pokeball (view PokemonBalls script line 53 for the ID# of each ball). If it's blank it defaults to the basic red and white Pokeball. You can set the ball used for any Pokemon any trainer has.
Here we go:
In the PokemonTrainers script search for the following:
Code:
if poke[15] # if this is a shadow Pokemon
pokemon.makeShadow rescue nil
end
Code:
pokemon.ballused=poke[16]
Code:
poke[15]=(!poke[15] || poke[15]=="") ? false : csvBoolean!(poke[15].clone) # Shadow
itemsize+=6 # Species, level, IV, move flag, held item
pkmn.push(poke)
Code:
if !poke[16] || poke[16]=="" # Ball Used
poke[16]=0
else
poke[16]=poke[16].to_i
raise _INTL("Bad ball type: {1} (must be from 0-23)\r\n{2}",poke[16],FileLineData.linereport) if poke[16]<0 || poke[16]>23
end
The number you put in is 0-23 which each corresponds to a certain Pokeball (view PokemonBalls script line 53 for the ID# of each ball). If it's blank it defaults to the basic red and white Pokeball. You can set the ball used for any Pokemon any trainer has.
Last edited: