• 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!
Resource icon

v21.1 Pokemon Form Changer V1.01

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
I was in the middle of adding traders in just about every Poke Center in towns that would trade you back a different form of what you trade them. This didn't seem like the most efficient way to go about this. After looking into the debug code for Pokemon modifications, I went ahead and made an item that will do the same thing. Using this, you will be prompted to select any available forms for the selected Pokemon, and it will change their Form to the selection. Due to the way Arceus works, and I'm assuming same with the memory items, the item won't work without "forcing" form change, so I've prevented use on all Legendaries. I'm not the best spriter, so if anyone has a good sprite for a Form Changer, I'd be more than happy to add it to go along with the script. It should also check for Pokemon that create their own forms, like Deerling, and prevent usage. I wrote it for V20.1, but tested it on V21.1 with no issues.
Onto the good stuff:
Just place this at the bottom of the Item_Effects area.
Ruby:
ItemHandlers::UseOnPokemon.add(:FORMCHANGER, proc { |item, qty, pkmn, screen|
  formcmds = [[], []]
  species_data = GameData::Species.get(pkmn.species)
  if species_data && species_data.egg_groups.include?(:Undiscovered)
    pbMessage("You cannot use this item on Legendary Pokémon!")
    next false
  elsif MultipleForms.hasFunction?(pkmn, "getForm")
    pbMessage("This species decides its own form and cannot be changed.")
    next false
  end

  GameData::Species.each do |sp|
    if sp.species == pkmn.species
      next if sp.mega_stone
      form_name = sp.form_name
      form_name = "Normal" if !form_name || form_name.empty?
      form_name = sprintf("%d: %s", sp.form, form_name)
      formcmds[0].push(sp.form)
      formcmds[1].push(form_name)
    end
  end
 

  choice = pbMessage("Which form would you like?", formcmds[1], -1)

  if choice == nil || choice == -1
    pbMessage(_INTL("Did not use the Form Changer."))
    next false
  elsif formcmds[0][choice] == pkmn.form
    pbMessage("Your Pokémon is already in that Form!")
    next false
  else
    chosen_form_name = formcmds[1][choice].split(': ')[1]  # Extract the chosen form name
    pbFadeOutIn {
      pkmn.form = formcmds[0][choice]
      screen.pbRefresh
      pkmn.calc_stats
    }
    pbMessage("Your Pokémon has changed to its #{chosen_form_name} Form!")
    $player.pokedex.register(pkmn)
           
    next true
  end
})
Add this into your PBS Items file
Ruby:
#-------------------------------
[FORMCHANGER]
Name = Form Changer
NamePlural = Form Changers
Pocket = 1
Price = 5000
FieldUse = OnPokemon
Flags =
Description = An item that will allow you to change the form of your Pokemon.

Please let me know if anyone has any issues. Hope you enjoy!
Credits
Credit if used would be nice: Dr.Doom76
  • Castform.png
    Castform.png
    14.5 KB · Views: 509
Author
drdoom76
Views
2,536
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from drdoom76

Latest updates

  1. V1.02

    Removed Mega "Forms" from the selection list.
  2. V1.01

    Added screen flash while changing form. Tested and working with V21.1.
Back
Top