• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Encounter list UI (v19+)

Resource Encounter list UI (v19+) 1.1.0

ThatWelshOne_

Champion
Member
ThatWelshOne_ submitted a new resource:

Encounter list UI (v19) - Show the player what they can encounter on the current map!

With permission from raZ, this is a reworked version of the simple encounter list UI script, updated for v19!

Here's the original resource from raZ and friends: https://eeveeexpo.com/resources/401/
That resource works with v18/v18.1 if you're using either of those versions.

You should also check out the DexNav UI script from phantombass, recently updated for v19 and a great practical application of the original script: https://eeveeexpo.com/resources/520/...

Read more about this resource...
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
Hello ThatWelshOne_,

Thank you for refining this script for 19.1. It's a great one and looks really clean with Voltseon's pause menu. I just had two questions.

1. Is there an easy way to remove the ? marks from the encounters UI and always default to the encounters UI showing greyed out sprites and only coloured in when you are in an area. I want players to know what exactly is in the area without having to keep searching for the mon to unlock the question mark. That way a player can immediately tell from looking in the encounters menu whether any pokemon on the route are worth hunting.

2. Not sure if this is a question for you or the folks that created the Voltseon Pause Menu, but how does one change the ! icon that is used as default for the encounters menu? I notice it is used for the Debug option AND the Encounters option when I look at VPM v1.6\Graphics\Pictures\Voltseon's Pause Menu. Can I just make my own menuEncounters.png and it will supercede the ! icon?
 

ThatWelshOne_

Champion
Member
Hello ThatWelshOne_,

Thank you for refining this script for 19.1. It's a great one and looks really clean with Voltseon's pause menu. I just had two questions.

1. Is there an easy way to remove the ? marks from the encounters UI and always default to the encounters UI showing greyed out sprites and only coloured in when you are in an area. I want players to know what exactly is in the area without having to keep searching for the mon to unlock the question mark. That way a player can immediately tell from looking in the encounters menu whether any pokemon on the route are worth hunting.

2. Not sure if this is a question for you or the folks that created the Voltseon Pause Menu, but how does one change the ! icon that is used as default for the encounters menu? I notice it is used for the Debug option AND the Encounters option when I look at VPM v1.6\Graphics\Pictures\Voltseon's Pause Menu. Can I just make my own menuEncounters.png and it will supercede the ! icon?
Hello!
1. Just to clarify, you want to do away with the question mark sprite and just have the icons be greyed our or coloured according to whether the player owns the Pokémon?

2. You can create your own graphic. You'd need to go into 005_VoltseonMenu_Entries.rb in the VPM plugin folder, find the entry for the encounter UI and update the @icon line to point to your new graphic.
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
Hello!
1. Just to clarify, you want to do away with the question mark sprite and just have the icons be greyed our or coloured according to whether the player owns the Pokémon?

2. You can create your own graphic. You'd need to go into 005_VoltseonMenu_Entries.rb in the VPM plugin folder, find the entry for the encounter UI and update the @icon line to point to your new graphic.
Thanks for the response on #2.

And yes, your understanding is correct on #1. I just want the UI to show either one of greyed out (basically you could have never even seen this mon before, OR seen this mon but not owned) and coloured represents owned. It's basically the functionality that was there under old versions of the script but I think the ? mark symbols was only added in this v19.1 iteration.
 
Last edited:

ThatWelshOne_

Champion
Member
Thanks for the response on #2.

And yes, your understanding is correct on #1. I just want the UI to show either one of greyed out (basically you could have never even seen this mon before, OR seen this mon but not owned) and coloured represents owned. It's basically the functionality that was there under old versions of the script but I think the ? mark symbols was only added in this v19.1 iteration.
Find this block of code in 002_UI_Encounters.rb :
Ruby:
Expand Collapse Copy
enc_array.each do |s|
  species_data = GameData::Species.get(s)
  if !$Trainer.pokedex.owned?(s) && !seen_form_any_gender?(s,species_data.form)
    @sprites["icon_#{i}"].pbSetParams(0,0,0,false)
    @sprites["icon_#{i}"].visible = true
  elsif !$Trainer.pokedex.owned?(s)
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,255)
    @sprites["icon_#{i}"].visible = true
  else
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,0)
    @sprites["icon_#{i}"].visible = true
  end
  i += 1
