• 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.

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

38
Posts
7
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:
    824
    Posts
    8
    Years
  • 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
     
    38
    Posts
    7
    Years
    • Seen Apr 4, 2018
    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:
    824
    Posts
    8
    Years
  • 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