• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Essentials Tutorial] Scripts defining rival trainer Pokemon details

  • 25
    Posts
    16
    Years
    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:
    Code:
          if poke[15] # if this is a shadow Pokemon
            pokemon.makeShadow rescue nil
          end
    Below that paste the following:
    Code:
          pokemon.ballused=poke[16]
    Next go to the Compiler script and search for:
    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)
    Below that paste the following:
    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
    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.
     
    Last edited:
  • 199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    Thanks! good tutorial! :)

    By the way. Is it possible to do to put EVS?
     
  • 25
    Posts
    16
    Years
    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.
     
  • 199
    Posts
    14
    Years
    • Seen Jul 6, 2022
    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|
    pokemon=e[0]
    if $game_switches[131]
    pokemon.ev[0]=255
    pokemon.ev[1]=255
    pokemon.ev[2]=255
    pokemon.ev[3]=255
    pokemon.ev[4]=255
    pokemon.ev[5]=255
    # Recalculate stats
    pokemon.calcStats
    end
    }
    But I do not know do like the same thing with a trainer. I have tried several things, but without success.
     
    Back
    Top