Essentials Docs Wiki
All Contributors
Richard PT
• 9/9/2018

Error when catching pokemon with multiple formes

Error log is below

[Pokémon Essentials version 17.2]

Exception: RuntimeError

Message: Script error within event 1 (coords 19,14), map 33 (Starting Town):

Exception: TypeError

Message: PSystem_Utilities:855:in `[]'cannot convert false into Integer

***Full script:


Interpreter:243:in `pbExecuteScript'

PSystem_Utilities:855:in `pbGetFSpeciesFromForm'

Pokemon_Forms:28:in `fSpecies'

PokeBattle_Pokemon:850:in `baseStats'

PokeBattle_Pokemon:886:in `calcStats'

PokeBattle_Battler:483:in `pbUpdate'

PokeBattle_Battler:947:in `pbResetForm'

PokeBattle_Battle:4024:in `pbEndOfBattle'

PokeBattle_Battle:4023:in `each'

PokeBattle_Battle:4023:in `pbEndOfBattle'

Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:163:in `update'
Scene_Map:161:in `loop'
Scene_Map:170:in `update'
Scene_Map:234:in `main'
0 6
  • Upvote
  • Reply
Richard PT
• 9/9/2018
Pretty sure this is the same issue I saw when making my own game, Pokemon Zero. I'm using Essentials 17.1, but try this and let me know how you get on.

Find the following line near the top of PokeBattle_Pokemon (Edit: I mean Pokemon_Forms)

return @forcedForm if @forcedForm!=nil

Replace it with

return @form if @forcedForm
• 9/9/2018
That worked for me, thanks a million dude! For anyone else having the same problem in 17.2, The line that Zerokid24 is talking about is under Pokemon_Forms instead of Pokebattle_Pokemon :)
• 9/9/2018
Cool, glad it worked for you, that one took me a while to pin down. And yes, you're right about the script, sorry for the confusion, I've edited my original response.
• 9/11/2018
I suggest you undo that change, and instead go into script section "PTrainer_NPCTrainers" and find the two lines which mention "poke[TPFORM]". Make the first line say "pokemon.forcedForm = poke[TPFORM] if " and delete the second line.

Then go to script section "PokeBattle_Battle" and find the mention of "forcedForm". Make it say "pokemon.forcedForm = nil if " instead.
• 9/13/2018
This fix works, but there is something strange, pokemon like Unown, don't change its forms in battle. There's 28 diferent Unowns but only the first one appears in battle. So, how to fix that issue? I'm gonna test all pokemon forms in searching of bugs or errors.
• 9/13/2018
Well, they do show up, so your copy of Essentials is broken somehow.

Keep the forums tidy, please. One error per thread.
Write a reply...