• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Resource Relearning moves from party menu(Like P:LA) 1.1

IndianAnimator

Novice
Member
Joined
Oct 8, 2021
Posts
12
IndianAnimator submitted a new resource:

Relearning moves from party menu(Like P:LA) - Relearning moves from party menu(Like P:LA)

Hey! Made a little something that I liked in P:LA (with help from eriedaberrie)
I introduce to you relearning moves from the party menu!

so in 021_UI_MoveRelearner
find def pbStartScreen and within that, you should find

moves = self.pbGetRelearnableMoves(pkmn)
remove the self and replace with MoveRelearnerScreen
so you should end up with
moves = MoveRelearnerScreen.pbGetRelearnableMoves(pkmn)

now in 016_UI_Party
go to line 1227 and add this line of code below, under it
commands[cmdRelearn...

Read more about this resource...
 

Kamkam10302005

Novice
Member
Joined
Feb 6, 2021
Posts
23
This script works perfectly, but I was kind of confused as to where to put some of the code. I got it eventually.
 

ValiantSoul

World Traveller
Member
Joined
Sep 12, 2020
Posts
171
Following the instructions, the button to choose Relearn appears on the Party Screen, but clicking it does nothing. Did I miss something? All the script is certainly in the correct place.

Ruby:
Expand Collapse Copy
def pbStartScreen(pkmn)
    moves = MoveRelearnerScreen.pbGetRelearnableMoves(pkmn)
    @scene.pbStartScene(pkmn, moves)
    loop do
      move = @scene.pbChooseMove
      if move
        if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
          if pbLearnMove(pkmn, move)
            @scene.pbEndScene
            return true
          end
        end
      elsif @scene.pbConfirm(_INTL("Give up trying to teach a new move to {1}?", pkmn.name))
        @scene.pbEndScene
        return false
      end
    end
  end
end

...then...

Ruby:
Expand Collapse Copy
pkmn = @party[pkmnid]
      commands   = []
      cmdSummary = -1
      cmdRelearn = -1
      cmdDebug   = -1
      cmdMoves   = [-1] * pkmn.numMoves
      cmdSwitch  = -1
      cmdMail    = -1
      cmdItem    = -1
      # Build the commands
      commands[cmdSummary = commands.length]      = _INTL("Summary")
      commands[cmdRelearn = commands.length] = _INTL("Relearn")

...and finally...

Ruby:
Expand Collapse Copy
break
              elsif cmdRelearn>=0 && command == cmdRelearn
                  if MoveRelearnerScreen.pbGetRelearnableMoves(pkmn).empty?
                    pbDisplay(_INTL("This Pokémon doesn't have any moves to remember yet."))
                else
                pbRelearnMoveScreen(pkmn)
                end

...which for some reason, leads to the command being avaliable, but doing nothing. Any help appreciated, of course :)
 

ValiantSoul

World Traveller
Member
Joined
Sep 12, 2020
Posts
171
I found the solution! Two additions should be added to the instructions:

On Line 155 on UI_MoveRelearner, change -> def pbGetRelearnableMoves(pkmn) to -> def MoveRelearnerScreen.pbGetRelearnableMoves(pkmn)
On Line 1222 on UI_Party, press enter and then add -> commands[cmdRelearn = commands.length] = _INTL("Relearn")
On Line 1310 on UI_Party, I pressed enter and then added the "elsif" part of the script above.
 
Last edited:

Galaxia

Trainer
Member
Joined
Jul 8, 2017
Posts
52
Is it possible for the PP to remain the same? (Vine Whip has 25 PP, Leech Seed has 10; when overwriting Leech Seed with Vine Whip its PP is now 10/25)
 

Utopian_Nemesis

Most people call me Nemo
Member
Joined
Jan 15, 2020
Posts
10
In my case, the move relearner shows every move a pokémon can learn before they reach the level they're supposed to learn that move. Is this supposed to happen and how can I change it to only show the moves the pokémon has learned so far instead?
 

JogatinandoC

Cooltrainer
Member
Joined
May 17, 2022
Posts
213
In my case, the move relearner shows every move a pokémon can learn before they reach the level they're supposed to learn that move. Is this supposed to happen and how can I change it to only show the moves the pokémon has learned so far instead?
You need to change the switchs in the plugin folder that activates eggmoves and TM Moves to switchs that you don't plan to use. By default they come in 97/98 (i think). I had this same problem in my third gym, where I used this switchs for other things.
 

RidgeBoy

Novice
Member
Joined
Apr 6, 2022
Posts
22
Just tried using this in Essentials v20.1 and it wasn't compiling for some reason.
I ended up changing the meta.txt to be this:
Plugins/LAMR/meta.txt:
Expand Collapse Copy
Name       = LA Moverelearner
Version    = 1.0
Essentials = 20.1
Website    = https://eeveeexpo.com/resources/933/
Credits    = Kotaro,IndianAnimator
Now it works!
 

Citycat17

