/// <summary>
        /// Starts to download a GameJolt save.
        /// </summary>
        /// <param name="GameJoltID">The GameJolt ID of the save to download.</param>
        /// <param name="MainSave">If this save is a main save download. Disable this flag to also download additional data.</param>
        public void DownloadSave(string GameJoltID, bool MainSave)
        {
            _gameJoltID    = GameJoltID;
            DownloadFailed = false;

            //Fill fields to contain as many items as items to download.
            _downloadedFlags.Clear();
            for (var i = 1; i <= SAVEFILECOUNT + EXTRADATADOWNLOADCOUNT; i++)
            {
                _downloadedFlags.Add(false);
            }

            AchievedEmblems.Clear();

            Apricorns      = "";
            Berries        = "";
            Box            = "";
            Daycare        = "";
            ItemData       = "";
            Items          = "";
            NPC            = "";
            Options        = "";
            Party          = "";
            Player         = "";
            Pokedex        = "";
            Register       = "";
            HallOfFame     = "";
            SecretBase     = "";
            RoamingPokemon = "";
            Statistics     = "";

            Friends = "";
            if (MainSave == true)
            {
                BaseGTSSetupScreen.BaseGTSEditTradeScreen.BaseSelectFriendScreen.Clear();
                //Clear temp friends
            }

            APICall APIPublicCall = new APICall(GotPublicKeys);

            APIPublicCall.GetKeys(false, "saveStorageV" + VERSION + "|" + GameJoltID + "|*");

            APICall APIPrivateCall = new APICall(GotPrivateKeys);

            APIPrivateCall.GetKeys(true, "saveStorageV" + VERSION + "|" + GameJoltID + "|*");

            if (MainSave == true)
            {
                Emblem.GetAchievedEmblems();
            }

            APICall APIFriendsCall = new APICall(SaveFriends);

            APIFriendsCall.FetchFriendList(GameJoltID);

            APICall APISentCall = new APICall(SaveSentRequests);

            APISentCall.FetchSentFriendRequest();

            APICall APIReceivedCall = new APICall(SaveReceivedRequests);

            APIReceivedCall.FetchReceivedFriendRequests();

            if (MainSave == true)
            {
                Thread t = new Thread(DownloadSpriteSub);
                t.IsBackground = true;
                t.Start();
            }
        }
 private void DownloadSpriteSub()
 {
     DownloadedSprite = Emblem.GetOnlineSprite(GameJoltID);
 }
        private string GetPlayerData()
        {
            GameMode GameMode = GameModeManager.ActiveGameMode;

            string ot = GameJoltID;

            while (ot.Length < 5)
            {
                ot = "0" + ot;
            }

            string s = "Name|" + API.Username + Environment.NewLine + "Position|1,0.1,3" + Environment.NewLine + "MapFile|yourroom.dat" + Environment.NewLine + "Rotation|1.570796" + Environment.NewLine + "RivalName|???" + Environment.NewLine + "Money|3000" + Environment.NewLine + "Badges|0" + Environment.NewLine + "Gender|Male" + Environment.NewLine + "PlayTime|0,0,0" + Environment.NewLine + "OT|" + ot + Environment.NewLine + "Points|0" + Environment.NewLine + "hasPokedex|0" + Environment.NewLine + "hasPokegear|0" + Environment.NewLine + "freeCamera|1" + Environment.NewLine + "thirdPerson|0" + Environment.NewLine + "skin|" + Emblem.GetPlayerSpriteFile(1, Core.GameJoltSave.GameJoltID, Core.GameJoltSave.Gender) + Environment.NewLine + "location|Your Room" + Environment.NewLine + "battleAnimations|2" + Environment.NewLine + "BoxAmount|5" + Environment.NewLine + "LastRestPlace|yourroom.dat" + Environment.NewLine + "LastRestPlacePosition|1,0.1,3" + Environment.NewLine + "DiagonalMovement|0" + Environment.NewLine + "RepelSteps|0" + Environment.NewLine + "LastSavePlace|yourroom.dat" + Environment.NewLine + "LastSavePlacePosition|1,0.1,3" + Environment.NewLine + "Difficulty|" + GameModeManager.GetActiveGameRuleValueOrDefault("Difficulty", 0) + Environment.NewLine + "BattleStyle|0" + Environment.NewLine + "saveCreated|" + GameController.GAMEDEVELOPMENTSTAGE + " " + GameController.GAMEVERSION + Environment.NewLine + "LastPokemonPosition|999,999,999" + Environment.NewLine + "DaycareSteps|0" + Environment.NewLine + "GameMode|Kolben" + Environment.NewLine + "PokeFiles|" + Environment.NewLine + "VisitedMaps|yourroom.dat" + Environment.NewLine + "TempSurfSkin|Hilbert" + Environment.NewLine + "Surfing|0" + Environment.NewLine + "ShowModels|1" + Environment.NewLine + "GTSStars|4" + Environment.NewLine + "SandBoxMode|0" + Environment.NewLine + "EarnedAchievements|";

            return(s);
        }