• 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!
Type match-up summary

Resource Type match-up summary 1.1.0

ThatWelshOne_

Champion
Member
Hello! I thought of adding an Item that let's you see a Type Chart (like a Town Map) and I was wondering how to add the functionality. Tried this simple script but it didn't work.
View attachment 26968
How could I make it work correctly? Additionally, how could I open a window that asks if you want to see a single-type chart (with pbTypeMatchUI) or a Species-specific chart (with pbSpeciesTypeMatchUI)?

Thank you for your plugin!
Didn't work how? Did you get an error?

As for the choice, I'm not sure. Are there other items that prompt any kind of response from the player before using them in the field?
 

notminiac

Novice
Member
Joined
Feb 24, 2024
Posts
18
I'm so sorry for the misunderstood... I moved out the "plugins" folder when configuring the type chart plugin. After moving it in and recompiling it works perfectly. Thank you so much for the plugin, again!
For now I'll just play with the graphics and try to accomplish the "dual item" idea.
 

Kayzering

Rookie
Member
Joined
May 14, 2024
Posts
1
Hey, I do not know if the creator of this plugin is still here after the nuke of relic castle but I'll try my luck.

I am totally lost right now. I made some modification in the plugin few days ago, and those modifications were working fine.

I just added forms in the considerations of the plugin (the plugin was only based on species, I made it based on species + form).Sadly, I see now that it is not working anymore. When i try to trigger the UI in fight it opens well. But when I click on right, I encounter this error:

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method id' for nil:NilClass

Backtrace:
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:112:in block in drawSpeciesTypes'
[Type Match-up UI] 002SpeciesTypeMatch_UI.rb:111:in times'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:111:in drawSpeciesTypes'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:101:in block in pbTypeMatchUp'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:73:in loop'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:73:in pbTypeMatchUp'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:233:in pbStartScreen'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:281:in block in pbSpeciesTypeMatchUI'
MessageConfig:594:in pbFadeOutIn'
[Type Match-up UI] 002_SpeciesTypeMatch_UI.rb:264:in `pbSpeciesTypeMatchUI'

Apparently it says that method id doesn't exist, which is weird cause it should. Line 112 is this one for me :
2.times do |i|
@sprites["icon#{i}"].pbSetParams(s.id,0,s.form,false)
end

s was created like that: s = GameData::Species.get_species_form(species, form). Note that previously, s was created this way: s = GameData::Species.get(species)

What I don't get is that s should have the method id, since it is created as a class Species in GameData.

Here are all the changes I made so any helper can reproduice the error (I guess):

In 002_SpeciesTypeMatch_UI

1) In def pbTypeMatchUp
  • replaced drawSpeciesTypes(species) with drawSpeciesTypes(species, form)
  • added newForm = @form[@index] after newSpecies = @species[@index] (twice)
  • replaced drawSpeciesTypes(newSpecies) if refresh with drawSpeciesTypes(newSpecies, newForm) if refresh

2) In def drawSpeciesTypes
  • replaced def drawSpeciesTypes(species) with def drawSpeciesTypes(species, form = 0)
  • replaced s = GameData::Species.get(species) with s = GameData::Species.get_species_form(species, form)

3) In def pbSpeciesTypeMatchUI
- I defined pbSpeciesTypeMatchUI as following:
def pbSpeciesTypeMatchUI(custom_species = nil, custom_form = 0)
pbFadeOutIn {
if custom_form == 0
scene = SpeciesTypeMatch_Scene.new
screen = SpeciesTypeMatch_Screen.new(scene)

# Use the custom_species array if it is provided
scene.instance_variable_set(:@species, custom_species)

screen.pbStartScreen
else
scene = SpeciesTypeMatch_Scene.new
screen = SpeciesTypeMatch_Screen.new(scene)

# Use the custom_species array if it is provided
scene.instance_variable_set(:@species, custom_species)
scene.instance_variable_set(:@form, custom_form)

screen.pbStartScreen
end
}
end

4) In Essentials Scripts, in 187-Battle_Scene, in def pbFrameUpdate, I added :
if Input.triggerex?(:T)
custom_species = @battle.battlers.map { |battler| battler.species }.uniq
custom_form = @battle.battlers.map { |battler| battler.form }.uniq
pbSpeciesTypeMatchUI(custom_species, custom_form)
end
 
Back
Top