public override void Save(XElement element)
        {
            element.Add(new XAttribute("campaignid", CampaignID));
            XElement modeElement = new XElement("MultiPlayerCampaign",
                                                new XAttribute("money", Money),
                                                new XAttribute("purchasedlostshuttles", PurchasedLostShuttles),
                                                new XAttribute("purchasedhullrepairs", PurchasedHullRepairs),
                                                new XAttribute("purchaseditemrepairs", PurchasedItemRepairs),
                                                new XAttribute("cheatsenabled", CheatsEnabled));

            CampaignMetadata?.Save(modeElement);
            Map.Save(modeElement);
            CargoManager?.SavePurchasedItems(modeElement);
            UpgradeManager?.SavePendingUpgrades(modeElement, UpgradeManager?.PendingUpgrades);

            if (petsElement != null)
            {
                modeElement.Add(petsElement);
            }

            // save bots
            CrewManager.SaveMultiplayer(modeElement);

            // save available submarines
            XElement availableSubsElement = new XElement("AvailableSubs");

            for (int i = 0; i < GameMain.NetLobbyScreen.CampaignSubmarines.Count; i++)
            {
                availableSubsElement.Add(new XElement("Sub", new XAttribute("name", GameMain.NetLobbyScreen.CampaignSubmarines[i].Name)));
            }
            modeElement.Add(availableSubsElement);

            element.Add(modeElement);

            //save character data to a separate file
            string    characterDataPath = GetCharacterDataSavePath();
            XDocument characterDataDoc  = new XDocument(new XElement("CharacterData"));

            foreach (CharacterCampaignData cd in characterData)
            {
                characterDataDoc.Root.Add(cd.Save());
            }
            try
            {
                characterDataDoc.SaveSafe(characterDataPath);
            }
            catch (Exception e)
            {
                DebugConsole.ThrowError("Saving multiplayer campaign characters to \"" + characterDataPath + "\" failed!", e);
            }

            lastSaveID++;
            DebugConsole.Log("Campaign saved, save ID " + lastSaveID);
        }