end
I think you would replace it with this:
Ruby:
Expand Collapse Copy
enc_array.each do |s|
  species_data = GameData::Species.get(s)
  if !$Trainer.pokedex.owned?(s)
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,255)
    @sprites["icon_#{i}"].visible = true
  else
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,0)
    @sprites["icon_#{i}"].visible = true
  end
  i += 1
end
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
Find this block of code in 002_UI_Encounters.rb :
Ruby:
Expand Collapse Copy
enc_array.each do |s|
  species_data = GameData::Species.get(s)
  if !$Trainer.pokedex.owned?(s) && !seen_form_any_gender?(s,species_data.form)
    @sprites["icon_#{i}"].pbSetParams(0,0,0,false)
    @sprites["icon_#{i}"].visible = true
  elsif !$Trainer.pokedex.owned?(s)
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,255)
    @sprites["icon_#{i}"].visible = true
  else
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,0)
    @sprites["icon_#{i}"].visible = true
  end
  i += 1
end
I think you would replace it with this:
Ruby:
Expand Collapse Copy
enc_array.each do |s|
  species_data = GameData::Species.get(s)
  if !$Trainer.pokedex.owned?(s)
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,255)
    @sprites["icon_#{i}"].visible = true
  else
    @sprites["icon_#{i}"].pbSetParams(s,0,species_data.form,false)
    @sprites["icon_#{i}"].tone = Tone.new(0,0,0,0)
    @sprites["icon_#{i}"].visible = true
  end
  i += 1
end
That worked wonderfully. Thank you very much :) !
 

Golisopod User

Elite Trainer
Member
Joined
May 11, 2020
Posts
319
How do I access the encounter list from Voltseon's Menu?
You should be able to just install this plugin and open the menu, and it'll show up automatically.
 

ThatWelshOne_

Champion
Member
I'm pretty sure the Dexnav script may work good with it but it not working for me.
As far as I know, the DexNav script builds on this script (or the original one from raZ, at least), so there are bound to be issues with duplicate classes and methods. I think you'd have to use one script or the other, not both. Fortunately, if you want the DexNav functionality, the decision on which script to use shouldn't be difficult. 😉
 

PauloJugoslavia

Novice
Member
Joined
Jul 26, 2019
Posts
40
Excellent resource!
I was wondering if it can be made to access the Encounters List from the PokeGear, I tried doing it myself, with no luck.
 

ThatWelshOne_

Champion
Member
Excellent resource!
I was wondering if it can be made to access the Encounters List from the PokeGear, I tried doing it myself, with no luck.
Hi! At the bottom of UI_Pokegear, you should see this:
Ruby:
Expand Collapse Copy
class PokemonPokegearScreen
  def initialize(scene)
    @scene = scene
  end

  def pbStartScreen
    commands = []
    cmdMap     = -1
    cmdPhone   = -1
    cmdJukebox = -1
    commands[cmdMap = commands.length]     = ["map",_INTL("Map")]
    if $PokemonGlobal.phoneNumbers && $PokemonGlobal.phoneNumbers.length>0
      commands[cmdPhone = commands.length] = ["phone",_INTL("Phone")]
    end
    commands[cmdJukebox = commands.length] = ["jukebox",_INTL("Jukebox")]
    @scene.pbStartScene(commands)
    loop do
      cmd = @scene.pbScene
      if cmd<0
        break
      elsif cmdMap>=0 && cmd==cmdMap
        pbShowMap(-1,false)
      elsif cmdPhone>=0 && cmd==cmdPhone
        pbFadeOutIn {
          PokemonPhoneScene.new.start
        }
      elsif cmdJukebox>=0 && cmd==cmdJukebox
        pbFadeOutIn {
          scene = PokemonJukebox_Scene.new
          screen = PokemonJukeboxScreen.new(scene)
          screen.pbStartScreen
        }
      end
    end
    @scene.pbEndScene
  end
