# Save Bank
Grammar — Save bank bank
Flags —Native
|Action
Saves the specified bank file, allowing you to access stored values later. If a bank is not saved, any changes made to it will be lost when the mission ends.
# Arguments
bank
— Bank
Returns — void
native void BankSave(bank b);
# Related
Category: Bank / Bank Management
- Open Bank —
bank
— BankLoad - Last Opened Bank —
bank
— BankLastCreated - Reload Bank —
void
— BankReload - Save Bank —
void
— BankSave - Preload Bank — macro
- Wait For Bank —
void
— BankWait
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:17655
BankLoad("DebugCinematic", 1);
BankValueSetFromInt(BankLastCreated(), "DebugCinematicShow", "Value", 0);
BankSave(BankLastCreated());
if ((gv_cinematicDebugValue == 0)) {
TriggerExecute(gt_Scene06ValerianIntro, true, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttutorial01.sc2map/MapScript.galaxy:936
BankValueSetFromFlag(BankLastCreated(), lv_section, IntToString((7)), gf_TutorialCompleted(7));
BankValueSetFromFlag(BankLastCreated(), lv_section, IntToString((0)), gf_TutorialCompleted(0));
BankSave(BankLastCreated());
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:17655
BankLoad("DebugCinematic", 1);
BankValueSetFromInt(BankLastCreated(), "DebugCinematicShow", "Value", 0);
BankSave(BankLastCreated());
if ((gv_cinematicDebugValue == 0)) {
TriggerExecute(gt_Scene06ValerianIntro, true, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttutorial01.sc2map — MapScript.galaxy:936
BankValueSetFromFlag(BankLastCreated(), lv_section, IntToString((7)), gf_TutorialCompleted(7));
BankValueSetFromFlag(BankLastCreated(), lv_section, IntToString((0)), gf_TutorialCompleted(0));
BankSave(BankLastCreated());
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:8479
libCamp_gf_TS_OpenCampaignBank();
libCamp_gf_TS_SaveTransitionVars(BankLastCreated(), false, false, false, libCamp_ge_TS_BankSavingType_Normal);
BankSave(BankLastCreated());
libCamp_gf_TS_SaveMissionBanks();
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:8584
}
libCamp_gf_TS_SaveTransitionVars(BankLastCreated(), lp_nextIsSimulation, lp_nextIsVictoryPlayAgain, lp_resultFromDefeat, lv_saveAll);
BankSave(BankLastCreated());
libCamp_gf_TS_SaveMissionBanks();
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:9477
lv_indexMission = libCamp_gv_tS_MapID[auto6A939711_i];
if ((libCamp_gv_tS_MissionBanks[(lv_indexMission)] != null)) {
BankSave(libCamp_gv_tS_MissionBanks[(lv_indexMission)]);
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:9513
lv_sectionName = libCamp_gf_TS_BankSectionName("ArcadeGame");
ConversationDataSaveStateValues("ArcadeGameVariables", BankLastCreated(), lv_sectionName);
BankSave(BankLastCreated());
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:9857
BankValueSetFromFlag(libCamp_gv_cP_Bank, ("CampaignCompleted"), "1", libCamp_gv_cPX_CampaignCompleted);
BankValueSetFromFlag(libCamp_gv_cP_Bank, ("CampaignCompleted"), "2", libCamp_gv_cPX_CampaignCompleted);
BankSave(libCamp_gv_cP_Bank);
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:11217
libCamp_gf_TS_SaveTransitionVars(BankLastCreated(), false, false, false, libCamp_ge_TS_BankSavingType_CreateMissionBank);
libCamp_gf_TS_SaveTransitionVars(BankLastCreated(), false, false, false, libCamp_ge_TS_BankSavingType_SaveSimulation);
BankSave(BankLastCreated());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13413
}
if ((libSwaC_gf_StoryMapTypeCheck(lp_nextMission, c_mapKindMission) == false)) {
BankSave(libSwaC_gv_zS_ArmyTechBank);
return ;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13442
autoDE125D20_ai = autoDE125D20_ai + 1;
}
BankSave(libSwaC_gv_zS_ArmyTechBank);
return ;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13466
auto009947F0_ai = auto009947F0_ai + 1;
}
BankSave(libSwaC_gv_zS_ArmyTechBank);
TextExpressionSetToken("Param/Expression/lib_SwaC_857D10FC", "A", StringToText(lv_bankPath));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_SwaC_857D10FC"), false);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13662
}
BankSave(libSwaC_gv_zS_ArchivesBank);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13777
}
BankSave(libSwaC_gv_zS_CampaignBank);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:13941
libSwaC_gf_ZS_OpenStoryBank();
UserDataSaveType("WriterStates", libSwaC_gf_StoryBank(), "WriterStateSnapshot");
BankSave(libSwaC_gf_StoryBank());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:19581
libSwaC_gf_ZS_SaveTransitionVarString(libSwaC_gv_zS_CampaignStatsBank, lv__SectionName, (IntToString(lv_missionIndex) + "-" + IntToString(lv_difficultyIndex)), libSwaC_gv_zSX_CamStatsWeaponArmorUpgrades, "");
libSwaC_gf_DispatchStoryEvent(libSwaC_ge_ZS_Event_StatisticsBankSave, "", "", true);
BankSave(libSwaC_gv_zS_CampaignStatsBank);
return true;
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:539
lv__SectionName = "Debug";
BankValueSetFromString(lv_storyBank, lv__SectionName, "DebugStoryScene", ("ScriptedScenes" + ";" + (lib281DEC45_gv_zSSX_DebugStoryScene)));
BankSave(lv_storyBank);
}
campaigns/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:8514
}
BankSave(libSwaC_gf_StoryBank());
return true;
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:5474
gv_tutorialProgress = 1;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:9445
gv_tutorialProgress = 2;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:15203
gv_tutorialProgress = 3;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:18960
gv_tutorialProgress = 4;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:5474
gv_tutorialProgress = 1;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:9445
gv_tutorialProgress = 2;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:15203
gv_tutorialProgress = 3;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:18960
gv_tutorialProgress = 4;
BankValueSetFromInt(gv_tutorialBankSave, "General", "Progress", gv_tutorialProgress);
BankSave(gv_tutorialBankSave);
}
else {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:870
libVoiC_gf_PC_OpenStoryBank();
BankValueSetFromFlag(libVoiC_gf_StoryBank(), "Debug", "StartedFirstStorymodeEpisode", lp_state);
BankSave(libVoiC_gf_StoryBank());
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7342
autoCDD6D710_ai = autoCDD6D710_ai + 1;
}
BankSave(libVoiC_gv_pC_ArmyTechBank);
return ;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7366
autoE0F96F5D_ai = autoE0F96F5D_ai + 1;
}
BankSave(libVoiC_gv_pC_ArmyTechBank);
TextExpressionSetToken("Param/Expression/lib_VoiC_6F0FF8BB", "A", StringToText(lv_bankPath));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_VoiC_6F0FF8BB"), false);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7512
}
BankSave(libVoiC_gv_pC_ArchivesBank);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7650
}
BankSave(libVoiC_gv_pC_CampaignBank);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7715
if ((libVoiC_gf_PC_MissionSectionExists(lv_indexMission) == true)) {
libVoiC_gf_PC_SaveArmyTechBank(libVoiC_gf_CurrentMap(), libVoiC_gv_pCX_IsSimulation);
BankSave(libVoiC_gv_pC_ArmyTechBank);
}
else {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:7840
libVoiC_gf_PC_OpenStoryBank();
UserDataSaveType("WriterStates", libVoiC_gf_StoryBank(), "WriterStateSnapshot");
BankSave(libVoiC_gf_StoryBank());
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:751
libVCST_gf_PS_SaveConversations(lv_storyBank, "StoryConversations");
lv__SectionName = "Misc";
BankSave(lv_storyBank);
}
mods/challenges.sc2mod — base.sc2data/LibChal.galaxy:1867
if ((libChal_gv_cHL_DefaultChallengeBank != null)) {
BankValueSetFromInt(libChal_gv_cHL_DefaultChallengeBank, libChal_gf_ChallengeName(lp_challengeType), libChal_gv_cHLC_KEYAWARD, (lp_award));
BankSave(libChal_gv_cHL_DefaultChallengeBank);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:12657
TriggerExecute(libStEx_gt_TrainingModeBankInit, true, false);
BankSave(libGame_gv_players[lv_itPlayer].lv_bankData.lv_bank);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:1368
lv_bankKey = (libStEx_gv_sE_TrainingModeBankkey_Tip_C + IntToString((lp_tip)));
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeTips[(lp_tip)].lv_doneTimes);
BankSave(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:2553
lv_bankKey = libStEx_gv_sE_TrainingModeBankkey_Talent_C;
BankValueSetFromFlag(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeTalentTaught);
BankSave(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank);
libGame_gv_xPTrickleEnabled = false;
TriggerExecute(libStEx_gt_SE_TrainingModeTalentsSuggestToOpenPanelQ, true, false);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:2844
lv_bankKey = libStEx_gv_sE_TrainingModeBankkey_RefCard_C;
BankValueSetFromInt(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank, libStEx_gv_sE_TrainingModeBankSection_C, lv_bankKey, libStEx_gv_sE_TrainingModeRefCardTimes);
BankSave(libGame_gv_players[libStEx_gv_sE_Player].lv_bankData.lv_bank);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:2033
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "TrueHeroIndex", DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, 1));
BankValueSetFromInt(lv_localBank, "Debug Menu Options", "TrueSkinIndex", libCore_gf_DataSkinsGetSkinIndexFromSkinLink((DataTableGetString(true, ("HeroIndex_" + IntToString(DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_heroDropdown, 1)) + "_SkinIndex_" + IntToString(DialogControlGetSelectedItem(libUIUI_gv_uIDebugPanel.lv_skinDropdown, 1)))))));
BankSave(lv_localBank);
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3401
auto3A10668D_ai = auto3A10668D_ai + 1;
}
BankSave(libComC_gv_cC_ArmyTechBank);
return ;
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3423
autoD0CDB671_ai = autoD0CDB671_ai + 1;
}
BankSave(libComC_gv_cC_ArmyTechBank);
TextExpressionSetToken("Param/Expression/lib_ComC_202D6D63", "A", StringToText(lv_bankPath));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_ComC_202D6D63"), false);
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3559
}
BankSave(libComC_gv_cC_ArchivesBank);
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3705
}
BankSave(libComC_gv_NC_CampaignBank);
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3755
if ((libComC_gf_NC_MissionSectionExists(lv_indexMission) == true)) {
libComC_gf_CC_SaveArmyTechBank(libComC_gf_CurrentMap(), libComC_gv_cCX_IsSimulation);
BankSave(libComC_gv_cC_ArmyTechBank);
}
else {
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:3823
libComC_gf_NC_OpenStoryBank();
UserDataSaveType("WriterStates", libComC_gf_CC_StoryBank(), "WriterStateSnapshot");
BankSave(libComC_gf_CC_StoryBank());
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:664
libNCST_gf_NS_SaveConversations(lv_storyBank, "StoryConversations");
lv__SectionName = "Misc";
BankSave(lv_storyBank);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:781
// Implementation
BankValueSetFromFlag(libComC_gf_CC_StoryBank(), "Debug", "StartedFirstStorymodeEpisode", lp_state);
BankSave(libComC_gf_CC_StoryBank());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4787
}
BankSave(libCOOC_gv_cC_CoopBank[lp_player]);
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:6511
}
BankSave(libA3DDD02B_gv_pC_ArchivesBank);
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:6623
}
BankSave(libA3DDD02B_gv_pP_CampaignBank);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:666
// Implementation
BankValueSetFromString(libWCdr_gv_w3CBank[lp_player], lp_section, lp_key, lp_value);
BankSave(libWCdr_gv_w3CBank[lp_player]);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:822
}
BankSave(libWCdr_gv_w3CBank[lp_player]);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:829
// Implementation
BankSectionRemove(libWCdr_gv_w3CBank[lp_player], lp_section);
BankSave(libWCdr_gv_w3CBank[lp_player]);
}