Pet Battle Scripts

Pet Battle Scripts

265k Downloads

[Feature Request] Allow export/share/import the script along with teams in Rematch integration

millanzarreta opened this issue · 3 comments

commented

One of the best features of Rematch is allowing you to export/share/import teams (or even entire groups of teams) with your friends.

The integration of PBS with Rematch currently only contemplates writing the scripts directly for each team. It would be super useful if when exporting/sharing/importing teams they could be shared along with their associated script. This may also require some modifications to be made from Rematch side, so it may also be necessary to contact the author of that addon.

As a practical example, lately I have been doing quite a few achievements with a friend, we make large collections of teams for each situation along with its script. While teams and their notes can be shared directly with a single click almost instantly, for scripts we need to copy them to a text file one by one, share it by other means, and then "import" manually them, which requires considerable time.

Any chance of this being implemented in the future? Thank you and greetings.

commented

When I last asked, Gello did not plan on including addon user data in the Rematch database (and thus exports) for sake of addons not causing Rematch issues. While I don't like that, I can understand it: Addon developers often fuck up, and users often fail to realise which addon actually causes an issue.

It does work the other way around though, but few users know that:

Click the minimap icon:
image

Select a script in the left pane:
image

Click Export in the menu on the top right:
image

Copy the data, as usual.

# Pet Battle Scripts
# Version: 2
# Name: test
# Data: XjFeVF5TcGx1Z2luXlNSZW1hdGNoXlNrZXleU3RlYW06OTZeU2V4dHJhXlN0ZXN0OjoxMjIwMUJCOjEyMTAyVjY6MjIyMDZCOl50Xl4=
# Code Start
change(next) [ !self(#3).active ]
use(Kopfstoß:376)
# Code End

On the other side, do the same, but select Import in the menu and paste the script. It should now show the team name:
image

Click save and the Rematch import dialog will open. Select a group and save:
image

And 🪄 it is now in Rematch on the other side:
image

I think it doesn't export notes though, please create a new issue if that's really important, I guess?

commented

That said, someone might want to lobby for xufu to also provide those export blobs instead of the script text to have one-click exports there as well.

commented

When I last asked, Gello did not plan on including addon user data in the Rematch database (and thus exports) for sake of addons not causing Rematch issues. While I don't like that, I can understand it: Addon developers often fuck up, and users often fail to realise which addon actually causes an issue.

The PBS and Rematch data are separated, each in its own file, which is completely normal as they are two separate addons, and it is PBS that maintains a reference from each script to its corresponding team in Rematch. This is something that the addon itself already does when you select a team in Rematch and choose the 'Create Script' or 'Edit Script' option, being able to import/export/share is not something that has to affect how the teams are saved, it simply offers the possibility of sharing the script along with the teams easily with your friends.

What I do understand is that doing this may also require a change from Rematch side, so it is possible that the two authors needed to collaborate for such a change.

As a user, the only thing I can say is that although both addons are great, this is the functionality that I miss the most, being able to share the scripts (more specifically the scripts together with their teams) in a simple and direct way with my friends. So, implementing any solution that facilitates this (whatever the approach) would be very nice.

About the PBS import/export built-in system, I didn't know about this functionality, thanks for explaining it. Still, this is not very useful (at least for me) for several reasons:

  • You can only 'export' it to text and then 'import' it as text, you cannot 'share' it directly to another person in the game (in Rematch you can share teams directly, it is not possible for groups even in Rematch but it is possible for individual teams)
  • You can only export one at a time, you cannot export a group or set of teams at once
  • The same for importing teams, it must be done one at a time
  • I have been testing this functionality and on many occasions it fails during the import, as follows: It imports the team correctly into Rematch, and imports the script into PBS, but it does not 'link' them. That is, from Rematch side the team is imported but does not appear that it has a script, and from PBS side the script is present (and is well-categorized into the Rematch category) but says 'No team matches this script'.

Until now what my friend and I did was share the entire set of teams with Rematch at once, and then I passed the scripts to it (either in the same file separating them or one by one), but it is a slow and cumbersome process and prone to errors. The method of sharing via PBS is not very useful to us due to the limitations aforementioned, it doesn't really provide any benefit compared to first sharing the teams via Rematch and after that directly sharing the scripts texts one by one, especially for a large collection of teams.

In conclusion, I think a better way of sharing teams along with their scripts with friends can be implemented. In my imagination, the most comfortable thing is that when I select a team or a group in rematch and select share or export, in the same way that checkboxes appear that allow me to select whether 'include preferences' or 'include notes', a checkbox appears that says 'include scripts', and if you select it the scripts will be shared. Then, when importing these teams, the addon must be able to understand whether the scripts are being passed or not and incorporate them correctly. The truth is that I don't know if this can be done only from the PBS addon, I guess some changes will also need to be made from Rematch side for this to work. Do you see it feasible?