# Save Data Table Value (Boolean)

Grammar — Save value as name in the scope|Global/Local data table
FlagsNative | Action

Saves a boolean value into a data table. Data tables allow you to store and recall values using a string identifier. If you save a data table value using a string identifier that already exists, you will overwrite the old value, even if it is a different data type than the value you are saving.

# Arguments

  • bool [ preset::DataScope ] — Scope
  • string — Name
  • bool — Value

Returns — void

native void DataTableSetBool(
	bool global,
	string name,
	bool val,
);

Category: Data Table / Save Value

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L3736
DataTableSetBool(true, (SoundLinkId(lp_soundLink)), true)
// L3785
DataTableSetBool(true, (SoundLinkId(lp_soundLink)), false)
// L3736
DataTableSetBool(true, (SoundLinkId(lp_soundLink)), true)
// L3785
DataTableSetBool(true, (SoundLinkId(lp_soundLink)), false)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L5605
DataTableSetBool(false, ((lv_indexMission) + "_Available"), false)
// L5615
DataTableSetBool(false, ((libSwaC_gf_StoryArmyCategoryEvolutionMission(libSwaC_gf_MissionArmyEvolutionUnlocked(lv_indexMission))) + "_Available"), true)
// L10045
DataTableSetBool(false, (lv_indexCategory), false)
// L10049
DataTableSetBool(false, ("SpineCrawler"), true)
// L10050
DataTableSetBool(false, ("SporeCrawler"), true)
// L10061
DataTableSetBool(false, (lv_missionCategory), true)
// L13892
DataTableSetBool(false, ((lv_indexMission) + "_Available"), false)
// L13902
DataTableSetBool(false, ((libSwaC_gf_StoryArmyCategoryEvolutionMission(libSwaC_gf_MissionArmyEvolutionUnlocked(lv_indexMission))) + "_Available"), true)

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L4765
DataTableSetBool(false, (lv_indexCategory), false)
// L4777
DataTableSetBool(false, (lv_missionCategory), true)
// L4784
DataTableSetBool(false, (lv_missionCategoryExtra), true)
// L5222
DataTableSetBool(false, (lv_indexCategory), false)
// L5247
DataTableSetBool(false, (lv_indexCategory2), true)

# mods/heroesdata.stormmod

GameLib.galaxy

// L2563
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C), lp_presentasRatio)
// L2564
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C), lp_gatedbyBase)
// L2576
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C), libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchMapSpecificAward", lp_userData, "Present as Ratio", 1)))
// L2577
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C), libNtve_gf_ConvertStringToBoolean(UserDataGetString("EndOfMatchMapSpecificAward", lp_userData, "Gated by Base", 1)))
// L2643
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_IsAdd_C), lp_isAdd)
// L3325
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_HasMercLordTalent_C), lp_hasMercLordTalent)
// L3606
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_HeroAIEndingCampAttack_C, libGame_gv_eventParam_HeroAIEndingCampAttack_Success_C), lp_success)
// L4091
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_RequestCustomRespawn_C, libGame_gv_eventParam_RequestCustomRespawn_RespawnMounted_C), lp_respawnMounted)
// L4246
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_CheckUnitForAbilityRedirect_C, libGame_gv_eventParam_CheckUnitForAbilityRedirect_Boolean_C), lp_boolean)
// L5108
DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_TalentPanelVisibilityChanged_C, libGame_gv_eventParam_TalentPanelVisibilityChanged_Visibility_C), lp_visible)

# mods/heroesdata.stormmod

HeroesLib.galaxy

// L597
DataTableSetBool(true, ("HeroIndex_" + lv_heroIndexStr + "_MountCategoryIndex_" + IntToString(DataTableGetInt(true, lv_mountCategoryCountStr)) + "_GrantedBySkin"), false)
// L612
DataTableSetBool(true, ("HeroIndex_" + lv_heroIndexStr + "_MountCategoryIndex_" + IntToString(DataTableGetInt(true, lv_mountCategoryCountStr)) + "_GrantedBySkin"), true)

# mods/missionpacks/campaigncommon.sc2mod

LibComC.galaxy

// L2184
DataTableSetBool(false, (lv_indexCategory), false)
// L2196
DataTableSetBool(false, (lv_missionCategory), true)
// L2205
DataTableSetBool(false, (lv_missionCategoryExtra), true)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L2388
DataTableSetBool(true, libCOMI_gf_CM_CoopAI_AttackForce_UseTransportName(lv_waypointIndex), false)
// L2391
DataTableSetBool(true, libCOMI_gf_CM_CoopAI_AttackForce_UseTransportName(lv_waypointIndex), true)
// L8280
DataTableSetBool(true, ("CM_RevealerOn_" + IntToString(libCOMI_gv_cM_RevealerCount)), true)
// L8290
DataTableSetBool(true, ("CM_RevealerOn_" + IntToString(libCOMI_gf_CM_RevealerIndex(lp_r))), (lp_enable == true))
// L19832
DataTableSetBool(true, ("CM_MTO_SkinApplied_" + (lv_skin) + "_" + IntToString(lv_player)), true)

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L3737
DataTableSetBool(true, libCOUI_gf_CU_UnitProgressBar_Data2(lp_unit), true)
// L3738
DataTableSetBool(true, libCOUI_gf_CU_UnitProgressBar_IsWideBarString(lp_unit), false)
// L3747
DataTableSetBool(true, libCOUI_gf_CU_UnitProgressBar_IsWideBarString(lp_unit), lp_isWideBar)
// L3844
DataTableSetBool(true, libCOUI_gf_CU_UnitProgressBar_Data2(lp_unit), (lp_showHide == true))

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L5584
DataTableSetBool(false, (lv_indexCategory), false)
// L5595
DataTableSetBool(false, (lv_missionCategory), true)