View Full Version : [Essentials Tutorial] Scripts defining rival trainer Pokemon details

July 15th, 2012, 9:14 PM
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:

if poke[15] # if this is a shadow Pokemon
pokemon.makeShadow rescue nil
endBelow that paste the following:

pokemon.ballused=poke[16]Next go to the Compiler script and search for:

poke[15]=(!poke[15] || poke[15]=="") ? false : csvBoolean!(poke[15].clone) # Shadow
itemsize+=6 # Species, level, IV, move flag, held item
pkmn.push(poke)Below that paste the following:

if !poke[16] || poke[16]=="" # Ball Used
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
endThat 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): http://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.

Seth Pegasus
July 16th, 2012, 12:55 AM
Thank you so much for this.

July 16th, 2012, 6:44 AM
Thanks! good tutorial! :)

By the way. Is it possible to do to put EVS?

July 16th, 2012, 3:10 PM
Do you mean EVS as in Effort Values? If so do you want to customize the individual EV values each opposing Pokemon has in order to alter its stats like the IV option or do you mean EV yield and have certain trainer Pokemon give higher EV yields upon defeat? Both should be possible although I'm not sure how difficult it would be to implement. I can check later if you want.

July 17th, 2012, 3:12 AM
I want to say that if it might personalize every Pokemon of the trainer with EVS (Effort Values) in his stats.

With the wild pokemon I have done it using this script and switch:
Events.onWildPokemonCreate+=proc {|sender,e|
if $game_switches[131]
# Recalculate stats
}But I do not know do like the same thing with a trainer. I have tried several things, but without success.