# Add Mission Archive

Grammar — Add a state type mission archive buttonText|Name for playerGroup
FlagsNative | Action

Adds a mission or scene to the mission archives panel for the specified players. Use “Last Created Mission Archive” to get the mission archive created through this action.

# Arguments

Returns — void

native int BattleReportCreate(
	playergroup inPlayerGroup,
	text inText,
	int inType,
	int inState,
);

Category: Story / Mission Archives Panel

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4169

    // Implementation
    lv_indexMission = (lp_mission);
    BattleReportCreate(PlayerGroupAll(), libCamp_gf_MissionNameInUpperCase(lp_mission), c_battleReportTypeMission, lp_state);
    libCamp_gv_tS_BattleReportMissions[lv_indexMission] = BattleReportLastCreated();
    BattleReportSetButtonImage(BattleReportLastCreated(), libCamp_gv_tS_MissionBattleReportIcon[(lp_mission)]);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4255

    if ((libCamp_gf_TS_GameFullyDownloaded() == false) && (lp_scene != libCamp_ge_SceneID_ScenePreRenderedTheDream) && (lp_scene != libCamp_ge_SceneID_ScenePreRenderedOldRivals) && (lp_scene != libCamp_ge_SceneID_ScenePreRenderedEnd) && (lp_scene != libCamp_ge_SceneID_ScenePreRenderedBetterMarine)) {
        TextExpressionSetToken("Param/Expression/lib_Camp_880903F1", "SCENENAME", libCamp_gv_tS_SceneNames[lv_indexScene]);
        BattleReportCreate(PlayerGroupAll(), TextExpressionAssemble("Param/Expression/lib_Camp_880903F1"), c_battleReportTypeScene, c_battleReportStateCompleted);
    }
    else {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4258

    }
    else {
        BattleReportCreate(PlayerGroupAll(), libCamp_gv_tS_SceneNames[lv_indexScene], c_battleReportTypeScene, c_battleReportStateCompleted);
    }
    libCamp_gv_tS_BattleReportScenes[lv_indexScene] = BattleReportLastCreated();

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6032

        if (CatalogFieldValueGet(c_gameCatalogMap, lv_mission, "Kind", 1) == "Mission") {
            if ((libSwaC_gf_MissionStatusCheck(lv_mission, libSwaC_ge_MissionStatus_Completed) == true)) {
                BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StoryMapName(lv_mission), c_battleReportTypeMission, c_battleReportStateCompleted);
                BattleReportSetPriority(BattleReportLastCreated(), lib281DEC45_gf_ZSS_UIArchivesMissionPriority(lv_mission));
                BattleReportSetDifficultyLevelCompleted(BattleReportLastCreated(), 1, true);

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6038

            }
            else {
                BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StoryMapName(lv_mission), c_battleReportTypeMission, c_battleReportStateHidden);
            }
            DataTableSetString(true, lib281DEC45_gf_ZSS_UIArchivesDataString(BattleReportLastCreated()), (lv_mission));

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6059

            if (((lib281DEC45_gv_zSS_CampaignComplete == true) || (libSwaC_gf_MissionStatusCheck(lv_mission, libSwaC_ge_MissionStatus_Completed) == true))) {
                if ((libSwaC_gf_MissionStatusCheck(lv_mission, libSwaC_ge_MissionStatus_Completed) == true)) {
                    BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StoryMapName(lv_mission), c_battleReportTypeMission, c_battleReportStateCompleted);
                }
                else {

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6062

                }
                else {
                    BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StoryMapName(lv_mission), c_battleReportTypeMission, c_battleReportStateNormal);
                }
                BattleReportSetPriority(BattleReportLastCreated(), lib281DEC45_gf_ZSS_UIArchivesMissionPriority(lv_mission));

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6068

            }
            else {
                BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StoryMapName(lv_mission), c_battleReportTypeMission, c_battleReportStateHidden);
            }
            if ((lib281DEC45_gv_zSS_CampaignComplete == false) && (lv_defaultSelection == true) && (lib281DEC45_gf_ZSS_UIArchivesMissionPriority(lv_mission) <= lv_bestPriority)) {

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:6087

        lv_scene = UserDataInstance("Scenes", auto0B56D757_ai);
        if ((lib281DEC45_gf_ZSS_UIArchivesScenePriority(lv_scene) < 1000)) {
            BattleReportCreate(PlayerGroupAll(), libSwaC_gf_StorySceneName(lv_scene), c_battleReportTypeScene, c_battleReportStateCompleted);
            BattleReportSetPriority(BattleReportLastCreated(), lib281DEC45_gf_ZSS_UIArchivesScenePriority(lv_scene));
            DataTableSetString(true, lib281DEC45_gf_ZSS_UIArchivesDataString(BattleReportLastCreated()), ("Scenes" + ";" + (lv_scene)));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:6990


            if ((libVoiC_gf_MissionStatusCheck(lv_indexMission, libVoiC_ge_MissionStatus_Completed) == true)) {
                BattleReportCreate(PlayerGroupAll(), libVoiC_gf_PC_CampaignMapName(lv_indexMission), c_battleReportTypeMission, c_battleReportStateCompleted);
                BattleReportSetPriority(BattleReportLastCreated(), libVCUI_gf_PU_ArchivesMissionPriority(lv_indexMission));
                BattleReportSetDifficultyLevelCompleted(BattleReportLastCreated(), 1, true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:6996

            }
            else {
                BattleReportCreate(PlayerGroupAll(), libVoiC_gf_PC_CampaignMapName(lv_indexMission), c_battleReportTypeMission, c_battleReportStateHidden);
            }
            DataTableSetString(true, libVCUI_gf_PU_ArchivesDataString(BattleReportLastCreated()), (lv_indexMission));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7014

        lv_indexScene = UserDataInstance("Scenes", auto50C6B8D0_ai);
        if ((libVCUI_gf_PU_ArchivesScenePriority(lv_indexScene) < 1000)) {
            BattleReportCreate(PlayerGroupAll(), libVoiC_gf_StorySceneName(lv_indexScene), c_battleReportTypeScene, c_battleReportStateCompleted);
            BattleReportSetPriority(BattleReportLastCreated(), libVCUI_gf_PU_ArchivesScenePriority(lv_indexScene));
            DataTableSetString(true, libVCUI_gf_PU_ArchivesDataString(BattleReportLastCreated()), ("Scenes;" + (lv_indexScene)));

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:4233

        if (CatalogFieldValueGet(c_gameCatalogMap, lv_indexMission, "Kind", 1) == "Mission" && libComC_gf_CC_MapInternal(lv_indexMission) == false) {
            if ((libComC_gf_MissionStatusCheck(lv_indexMission, libComC_ge_MissionStatus_Completed) == true)) {
                BattleReportCreate(PlayerGroupAll(), libComC_gf_CC_MapName(lv_indexMission), c_battleReportTypeMission, c_battleReportStateCompleted);
                BattleReportSetPriority(BattleReportLastCreated(), libNCUI_gf_NU_ArchivesMissionPriority(lv_indexMission));
                BattleReportSetDifficultyLevelCompleted(BattleReportLastCreated(), 1, true);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:4239

            }
            else {
                BattleReportCreate(PlayerGroupAll(), libComC_gf_CC_MapName(lv_indexMission), c_battleReportTypeMission, c_battleReportStateHidden);
            }
            DataTableSetString(true, libNCUI_gf_NU_ArchivesDataString(BattleReportLastCreated()), (lv_indexMission));

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:4257

        lv_indexScene = UserDataInstance("Scenes", auto75248FC1_ai);
        if ((libNCUI_gf_NU_ArchivesScenePriority(lv_indexScene) < 1000)) {
            BattleReportCreate(PlayerGroupAll(), libComC_gf_CC_SceneName(lv_indexScene), c_battleReportTypeScene, c_battleReportStateCompleted);
            BattleReportSetPriority(BattleReportLastCreated(), libNCUI_gf_NU_ArchivesScenePriority(lv_indexScene));
            DataTableSetString(true, libNCUI_gf_NU_ArchivesDataString(BattleReportLastCreated()), ("Scenes;" + (lv_indexScene)));

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9649

        lv_indexMission = CatalogEntryGet(c_gameCatalogMap, autoAEABAC17_ai);
        if (CatalogFieldValueGet(c_gameCatalogMap, lv_indexMission, "Kind", 1) == "Mission") {
            BattleReportCreate(PlayerGroupAll(), libA3DDD02B_gf_StoryMapName(lv_indexMission), c_battleReportTypeMission, c_battleReportStateCompleted);
            BattleReportSetPriority(BattleReportLastCreated(), libA3DDD02B_gf_PP_ArchivesMissionPriority(lv_indexMission));
            BattleReportSetDifficultyLevelCompleted(BattleReportLastCreated(), 1, true);

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:9667

        lv_indexScene = UserDataInstance("Scenes", auto205510F4_ai);
        if ((libA3DDD02B_gf_PP_ArchivesScenePriority(lv_indexScene) < 1000)) {
            BattleReportCreate(PlayerGroupAll(), libA3DDD02B_gf_StorySceneName(lv_indexScene), c_battleReportTypeScene, c_battleReportStateCompleted);
            BattleReportSetPriority(BattleReportLastCreated(), libA3DDD02B_gf_PP_ArchivesScenePriority(lv_indexScene));
            DataTableSetString(true, libA3DDD02B_gf_PP_ArchivesDataString(BattleReportLastCreated()), ("Scenes;" + (lv_indexScene)));