• 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.
Type Matchup UI for v21.1

Resource Type Matchup UI for v21.1 2.01

gameguy39

Rookie
Member
Joined
Jul 27, 2019
Posts
6

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
270
As you can see, when I use Hoopa-unbound in a battle, it displays the data of Hoopa-confined.
How can I make the screen display Pokémon of its forms in battle?
 

Attachments

  • 屏幕截图 2023-11-22 204021.png
    屏幕截图 2023-11-22 204021.png
    17 KB · Views: 51
  • 屏幕截图 2023-11-22 204005.png
    屏幕截图 2023-11-22 204005.png
    7.5 KB · Views: 55

RxH

Rookie
Member
Joined
Dec 5, 2023
Posts
1
As you can see, when I use Hoopa-unbound in a battle, it displays the data of Hoopa-confined.
How can I make the screen display Pokémon of its forms in battle?
I wanted to do the same thing and I managed to do it with some tweaks, but I'm just a normal player not a dev do if it doesn't work or there is a bug good luck (but I don't have in my part)
I'll explain in the logical way not necessarily in order

First in pbFrameUpdate I changed the new part to:
Ruby:
Expand Collapse Copy
if Input.trigger?(Input::AUX2)
       
        custom_species = @battle.battlers.map { |battler| battler }.uniq
      pbSpeciesTypeMatchUI(custom_species.reverse) #.reverse is here only to show first the opponent which I find better
    end

Then in the 002_SpeciesTypeMatch_UI file I changed pbSpeciesTypeMatchUI at the end
Ruby:
Expand Collapse Copy
if custom_species #removed the other check
       
      # Use the custom_species array if it is provided
      scene.instance_variable_set(:@species,custom_species.each{|a| a.species})
    else

Then in drawSpeciesTypes I changed some variable because it doesn't get the same thing as before
at the beginning:
Ruby:
Expand Collapse Copy
    s = species #Use what you really get from battle and not the base thing in pokedex

    2.times do |i|
      @sprites["icon_#{i}"].pbSetParams(s.species,0,s.form,false)#changed .id to .species
    end

At the end:
Ruby:
Expand Collapse Copy
# Draw species name
    pbDrawTextPositions(@overlay_type,[
           [s.name,Graphics.width/2,@h+10,2,base,shadow]
        ])#changed .real_name to .name also for bug and it's better it supports translation and custom nickname

IMPORTANT
I removed this part in pbTypeMatchUp


Ruby:
Expand Collapse Copy
    elsif Input.trigger?(Input::USE) # Don't work idk why
        oldSpecies = @species[@index]
        newSpecies = pbChooseSpeciesFromList(oldSpecies, oldSpecies)
        if oldSpecies != newSpecies
          @index = @species.index(newSpecies)
          refresh = true
        end
So during battle if you press enter you don't get anymore the menu for choosing which pokemon to show, but who cares you can go to it using right/left, I don't want to correct the bug because I don't understand and it will take a long time for literally nothing but you can try


So in conclusion what this does, you can now see in battle the real form currently and not only the base form, so you can see mega evolution, regional variants, special form, fakemon even just custom sprite change I added some screenshot to show it

Also something I find cool I added is the mention of what EV you gain from this pokemon from killing it, if you want the code you need to add at the end of drawSpeciesTypes
Ruby:
Expand Collapse Copy
# Draw species name
    pbDrawTextPositions(@overlay_type,[
           [s.name,Graphics.width/2,@h+10,2,base,shadow]
        ])#changed .real_name to name also for bug and it's better it support translation and custom nickname
     
        pkev = ""
        s.pokemon.evYield.each_key {|ev|
        if s.pokemon.evYield[ev] > 0
            pkev += " #{ev}: +#{s.pokemon.evYield[ev]} "
        end }
        pbDrawTextPositions(@overlay_type,[
           [pkev,Graphics.width/2,@h+278,2,base,shadow]
        ])

    @init = false



Oh yeah last thing I use the v20 version so if you need to do some change for v21 I can't help you btw if the author want to add some of this directly in the script no problem just be sure if it works because like I said in the beginning I'm just a random guy doing some tweaks that's it
 

Attachments

  • Screenshot_20231203-070350_RPG_Maker_Plugin_for_JoiPlay.png
    Screenshot_20231203-070350_RPG_Maker_Plugin_for_JoiPlay.png
    150.4 KB · Views: 39
  • Screenshot_20231203-070331_RPG_Maker_Plugin_for_JoiPlay.png
    Screenshot_20231203-070331_RPG_Maker_Plugin_for_JoiPlay.png
    191.3 KB · Views: 35
  • Screenshot_20231203-070532_RPG_Maker_Plugin_for_JoiPlay.png
    Screenshot_20231203-070532_RPG_Maker_Plugin_for_JoiPlay.png
    150.4 KB · Views: 39
  • Screenshot_20231203-072348_RPG_Maker_Plugin_for_JoiPlay.png
    Screenshot_20231203-072348_RPG_Maker_Plugin_for_JoiPlay.png
    221.4 KB · Views: 40
  • Game_vF9pXefarL.png
    Game_vF9pXefarL.png
    103.7 KB · Views: 37

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
270
I wanted to do the same thing and I managed to do it with some tweaks, but I'm just a normal player not a dev do if it doesn't work or there is a bug good luck (but I don't have in my part)
I'll explain in the logical way not necessarily in order

First in pbFrameUpdate I changed the new part to:
Ruby:
Expand Collapse Copy
if Input.trigger?(Input::AUX2)
      
        custom_species = @battle.battlers.map { |battler| battler }.uniq
      pbSpeciesTypeMatchUI(custom_species.reverse) #.reverse is here only to show first the opponent which I find better
    end

Then in the 002_SpeciesTypeMatch_UI file I changed pbSpeciesTypeMatchUI at the end
Ruby:
Expand Collapse Copy
if custom_species #removed the other check
      
      # Use the custom_species array if it is provided
      scene.instance_variable_set(:@species,custom_species.each{|a| a.species})
    else

Then in drawSpeciesTypes I changed some variable because it doesn't get the same thing as before
at the beginning:
Ruby:
Expand Collapse Copy
    s = species #Use what you really get from battle and not the base thing in pokedex

    2.times do |i|
      @sprites["icon_#{i}"].pbSetParams(s.species,0,s.form,false)#changed .id to .species
    end

At the end:
Ruby:
Expand Collapse Copy
# Draw species name
    pbDrawTextPositions(@overlay_type,[
           [s.name,Graphics.width/2,@h+10,2,base,shadow]
        ])#changed .real_name to .name also for bug and it's better it supports translation and custom nickname

IMPORTANT
I removed this part in pbTypeMatchUp


Ruby:
Expand Collapse Copy
    elsif Input.trigger?(Input::USE) # Don't work idk why
        oldSpecies = @species[@index]
        newSpecies = pbChooseSpeciesFromList(oldSpecies, oldSpecies)
        if oldSpecies != newSpecies
          @index = @species.index(newSpecies)
          refresh = true
        end
So during battle if you press enter you don't get anymore the menu for choosing which pokemon to show, but who cares you can go to it using right/left, I don't want to correct the bug because I don't understand and it will take a long time for literally nothing but you can try


So in conclusion what this does, you can now see in battle the real form currently and not only the base form, so you can see mega evolution, regional variants, special form, fakemon even just custom sprite change I added some screenshot to show it

Also something I find cool I added is the mention of what EV you gain from this pokemon from killing it, if you want the code you need to add at the end of drawSpeciesTypes
Ruby:
Expand Collapse Copy
# Draw species name
    pbDrawTextPositions(@overlay_type,[
           [s.name,Graphics.width/2,@h+10,2,base,shadow]
        ])#changed .real_name to name also for bug and it's better it support translation and custom nickname
    
        pkev = ""
        s.pokemon.evYield.each_key {|ev|
        if s.pokemon.evYield[ev] > 0
            pkev += " #{ev}: +#{s.pokemon.evYield[ev]} "
        end }
        pbDrawTextPositions(@overlay_type,[
           [pkev,Graphics.width/2,@h+278,2,base,shadow]
        ])

    @init = false



Oh yeah last thing I use the v20 version so if you need to do some change for v21 I can't help you btw if the author want to add some of this directly in the script no problem just be sure if it works because like I said in the beginning I'm just a random guy doing some tweaks that's it
Thanks a lot! It works.
 
Back
Top