Solved PC on the Menu Screen

Posts
53
#21
Aha! Yeah, it's the def pbPokeCenterPC in the Following Pokémon script—that one overrides all the changes you/I made to that function in PScreen_PC! You'll just need to make some similar changes in there too, i.e. introduce the is_pc parameter and pass it to callCommand. You might want to check if any of the other functions I've suggested changing are also duplicated in Following Pokémon, 'cause you'll need to do a similar thing for each one if so.

Off-topic, Following Pokémon is the bane of my life. It always conflicts with something.
So I changed everything you said to change in the Following Pokemon script (exept callCommand, I'll get to that later) and it shows the error message again.
I searched in the Following Pokemon script the callCommand and I didn't find anything. Have I done something wrong?
 

MGriffin

Trainer
Member
Posts
95
#22
So I changed everything you said to change in the Following Pokemon script (exept callCommand, I'll get to that later) and it shows the error message again.
I'm all out of ideas. If you've added is_pc to all the "def pbPokeCenterPC" functions in Essentials and you're still getting an error about the number of arguments then I don't know how to help you, sorry. Are you sure it's exactly the same error? Can you post it here?

I searched in the Following Pokemon script the callCommand and I didn't find anything. Have I done something wrong?
That's probably fine. I don't actually know what's in the Following Pokémon script, it must be that it doesn't make any changes to callCommand, in which case just making changes to the other one is enough.
 
Posts
53
#23
I'm all out of ideas. If you've added is_pc to all the "def pbPokeCenterPC" functions in Essentials and you're still getting an error about the number of arguments then I don't know how to help you, sorry. Are you sure it's exactly the same error? Can you post it here?


That's probably fine. I don't actually know what's in the Following Pokémon script, it must be that it doesn't make any changes to callCommand, in which case just making changes to the other one is enough.
Here's the error:
Code:
---------------------------
Pokemon Essentials  17.2
---------------------------
[Pokémon Essentials version 17.2]
 
Exception: ArgumentError
 
Message: wrong number of arguments(0 for 1)
 
PScreen_PauseMenu:199:in `pbPokeCenterPC'
 
PScreen_PauseMenu:199:in `pbStartPokemonMenu'
 
PScreen_PauseMenu:144:in `loop'
 
PScreen_PauseMenu:275:in `pbStartPokemonMenu'
 
Scene_Map:127:in `call_menu'
 
Scene_Map:213:in `follow_update'
 
Follow Pokemon:1551:in `update'
 
Scene_Map:234:in `main'
 
Scene_Map:231:in `loop'
 
Scene_Map:236:in `main'
 
 
 
This exception was logged in 
 
C:\Users\Cristian\Saved Games\Pokemon Essentials  17_2\errorlog.txt.
 
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
 

MGriffin

Trainer
Member
Posts
95
#24
Here's the error:
Code:
Exception: ArgumentError
 
Message: wrong number of arguments(0 for 1)
 
PScreen_PauseMenu:199:in `pbPokeCenterPC'
Ah, that is the same error. I don't know what to say, there must be yet another def pbPokeCenterPC out there that's missing is_pc. If you post a link to your Data/Scripts.rxdata I can take a quick look.
 

MGriffin

Trainer
Member
Posts
95
#28
Worked like a charm. Made these changes to Follow Pokemon:

Code:
def pbPokeCenterPC(is_pc=true) # changed
  follow_pbPokeCenterPC(is_pc) # changed
  $PokemonTemp.dependentEvents.refresh_sprite
end
Code:
class TrainerPC
 
  alias follow_access access
  def access(is_pc)
	follow_access(is_pc) # changed
	$PokemonTemp.dependentEvents.refresh_sprite
  end
end
I think it might be worth looking up what alias is and how it works. The important thing is that because we introduced a new parameter, we needed to modify some of the calls to the aliased functions.

With those two changes I got no error, and when I also changed the PScreen_PauseMenu to use "pbPokeCenterPC false" I could place party Pokémon into the box without healing them.
 
Posts
53
#29
I
Worked like a charm. Made these changes to Follow Pokemon:

Code:
def pbPokeCenterPC(is_pc=true) # changed
  follow_pbPokeCenterPC(is_pc) # changed
  $PokemonTemp.dependentEvents.refresh_sprite
end
Code:
class TrainerPC
 
  alias follow_access access
  def access(is_pc)
	follow_access(is_pc) # changed
	$PokemonTemp.dependentEvents.refresh_sprite
  end
end
I think it might be worth looking up what alias is and how it works. The important thing is that because we introduced a new parameter, we needed to modify some of the calls to the aliased functions.

With those two changes I got no error, and when I also changed the PScreen_PauseMenu to use "pbPokeCenterPC false" I could place party Pokémon into the box without healing them.
It works! Thank you very much!
Just one more thing: what if I want the feature to be given by an NPC or something like the Pokedex appears on the menu?
 

MGriffin

Trainer
Member
Posts
95
#30
I

It works! Thank you very much!
Just one more thing: what if I want the feature to be given by an NPC or something like the Pokedex appears on the menu?
Thank God! I'll be honest, I was going to give up if it didn't.

Simple, just change the code that puts the PC option in the menu to check for a flag that talking to that NPC sets. I think you can base that on how the Pokédex item in the menu works, I think that one isn't there until you pick up the 'dex.

Ah, that is the same error. I don't know what to say, there must be yet another def pbPokeCenterPC out there that's missing is_pc. If you post a link to your Data/Scripts.rxdata I can take a quick look.
Just to say, this wasn't actually the same error! The first one said 1 for 0, but this one said 0 for 1, which is because is_pc wasn't defaulted—it just said "def pcPokeCenterPC(is_pc)" instead of "def pcPokeCenterPC(is_pc=true)".
 
Posts
53
#31
Thank God! I'll be honest, I was going to give up if it didn't.

Simple, just change the code that puts the PC option in the menu to check for a flag that talking to that NPC sets. I think you can base that on how the Pokédex item in the menu works, I think that one isn't there until you pick up the 'dex.
I don't understand it, 'cause I'm a noob, but you know what, take some rest buddy, you helped me out a lot. You deserve some rest. I'll ask another time on another discussion. If you want to tell me step by step how to do it, I don't mind. Anyways, thanks a lot! I'll surely credit you when I'll finish the game!
 

Ulithium_Dragon

Trainer
Member
Posts
50
#32
Hmm, I might make it so that the player can use this feature one time between Pokemon Center visits, so to "recharge" it or w.e. you have to go back to a real Pokemon Center.
 
Posts
1
#33
in relation to all of this, i have successfully set up pc access from the menu, and set up so when moving pokemon between party and storage they dont heal.
my question is, does anyone know of a way to heal all pokemon in storage, ideally at the same time when you heal your party at a pokemon center? this would be similar to lets go if anyone has played that.
 
Top