• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Legends: Z-A protagonist in the poll by clicking here.
  • 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.

[Scripting Question] Change exp multiplier for trainer pokemon and customize encounter system

  • 38
    Posts
    8
    Years
    • Seen Apr 4, 2018
    Hello I have some questions:
    Is there a way to change the exp gained from trainer vs wild pokemon multiplier? I think its a bit too low for my game.

    Is there a way to customize the encounter rates? The system right now doesn't allow for me to have the exact encounter rates that I want.

    How do you make a gym leader not switch to the best pokemon until all others are defeated?

    Why are pokemon using bite over a 70 power (105 with stab) move?

    Thanks.
     
    Last edited:
    1.) PokeBattle_Battle (without the R), line 1982, holds what you're looking for here.

    2.) I don't know enough about encounter rates to know this.

    3.) PokeBattle_AI, line 4002, contains a function called def pbDefaultChooseNewEnemy(. You add in the red bits of code.
    Code:
      def pbDefaultChooseNewEnemy(index,party)
        enemies=[]
        for i in 0..party.length-1
          if pbCanSwitchLax?(index,i,false)
            enemies.push(i) [COLOR="Red"]if i != party.length-1 || enemies.length==0[/COLOR]
          end
        end
        if enemies.length>0
          return pbChooseBestNewEnemy(index,party,enemies)
        end
        return -1
      end
     
    Line 1982 is about outsider pokemon. I meant to say increase the exp gained from trainer battles, not increase the amount of exp that pokemon from other trainers gain. Sorry about that.
    The other one works just fine. Thanks for that.

    Edit: I found what I was looking for. It's on line 1964: exp=(exp*3/2).floor if @opponent
     
    Last edited:
    Line 1982 is about outsider pokemon. I meant to say increase the exp gained from trainer battles, not increase the amount of exp that pokemon from other trainers gain. Sorry about that.
    The other one works just fine. Thanks for that.

    Edit: I found what I was looking for. It's on line 1964: exp=(exp*3/2).floor if @opponent

    Huh. You must not be using the same version I have as an example of where to point. that is the line I was referring to, but for you it was apparently eighteen lines higher
     
    Back
    Top