• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll 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.

How to remove Pokémon not obeying orders?

Maybe you should make a NPC that make pokemon happy, then you get the obeys, when maximum happiness, pokemon can't turn away and obey you.
 
PokeBattle_Battler, search for "def pbObedianceCheck". The line directly below that should read "return true if choice[0]!=1". Change that to read just "return true", and Pokemon will always obey you.

As for gaining only 1 EXP, I don't know yet. I don't know where EXP is defined.

Edit: found how EXP works. This is untested, but:

search for "growthrate=thispoke.growthrate". That should take you inside the function "pbGainEXP". Directly below that line, add the following code:
Code:
              badgelevel=MAXLEVEL
              if pbOwnedByPlayer?(thispoke.index) && internalbattle
                badgelevel=10
                badgelevel=20  if pbPlayer.numbadges>=1
                badgelevel=30  if pbPlayer.numbadges>=2
                badgelevel=40  if pbPlayer.numbadges>=3
                badgelevel=50  if pbPlayer.numbadges>=4
                badgelevel=60  if pbPlayer.numbadges>=5
                badgelevel=70  if pbPlayer.numbadges>=6
                badgelevel=80  if pbPlayer.numbadges>=7
                badgelevel=100 if pbPlayer.numbadges>=8
              end
              if thispoke.level>badgelevel
                newexp=PBExperience.pbAddExperience(thispoke.exp,1,growthrate)
              else
                newexp=PBExperience.pbAddExperience(thispoke.exp,exp,growthrate)
              end

You'll notice that the second to last line is a clone of the line directly below what I had you paste; delete the copy of that line that's outside the if statement.

Very soon after where I had you paste, you should find the following code. Add the red part:
Code:
[COLOR="Red"]                if thispoke.level>badgelevel
                  pbDisplayPaused(_INTL("{1} gained a measly {2} Exp. Points.",thispoke.name,exp))
                els[/COLOR]if isOutsider
                  pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
                else
                  pbDisplayPaused(_INTL("{1} gained {2} Exp. Points!",thispoke.name,exp))
                end
 
Last edited:
PokeBattle_Battler, search for "def pbObedianceCheck". The line directly below that should read "return true if choice[0]!=1". Change that to read just "return true", and Pokemon will always obey you.

As for gaining only 1 EXP, I don't know yet. I don't know where EXP is defined.

Edit: found how EXP works. This is untested, but:

search for "growthrate=thispoke.growthrate". That should take you inside the function "pbGainEXP". Directly below that line, add the following code:
Code:
              badgelevel=MAXLEVEL
              if pbOwnedByPlayer?(thispoke.index) && internalbattle
                badgelevel=10
                badgelevel=20  if pbPlayer.numbadges>=1
                badgelevel=30  if pbPlayer.numbadges>=2
                badgelevel=40  if pbPlayer.numbadges>=3
                badgelevel=50  if pbPlayer.numbadges>=4
                badgelevel=60  if pbPlayer.numbadges>=5
                badgelevel=70  if pbPlayer.numbadges>=6
                badgelevel=80  if pbPlayer.numbadges>=7
                badgelevel=100 if pbPlayer.numbadges>=8
              end
              if thispoke.level>badgelevel
                newexp=PBExperience.pbAddExperience(thispoke.exp,1,growthrate)
              else
                newexp=PBExperience.pbAddExperience(thispoke.exp,exp,growthrate)
              end

You'll notice that the second to last line is a clone of the line directly below what I had you paste; delete the copy of that line that's outside the if statement.

Very soon after where I had you paste, you should find the following code. Add the red part:
Code:
[COLOR="Red"]                if thispoke.level>badgelevel
                  pbDisplayPaused(_INTL("{1} gained a measly {2} Exp. Points.",thispoke.name,exp))
                els[/COLOR]if isOutsider
                  pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
                else
                  pbDisplayPaused(_INTL("{1} gained {2} Exp. Points!",thispoke.name,exp))
                end

I got this error while testing out the exp gain.
Code:
---------------------------
Pokémon Paragon
---------------------------
Exception: NameError

Message: uninitialized constant PokeBattle_Battle::MAXLEVEL

PokeBattle_Battle:2170:in `pbGainEXP'

PokeBattle_Battle:2121:in `each'

PokeBattle_Battle:2121:in `pbGainEXP'

PokeBattle_Battle:2075:in `each'

PokeBattle_Battle:2075:in `pbGainEXP'

PokeBattle_Battler:3600:in `pbUseMove'

PokeBattle_Battler:3709:in `pbProcessTurn'

PokeBattle_Battler:3708:in `logonerr'

PokeBattle_Battler:3708:in `pbProcessTurn'

PokeBattle_Battle:3106:in `pbAttackPhase'



