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

v21.1 Trade With Friends V1.0

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
How to Use:

To initiate a trade in your game, simply call the pbTradeWithFriends method. This will open a menu with several options:

  • Trading: This option lets you select a Pokémon to trade. The chosen Pokémon is stored in a variable for later use, and its data is encrypted and saved in a file in the game's "trade" folder. The Pokémon you selected is removed from your party. You then give this file to a friend for the trade. Only one trade is allowed at a time, so if this variable is filled, you cannot start a second trade. I've included a clear function to prevent lockout.
  • Retrieval: Use this option to retrieve a Pokémon from a trade file. The script searches the game directory and subfolders for the appropriate file, decrypts it, and prompts you to select one of your Pokémon to trade back. After selection, it continues the trade, using the data from the variable stored during the initial trade. Displays trade scene. The retrieved Pokémon is added to your party.
  • Clearing: If your trade partner doesn't trade back, you can use this option. It allows you to clear the stored Pokémon, preventing a lockout situation. You'll receive clear explanations and warnings before proceeding, as this action results in the loss of the stored Pokémon.
  • Explanation: This submenu provides detailed explanations of all menu options.

In-Game Process:

When you call the pbTradeWithFriends method, the player can start the trade process. The selected Pokémon is "transferred" to a file, which is given to a friend for the trade. The friend receives the Pokémon and selects one of theirs to send back. The second file is sent back to the first player, who then receives the second Pokémon.




Features:

  • Only one trade can be initiated at a time to ensure a proper trade scene.
  • The script includes various warning features to prompt users for file overwriting and more.
  • It scans through a player's party and PC to prevent receiving the same Pokémon twice by comparing owner ID, species, obtain level, and obtain map.
  • Data transferred into the file is encrypted to prevent cheating.
  • The script currently calls the Party screen; later, it might include the PC.
  • Players can trade between different games, and the script checks for valid species before continuing with the trade.

Other Notes:

  • I've left some debug outputs in the script that the players won't be able to see. We left them so devs will be able to see what's going on with the file management. If not wanted, feel free to take out the "puts" lines.
  • Being that it has the capability of being used between different games, modification may be necessary to ensure balance or prevent certain species from being obtained in your specific game. If you need help with this, please reach out, and we'll be more than happy to help.
  • This script is a work in progress. It's designed for ease of readability and modification, with smaller methods for various functionalities. While it's been developed with several fail-safes, if you encounter any issues or have suggestions, please feel free to let me know.
Credits
Dr.Doom76
Author
drdoom76
Downloads
437
Views
2,311
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from drdoom76

Back
Top