HeyHeyHenry
HeyHeyHenryΔ
- 11
- Posts
- 5
- Years
- Age 20
- My House
- Seen May 2, 2023
Oh hey! It's me, HeyHeyHenry. Today I'll try to teach you how to apply almost EVERY Affection Effects in Pokémon Essentials, but first, I want to make sure that you have the Pokémon Amie or Refresh Script Installed in your project... So if you still don't have it, click here to learn how to install it! (Remembering that this Script was an adaptation of the rigbycwts's Script, so please credit Pizza Sun and rigbycwts for this Script!).
First, let's make a small list of what we need to do, current this is everything that is affected by Affection:
Ok, so First, let's change the Experience Gain! Open your project and search for the "PokeBattle_Battle" script, and go to the Line N°1932, add a new line and in this new line, add this:
Now search for "if exp>0" in the line N°1937 and Substitute Everything until the line N°1944 with this:
New Code:
Old Code:
Good! Now, all Pokémon that have 2 Levels of Affection, already receive a 1.2x experience increase. The next step is to make our Pokémon be able to sometimes, endure attacks, Let's to the "PokeBattle_Move" script, and search for the line N°1165 and substitute all the code until the line N°1187 with this:
New Code:
Old Code:
All right! So now our Pokémon can survive from attacks, but we need to make it be able to avoid them too, so let's go to the "PokeBattle_Battle" script, and then to the line N°2398, create a new line and in this new line, insert this:
Okay! Now let's make it Shake Off those bad Status Conditions >:C!! Let's go to the line N°3299 and add a new line, then in this new line we'll insert this:
All Right, we now wants to make our Pokémon be able to increase its Critical Ratio when it loves you, so let's go to "PokeBattle_Move" script and then to the line N°557 and add a new line, then in this new line we'll just add this:
Last steps! We want the different battle quotes, right? So let's go!
1. When our Pokémon lands a Super Effective Move:
Let's go to "PokeBattle_Battler" script and go to the Line N°2855, we'll substitute this line with this lines:
2. When our Pokémon is with Critical HP remaining:
Let's go to "PokeBattle_Battler" Script and then to Line N°3299, create a new line and in this new line, add this:
3. Special Message when uses a Item that recovers the HP:
Go to the "PItem_items" script and find the line N°368 and replace everything until the line N°381 with this:
New Code:
Old Code:
4. Special Message when your Pokémon is Sleeping:
We'll have to go to "PokeBattle_BattlerEffects" script and then to the line N°472, you'll have to substitute the entire code until the line N°474, with this:
5. Special Message when it lands a Critical Hit:
We'll have to go to the "PokeBattle_Move" script and then to the line N°1223, there you'll substitute it with this:
6. Special Message when it enters in Battle:
First go to the "PokeBattle_Battle" script and then found the line N°2493, substitute it with this:
Then go to the line N°2493 and substitute it with this:
Now the last thing we need to do is go to the line N°2494 and add a new line, in this new line you will add this:
And now you have a lot of the Affection effects in battle! I hope you enjoy it, and if you find any error, please, reply it to me! C:
Note: If you want to do it more like Pokémon Let's GO, you will have to change "getAffectionLevel" to "happiness" and the values too
First, let's make a small list of what we need to do, current this is everything that is affected by Affection:
Spoiler:
- Experience Gain (2 Levels of Affection)
- Endure Attacks (3 Levels of Affection)
- Avoid Attacks (4 Levels of Affection)
- Shake Off Status Conditions (4 Levels of Affection)
- High Critical Ratio (5 Levels of Affection)
- Different Battle Quotes (Every Level of Affection)
Ok, so First, let's change the Experience Gain! Open your project and search for the "PokeBattle_Battle" script, and go to the Line N°1932, add a new line and in this new line, add this:
Spoiler:
exp=(exp*1.2).floor if if @battlers[0].getAffectionLevel >= 2
Now search for "if exp>0" in the line N°1937 and Substitute Everything until the line N°1944 with this:
New Code:
Spoiler:
if exp>0
if showmessages
if isOutsider
pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
elsif @battlers[0].getAffectionLevel >= 2
pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
else
pbDisplayPaused(_INTL("{1} gained {2} Exp. Points!",thispoke.name,exp))
end
end
if showmessages
if isOutsider
pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
elsif @battlers[0].getAffectionLevel >= 2
pbDisplayPaused(_INTL("{1} gained a boosted {2} Exp. Points!",thispoke.name,exp))
else
pbDisplayPaused(_INTL("{1} gained {2} Exp. Points!",thispoke.name,exp))
end
end
Old Code:
Spoiler:
if exp>0
if showmessages
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
end
if showmessages
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
end
Good! Now, all Pokémon that have 2 Levels of Affection, already receive a 1.2x experience increase. The next step is to make our Pokémon be able to sometimes, endure attacks, Let's to the "PokeBattle_Move" script, and search for the line N°1165 and substitute all the code until the line N°1187 with this:
New Code:
Spoiler:
if damage>=opponent.hp
damage=opponent.hp
if @function==0xE9 # False Swipe
damage=damage-1
elsif opponent.effects[PBEffects::Endure]
damage=damage-1
opponent.damagestate.endured=true
PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Endure")
elsif damage==opponent.totalhp
if opponent.hasWorkingAbility(:STURDY) && !attacker.hasMoldBreaker
opponent.damagestate.sturdy=true
damage=damage-1
PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Sturdy")
elsif opponent.hasWorkingItem(:FOCUSSASH) && opponent.hp==opponent.totalhp
opponent.damagestate.focussash=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Sash")
elsif opponent.hasWorkingItem(:FOCUSBAND) && @battle.pbRandom(10)==0
opponent.damagestate.focusband=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Band")
elsif opponent.getAffectionLevel>=3
case rand (4)
when 0..1
when 2
damage=damage-1
@battle.pbDisplay(_INTL("{1} toughed it out so you wouldn't feel sad!",opponent.pbThis))
when 3
end
end
end
damage=opponent.hp
if @function==0xE9 # False Swipe
damage=damage-1
elsif opponent.effects[PBEffects::Endure]
damage=damage-1
opponent.damagestate.endured=true
PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Endure")
elsif damage==opponent.totalhp
if opponent.hasWorkingAbility(:STURDY) && !attacker.hasMoldBreaker
opponent.damagestate.sturdy=true
damage=damage-1
PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Sturdy")
elsif opponent.hasWorkingItem(:FOCUSSASH) && opponent.hp==opponent.totalhp
opponent.damagestate.focussash=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Sash")
elsif opponent.hasWorkingItem(:FOCUSBAND) && @battle.pbRandom(10)==0
opponent.damagestate.focusband=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Band")
elsif opponent.getAffectionLevel>=3
case rand (4)
when 0..1
when 2
damage=damage-1
@battle.pbDisplay(_INTL("{1} toughed it out so you wouldn't feel sad!",opponent.pbThis))
when 3
end
end
end
Old Code:
Spoiler:
if damage>=opponent.hp
damage=opponent.hp
if @function==0xE9 # False Swipe
damage=damage-1
elsif opponent.effects[PBEffects::Endure]
damage=damage-1
opponent.damagestate.endured=true
PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Endure")
elsif damage==opponent.totalhp
if opponent.hasWorkingAbility(:STURDY) && !attacker.hasMoldBreaker
opponent.damagestate.sturdy=true
damage=damage-1
PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Sturdy")
elsif opponent.hasWorkingItem(:FOCUSSASH) && opponent.hp==opponent.totalhp
opponent.damagestate.focussash=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Sash")
elsif opponent.hasWorkingItem(:FOCUSBAND) && @battle.pbRandom(10)==0
opponent.damagestate.focusband=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Band")
end
end
damage=opponent.hp
if @function==0xE9 # False Swipe
damage=damage-1
elsif opponent.effects[PBEffects::Endure]
damage=damage-1
opponent.damagestate.endured=true
PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Endure")
elsif damage==opponent.totalhp
if opponent.hasWorkingAbility(:STURDY) && !attacker.hasMoldBreaker
opponent.damagestate.sturdy=true
damage=damage-1
PBDebug.log("[Ability triggered] #{opponent.pbThis}'s Sturdy")
elsif opponent.hasWorkingItem(:FOCUSSASH) && opponent.hp==opponent.totalhp
opponent.damagestate.focussash=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Sash")
elsif opponent.hasWorkingItem(:FOCUSBAND) && @battle.pbRandom(10)==0
opponent.damagestate.focusband=true
damage=damage-1
PBDebug.log("[Item triggered] #{opponent.pbThis}'s Focus Band")
end
end
All right! So now our Pokémon can survive from attacks, but we need to make it be able to avoid them too, so let's go to the "PokeBattle_Battle" script, and then to the line N°2398, create a new line and in this new line, insert this:
Spoiler:
# Affection Avoid
if target.getAffectionLevel>=4
case rand (4)
when 0..1
when 2
@battle.pbDisplay(_INTL("{1} avoided the move in time with your shout!",target.pbThis(true)))
PBDebug.log("[Move failed] #{target.pbThis} loves you so much!")
return false
when 3
end
end
if target.getAffectionLevel>=4
case rand (4)
when 0..1
when 2
@battle.pbDisplay(_INTL("{1} avoided the move in time with your shout!",target.pbThis(true)))
PBDebug.log("[Move failed] #{target.pbThis} loves you so much!")
return false
when 3
end
end
Okay! Now let's make it Shake Off those bad Status Conditions >:C!! Let's go to the line N°3299 and add a new line, then in this new line we'll insert this:
Spoiler:
if self.status==PBStatuses::SLEEP
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} shook itself awake so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} shook itself awake so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::PARALYSIS
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} gathered all its energy to break through its paralysis so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} gathered all its energy to break through its paralysis so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::POISON
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} managed to expel the poison so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} managed to expel the poison so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::FROZEN
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} melted the ice with its fiery determination so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} melted the ice with its fiery determination so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::BURN
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} blew on its burn and made it better so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} blew on its burn and made it better so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} shook itself awake so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} shook itself awake so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::PARALYSIS
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} gathered all its energy to break through its paralysis so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} gathered all its energy to break through its paralysis so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::POISON
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} managed to expel the poison so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} managed to expel the poison so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::FROZEN
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} melted the ice with its fiery determination so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} melted the ice with its fiery determination so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
if self.status==PBStatuses::BURN
case rand(4)
when random4 = 0..1
when random4 = 2
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} blew on its burn and made it better so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
when 3
if self.getAffectionLevel >= 4
pbCureStatus(false)
@battle.pbDisplay(_INTL("{1} blew on its burn and made it better so that {2} wouldn't worry!",pbThis,$Trainer.name))
end
end
end
All Right, we now wants to make our Pokémon be able to increase its Critical Ratio when it loves you, so let's go to "PokeBattle_Move" script and then to the line N°557 and add a new line, then in this new line we'll just add this:
Spoiler:
c+=2 if attacker.getAffectionLevel==5
Last steps! We want the different battle quotes, right? So let's go!
1. When our Pokémon lands a Super Effective Move:
Let's go to "PokeBattle_Battler" script and go to the Line N°2855, we'll substitute this line with this lines:
Spoiler:
@battle.pbDisplay(_INTL("That's it! I knew you could do it!")) if attacker.getAffectionLevel >= 4
@battle.pbDisplay(_INTL("It's super effective!")) if attacker.getAffectionLevel <= 4
@battle.pbDisplay(_INTL("It's super effective!")) if attacker.getAffectionLevel <= 4
2. When our Pokémon is with Critical HP remaining:
Let's go to "PokeBattle_Battler" Script and then to Line N°3299, create a new line and in this new line, add this:
Spoiler:
if self.hp <= 10 && self.getAffectionLevel >= 4
@battle.pbDisplay(_INTL("{1} is in a bit of a pinch. It looks like it might cry...",pbThis))
end
@battle.pbDisplay(_INTL("{1} is in a bit of a pinch. It looks like it might cry...",pbThis))
end
3. Special Message when uses a Item that recovers the HP:
Go to the "PItem_items" script and find the line N°368 and replace everything until the line N°381 with this:
New Code:
Spoiler:
def pbBattleHPItem(pokemon,battler,restorehp,scene)
if pokemon.hp<=0 || pokemon.hp==pokemon.totalhp || pokemon.egg?
scene.pbDisplay(_INTL("But it had no effect!"))
return false
end
if battler
hpgain = battler.pbRecoverHP(restorehp)
else
hpgain = pbItemRestoreHP(pokemon,restorehp)
end
scene.pbDisplay(_INTL("{1}'s HP was restored.",pokemon.name))
scene.pbDisplay(_INTL("{1} is thrilled to bits!",pokemon.name)) if pokemon.getAffectionLevel >= 4
return true
end
if pokemon.hp<=0 || pokemon.hp==pokemon.totalhp || pokemon.egg?
scene.pbDisplay(_INTL("But it had no effect!"))
return false
end
if battler
hpgain = battler.pbRecoverHP(restorehp)
else
hpgain = pbItemRestoreHP(pokemon,restorehp)
end
scene.pbDisplay(_INTL("{1}'s HP was restored.",pokemon.name))
scene.pbDisplay(_INTL("{1} is thrilled to bits!",pokemon.name)) if pokemon.getAffectionLevel >= 4
return true
end
Old Code:
Spoiler:
def pbBattleHPItem(pokemon,battler,restorehp,scene)
if pokemon.hp<=0 || pokemon.hp==pokemon.totalhp || pokemon.egg?
scene.pbDisplay(_INTL("But it had no effect!"))
return false
end
if battler
hpgain = battler.pbRecoverHP(restorehp)
else
hpgain = pbItemRestoreHP(pokemon,restorehp)
end
scene.pbDisplay(_INTL("{1}'s HP was restored.",pokemon.name))
return true
end
if pokemon.hp<=0 || pokemon.hp==pokemon.totalhp || pokemon.egg?
scene.pbDisplay(_INTL("But it had no effect!"))
return false
end
if battler
hpgain = battler.pbRecoverHP(restorehp)
else
hpgain = pbItemRestoreHP(pokemon,restorehp)
end
scene.pbDisplay(_INTL("{1}'s HP was restored.",pokemon.name))
return true
end
4. Special Message when your Pokémon is Sleeping:
We'll have to go to "PokeBattle_BattlerEffects" script and then to the line N°472, you'll have to substitute the entire code until the line N°474, with this:
Spoiler:
when PBStatuses::SLEEP
@battle.pbCommonAnimation("Sleep",self,nil)
@battle.pbDisplay(_INTL("{1} is fast asleep.",pbThis)) if self.getAffectionLevel <= 3
@battle.pbDisplay(_INTL("{1} is fast asleep... Zzz... Zzz...",pbThis)) if self.getAffectionLevel >= 4
@battle.pbCommonAnimation("Sleep",self,nil)
@battle.pbDisplay(_INTL("{1} is fast asleep.",pbThis)) if self.getAffectionLevel <= 3
@battle.pbDisplay(_INTL("{1} is fast asleep... Zzz... Zzz...",pbThis)) if self.getAffectionLevel >= 4
5. Special Message when it lands a Critical Hit:
We'll have to go to the "PokeBattle_Move" script and then to the line N°1223, there you'll substitute it with this:
Spoiler:
elsif attacker.getAffectionLevel <= 4
@battle.pbDisplay(_INTL("A critical hit!"))
else
@battle.pbDisplay(_INTL("{1} landed a critical hit, wishing to be praised!",attacker.pbThis)) if attacker.getAffectionLevel == 5
@battle.pbDisplay(_INTL("A critical hit!"))
else
@battle.pbDisplay(_INTL("{1} landed a critical hit, wishing to be praised!",attacker.pbThis)) if attacker.getAffectionLevel == 5
6. Special Message when it enters in Battle:
First go to the "PokeBattle_Battle" script and then found the line N°2493, substitute it with this:
Spoiler:
pbDisplayBrief(_INTL("Go! {1}!",@battlers[0].name)) if @battlers[0].getAffectionLevel <= 2
pbDisplayBrief(_INTL("Go on, {1}! I know you can do it!",@battlers[0].name)) if @battlers[0].getAffectionLevel >= 3
pbDisplayBrief(_INTL("Go on, {1}! I know you can do it!",@battlers[0].name)) if @battlers[0].getAffectionLevel >= 3
Then go to the line N°2493 and substitute it with this:
Spoiler:
pbDisplayBrief(_INTL("{1}, switch out!\r\nCome back!",i.name)) if self.getAffectionLevel <= 2
pbDisplayBrief(_INTL("Come on back, {1}!\r\nYou did great out there!",i.name)) if self.getAffectionLevel <= 3
pbDisplayBrief(_INTL("Come on back, {1}!\r\nYou did great out there!",i.name)) if self.getAffectionLevel <= 3
Now the last thing we need to do is go to the line N°2494 and add a new line, in this new line you will add this:
Spoiler:
#===============================================================================
# Messages When the Affection is equal to 2
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel == 2
random3=rand(4)
if random3==0
pbDisplayBrief(_INTL("{1} is thinking about Poké Beans...",getBattlerPokemon(@battlers[0]).name))
elsif random3==1
pbDisplayBrief(_INTL("{1} seems like it wants to be petted...",getBattlerPokemon(@battlers[0]).name))
elsif random3==2
pbDisplayBrief(_INTL("{1} seems a little bit worried about being able to",getBattlerPokemon(@battlers[0]).name))
elsif random3==3
pbDisplayBrief(_INTL("{1} is dozing off... It must be sleepy.",getBattlerPokemon(@battlers[0]).name))
end
end
end
#===============================================================================
# Messages When the Affection is equal to 3
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel == 3
random4=rand(5)
if random4==0
pbDisplayBrief(_INTL("{1} really wants some time to play with you.",getBattlerPokemon(@battlers[0]).name))
elsif random4==1
pbDisplayBrief(_INTL("{1} seems to be interested in the other Pokémon's scent...",getBattlerPokemon(@battlers[0]).name))
elsif random4==2
pbDisplayBrief(_INTL("{1} is reassured by your familiar scent...",getBattlerPokemon(@battlers[0]).name))
elsif random4==3
pbDisplayBrief(_INTL("{1} is admiring the surrounding view.",getBattlerPokemon(@battlers[0]).name))
elsif random4==4
pbDisplayBrief(_INTL("{1} is remembering the first time it met you...",getBattlerPokemon(@battlers[0]).name))
end
end
#===============================================================================
# Messages When the Affection is equal to 4 or 5
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel >= 4
random4=rand(5)
if random4==0
pbDisplayBrief(_INTL("{1} is looking at you with intense and determined eyes!",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
elsif random4==1
pbDisplayBrief(_INTL("{1} is expecting you to come up with a great strategy!",getBattlerPokemon(@battlers[0]).name))
elsif random4==2
pbDisplayBrief(_INTL("You and {1} are breathing in perfect sync with one another!",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
elsif random4==3
pbDisplayBrief(_INTL("{1} seems curious about your fashion.",getBattlerPokemon(@battlers[0]).name))
elsif random4==4
pbDisplayBrief(_INTL("{1} is relaxed. The sight of you might have made it feel more secure.",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
end
end
# Messages When the Affection is equal to 2
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel == 2
random3=rand(4)
if random3==0
pbDisplayBrief(_INTL("{1} is thinking about Poké Beans...",getBattlerPokemon(@battlers[0]).name))
elsif random3==1
pbDisplayBrief(_INTL("{1} seems like it wants to be petted...",getBattlerPokemon(@battlers[0]).name))
elsif random3==2
pbDisplayBrief(_INTL("{1} seems a little bit worried about being able to",getBattlerPokemon(@battlers[0]).name))
elsif random3==3
pbDisplayBrief(_INTL("{1} is dozing off... It must be sleepy.",getBattlerPokemon(@battlers[0]).name))
end
end
end
#===============================================================================
# Messages When the Affection is equal to 3
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel == 3
random4=rand(5)
if random4==0
pbDisplayBrief(_INTL("{1} really wants some time to play with you.",getBattlerPokemon(@battlers[0]).name))
elsif random4==1
pbDisplayBrief(_INTL("{1} seems to be interested in the other Pokémon's scent...",getBattlerPokemon(@battlers[0]).name))
elsif random4==2
pbDisplayBrief(_INTL("{1} is reassured by your familiar scent...",getBattlerPokemon(@battlers[0]).name))
elsif random4==3
pbDisplayBrief(_INTL("{1} is admiring the surrounding view.",getBattlerPokemon(@battlers[0]).name))
elsif random4==4
pbDisplayBrief(_INTL("{1} is remembering the first time it met you...",getBattlerPokemon(@battlers[0]).name))
end
end
#===============================================================================
# Messages When the Affection is equal to 4 or 5
#===============================================================================
if getBattlerPokemon(@battlers[0]).getAffectionLevel >= 4
random4=rand(5)
if random4==0
pbDisplayBrief(_INTL("{1} is looking at you with intense and determined eyes!",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
elsif random4==1
pbDisplayBrief(_INTL("{1} is expecting you to come up with a great strategy!",getBattlerPokemon(@battlers[0]).name))
elsif random4==2
pbDisplayBrief(_INTL("You and {1} are breathing in perfect sync with one another!",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
elsif random4==3
pbDisplayBrief(_INTL("{1} seems curious about your fashion.",getBattlerPokemon(@battlers[0]).name))
elsif random4==4
pbDisplayBrief(_INTL("{1} is relaxed. The sight of you might have made it feel more secure.",getBattlerPokemon(@battlers[0]).name,$Trainer.name))
end
end
And now you have a lot of the Affection effects in battle! I hope you enjoy it, and if you find any error, please, reply it to me! C:
Note: If you want to do it more like Pokémon Let's GO, you will have to change "getAffectionLevel" to "happiness" and the values too
Last edited: