- 76
- Posts
- 9
- Years
- Seen Oct 6, 2017
How can I remove Pokémon not obeying orders from being too high of a level and replace it with the high level Pokémon getting 1 exp instead.
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
[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
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
---------------------------
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
---------------------------
It should be MAXIMUMLEVEL.
---------------------------
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
---------------------------
if pbOwnedByPlayer?(thispoke.index) && internal battle
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
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