- Pokémon Essentials Version
- v20.1 ➖
Vanilla Essentials Compatibility
This plugin works for Pokemon Essentials 20.1. It may also work for Pokemon Essentials 21.
Other's plugin compatibility
This plugin should not interfere with another plugin unless they alter the wild pokemon created.
It's tested to be compatible with Automatic Level Scaling.
This plugin has been made compatible with Cable Club so you can now let the players send their friend safari code to their friends.
The plugin now has all the code needed for a functional Friend Safari. You still need to make the events to transport the player to other places and to create and register the safaris for the player to access them but this plugin should make it easier and shorter to do.
The updates from now on should only be bug fixes unless someone points things from X and Y's Friend Safari that I forgot to add.
How to use
Be aware that all the plugins calls check if the name you are trying to register has already been stored. This means that you can't register two or more NPC or players with the same name. Multiple NPC or players registered can have the same safari type, though.
This plugin works for Pokemon Essentials 20.1. It may also work for Pokemon Essentials 21.
Other's plugin compatibility
This plugin should not interfere with another plugin unless they alter the wild pokemon created.
It's tested to be compatible with Automatic Level Scaling.
This plugin has been made compatible with Cable Club so you can now let the players send their friend safari code to their friends.
The plugin now has all the code needed for a functional Friend Safari. You still need to make the events to transport the player to other places and to create and register the safaris for the player to access them but this plugin should make it easier and shorter to do.
The updates from now on should only be bug fixes unless someone points things from X and Y's Friend Safari that I forgot to add.
- Drop the contents of the zip into the game's folder.
- Delete Safari_Compiler v20.1 or v21+ in
Lin's Friend Safari/01 - Main
if you are not using the proper version of pokemon Essentials. - Configure the script to your liking.
- Compile the game.
- Start a new game.
- Edit the arrays in the Safari_Types file. The first one will have the text to display so put the text inside the _INTL() function. The second array will be used to compare to the pokémon's flags so it has to go without the _INTL() function. Both arrays have to be of the same length.
- Edit the Pokemon and Pokemon_forms PBS files to add the flags to the pokémon. You can use Mass Flag/TutorMove adder plugin to facilitate this work.
- Use
pbGetPokemonFlagList(flagID)
instead ofpbGetPokemonTypeList(type)
to get a list of the pokémon with the flag of the provided index. Note that "flagID" and "type" are both indexes. - You can change the text in
pbShowNPCSafariType
(in the Safari_NPC file) andpbShowFriendSafariType
(in the Safari_Player) from "Type" to any text fits your new safari or just translate it in the language files.
How to use
Be aware that all the plugins calls check if the name you are trying to register has already been stored. This means that you can't register two or more NPC or players with the same name. Multiple NPC or players registered can have the same safari type, though.
Command:
Use: used by the
Variable:
The types names are stored in
pbSetTypeName
Use: used by the
pbShowSafari
and pbSaveSafariTypeToTxt
to show types names instead of a number. Can be used to create messages where an NPC says the name of a type depending on the value of a variable.Variable:
The types names are stored in
$PokemonGlobal.typename
.Command:
Use: used by
Variable:
The types names are stored in
pbSetTypeID
Use: used by
pbGetPokemonTypeList
to get a list of pokémon of a certain type.Variable:
The types names are stored in
$PokemonGlobal.typeid
.A variable used to pass and store a list of pokémon. It's used by many of the commands there to pass the array with the pokémon around. It's also used to determine which pokémon overwrite the encounters of the allowed maps.
Variable:
Variable:
$PokemonGlobal.pkmnlist
This makes use of two commands that are, not directly, related to the register friends for the Friend Safari but it allows you to store the name and safari type of NPC to recover anytime during the game to easily register them afterwards. Quite useful if you use variables to randomise the safari type of each NPC at the intro event.
Command:
Use: You have to define the "name", "type" and "pkmn" for it to work. While you can register either text or numbers (maybe more, since there's no check on what is being stored), I recommend using text for the name, a number for the type and an ID or array of ID for the pkmn for the other functions to work.
Variables:
The names are stored in
The type's position are stored in
The type's names are stored in
The type's id are stored in
The pokémon are stored in
The i indicates a position in the
Examples:
While the images show the variable picking a random number between 1 and 18 (one for each type), you can also have each character have a predetermined type.
pbStoreNPC(name, type, pkmn)
Use: You have to define the "name", "type" and "pkmn" for it to work. While you can register either text or numbers (maybe more, since there's no check on what is being stored), I recommend using text for the name, a number for the type and an ID or array of ID for the pkmn for the other functions to work.
Variables:
The names are stored in
$PokemonGlobal.storage[i].name
.The type's position are stored in
$PokemonGlobal.storage[i].type
.The type's names are stored in
$PokemonGlobal.storage[i].type_name
.The type's id are stored in
$PokemonGlobal.storage[i].type_id
.The pokémon are stored in
$PokemonSystemGlobal.storage[i].pkmn_list
.The i indicates a position in the
$PokemonSystemGlobal.storage
array.Examples:
While the images show the variable picking a random number between 1 and 18 (one for each type), you can also have each character have a predetermined type.
Command:
Use: All three have to have a value. Name is a string, the text you used as a name with
Example:
pbGetNPC(name, var1, var2)
Use: All three have to have a value. Name is a string, the text you used as a name with
pbStoreNPC
. Var1 and var2 are numbers that correspond to the variables' ID you want to store the data with. Var1 will store the name and var2 will store the type. $PokemonGlobal.pkmnlist
will store the array of pokémon.Example:
A serie of commands for the NPC friend safari. One of them only allows for a visual display of the NPC registered and their friend safari type.
Command:
Use: registers an NPC so the player can choose it when trying to enter the friend safari.
Variables:
The names are stored in
The type's position are stored in
The type's name are stored in
The type's id are stored in
The pokémon are stored in
Examples:
In combination with the NPC storage system:
pbAddNPC(name, type, pkmn)
Use: registers an NPC so the player can choose it when trying to enter the friend safari.
Variables:
The names are stored in
$PokemonGlobal.npc[i].name
.The type's position are stored in
$PokemonGlobal.npc[i].type
.The type's name are stored in
$PokemonGlobal.npc[i].type_name
.The type's id are stored in
$PokemonGlobal.npc[i].type_id
.The pokémon are stored in
$pokemonGlobal.npc[i].pkmn_list
.Examples:
In combination with the NPC storage system:
Command:
Use: for those that want to add multiple languages and have NPC whit a different name depending on the language. While the _INTL() function will translate the text in the plugins, it does not update when the language changes when it's stored in a variable. This function solves that by changing the matching name to the name the _INTL() returns.
Use it in a common event to just have to call it instead of updating every name every time you need them to be updated.
pbUpdateNPCName(name)
Use: for those that want to add multiple languages and have NPC whit a different name depending on the language. While the _INTL() function will translate the text in the plugins, it does not update when the language changes when it's stored in a variable. This function solves that by changing the matching name to the name the _INTL() returns.
Use it in a common event to just have to call it instead of updating every name every time you need them to be updated.
Command:
Use: to update all the data of an already registered NPC. Used in the
pbUpdateNPC(name, type, pkmn)
Use: to update all the data of an already registered NPC. Used in the
pbAddNPC(name, type, pkmn)
command.Command:
Use: checks for all the NPC stored and adds them to show choices. When the player selects one of them, the value of the selected NPC's safari is returned to a variable whose ID is determined in the configuration of the plugin. You can use it with a conditional branch that checks the variable's value to decide where to take the player. Or maybe to change the game's version encounter. The pokémon stored with that NPC are stored in
Examples:
pbChooseNPCSafari
Use: checks for all the NPC stored and adds them to show choices. When the player selects one of them, the value of the selected NPC's safari is returned to a variable whose ID is determined in the configuration of the plugin. You can use it with a conditional branch that checks the variable's value to decide where to take the player. Or maybe to change the game's version encounter. The pokémon stored with that NPC are stored in
$PokemonGlobal.pkmnlist
so they can overwrite the encounters if possible.Examples:
Command:
Use: Creates a message where the names of the pokémon of the NPC in a certain index are displayed.
pbShowNPCPokemon(npcIndex)
Use: Creates a message where the names of the pokémon of the NPC in a certain index are displayed.
Command:
Use: Shows a scene where the NPC's names and types are displayed (types with actual names instead of numbers) for the player to see which ones they have registered and which safari type they have. It now allows for multiple pages if there are more than 18 NPC registered.
Examples:
pbShowNPCSafariType
Use: Shows a scene where the NPC's names and types are displayed (types with actual names instead of numbers) for the player to see which ones they have registered and which safari type they have. It now allows for multiple pages if there are more than 18 NPC registered.
Examples:
IMPORTANT
I don't know how to make the plugin create folders so you'll have to create the folder or folders for this part to work. The game will also need said folders when it's released so it works when the player tries to use these functions.
I don't know how to make the plugin create folders so you'll have to create the folder or folders for this part to work. The game will also need said folders when it's released so it works when the player tries to use these functions.
Command:
Use: stores the type and pokémon of the player's safari. Its needed for
Variables:
The name of the player is stored in [/ICODE]$PokemonGlobal.player.name[/ICODE].
The type's position of the player's safari is stored in
The type's name of the player's safari is stored in
The type's id of the player's safari is stored in
The pokémon of the player's safari are stored in
pbCreatePlayerSafari(type, pkmn)
Use: stores the type and pokémon of the player's safari. Its needed for
pbSaveSafariTypeToTxt
.Variables:
The name of the player is stored in [/ICODE]$PokemonGlobal.player.name[/ICODE].
The type's position of the player's safari is stored in
$PokemonGlobal.player.type
.The type's name of the player's safari is stored in
$PokemonGlobal.player.type_name
.The type's id of the player's safari is stored in
$PokemonGlobal.player.type_id
.The pokémon of the player's safari are stored in
$pokemonGlobal.player.pkmn_list
.Command:
Use: When the player interacts with an event with this code, a txt file with the player's name as its name will be created in a folder within the game's folder. Where that folder is and its name can be changed in the configuration.
Example:
pbSaveSafariTypeToTxt
Use: When the player interacts with an event with this code, a txt file with the player's name as its name will be created in a folder within the game's folder. Where that folder is and its name can be changed in the configuration.
Example:
Command:
Use: When the player interacts with an event with this code, a screen to write a name will appear. If the name matches one of the txt names stored in a certain folder within the game's folder, the game will attempt to search for a valid type. If there's a valid type, the player's Safari and pokémon will be registered. The folder where the txt files are readen can be changed in the configuration.
Variables:
The names are stored in
The type's position are stored in
The type's names are stored in
The type's id are stored in
The pokémon are stored in
Example:
pbGetFriendSafari
Use: When the player interacts with an event with this code, a screen to write a name will appear. If the name matches one of the txt names stored in a certain folder within the game's folder, the game will attempt to search for a valid type. If there's a valid type, the player's Safari and pokémon will be registered. The folder where the txt files are readen can be changed in the configuration.
Variables:
The names are stored in
$PokemonGlobal.friend[i].name
.The type's position are stored in
$pokemonGlobal.friend[i].type
.The type's names are stored in
$PokemonGlobal.friend[i].type_name
.The type's id are stored in
$PokemonGlobal.friend[i].type_id
.The pokémon are stored in
$pokemonGlobal.friend[i].pkmn_list
.Example:
Command:
Use: The
pbAddFriend(name, type, pkmn)
Use: The
pbGetFriendSafari
uses it to register players but you can use it to manually register players the same way as NPC.Command:
Use: to update all the data of an already registered friend. Used in the
pbUpdateFriend(name, type, pkmn)
Use: to update all the data of an already registered friend. Used in the
pbAddFriend(name, type, pkmn)
command.Command:
Use: It's used the same way and does the same as
pbChooseFriendSafari
Use: It's used the same way and does the same as
pbChooseNPCSafari
, just that for players instead of NPC.Command:
Use: It's used the same way and does the same as
pbShowFriendPokemon(friendIndex)
Use: It's used the same way and does the same as
pbShowNPCPokemon
, just that for players instead of NPC.Command:
Use: It's used the same way and does the same as
pbShowFriendSafariType
Use: It's used the same way and does the same as
pbShowNPCSafariType
, just that for players instead of NPC.Commands to facilitate the creation of a list of pokémon for the safari.
Command:
Use: It creates a list of all the allowed pokémon of a certain type that are in your game.
Variables:
The list of pokémon is stored in
pbGetPokemonTypeList(type)
Use: It creates a list of all the allowed pokémon of a certain type that are in your game.
Variables:
The list of pokémon is stored in
$PokemonGlobal.pkmnlist
.Command:
Use: It works the same way as
Variables:
The list of pokémon is stored in
pbGetPokemonFlagList(flagID)
Use: It works the same way as
pbGetPokemonTypeList
but searches for pokémon with a certain flag instead of a type. Useful if you want the friend safari to use something else to sort the pokémon of each safari.Variables:
The list of pokémon is stored in
$PokemonGlobal.pkmnlist
.Command:
Use: It creates a list of pokémon from the list created in
Variables:
The list of pokémon is stored in
pbGetPokemonSample
Use: It creates a list of pokémon from the list created in
pbGetPokemonTypeList(type)
. The amount of pokémon that are randomly picked from the list is defined in the configuration.Variables:
The list of pokémon is stored in
$PokemonGlobal.pkmnlist
.A series of commands to create a PC for the Friend Safari.
Command:
Use: For the PC to display the same message and reproduce the same text as when you start another PC. It uses the command
pbSafariPC
Use: For the PC to display the same message and reproduce the same text as when you start another PC. It uses the command
pbSafariPCMenu
to open the Safari PC.Command:
Use: To show the options to choose between the NPC's PC options and the players' PC options. It uses the commands
pbSafariPCMenu
Use: To show the options to choose between the NPC's PC options and the players' PC options. It uses the commands
pbSafariNPCMenu
and pbSafariFriendMenu
to show each PC.Command:
Use: To show the options to choose between managing NPC data or displaying the list of NPC registered and their types. It uses the commands
pbSafariNPCMenu
Use: To show the options to choose between managing NPC data or displaying the list of NPC registered and their types. It uses the commands
pbPCNPCSafari
to manage NPC data and pbShowNPCSafariType
to show the list of NPC registered.Command:
Use: It works the same way as
pbSafariFriendMenu
Use: It works the same way as
pbSafariNPCMenu
. It uses the commands pbPCFriendSafari
and pbShowFriendSafariType
instead.Command:
Use: Creates a list to choose from the NPC registered. It allows deleting that NPC info from the register. It also uses the command
pbPCNPCSafari
Use: Creates a list to choose from the NPC registered. It allows deleting that NPC info from the register. It also uses the command
pbShowNPCPokemon
to show a list of that NPC's pokémon list.Command:
Use: It works the same way as
pbPCNPCSafari
Use: It works the same way as
pbSafariNPCMenu
. It uses the command pbShowFriendPokemon
instead.- Credits
- LinKazamine for the script and image.
FL for the diploma script that served as a base for the visual types list.
Edael for the code that was used to display the text in different positions on the screen.
Vendily for the help with the code.