end
Replace that with this:
Ruby:
Expand Collapse Copy
class PokemonPokegearScreen
  def initialize(scene)
    @scene = scene
  end

  def pbStartScreen
    commands = []
    cmdMap        = -1
    cmdPhone      = -1
    cmdJukebox    = -1
    cmdEncounters = -1 # Edit
    commands[cmdMap = commands.length]        = ["map",_INTL("Map")]
    if $PokemonGlobal.phoneNumbers && $PokemonGlobal.phoneNumbers.length>0
      commands[cmdPhone = commands.length]    = ["phone",_INTL("Phone")]
    end
    commands[cmdJukebox = commands.length]    = ["jukebox",_INTL("Jukebox")]
    commands[cmdEncounters = commands.length] = ["encounters",_INTL("Encounters")] # Edit
    @scene.pbStartScene(commands)
    loop do
      cmd = @scene.pbScene
      if cmd<0
        break
      elsif cmdMap>=0 && cmd==cmdMap
        pbShowMap(-1,false)
      elsif cmdPhone>=0 && cmd==cmdPhone
        pbFadeOutIn {
          PokemonPhoneScene.new.start
        }
      elsif cmdJukebox>=0 && cmd==cmdJukebox
        pbFadeOutIn {
          scene = PokemonJukebox_Scene.new
          screen = PokemonJukeboxScreen.new(scene)
          screen.pbStartScreen
        }
      # Edit
      elsif cmdEncounters>=0 && cmd==cmdEncounters
        pbFadeOutIn {
          scene = EncounterList_Scene.new
          screen = EncounterList_Screen.new(scene)
          screen.pbStartScreen
        }
      end
    end
    @scene.pbEndScene
  end
end
If you have made any other changes to the Pokégear script, then those will be overwritten. I marked the bits I added by # Edit if you want to add those in manually instead. Finally, you'll want a graphic called icon_encounters.png in Graphics\Pictures\Pokegear for your new button.
 

dreamaurua

Rookie
Member
Joined
Oct 7, 2020
Posts
5
Hello, Is there a simple command to call the encounter list menu vs. having it embedded into a menu? I want to have a roaming character that can be found in each route, you can pay him to have access to the encounter menu in that area, then signposts will display the information afterwards as well. Thanks in advance, I love this script I used it in 18. You script guru's make the dreams happen for us just learning.
 

REALMUGEN

Trainer
Member
Joined
Jan 23, 2020
Posts
72
Hello, Is there a simple command to call the encounter list menu vs. having it embedded into a menu? I want to have a roaming character that can be found in each route, you can pay him to have access to the encounter menu in that area, then signposts will display the information afterwards as well. Thanks in advance, I love this script I used it in 18. You script guru's make the dreams happen for us just learning.

You can probably call the script with
Ruby:
Expand Collapse Copy
pbFadeOutIn {
           scene = EncounterList_Scene.new
           screen = EncounterList_Screen.new(scene)
           screen.pbStartScreen
           }

But maybe I'm wrong

No, I'm not wrong, it works.

Thanks for share this...
Definitely goes to my game...
 

ThatWelshOne_

Champion
Member
You can probably call the script with
Ruby:
Expand Collapse Copy
pbFadeOutIn {
           scene = EncounterList_Scene.new
           screen = EncounterList_Screen.new(scene)
           screen.pbStartScreen
           }

But maybe I'm wrong

No, I'm not wrong, it works.

Thanks for share this...
Definitely goes to my game...
I would recommend creating a utility method for this.
At the bottom of the encounter UI script, add this:
Ruby:
Expand Collapse Copy
def pbViewEncounters
  scene = EncounterList_Scene.new
  screen = EncounterList_Screen.new(scene)
  screen.pbStartScreen
end
You might need the pbFadeOutIn bit as well, I'm not sure.
Then, you can just use pbViewEncounters as a script command in your event to bring up the UI.
 

dreamaurua

Rookie
Member
Joined
Oct 7, 2020
Posts
5
Thanks for the quick reply, this worked perfectly. I always try for a bit to figure it out myself first before asking. Cheers, your scripts are super helpful. I didnt need the fadeoutin
I would recommend creating a utility method for this.
At the bottom of the encounter UI script, add this:
Ruby:
Expand Collapse Copy
def pbViewEncounters
  scene = EncounterList_Scene.new
  screen = EncounterList_Screen.new(scene)
  screen.pbStartScreen
end
You might need the pbFadeOutIn bit as well, I'm not sure.
Then, you can just use pbViewEncounters as a script command in your event to bring up the UI.
 

PorousMist

Novice
Member
Joined
Aug 2, 2020
Posts
37
I tried implementing this script, but it only displays a black screen. The functionality is there, but nothing is displayed. Is this a common problem?
 
Back
Top