• 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!
Encounter list UI (v19+)

Resource Encounter list UI (v19+) 1.1.0

neoncityrain

Trans and proud
Member
Joined
Aug 16, 2022
Posts
26
This resource has watered my crops. I'm making nice graphics for a bunch of different encounter types and having a great time! My only issue is that the "?" sprites don't seem to be working incode- they show up only as shadows, as in the attachment. I've narrowed the issue down to the seen_form_any_gender? code not working as it's supposed to (they're question marks when I remove that line from the code), but I'm still learning programming so I'm at a loss on how to fix it myself. I haven't edited anything in the file past the background graphic coding and have reinstalled to make sure it isn't just me being a fool.

Thank you for your time, and apologies for any trouble!
 

Attachments

  • unknown.png
    unknown.png
    58.7 KB · Views: 172

SkyArmyRecru1t

Pokémon Master
Member
Joined
Aug 25, 2017
Posts
166
I'll add onto the above bug report by saying that while deleting that line does cause the ? graphic to show, it doesn't update the icon to the grayed out Pokémon after encountering it so it's not much of a fix. I tried looking into it myself and I'm not able to find the issue either but hopefully it can be fixed soon
 

ThatWelshOne_

Champion
Member
This resource has watered my crops. I'm making nice graphics for a bunch of different encounter types and having a great time! My only issue is that the "?" sprites don't seem to be working incode- they show up only as shadows, as in the attachment. I've narrowed the issue down to the seen_form_any_gender? code not working as it's supposed to (they're question marks when I remove that line from the code), but I'm still learning programming so I'm at a loss on how to fix it myself. I haven't edited anything in the file past the background graphic coding and have reinstalled to make sure it isn't just me being a fool.

Thank you for your time, and apologies for any trouble!
I'll add onto the above bug report by saying that while deleting that line does cause the ? graphic to show, it doesn't update the icon to the grayed out Pokémon after encountering it so it's not much of a fix. I tried looking into it myself and I'm not able to find the issue either but hopefully it can be fixed soon
What other plugins are you using, please?
I don't have this issue in an otherwise unedited v20.1 (otherwise I would've fixed it before releasing the update, obviously).
 

SkyArmyRecru1t

Pokémon Master
Member
Joined
Aug 25, 2017
Posts
166
What other plugins are you using, please?
I don't have this issue in an otherwise unedited v20.1 (otherwise I would've fixed it before releasing the update, obviously).
Oops sorry, I was in a hurry and I forgot to mention it in the original post. I already tested around and found out it has confliction with Essentials Deluxe, at least for me
 

ThatWelshOne_

Champion
Member
Oops sorry, I was in a hurry and I forgot to mention it in the original post. I already tested around and found out it has confliction with Essentials Deluxe, at least for me
It's Essentials Deluxe since it overwrites the default seen_form? function which this resource uses in the seen_form_any_gender? check (this is what displays the ? sprite or the regular Pokémon sprite).
I'll need some time to work out if this resource can be made compatible with the other plugin.
 

Citycat17

Novice
Member
Joined
Apr 3, 2019
Posts
16
The script is working, but I only see the Pokemon sprites and whether I have the pokemon or have only seen them. I want the question mark sprite for if I have never seen the Pokemon, but its not showing up. As if I've already seen the Pokemon before I've even received a Pokedex. Would this have anything to do with the overworld pokemon plugin that I have installed?
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
I have added some new encounter types such as "BeachDay", "BeachMorning", and "BeachNight" and same for "DesertDay", "DesertMorning", and "DesertNight". They work very much like grass in the sense that any tile that is classified as a "Beach" or "Desert" tile could spawn a pokemon.

However, I realized when I checked the Encounters UI, I realized it doesn't show that it's a Beach encounter as per screenshot:
1665244410908.png

Where would I need to go into the scripts of this resource to add new encounter types so that this populates and could you explain what would be the piece that needs to be added?

It seems like it's just this section here but want to make sure I don't have to add anywhere else:
1665247765720.png
 
Last edited:

ThatWelshOne_

Champion
Member
The script is working, but I only see the Pokemon sprites and whether I have the pokemon or have only seen them. I want the question mark sprite for if I have never seen the Pokemon, but its not showing up. As if I've already seen the Pokemon before I've even received a Pokedex. Would this have anything to do with the overworld pokemon plugin that I have installed?
I missed your question until now, sorry. Do you use Essentials Deluxe? There's a conflict between this resource and that one that causes the issue you described.

I have added some new encounter types such as "BeachDay", "BeachMorning", and "BeachNight" and same for "DesertDay", "DesertMorning", and "DesertNight". They work very much like grass in the sense that any tile that is classified as a "Beach" or "Desert" tile could spawn a pokemon.

However, I realized when I checked the Encounters UI, I realized it doesn't show that it's a Beach encounter as per screenshot:
View attachment 13042
Where would I need to go into the scripts of this resource to add new encounter types so that this populates and could you explain what would be the piece that needs to be added?

It seems like it's just this section here but want to make sure I don't have to add anywhere else:
View attachment 13044
You only need to add the names to that chunk of code you highlighted, yes.
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
I was doing some playtesting and I think there's something funny happening with the forms in this script. For context, I have a regional Shellos that has 12 different forms (i.e. form 0 defined in Pokemon.txt PBS + 11 unique ones in pokemonforms.txt PBS).

I had caught one (form 8) and it logged in my dex. I was looking at my encounters menu in a different area where form 4 appears and I realized it was showing me that I had captured form 4 (i.e. the icon was lit up) when I hadn't done so. Is there a way to correct for this so forms are effectively treated as their own entry? I'm unsure if this is intended or not, but if possible I would like forms to have their own unique appearance so players don't get confused as to what forms they have actually caught. There is no way for these forms to change from one to another.

