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:
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.