pokemon-showdown icon indicating copy to clipboard operation
pokemon-showdown copied to clipboard

[Feature Suggestion] The ability to save teams to some cloud (like dropbox)

Open benbot opened this issue 10 years ago • 56 comments

I think that would be a pretty cool feature. I'd be glad to put some work into something like that if you guys would want that kind of functionality.

benbot avatar Apr 12 '14 06:04 benbot

Accidentally clicked close. Sorry :3

benbot avatar Apr 12 '14 06:04 benbot

Wouldn't it be better just to save the teams to the server?

kotarou3 avatar Apr 12 '14 09:04 kotarou3

I don't know how much server space they have or if they want to use their own resources to hold the teams. If you store the data on another service then the responsibility of keeping that data secure and uncorrupted falls on dropbox... making the maintainer's lives easier.

benbot avatar Apr 12 '14 16:04 benbot

Well, the advantage of storing on Dropbox is that users would be able to manipulate the teams as normal files.

The advantage of storing on PS is that it's associated with the PS account with no need to link to an external service, and PS deduplication etc can be tuned to its own service.

I'll probably just store on PS, to make it seamless. But first we need to fix server load.

Zarel avatar Apr 12 '14 19:04 Zarel

Why not just symlink the teams folder into your Dropbox folder?

Protonk avatar Jun 05 '14 13:06 Protonk

That's what i ended up doing. I was just saying for the betterment of showdown.... integrated cloud storage.

benbot avatar Jun 05 '14 14:06 benbot

I actually do plan to add a feature to store teams on accounts.

Zarel avatar Jun 05 '14 22:06 Zarel

If you need any help with it just shoot me an email. I'll be more than glad to lend a hand.

benbot avatar Jun 06 '14 13:06 benbot

Um, how skilled at programming are you? I've been planning a refactor to save teams in the new packed team format instead of JSON; if you could do that for me that'd be pretty nice.

Zarel avatar Jun 06 '14 20:06 Zarel

I've been programming for about 8 years (mostly C and C++ but I know some JS). I'm in college atm. What's the new format?

benbot avatar Jun 07 '14 02:06 benbot

Time and skill are different. :P

https://github.com/Zarel/Pokemon-Showdown-Client/blob/101d67ea23d7a87c117338e341312c68bddd4aa0/js/storage.js#L64

I mean use this to pack the teams.

Zarel avatar Jun 07 '14 03:06 Zarel

That looks pretty straight forward. But why use this instead of JSON?

benbot avatar Jun 07 '14 15:06 benbot

It's a bit less than 1/3 the size of JSON, which probably already uses even less RAM than the actual object representation. Storing teams that aren't open in this format should save a huge amount of memory.

Zarel avatar Jun 08 '14 03:06 Zarel

Yeah that's quite a difference. So What exactly do you need done?

benbot avatar Jun 08 '14 03:06 benbot

Well, teams are currently saved in localStorage in JSON. The first step would be to change that over to the Storage.packTeam format. Be sure to make it backwards-compatible!

Zarel avatar Jun 08 '14 03:06 Zarel

So converting JSON to Sotrage.packTeam? Seems pretty straight forward.

benbot avatar Jun 08 '14 04:06 benbot

Yep. It's probably a good first task for you to do; get you used to coding for PS. The repository is:

https://github.com/Zarel/Pokemon-Showdown-Client

And you test with testclient.html.

Zarel avatar Jun 08 '14 04:06 Zarel

I'll get working on that tomorrow then.

benbot avatar Jun 08 '14 04:06 benbot

I've been lurking in the dev room for a while now and was looking to start contributing. I know this is an old issue, but is it something you guys are still wanting to do? If so, I'd be willing to give it a go.

scpinion avatar May 11 '15 13:05 scpinion

Sure, assuming you mean the Storage.packTeam implementation.

Zarel avatar May 12 '15 06:05 Zarel

Yes, implement the Stoarage.packTeam in the current teambuilder with backwards compatibility for JSON. At the moment, the tier and team name are not included in the packed format. Was this by design?

I do not have the knowledge/experience to implement something that would allow saving teams to the server, but I'm willing to learn.

scpinion avatar May 12 '15 11:05 scpinion

I have a bot capable of saving teams to its files and are able to send you the link to them after storing with a command. maybe this could relate to how this could be done?

Irraquated avatar Jun 23 '15 09:06 Irraquated

Hi @Zarel what's the status of this? I still get different teams depending on the browser session I use, even if I am logged in with my regular user.

The thing is that it's not very straightforward to import the team I have in other browser (in my laptop at home) when I am using Showdown in my mobile, because most of the time I don't have access to that browser session where I have my teams.

I ended up having an online file where I manually save my teams every now and then... but It's awful, would be nicer if they could be saved server-side, or integrate Dropbox for automatic synching (for that a timestamp-based logic could be used, in order to decide if there is new data or not) if you want to avoid the server load / storage possible problems.

Thanks!

itsjavi avatar Apr 03 '16 14:04 itsjavi

This is planned, but unlikely to happen particularly soon

Zarel avatar Apr 03 '16 22:04 Zarel

A suggestion: You could store the file on the dropbox account and on the PS server just store the link to this file. Probably wont take much server space. And then sync it regularly with the file. Also adding a functionality to change the file url could be an added bonus.

prayansh avatar Jun 25 '16 19:06 prayansh

wouldn't take much server space, but would take a lot of programming and I don't think it's the best solution here...

Zarel avatar Jun 26 '16 00:06 Zarel

It would be enough to be able to connect to Dropbox/Google Drive for backing up and restore all your teams in a plain text file (PS format), maybe a dump of what you have in the localStorage. It could be a first iteration of the feature.

@Zarel I could help with that with a Pull Request. Do you have any recommendations, like where to look at first in the code or what needs to be done first?. I will follow the readme, but maybe if you could throw some light on how to get started with this particular thing it could help me to find things easier. Thanks

itsjavi avatar Jul 12 '16 14:07 itsjavi

It should be in the client repository: Zarel/Pokemon-Showdown-Client

I still don't like this idea because external storage adds so much complication and another server I don't control that can go down etc etc

Zarel avatar Jul 13 '16 05:07 Zarel

This would be a nice "Premium feature". I'd be happy to pay a fee for this additional service. You could make it one time fee, yearly or monthly.

ghost avatar Dec 22 '16 10:12 ghost

We don't charge for features ever, so that's not really an option.

As a note for anyone reading the earlier conversation: Teams are now already stored packed.

Zarel avatar Dec 23 '16 09:12 Zarel