I should also add I had made a few tweaks to the code based on earlier discussions in this thread to disable the grey question marks and always have greyed out icons for mons that aren't caught, so here's an excerpt of that section of the script but I don't think that would affect different forms registering as being caught.

I have a bunch of other plugins but not sure if any of them would cause any conflicts with this particular functionality since this script otherwise works great as far as I can tell:
1669326750469.png
1669327177531.png
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,047
I was doing some playtesting and I think there's something funny happening with the forms in this script. For context, I have a regional Shellos that has 12 different forms (i.e. form 0 defined in Pokemon.txt PBS + 11 unique ones in pokemonforms.txt PBS).

I had caught one (form 8) and it logged in my dex. I was looking at my encounters menu in a different area where form 4 appears and I realized it was showing me that I had captured form 4 (i.e. the icon was lit up) when I hadn't done so. Is there a way to correct for this so forms are effectively treated as their own entry? I'm unsure if this is intended or not, but if possible I would like forms to have their own unique appearance so players don't get confused as to what forms they have actually caught. There is no way for these forms to change from one to another.

I should also add I had made a few tweaks to the code based on earlier discussions in this thread to disable the grey question marks and always have greyed out icons for mons that aren't caught, so here's an excerpt of that section of the script but I don't think that would affect different forms registering as being caught.

I have a bunch of other plugins but not sure if any of them would cause any conflicts with this particular functionality since this script otherwise works great as far as I can tell:
View attachment 14013View attachment 14014
Idk if it's related at all, but Essentials Deluxe currently bugs out with displaying certain forms in the Pokedex, and will show the incorrect forms as owned depending on the gender of the caught species. It's been an ongoing issue that I haven't had the time to address. I do plan on fixing this in the next update, whenever I get around to it.

Whether or not this is the cause of whatever bug your experiencing, I can't be certain. But it wouldn't surprise me.
 

ThatWelshOne_

Champion
Member
I was doing some playtesting and I think there's something funny happening with the forms in this script. For context, I have a regional Shellos that has 12 different forms (i.e. form 0 defined in Pokemon.txt PBS + 11 unique ones in pokemonforms.txt PBS).

I had caught one (form 8) and it logged in my dex. I was looking at my encounters menu in a different area where form 4 appears and I realized it was showing me that I had captured form 4 (i.e. the icon was lit up) when I hadn't done so. Is there a way to correct for this so forms are effectively treated as their own entry? I'm unsure if this is intended or not, but if possible I would like forms to have their own unique appearance so players don't get confused as to what forms they have actually caught. There is no way for these forms to change from one to another.

I should also add I had made a few tweaks to the code based on earlier discussions in this thread to disable the grey question marks and always have greyed out icons for mons that aren't caught, so here's an excerpt of that section of the script but I don't think that would affect different forms registering as being caught.

I have a bunch of other plugins but not sure if any of them would cause any conflicts with this particular functionality since this script otherwise works great as far as I can tell:
View attachment 14013View attachment 14014
This is intended behaviour. It's how it works in base Essentials I believe, i.e. there's no distinction between which forms are owned, owning one effectively means you own them all, and probably how it works (or worked) in the main series games.

I did have a way to do what you want in the v18.1 iteration of this resource, but it was clunky and buggy so I removed it.
 

Jos_Louis

Developer of Pokemon Soulstones
Member
Joined
Sep 3, 2020
Posts
147
Oh, well, if that's base behaviour, that's a bit strange especially when forms can be very diverse (e.g. Vulpix), but then there are other forms that are "lazier" (e.g. Florges line) and don't have any differences other than cosmetic.

In any case, I'll live with it and just tell people that forms are treated as one.
 

ThatWelshOne_

Champion
Member
Is there a fix for this issue?
I think we'd have to change my seen_form_any_gender? method to fit the seen_form? method in Essentials Deluxe.
You could try replacing the entire seen_form_any_gender? method (lines 46-53 for me) with this:
Ruby:
def seen_form_any_gender?(species, form)
  ret = false
  if $player.pokedex.seen_form?(species, 0, form, nil, nil) ||
    $player.pokedex.seen_form?(species, 1, form, nil, nil)
    ret = true
  end
  return ret
end
 

RegalSword

Pokemon Itinerant Developer
Member
Joined
Feb 13, 2021
Posts
516
I think we'd have to change my seen_form_any_gender? method to fit the seen_form? method in Essentials Deluxe.
You could try replacing the entire seen_form_any_gender? method (lines 46-53 for me) with this:
Ruby:
def seen_form_any_gender?(species, form)
  ret = false
  if $player.pokedex.seen_form?(species, 0, form, nil, nil) ||
    $player.pokedex.seen_form?(species, 1, form, nil, nil)
    ret = true
  end
  return ret
end
I just tried it. It didn't seem to have any effect.
 

super saiyan eevee

Rookie
Member
Joined
Feb 12, 2022
Posts
9
Find this block of code in 002_UI_Encounters.rb :
Ruby:
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:
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
I'm having the opposite issue where I only see the greyed out pokemon even if I haven't seen the pokemon. I'd prefer to have question marks for pokemon that havent been seen. what am I doing wrong? lol

I made sure to start a new game and compile everything as well. I checked to make sure that the code is the same as the first part, it just doesnt want to work with me.
 

ThatWelshOne_

Champion
Member
I'm having the opposite issue where I only see the greyed out pokemon even if I haven't seen the pokemon. I'd prefer to have question marks for pokemon that havent been seen. what am I doing wrong? lol

I made sure to start a new game and compile everything as well. I checked to make sure that the code is the same as the first part, it just doesnt want to work with me.
Are you also using Essentials Deluxe?
 
Back
Top