Novice
Member
Joined
Apr 3, 2019
Posts
16
I got this error while using this code:

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.3]

Exception: NoMethodError
Message: undefined method `flydata=' for nil:NilClass

Backtrace:
[LA Moverelearner] LAMR.rb:150:in `block (2 levels) in pbPokemonScreen'
[LA Moverelearner] LAMR.rb:108:in `each'
[LA Moverelearner] LAMR.rb:108:in `each_with_index'
[LA Moverelearner] LAMR.rb:108:in `block in pbPokemonScreen'
[LA Moverelearner] LAMR.rb:62:in `loop'
[LA Moverelearner] LAMR.rb:62:in `pbPokemonScreen'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:15:in `block in selected'
082:MessageConfig:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:12:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'

The script seems to conflict with the ability to use fly. I removed the plugin and I was able to use fly again. Any ideas on how to fix this to make the script still work while still being able to fly.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Putting this in your plugins folder or just adding as a script will give you the functionality you want without conflicting with other scripts I believe. Working for v20.1 of course.
Relearning Moves from Party Menu:
Expand Collapse Copy
#==============================================================================
# Config   
# LA Move Relearner base by IndianAnimator script by Kotaro
module Settings
  EGGMOVESSWITCH  = 99
  TMMOVESSWITCH   = 100
end 
EGGMOVES = false
TMMOVES = false
#==============================================================================
class MoveRelearnerScreen
  def MoveRelearnerScreen.pbGetRelearnableMoves(pkmn)
    return [] if !pkmn || pkmn.egg? || pkmn.shadowPokemon?
    moves = []
    pkmn.getMoveList.each do |m|
      next if m[0] > pkmn.level || pkmn.hasMove?(m[1])
      moves.push(m[1]) if !moves.include?(m[1])
    end
    tmoves = []
    if pkmn.first_moves
      for i in pkmn.first_moves
        tmoves.push(i) if !pkmn.hasMove?(i) && !moves.include?(i)
      end
    end
    species = pkmn.species
    species_data = GameData::Species.get(species)
    if $game_switches[Settings::EGGMOVESSWITCH] || EGGMOVES == true
      babyspecies = species_data.get_baby_species
      GameData::Species.get(babyspecies).egg_moves.each { |m| moves.push(m) }
    end 
    if $game_switches[Settings::TMMOVESSWITCH] || TMMOVES==true
      species_data.tutor_moves.each { |m| moves.push(m) }
    end 
    moves = tmoves + moves
    return moves | []   # remove duplicates
  end

  def pbStartScreen(pkmn)
    moves = MoveRelearnerScreen.pbGetRelearnableMoves(pkmn)    #by Kota
    @scene.pbStartScene(pkmn, moves)
    loop do
      move = @scene.pbChooseMove
      if move
        if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
          if pbLearnMove(pkmn, move)
            @scene.pbEndScene
            return true
          end
        end
      elsif @scene.pbConfirm(_INTL("Give up trying to teach a new move to {1}?", pkmn.name))
        @scene.pbEndScene
        return false
      end
    end
  end
end

MenuHandlers.add(:party_menu, :relearn, {
  "name"      => _INTL("Relearn"),
  "order"     => 56,
  "effect"    => proc { |screen, party, party_idx|
    pkmn = party[party_idx]
    
    if MoveRelearnerScreen.pbGetRelearnableMoves(pkmn).empty?
          screen.pbDisplay(_INTL("This Pokémon doesn't have any moves to remember yet."))
        else
          pbRelearnMoveScreen(pkmn)
        end
  }
})
 

RidgeBoy

Novice
Member
Joined
Apr 6, 2022
Posts
22
@Gardenette
For me, the LA Move Relearner is getting a conflict with "Essentials Deluxe > Miscellaneous.rb" plugin,
so I plan on using your fix to see if that helps.

Seems like I just have to add:
New code:
Expand Collapse Copy
MenuHandlers.add(:party_menu, :relearn, {
  "name"      => _INTL("Relearn"),
  "order"     => 56,
  "effect"    => proc { |screen, party, party_idx|
    pkmn = party[party_idx]
   
    if MoveRelearnerScreen.pbGetRelearnableMoves(pkmn).empty?
          screen.pbDisplay(_INTL("This Pokémon doesn't have any moves to remember yet."))
        else
          pbRelearnMoveScreen(pkmn)
        end
  }
})

Does that mean I also have to delete the entire "class PokemonPartyScreen" code? (Pretty much the whole plugin lol, lines 60ish - 280ish)

EDIT: realized I could just try it out lol. The answer was "yes - delete that whole 'class PokemonPartyScreen' from the plugin."
 

ambrosia04

Rookie
Member
Joined
Aug 29, 2023
Posts
1
This script works perfectly, but I was kind of confused as to where to put some of the code. I got it eventually.
Where do you have to put it? I'm quite new to this so I just dragged the folder to the Plugin folder, but it doesn't compile it as a plugin.
 
Back
Top