This exception was logged in 

C:\Users\Tyler\Saved Games/Pokémon Paragon/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
 
Last edited:
It should be MAXIMUMLEVEL.

Hmm it seemed to fix that error, but this one also popped up.

Code:
---------------------------
Pokémon Paragon
---------------------------
Exception: NoMethodError

Message: undefined method `index' for #<PokeBattle_Pokemon:0x8dd8758>

PokeBattle_Battle:2171:in `pbGainEXP'

PokeBattle_Battle:2121:in `each'

PokeBattle_Battle:2121:in `pbGainEXP'

PokeBattle_Battle:2075:in `each'

PokeBattle_Battle:2075:in `pbGainEXP'

PokeBattle_Battler:3600:in `pbUseMove'

PokeBattle_Battler:3709:in `pbProcessTurn'

PokeBattle_Battler:3708:in `logonerr'

PokeBattle_Battler:3708:in `pbProcessTurn'

PokeBattle_Battle:3106:in `pbAttackPhase'



This exception was logged in 

C:\Users\Tyler\Saved Games/Pokémon Paragon/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
Any ideas? I'm taking the Ruby course on CodeAcademy and I know that the problem is that when it tries to call
Code:
if pbOwnedByPlayer?(thispoke.index) && internal battle
that the .index isn't defined anywhere. But I don't understand exactly where or how to define it.
 
SOLVED!

I got it working after I modified a few lines. Thank goodness I am taking that course on Ruby!

Here is the finished code if anyone is interested:
Code:
              badgelevel=MAXIMUMLEVEL
              if pbOwnedByPlayer?(thispoke.partyIndex) && internalbattle
                badgelevel=10
                badgelevel=20  if pbPlayer.numbadges>=1
                badgelevel=30  if pbPlayer.numbadges>=2
                badgelevel=40  if pbPlayer.numbadges>=3
                badgelevel=50  if pbPlayer.numbadges>=4
                badgelevel=60  if pbPlayer.numbadges>=5
                badgelevel=70  if pbPlayer.numbadges>=6
                badgelevel=80  if pbPlayer.numbadges>=7
                badgelevel=100 if pbPlayer.numbadges>=8
              end
              if thispoke.level>badgelevel
                newexp=PBExperience.pbAddExperience(thispoke.exp,1,growthrate)
              else
                newexp=PBExperience.pbAddExperience(thispoke.exp,exp,growthrate)
              end
              exp=newexp-thispoke.exp
              if exp > 0
                if thispoke.level>badgelevel
                  pbDisplayPaused(_INTL("{1} gained a measly {2} Exp. Points.",thispoke.name,exp))
                elsif isOutsider
 
Last edited:
PokeBattle_Battler, search for "def pbObedianceCheck". The line directly below that should read "return true if choice[0]!=1". Change that to read just "return true", and Pokemon will always obey you.

As for gaining only 1 EXP, I don't know yet. I don't know where EXP is defined.

Edit: found how EXP works. This is untested, but:

search for "growthrate=thispoke.growthrate". That should take you inside the function "pbGainEXP". Directly below that line, add the following code:
Code:
              badgelevel=MAXLEVEL
              if pbOwnedByPlayer?(thispoke.index) && internalbattle
                badgelevel=10
                badgelevel=20  if pbPlayer.numbadges>=1
                badgelevel=30  if pbPlayer.numbadges>=2
                badgelevel=40  if pbPlayer.numbadges>=3
                badgelevel=50  if pbPlayer.numbadges>=4
                badgelevel=60  if pbPlayer.numbadges>=5
                badgelevel=70  if pbPlayer.numbadges>=6
                badgelevel=80  if pbPlayer.numbadges>=7
                badgelevel=100 if pbPlayer.numbadges>=8
              end
              if thispoke.level>badgelevel
                newexp=PBExperience.pbAddExperience(thispoke.exp,1,growthrate)
              else
                newexp=PBExperience.pbAddExperience(thispoke.exp,exp,growthrate)
              end

You'll notice that the second to last line is a clone of the line directly below what I had you paste; delete the copy of that line that's outside the if statement.

Very soon after where I had you paste, you should find the following code. Add the red part:
Code:
[COLOR="Red"]                if thispoke.level>badgelevel
                  pbDisplayPaused(_INTL("{1} gained a measly {2} Exp. Points.",thispoke.name,exp))
                els[/COLOR]if isOutsider
                  pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
                else
                  pbDisplayPaused(_INTL("{1} gained {2} Exp. Points!",thispoke.name,exp))
                end

I was checking PokeBattle_Battler and can't find "def pbObedianceCheck" and "growthrate=thispoke.growthrate"
 
Back
Top