# Save Data Table Value (Integer)
Grammar — Save value as name in the scope|Global/Local data table
Flags —Native
|Action
Saves an integer 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 ] — Scopestring
— Nameint
— Value
Returns — void
native void DataTableSetInt(
bool global,
string name,
int val,
);
# Related
Category: Data Table / Save Value
- [F] —
void
— Save Data Table Value (Ability Command) — ( DataTableSetAbilCmd ) - [F] —
void
— Save Data Table Value (Actor) — ( DataTableSetActor ) - [F] —
void
— Save Data Table Value (Actor Scope) — ( DataTableSetActorScope ) - [F] —
void
— Save Data Table Value (AI Filter) — ( DataTableSetAIFilter ) - [F] —
void
— Save Data Table Value (Bank) — ( DataTableSetBank ) - [F] —
void
— Save Data Table Value (Boolean) — ( DataTableSetBool ) - [F] —
void
— Save Data Table Value (Byte) — ( DataTableSetByte ) - [F] —
void
— Save Data Table Value (Camera Object) — ( DataTableSetCameraInfo ) - [F] —
void
— Save Data Table Value (Cinematic) — ( DataTableSetCinematic ) - [F] —
void
— Save Data Table Value (Color) — ( DataTableSetColor ) - [F] —
void
— Save Data Table Value (Control) — ( DataTableSetControl ) - [F] —
void
— Save Data Table Value (Conversation) — ( DataTableSetConversation ) - [F] —
void
— Save Data Table Value (Conversation Reply) — ( DataTableSetReply ) - [F] —
void
— Save Data Table Value (Dialog) — ( DataTableSetDialog ) - [F] —
void
— Save Data Table Value (Dialog Item) — ( libNtve_gf_SaveDataTableValueDialogItem ) - [F] —
void
— Save Data Table Value (Difficulty Level) — ( libNtve_gf_SaveDataTableValueDifficultyLevel ) - [F] —
void
— Save Data Table Value (Doodad) — ( DataTableSetDoodad ) - [F] —
void
— Save Data Table Value (Integer) — ( DataTableSetInt ) - [F] —
void
— Save Data Table Value (Marker) — ( DataTableSetMarker ) - [F] —
void
— Save Data Table Value (Objective) — ( DataTableSetObjective ) - [F] —
void
— Save Data Table Value (Order) — ( DataTableSetOrder ) - [F] —
void
— Save Data Table Value (Ping) — ( DataTableSetPing ) - [F] —
void
— Save Data Table Value (Planet) — ( DataTableSetPlanet ) - [F] —
void
— Save Data Table Value (Player Color) — ( libNtve_gf_SaveDataTableValuePlayerColor ) - [F] —
void
— Save Data Table Value (Player Group) — ( DataTableSetPlayerGroup ) - [F] —
void
— Save Data Table Value (Point) — ( DataTableSetPoint ) - [F] —
void
— Save Data Table Value (Portrait) — ( DataTableSetPortrait ) - [F] —
void
— Save Data Table Value (Real) — ( DataTableSetFixed ) - [F] —
void
— Save Data Table Value (Region) — ( DataTableSetRegion ) - [F] —
void
— Save Data Table Value (Revealer) — ( DataTableSetRevealer ) - [F] —
void
— Save Data Table Value (Sound) — ( DataTableSetSound ) - [F] —
void
— Save Data Table Value (Sound Link) — ( DataTableSetSoundLink ) - [F] —
void
— Save Data Table Value (String) — ( DataTableSetString ) - [F] —
void
— Save Data Table Value (Text) — ( DataTableSetText ) - [F] —
void
— Save Data Table Value (Text Tag) — ( libNtve_gf_SaveDataTableValueTextTag ) - [F] —
void
— Save Data Table Value (Timer) — ( DataTableSetTimer ) - [F] —
void
— Save Data Table Value (Transmission) — ( DataTableSetTransmission ) - [F] —
void
— Save Data Table Value (Transmission Source) — ( DataTableSetTransmissionSource ) - [F] —
void
— Save Data Table Value (Trigger) — ( DataTableSetTrigger ) - [F] —
void
— Save Data Table Value (Unit) — ( DataTableSetUnit ) - [F] —
void
— Save Data Table Value (Unit Filter) — ( DataTableSetUnitFilter ) - [F] —
void
— Save Data Table Value (Unit Group) — ( DataTableSetUnitGroup ) - [F] —
void
— Save Data Table Value (Unit Reference) — ( DataTableSetUnitRef ) - [F] —
void
— Save Data Table Value (Wave) — ( DataTableSetWave ) - [F] —
void
— Save Data Table Value (Wave Info) — ( DataTableSetWaveInfo ) - [F] —
void
— Save Data Table Value (Wave Target) — ( DataTableSetWaveTarget )
# Examples
# campaigns/liberty.sc2campaign
// L8101
DataTableSetInt(true, lv_datatable_name, 9)
// L8104
DataTableSetInt(true, lv_datatable_name, 0)
// L8113
DataTableSetInt(true, lv_datatable_name, lv_current)
// L8124
DataTableSetInt(true, lv_datatable_name, lv_current)
// L8101
DataTableSetInt(true, lv_datatable_name, 9)
// L8104
DataTableSetInt(true, lv_datatable_name, 0)
// L8113
DataTableSetInt(true, lv_datatable_name, lv_current)
// L8124
DataTableSetInt(true, lv_datatable_name, lv_current)
# campaigns/swarmstory.sc2campaign
// L485
DataTableSetInt(true, lv_name, lp_uIItemID)
// L5900
DataTableSetInt(true, ("ZPrevStatus_" + (lv_indexMission)), libSwaC_gf_MissionStatusAge(lv_indexMission, libSwaC_ge_MissionStatus_Completed))
// L6393
DataTableSetInt(true, ("ZC_BestObj_" + (lp_objective)), lp_progress)
// L10006
DataTableSetInt(true, (libSwaC_gv_zSC_ArmyCategoryStateKey + (lp_armyCategory)), (lp_state))
// L10008
DataTableSetInt(true, (libSwaC_gv_zSC_ArmyCategoryStateKey + (libSwaC_gf_ZS_ArmyCategoryMorphCategory(lp_armyCategory, 1))), (lp_state))
// L10471
DataTableSetInt(true, (libSwaC_gv_zSC_ArmyUpgradeStateKey + (lp_armyUpgrade)), (lp_state))
// L10775
DataTableSetInt(true, (libSwaC_gv_zSC_ArmyUnitStateKey + (lp_armyUnit)), (lp_state))
// L10777
DataTableSetInt(true, (libSwaC_gv_zSC_ArmyUnitStateKey + (libSwaC_gf_ZS_ArmyUnitMorphUnit(lp_armyUnit, 1))), (lp_state))
// L15352
DataTableSetInt(true, ("DebugTechSaveArmyCategory_" + (lv_indexCategory)), (libSwaC_gf_ZS_StoryArmyCategoryState(lv_indexCategory)))
// L15357
DataTableSetInt(true, ("DebugTechSaveArmyUpgrade_" + (lv_indexUpgrade)), (libSwaC_gf_ZS_StoryArmyUpgradeState(lv_indexUpgrade)))
# campaigns/swarmstoryutil.sc2mod
// L6041
DataTableSetInt(true, lib281DEC45_gf_ZSS_UIArchivesDataTypeString(BattleReportLastCreated()), (lib281DEC45_ge_ZSS_UIArchivesType_Mission))
// L6078
DataTableSetInt(true, lib281DEC45_gf_ZSS_UIArchivesDataTypeString(BattleReportLastCreated()), (lib281DEC45_ge_ZSS_UIArchivesType_Mission))
// L6090
DataTableSetInt(true, lib281DEC45_gf_ZSS_UIArchivesDataTypeString(BattleReportLastCreated()), (lib281DEC45_ge_ZSS_UIArchivesType_Scene))
# campaigns/voidstory.sc2campaign
// L555
DataTableSetInt(true, ("DebugTechSaveArmyCategory_" + (lv_indexCategory)), (libVoiC_gf_PC_ArmyCategoryState(lv_indexCategory)))
// L3641
DataTableSetInt(true, ("PC_BestObj_" + (lp_objective)), lp_progress)
// L3650
DataTableSetInt(true, ("ZC_ArchiveObj_" + (lp_objective)), lp_progress)
// L3820
DataTableSetInt(true, ("PObjIndex_" + (lp_objective)), lv_index)
// L4666
DataTableSetInt(true, (libVoiC_gv_pCC_ArmyCategoryStateKey + (lp_armyCategory)), (lp_state))
// L5181
DataTableSetInt(true, (libVoiC_gv_pCC_ArmyUnitStateKey + (lp_armyUnit)), (lp_state))
// L8453
DataTableSetInt(true, lv_name, lp_uIItemID)
// L10688
DataTableSetInt(true, ("UnitMade_" + lv_iD), lv_previousValue)
// L10690
DataTableSetInt(true, ("MinSpent_" + lv_iD), (lv_previousValue+UnitTypeGetCost(UnitGetType(EventUnitCreatedUnit()), c_unitCostMinerals)))
// L10692
DataTableSetInt(true, ("VesSpent_" + lv_iD), (lv_previousValue+UnitTypeGetCost(UnitGetType(EventUnitCreatedUnit()), c_unitCostVespene)))
# campaigns/voidstory.sc2campaign
— VoidCampaignMissionLib.galaxy
// L436
DataTableSetInt(false, TriggerEventParamName(libVCMI_gv_pMC_SoATargetingEventExited, libVCMI_gv_pMC_SoATargetingParamReason), (lp_exitType))
// L4570
DataTableSetInt(false, TriggerEventParamName(libVCMI_gv_pMC_SoATargetingEventExited, libVCMI_gv_pMC_SoATargetingParamReason), (libVCMI_ge_SpearofAdunTargetingExitType_ByCanceling))
// L4574
DataTableSetInt(false, TriggerEventParamName(libVCMI_gv_pMC_SoATargetingEventExited, libVCMI_gv_pMC_SoATargetingParamReason), (libVCMI_ge_SpearofAdunTargetingExitType_ByFiring))
// L4635
DataTableSetInt(true, ("AbilUsed_" + (libVCMI_gv_pM_SoATargetingAbilityInstance)), (DataTableGetInt(true, ("AbilUsed_" + (libVCMI_gv_pM_SoATargetingAbilityInstance)))+1))
// L5098
DataTableSetInt(false, TriggerEventParamName(libVCMI_gv_pMC_SoATargetingEventExited, libVCMI_gv_pMC_SoATargetingParamReason), (libVCMI_ge_SpearofAdunTargetingExitType_ByFiring))
// L5102
DataTableSetInt(false, TriggerEventParamName(libVCMI_gv_pMC_SoATargetingEventExited, libVCMI_gv_pMC_SoATargetingParamReason), (libVCMI_ge_SpearofAdunTargetingExitType_ByCanceling))
// L7349
DataTableSetInt(true, ("AbilUsed_" + ("GPTier1Power1")), (DataTableGetInt(true, ("GPTier1Power1"))+1))
# campaigns/voidstory.sc2campaign
// L376
DataTableSetInt(false, (lv_typeString + "." + lv_instanceString + "." + lv_fieldString), UserDataGetInt(lv_userType, lv_userInstance, lv_userField, 1))
# campaigns/voidstory.sc2campaign
// L4366
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_MinValue), lp_minValue)
// L4367
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_MaxValue), lp_maxValue)
// L4368
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_OffsetX), lp_offsetX)
// L4369
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_OffsetY), lp_offsetY)
// L4429
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_CurValue), lp_value)
// L4440
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_OffsetX), lp_offsetX)
// L4441
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_OffsetY), lp_offsetY)
// L4461
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_MinValue), lp_minValue)
// L4462
DataTableSetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_MaxValue), lp_maxValue)
// L4653
DataTableSetInt(true, libVCUI_gf_PU_UnitProgressBar_Data(lp_unit, libVCUI_ge_PU_UnitProgressBarDataName_MinValue), lp_minValue)
# mods/core.sc2mod
// L2327
DataTableSetInt(lp_scope, lp_name, lp_value)
// L2333
DataTableSetInt(lp_scope, lp_name, lp_value)
// L2339
DataTableSetInt(lp_scope, lp_name, lp_value)
// L2345
DataTableSetInt(lp_scope, lp_name, lp_value)
// L1963
DataTableSetInt(lp_scope, lp_name, lp_value)
// L1969
DataTableSetInt(lp_scope, lp_name, lp_value)
// L1975
DataTableSetInt(lp_scope, lp_name, lp_value)
// L1981
DataTableSetInt(lp_scope, lp_name, lp_value)
# mods/heroes.stormmod
// L775
DataTableSetInt(true, ("ChangeHeroList" + IntToString(lv_itListItemIndex)), lv_itHeroIndex)
// L817
DataTableSetInt(true, ("ChangeHeroList" + IntToString(lv_itListItemIndex)), lv_itHeroIndex)
// L775
DataTableSetInt(true, ("ChangeHeroList" + IntToString(lv_itListItemIndex)), lv_itHeroIndex)
// L817
DataTableSetInt(true, ("ChangeHeroList" + IntToString(lv_itListItemIndex)), lv_itHeroIndex)
# mods/heroesbrawlmods/arenamodemods/arenamode.stormmod
// L162
DataTableSetInt(false, TriggerEventParamName(libAREN_gv_eventID_MapTributeWarning_C, libAREN_gv_eventParam_MapTributeWarning_Position_C), lp_position)
// L181
DataTableSetInt(false, TriggerEventParamName(libAREN_gv_eventID_MapTributeWarning_C2, libAREN_gv_eventParam_MapTributeWarning_Position_C2), lp_position)
// L223
DataTableSetInt(false, "ARENAMECHANIC_LASTREGISTERED", libAREN_gv_aRM_MechanicsCount)
# mods/heroesbrawlmods/arenamodemods/attackdefend.stormmod
// L719
DataTableSetInt(false, TriggerEventParamName(libAtDe_gv_eventID_AttackDefendRoundEnds_C, libAtDe_gv_eventParam_AttackDefendAttackingTeamScoreForRound_Team_C), lp_team)
# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod
// L788
DataTableSetInt(false, TriggerEventParamName(libPVEB_gv_eventID_NPCHeroSpawn_C, libPVEB_gv_eventParam_NPCHeroSpawn_Player_C), lp_player)
// L1651
DataTableSetInt(false, "LastCreatedPvEAttackWaveIndex", lv_waveIndex)
# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod
// L322
DataTableSetInt(false, "LastCreatedPvEAttackWaveIndex", lv_waveIndex)
// L995
DataTableSetInt(false, TriggerEventParamName(libPVEM_gv_pvEEventIDNPCHeroSpawn_C, libPVEM_gv_pvEEventParamNPCHeroSpawnPlayer_C), lp_player)
# mods/heroesdata.stormmod
// L852
DataTableSetInt(false, libAIAI_gv_defenderAILastCreatedDefenderAIIndex, lv_defenderAIIndex)
# mods/heroesdata.stormmod
// L463
DataTableSetInt(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurUltimateEvolutionEnded_C, libGDHL_gv_eventParam_AbathurUltimateEvolution_AbathurPlayer_C), lp_abathurPlayer)
// L489
DataTableSetInt(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurUltimateEvolutionHeroCopied_C, libGDHL_gv_eventParam_AbathurUltimateEvolutionHeroCopied_AbathurOwner_C), lp_ownerofAbathur)
// L490
DataTableSetInt(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurUltimateEvolutionHeroCopied_C, libGDHL_gv_eventParam_AbathurUltimateEvolutionHeroCopied_TargetOwner_C), lp_ownerofTarget)
// L515
DataTableSetInt(false, TriggerEventParamName(libGDHL_gv_eventID_AbathurSymbiote_C, libGDHL_gv_eventParam_AbathurSymbiote_AbathurPlayer_C), lp_abathurPlayer)
# mods/heroesdata.stormmod
// L1295
DataTableSetInt(false, libGame_gv_capturePointLastCreatedCapturePointIndex_C, libGame_gv_capturePointCurrentCount)
// L1496
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_DeathRecapSpecialCaseEvent_C, libGame_gv_eventParam_DeathRecapSpecialCaseEvent_Player_C), lp_player)
// L2641
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Player_C), lp_player)
// L3277
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_TryMeCustomButton1Pressed_C, libGame_gv_eventParam_TryMeCustomButton1Pressed_Player_C), lp_player)
// L3297
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CameraPannedFromScript_C, libGame_gv_eventParam_CameraPannedFromScript_Player_C), lp_player)
// L3322
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_CapturePointIndex_C), lp_capturePointIndex)
// L3323
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointChangesOwner_C, libGame_gv_eventParam_CapturePointChangesOwner_Owner_C), lp_owner)
// L3362
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CapturePointBecomesFullyOverCaptured_C, libGame_gv_eventParam_CapturePointBecomesFullyOverCaptured_CapturePointIndex_C), lp_capturePointIndex)
// L3381
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Player_C), lp_player)
// L3407
DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_DebugHeroSwapped_C, libGame_gv_eventParam_DebugHeroSwapped_Player_C), lp_player)
# mods/heroesdata.stormmod
// L540
DataTableSetInt(true, ("HeroIndex_" + IntToString(lp_heroIndex) + "_SkinCount"), lv_newSkinCount)
// L590
DataTableSetInt(true, ("HeroIndex_" + IntToString(lp_heroIndex) + "_MountCategoryCount"), 0)
// L595
DataTableSetInt(true, lv_mountCategoryCountStr, (DataTableGetInt(true, lv_mountCategoryCountStr) + 1))
// L600
DataTableSetInt(true, ("HeroIndex_" + lv_heroIndexStr + "_SkinCount"), 1)
// L610
DataTableSetInt(true, lv_mountCategoryCountStr, (DataTableGetInt(true, lv_mountCategoryCountStr) + 1))
// L620
DataTableSetInt(true, lv_voiceLineCountStr, 0)
// L626
DataTableSetInt(true, lv_voiceLineCountStr, (DataTableGetInt(true, lv_voiceLineCountStr) + 1))
// L1645
DataTableSetInt(true, "Mounts_MountCount", libCore_gv_dataMountsMountCount)
// L1646
DataTableSetInt(true, lv_mountCategoryCountStr, (DataTableGetInt(true, lv_mountCategoryCountStr) + 1))
// L1649
DataTableSetInt(true, (lv_mountDataTableStr + "_Index"), libCore_gv_dataMountsMountCount)
# mods/heroesdata.stormmod
// L475
DataTableSetInt(true, ("DMG" + lv_effectName + "Heroic:EffectCount" + IntToString(lp_reportPlayer)), 0)
// L478
DataTableSetInt(true, ("DMG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0)
// L498
DataTableSetInt(true, ("HLG" + lv_effectName + "Heroic:EffectCount" + IntToString(lp_reportPlayer)), 0)
// L500
DataTableSetInt(true, ("HLG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0)
// L503
DataTableSetInt(true, ("DMGStatTrackPlayer" + lv_reportPlayerAsStr + ":EffectInstanceCount"), 0)
// L504
DataTableSetInt(true, ("HLGStatTrackPlayer" + lv_reportPlayerAsStr + ":EffectInstanceCount"), 0)