In-Depth Pokedex Data Page [v21.1]

v21.1 In-Depth Pokedex Data Page [v21.1] v1.0.3

This resource pertains to version 21.1 of Pokémon Essentials.
This isn't worthy of its own version update, but now that the Gen 9 Pack has been updated to v3.0.1, the placeholder evolution handlers for Gen 9 species have been removed from this plugin, since they now properly work in the Gen 9 Pack scripts.
  • Fixed an error that would occur if you have custom Egg Groups or Habitats which you have not assigned an icon position value to.
  • Reconfigured how the graphics for the plugin are stored so that they aren't accidentally deleted for completed projects.
  • Fixed a bug that would cause a crash after registering a new species in the Pokedex.
  • Fixed a bug that could cause a potential crash if the total number of species icons that appear in one of the sub menus happens to be an exact multiple of 12.
Minor Update (v1.0.1)
IMPORTANT
It's come to my attention that if you're using this plugin with scripts and PBS files taken from the Gen 9 pack, the evolution text for some of the species added by that plugin may not display correctly. This is due to the evolution handlers from that plugin not being fully compatible with v21.1 yet. To address this, I've updated this plugin to contain updated evolution methods that are compatible with v21.1. I'll keep these in the plugin as placeholder until the Gen 9 Pack is officially updated to v21.1.

Furthermore, I've noticed that there are several errors and/or missing elements scattered throughout the Gen 9 PBS files, which affects some of the displays in the plugin by displaying incorrect data. To address this, I'm going to include a script below that you can run to fix these errors. I'm not going to include this in the plugin, because it's incredibly niche and only serves a single purpose to be used only once; after which you can simply delete the script.

Again, this is only necessary to use if you're using Gen 9 PBS files. Otherwise, you can mostly ignore this update entirely.

Paste this code anywhere in an empty space in your Essentials script:
Code:
module GameData
  class Item
    attr_accessor :real_portion_name
    attr_accessor :real_portion_name_plural
  end
  class Species
    attr_accessor :real_form_name
    attr_accessor :habitat
    attr_accessor :generation
    attr_accessor :flags
  end
end

module Compiler
  module_function
  
  def update_gen9
    compile_items = false
    items_to_update   = [
      :AUSPICIOUSARMOR, :MALICIOUSARMOR, :BOOSTERENERGY
    ]
    items_to_update.each do |item|
      data = GameData::Item.try_get(item)
      next if !data
      compile_items = true
      case item
      when :AUSPICIOUSARMOR, :MALICIOUSARMOR
        data.real_portion_name = "set of #{data.name}"
        data.real_portion_name_plural = "sets of #{data.name}"
      when :BOOSTERENERGY
        data.real_portion_name = "capsule of #{data.name}"
        data.real_portion_name_plural = "capsules of #{data.name}"
      end
    end
    compile_species = false
    species_to_update = [
      :WYRDEER, :BASCULEGION, :SNEASLER, :OVERQWIL, :ENAMORUS,
      :TAROUNTULA, :SPIDOPS, :NYMBLE, :LOKIX, :WATTREL, :KILOWATTREL,
      :WIGLETT, :WUGTRIO, :BOMBIRDIER, :VAROOM, :REVAVROOM, :CYCLIZAR,
      :GREAVARD, :HOUNDSTONE, :VELUZA, :ANNIHILAPE,
      :DARMANITAN_1, :DARMANITAN_3, 
      :QUILAVA_1, :TYPHLOSION_1, :SNEASEL_1, :DEWOTT_1, :SAMUROTT_1,
      :PETILIL_1, :LILLIGANT_1, :BASCULIN_2, :RUFFLET_1, :BRAVIARY_1,
      :GOOMY_1, :SLIGGOO_1, :GOODRA_1, :BERGMITE_1, :AVALUGG_1,
      :DARTRIX_1, :DECIDUEYE_1, :BASCULEGION_1,
      :REVAVROOM_1, :REVAVROOM_2, :REVAVROOM_3, :REVAVROOM_4, :REVAVROOM_5
    ]
    species_to_update.each do |species|
      data = GameData::Species.try_get(species)
      next if !data
      compile_species = true
      case data.species
      when :QUILAVA_1, :DEWOTT_1, :PETILIL_1, :RUFFLET_1, :GOOMY_1, :BERGMITE_1, :DARTRIX_1
        data.flags.clear
        data.generation = 8
      when :TYPHLOSION_1, :SAMUROTT_1, :LILLIGANT_1, :BRAVIARY_1, :SLIGGOO_1, :GOODRA_1, :AVALUGG_1, :DECIDUEYE_1
        data.flags.clear
      when :DARMANITAN
        data.flags = ["DefaultForm_#{data.form - 1}"]
      when :BASCULIN
        data.real_form_name = "White-Striped"
      when :BASCULEGION
        data.flags = ["DefaultForm_2", "InheritFormWithEverStone"]
      when :SNEASLER
        data.habitat = :Mountain
        data.flags = ["DefaultForm_1", "InheritFormWithEverStone"]
      when :OVERQWIL
        data.flags = ["DefaultForm_1", "InheritFormWithEverStone"]
      when :ENAMORUS
        data.habitat = :Rare
      when :TAROUNTULA, :SPIDOPS
        data.habitat = :Forest
      when :WYRDEER, :NYMBLE, :LOKIX, :CYCLIZAR, :GREAVARD, :HOUNDSTONE
        data.habitat = :Grassland
      when :WATTREL, :KILOWATTREL, :WIGLETT, :WUGTRIO, :VELUZA
        data.habitat = :Sea
      when :SNEASEL, :BOMBIRDIER, :ANNIHILAPE
        data.habitat = :Mountain
      when :VAROOM, :REVAVROOM
        data.habitat = :RoughTerrain
        data.real_form_name = nil
      end
    end
    if compile_items
      GameData::Item.save
      Compiler.write_items
    end
    if compile_species
      GameData::Species.save
      Compiler.write_pokemon
      Compiler.write_pokemon_forms
    end
    if compile_items || compile_species
      Compiler.compile_all(true)
    end
    pbMessage(_INTL("Data successfully updated. You may now delete the Gen 9 Updater script."))
  end
end
Next, in an event, run the script Compiler.update_gen9. The game should start rewriting some of your PBS files, and then begin compiling. After which, a message will display telling you that the data successfully updated. After this is complete, you may close your game and remove the code you pasted above from your scripts, as it has done its job and is no longer needed.

After doing this and installing the latest update, all Gen 9-related issues in the Data pages should be resolved.
Top