• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Friend Safari

Resource Friend Safari 1.1.3

The second one I figured why, but the first one I don't know why you have it. I have interacted with the pc near Blue without interacting with any other event on the map and I didn't get an error. Are you starting a new game when testing? Have you interacted with any other event before the one that throws the error?
and No. but I will restart and try.
 
The second one I figured why, but the first one I don't know why you have it. I have interacted with the pc near Blue without interacting with any other event on the map and I didn't get an error. Are you starting a new game when testing? Have you interacted with any other event before the one that throws the error?
Okay I did and it didn't give me an error. as for the one near Leaf, let me check. Still crashes if I check the check friend's data
 
Yes, I know that the pc near Leaf crashes. I did a typo in the code that causes it. But I'm glad the other one was fixed. I updated the plugin again with the fix for the pc near Leaf.

As a side note, that pc is to check the pokemon that appear in a safari or delete a saved safari. As of now, the pokemon list appears as something like that: [:PIKACHU, :PLUSLE, :SHINX]. When I figure out how to change that, I'll upload it again.
 
LinKazamine updated Friend Safari with a new update entry:

1.1.2

  • Fixed an error when trying to delete an NPC data from the computer.
  • Changed the variable to make posible to add it on created save files. Even so, better to test new plugins on new save files.
  • Fixed an error when trying to register a friend.
  • Fixed an error when trying to use pbSafariPC.
  • Changed code to display the safari pokemon's name as a string instead of an array of ID.

Read the rest of this update entry...
 
I was testing the NPC in the demo map and noticed that even when I hit "cancel" in pbChooseNPCSafari, the "set move route" command beneath it still activates. To fix this issue, would it be possible for you to modify the pbChooseNPCSafari script so that when "cancel" is pressed, something akin to the "exit event processing" option in RPGMaker XP occurs?
 
The script is done like any other with a "cancel" option. And the move route has nothing to do with the script, since it is done in the map's event (so you can customize the route to the map).

But to solve that problem:
If you set the variable you chose to store the safari type (in the configuration) to either 0 or another number that is bigger than the number of types you defined at Safari_Types at the start of the event, you can use that value on a conditional branch so the movement only happens if the variable doesn't have that value. By default, it is variable 1.

I've reuploaded the map on the download link to include both examples in both events that let you select a safari. Haven't tested it, but now in both cases you should see a text (the same one as if you selected "no" when they asks you if you want to enter a safari) if you select cancel.
 
But to solve that problem:
If you set the variable you chose to store the safari type (in the configuration) to either 0 or another number that is bigger than the number of types you defined at Safari_Types at the start of the event, you can use that value on a conditional branch so the movement only happens if the variable doesn't have that value. By default, it is variable 1.
Your suggestion worked, thank you!

I have another question. Would it be possible to ban a Pokemon by species? If I've understood correctly, currently there is only the option to filter by generation or flags.
 
Well, there is no option to ban by species but you can ban pokemon with certain flags. There is a BAN_LIST, where you can add flags that would discualify a pokemon from being chosen. By default, it includes flags "Gen1", "Gen2", "Fossil", "Legendary", "Mythical", "Paradox" and "UltraBeast" as examples. You could add any flag to that list and then add it to the pokemons with TechSkylander1518's Mass Flag Adder.

Edit: the plugin is for v20.1 and I don't know if it works on v21+ (if that is what you are using). If it does not, you will have to add the flag manually on the PBS.
That said, if more people are interested in allowing to ban by species as well, I may look to add it. Just be aware that it will just be another filter pokemon must pass alongside GEN_LIST or BAN_LIST for them to be elegible for the safari.
 
Last edited:
I'm using 21.1 and worked for a while, but now things don't. The problems I had before the update came back. owo

here are the errors I get:
pbSafariPC < again but only after you get Leaf's and Blue/Green's friend codes.
Leaf's code breaks again but only after player gets their own code.
 
Last edited:
You mean the pc crashing? Can you share the errorlog? I haven't touched the code aside from making the pokemon list look better, but I tested that and worked for me so the problems shouldn't be happening again.
 
[2025-08-07 07:57:19 -0500]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 1 (coords 6,7), map 22 (test)
Exception: TypeError
Message: Argument 0: Expected string

***Full script:
pbSafariPC

Backtrace:
SpriteWindow_text:1107:in `text_size'
SpriteWindow_text:1107:in `block in getAutoDims'
SpriteWindow_text:1106:in `each'
SpriteWindow_text:1106:in `getAutoDims'
SpriteWindow_text:1173:in `initialize'
Messages:723:in `new'
Messages:723:in `pbShowCommands'
[Lin's Friend Safari] Safari_PC.rb:67:in `block in pbPCNPCSafari'
[Lin's Friend Safari] Safari_PC.rb:60:in `loop'
[Lin's Friend Safari] Safari_PC.rb:60:in `pbPCNPCSafari'

Here's the error when talking to Leaf after getting my friend code:
[2025-08-07 07:56:42 -0500]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 7 (coords 8,11), map 22 (test)
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected 8 to be a String, but got Integer.

***Full script:
pbGetNPC("Leaf", 1, 2)
name = pbGet(1)
type = pbGet(2)
pkmn = $PokemonGlobal.pkmnlist
pbAddNPC(name, type, pkmn)

Backtrace:
015:Validation:29:in `validate'
[Lin's Friend Safari] Safari_Main.rb:60:in `initialize'
[Lin's Friend Safari] Safari_NPC.rb:46:in `new'
[Lin's Friend Safari] Safari_NPC.rb:46:in `pbAddNPC'
(eval):5:in `execute_script'
033:Interpreter:138:in `eval'
033:Interpreter:138:in `execute_script'
034:Interpreter_Commands:1177:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:130:in `block in update'
 
I'm not seeing anything weird with the code. I've compared it with the one the pc uses on v21.1 and it should work. The errors started out of nowhere? Did you change something in the plugin right before the errors started? Or in the map I provided as an example?
 
I didn't change anything. I turned off the auto leaf code since it was crashing but that's all that I changed when I updated the code.
 
When you say "auto leaf code", you mean the auto event that activates when entering the map for the first time? What error where you having?
 
let me turn it on and see.

Okay that's odd. It didn't do the error this time. but when I talk to Leaf after getting her code this happens:
[2025-08-07 10:04:11 -0500]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 7 (coords 10,10), map 22 (test)
Exception: NoMethodError
Message: undefined method `npcnames' for #<PokemonSystem>

***Full script:
$PokemonSystem.npcnames.include?("Leaf")
Backtrace:
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:434:in `command_111'
Interpreter_Commands:29:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'
Scene_Map:167:in `block in update'
Scene_Map:166:in `loop'
 
Well, that is weird. I checked my map and realised that the events sometimes still used the variable name I used before changing to a unique one for this plugin, but it was PokemonGlobal, not PokemonSystem. In any case, I've gone through them all to change it for the correct variable name. Could you try downloading the map again and see if this fixes something?
 
Back
Top