# Save Data Table Value (Real)

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

Saves a real 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
  • fixed — Value

Returns — void

native void DataTableSetFixed(
	bool global,
	string name,
	fixed val,
);

Category: Data Table / Save Value

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:2562

    DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Name_C), lp_name);
    DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Suffix_C), lp_suffix);
    DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Base_C), lp_base);
    DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_PresentAsRatio_C), lp_presentasRatio);
    DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_GatedByBase_C), lp_gatedbyBase);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:2575

    DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Name_C), UserDataGetText("EndOfMatchMapSpecificAward", lp_userData, "Award Name", 1));
    DataTableSetText(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Suffix_C), UserDataGetText("EndOfMatchMapSpecificAward", lp_userData, "Description", 1));
    DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardInitialize_C, libGame_gv_eventParam_MapSpecificAwardInitialize_Base_C), UserDataGetFixed("EndOfMatchMapSpecificAward", lp_userData, "Base", 1));
    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)));
    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)));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:2642

    // Implementation
    DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Player_C), lp_player);
    DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_Value_C), lp_value);
    DataTableSetBool(false, TriggerEventParamName(libGame_gv_eventID_MapSpecificAwardUpdate_C, libGame_gv_eventParam_MapSpecificAwardUpdate_IsAdd_C), lp_isAdd);
    TriggerSendEvent(libGame_gv_eventID_MapSpecificAwardUpdate_C);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:3382

    // Implementation
    DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Player_C), lp_player);
    DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_CustomTryMeModeSetLevel_C, libGame_gv_eventParam_CustomTryMeModeSetLevel_Level_C), lp_level);
    TriggerSendEvent(libGame_gv_eventID_CustomTryMeModeSetLevel_C);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:4050

    DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Player_C), lp_player);
    DataTableSetInt(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_HeroID_C), lp_heroID);
    DataTableSetFixed(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_DebugXP_C), lp_debugXP);
    DataTableSetPoint(false, TriggerEventParamName(libGame_gv_eventID_ManualHeroSpawn_C, libGame_gv_eventParam_ManualHeroSpawn_Location), lp_location);
    TriggerSendEvent(libGame_gv_eventID_ManualHeroSpawn_C);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:20097

        for ( ; ( (auto06675179_ai >= 0 && lv_structureIndex <= auto06675179_ae) || (auto06675179_ai < 0 && lv_structureIndex >= auto06675179_ae) ) ; lv_structureIndex += auto06675179_ai ) {
            if ((UnitGetType(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex]) != "KingsCore")) {
                DataTableSetFixed(true, ("%BuildingScalingLifePercent%" + IntToString(UnitGetTag(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex]))), UnitGetPropertyFixed(libGame_gv_townTownData[lv_townIndex].lv_structureUnits[lv_structureIndex], c_unitPropLifePercent, c_unitPropCurrent));
            }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:476

        DataTableSetString(true, ("DMGStatTrackPlayer" + lv_reportPlayerAsStr + ":Effect" + IntToString(lv_itEntry)), "");
        DataTableSetInt(true, ("DMG" + lv_effectName + "Heroic:EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + "Heroic:DamageAttempted" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + "Heroic:DamageDone" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetInt(true, ("DMG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:477

        DataTableSetInt(true, ("DMG" + lv_effectName + "Heroic:EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + "Heroic:DamageAttempted" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + "Heroic:DamageDone" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetInt(true, ("DMG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + ":DamageAttempted" + IntToString(lp_reportPlayer)), 0.0);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:479

        DataTableSetFixed(true, ("DMG" + lv_effectName + "Heroic:DamageDone" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetInt(true, ("DMG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + ":DamageAttempted" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + ":DamageDone" + IntToString(lp_reportPlayer)), 0.0);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:480

        DataTableSetInt(true, ("DMG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + ":DamageAttempted" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetFixed(true, ("DMG" + lv_effectName + ":DamageDone" + IntToString(lp_reportPlayer)), 0.0);
    }
    TriggerDebugOutput(7, StringExternal("Param/Value/lib_Sprt_9950C0AA"), false);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:499

        DataTableSetString(true, ("HLGStatTrackPlayer" + lv_reportPlayerAsStr + ":Effect" + IntToString(lv_itEntry)), "");
        DataTableSetInt(true, ("HLG" + lv_effectName + "Heroic:EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("HLG" + lv_effectName + "Heroic:HealingDone" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetInt(true, ("HLG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("HLG" + lv_effectName + ":HealingDone" + IntToString(lp_reportPlayer)), 0.0);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:501

        DataTableSetFixed(true, ("HLG" + lv_effectName + "Heroic:HealingDone" + IntToString(lp_reportPlayer)), 0.0);
        DataTableSetInt(true, ("HLG" + lv_effectName + ":EffectCount" + IntToString(lp_reportPlayer)), 0);
        DataTableSetFixed(true, ("HLG" + lv_effectName + ":HealingDone" + IntToString(lp_reportPlayer)), 0.0);
    }
    DataTableSetInt(true, ("DMGStatTrackPlayer" + lv_reportPlayerAsStr + ":EffectInstanceCount"), 0);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:2510

    lv_damagingEffectCountAsStr = IntToString(DataTableGetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_damagingEffectPlayerAsStr)));
    DataTableSetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_damagingEffectPlayerAsStr), (DataTableGetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_damagingEffectPlayerAsStr)) + 1));
    DataTableSetFixed(true, (lv_lookupNamePrefix + ":DamageAttempted" + lv_damagingEffectPlayerAsStr), (DataTableGetFixed(true, (lv_lookupNamePrefix + ":DamageAttempted" + lv_damagingEffectPlayerAsStr)) + lv_damageAttempted));
    DataTableSetFixed(true, (lv_lookupNamePrefix + ":DamageDone" + lv_damagingEffectPlayerAsStr), (DataTableGetFixed(true, (lv_lookupNamePrefix + ":DamageDone" + lv_damagingEffectPlayerAsStr)) + lv_damageDone));
    return true;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:2511

    DataTableSetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_damagingEffectPlayerAsStr), (DataTableGetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_damagingEffectPlayerAsStr)) + 1));
    DataTableSetFixed(true, (lv_lookupNamePrefix + ":DamageAttempted" + lv_damagingEffectPlayerAsStr), (DataTableGetFixed(true, (lv_lookupNamePrefix + ":DamageAttempted" + lv_damagingEffectPlayerAsStr)) + lv_damageAttempted));
    DataTableSetFixed(true, (lv_lookupNamePrefix + ":DamageDone" + lv_damagingEffectPlayerAsStr), (DataTableGetFixed(true, (lv_lookupNamePrefix + ":DamageDone" + lv_damagingEffectPlayerAsStr)) + lv_damageDone));
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:2595

    lv_healingEffectCountAsStr = IntToString(DataTableGetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_healingEffectPlayerAsStr)));
    DataTableSetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_healingEffectPlayerAsStr), (DataTableGetInt(true, (lv_lookupNamePrefix + ":EffectCount" + lv_healingEffectPlayerAsStr)) + 1));
    DataTableSetFixed(true, (lv_lookupNamePrefix + ":HealingDone" + lv_healingEffectPlayerAsStr), (DataTableGetFixed(true, (lv_lookupNamePrefix + ":HealingDone" + lv_healingEffectPlayerAsStr)) + lv_healingDone));
    libGame_gv_scoreValues[lv_healingPlayer].lv_healing += FixedToInt(lv_healingDone);
    return true;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3513

    lv_changed = (lv_newDelta-lv_oldDelta);
    CatalogFieldValueModify(lp_catalog, lp_entry, lp_fieldPath, lp_player, FixedToString(lv_changed, c_fixedPrecisionAny), c_upgradeOperationAdd);
    DataTableSetFixed(true, lv_dataPath, lv_newDelta);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:25461

                lv_changedValue = (lv_oldValue*libCOMI_gv_c_TychusSpecialistTrainingAuraCooldownFactor/100);
                CatalogFieldValueModify(c_gameCatalogAbil, lv_itActive, lv_pathCooldown, lv_p, FixedToString(lv_changedValue, c_fixedPrecisionAny), c_upgradeOperationSubtract);
                DataTableSetFixed(true, ("TychusSpecialistTrainingAura_" + IntToString(UnitGetTag(lv_u)) + "_CooldownTimeChange"), lv_changedValue);
                lv_oldValue = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lv_itActive, lv_pathCharge, lv_p);
                lv_changedValue = (lv_oldValue*libCOMI_gv_c_TychusSpecialistTrainingAuraCooldownFactor/100);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:25465

                lv_changedValue = (lv_oldValue*libCOMI_gv_c_TychusSpecialistTrainingAuraCooldownFactor/100);
                CatalogFieldValueModify(c_gameCatalogAbil, lv_itActive, lv_pathCharge, lv_p, FixedToString(lv_changedValue, c_fixedPrecisionAny), c_upgradeOperationSubtract);
                DataTableSetFixed(true, ("TychusSpecialistTrainingAura_" + IntToString(UnitGetTag(lv_u)) + "_ChargeTimeChange"), lv_changedValue);
            }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5060

            lv_totalbasepossibilities += lv_basepossibilities;
            lv_targetpercentage = libCOMU_gf_CT_GetMutatorCountTargetPercentageAtDifficultyLevel(lv_mutatorcountiter, libCOMU_gf_CT_GetMutationDifficultyLevel());
            DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_TargetPercentage_", lv_mutatorcountiter), lv_targetpercentage);
            if ((lv_targetpercentage >= 0.0)) {
                lv_remainingpercentage -= lv_targetpercentage;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5068

            }
        }
        DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_TargetPercentage_", 0), MaxF(lv_remainingpercentage, 0.0));
        DataTableSetInt(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_Possibilities_", 0), lv_basepossibilities);
        autoD7B7EC40_ae = UserDataGetInt("MutationDifficultyLevels", libCOMU_gf_CT_GetMutationDifficultyLevel(), "MutatorsMax", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5076

            if ((lv_targetpercentage < 0.0) && (lv_remainingpercentage > 0.0) && (lv_totaluntargetedpossibilities > 0)) {
                lv_targetpercentage = (DataTableGetInt(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_Possibilities_", lv_mutatorcountiter)) / lv_totaluntargetedpossibilities * lv_remainingpercentage);
                DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_TargetPercentage_", lv_mutatorcountiter), lv_targetpercentage);
            }
            else if ((lv_targetpercentage < 0.0)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5080

            else if ((lv_targetpercentage < 0.0)) {
                lv_targetpercentage = 0.0;
                DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_TargetPercentage_", lv_mutatorcountiter), lv_targetpercentage);
            }
            lv_actualpercentage = (IntToFixed(DataTableGetInt(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_Possibilities_", lv_mutatorcountiter))) / IntToFixed(lv_totalbasepossibilities));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5083

            }
            lv_actualpercentage = (IntToFixed(DataTableGetInt(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_Possibilities_", lv_mutatorcountiter))) / IntToFixed(lv_totalbasepossibilities));
            DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_ActualPercentage_", lv_mutatorcountiter), lv_actualpercentage);
            if ((lv_actualpercentage > 0.0)) {
                DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_WeightMod_", lv_mutatorcountiter), (lv_targetpercentage / lv_actualpercentage));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5085

            DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_ActualPercentage_", lv_mutatorcountiter), lv_actualpercentage);
            if ((lv_actualpercentage > 0.0)) {
                DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_WeightMod_", lv_mutatorcountiter), (lv_targetpercentage / lv_actualpercentage));
            }
            else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5088

            }
            else {
                DataTableSetFixed(true, libCOMU_gf_CT_MutatorCountTableName("MutatorCount_WeightMod_", lv_mutatorcountiter), 0.0);
            }
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:8590

        if ((UnitGroupHasUnit(DataTableGetUnitGroup(true, ("CC_ScoreGroup_" + IntToString(lv_scoreIndex))), EventUnit()) == true) && (PlayerGroupHasPlayer(libCOOC_gf_NondefeatedPlayers(), EventUnitDamageSourcePlayer()) == true)) {
            lv_newScore = (DataTableGetFixed(true, ("CC_ScoreVal_" + IntToString(lv_scoreIndex) + "_" + IntToString(EventUnitDamageSourcePlayer()))) + EventUnitDamageAmount());
            DataTableSetFixed(true, ("CC_ScoreVal_" + IntToString(lv_scoreIndex) + "_" + IntToString(EventUnitDamageSourcePlayer())), lv_newScore);
            PlayerScoreValueSetFromInt(EventUnitDamageSourcePlayer(), (DataTableGetString(true, ("CC_ScoreType_" + IntToString(lv_scoreIndex)))), FixedToInt(lv_newScore));
        }