# Catalog Field Value Set As Real

Grammar — Set value of catalog entry fieldPath for player player to value
FlagsAction

Sets the value of a field for an entry. To find the name of a field path, open the data editor and turn on View Raw Data. For example, if you wanted to set the unit for the first index of a train ability, your field path string would be “InfoArray[0].Unit”.

# Arguments

  • int<preset::CatalogType> — Catalog
  • string<catalogentry> — Entry
  • string<catalogfieldpath> — Field Path
  • int — Player
  • fixed — Value

Returns — bool

bool libNtve_gf_CatalogFieldValueSetAsReal(
	int lp_catalog,
	string lp_entry,
	string lp_fieldPath,
	int lp_player,
	fixed lp_value,
);

Category: Catalog / Support

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1782

    auto95ABF8B8_val = lp_operation;
    if (auto95ABF8B8_val == c_upgradeOperationAdd) {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value));
    }
    else if (auto95ABF8B8_val == c_upgradeOperationSubtract) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1785

    }
    else if (auto95ABF8B8_val == c_upgradeOperationSubtract) {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default - lp_value));
    }
    else if (auto95ABF8B8_val == c_upgradeOperationMultiply) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1788

    }
    else if (auto95ABF8B8_val == c_upgradeOperationMultiply) {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default * lp_value));
    }
    else if (auto95ABF8B8_val == c_upgradeOperationDivide) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1791

    }
    else if (auto95ABF8B8_val == c_upgradeOperationDivide) {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default / lp_value));
    }
    else if (auto95ABF8B8_val == c_upgradeOperationSet) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1794

    }
    else if (auto95ABF8B8_val == c_upgradeOperationSet) {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, lp_value);
    }
    else {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1797

    }
    else {
        return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value));
    }
}

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

        lv_supply += UnitGetPropertyFixed(lv_supplyunit, c_unitPropSuppliesUsed, c_unitPropCurrent);
    }
    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "CommanderPrestigeRaynorAir", "Modification.RateMultiplierArray[" + IntToString(1) + "]", lp_raynorPlayer, (1 + (lv_supply / 100)));
}

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

    lv_dehakaScaleResult = ((lv_dehakaCurrentLevel * lv_dehakaScalePerLevel) + lv_dehakaBaseScale);
    libNtve_gf_SendActorMessageToUnit(lp_dehakaUnit, libNtve_gf_SetScale(lv_dehakaScaleResult, lv_dehakaScaleResult, lv_dehakaScaleResult, 0.0));
    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "Radius", lp_dehakaPlayer, ((lv_dehakaCurrentLevel * 0.0625) + 0.5));
    lv_dehakaAttackDamageResult = (lv_dehakaAttackDamageBase + ((lv_dehakaCurrentLevel - 1) * lv_dehakaAttackDamagePerLevel));
    lv_dehakaTurnSpeed = (800.0 - (lv_dehakaCurrentLevel * 40.0));

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

    }

    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "TurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "StationaryTurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
    if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {

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


    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "TurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
    libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "StationaryTurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
    if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {
        libCOMI_gv_cM_DehakaEatReviveTimerAdjustment = ((lv_dehakaCurrentLevel * 1) - 24);

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

    if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {
        libCOMI_gv_cM_DehakaEatReviveTimerAdjustment = ((lv_dehakaCurrentLevel * 1) - 24);
        libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "DehakaDroneReviveTimerRefLink", "Amount", lp_dehakaPlayer, libCOMI_gv_cM_DehakaEatReviveTimerAdjustment);
        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_dehakaPlayer) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_dehakaPlayer) == 4)) && (lv_dehakaCurrentLevel >= 6) && (GameGetMissionTime() < 360.0)) {
            AchievementAward(lp_dehakaPlayer, "CommanderDehakaLevelUp");

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

                        CatalogFieldValueModify(c_gameCatalogEffect, "HornerMSOAttackSpeedDisplayDummy", "Amount", lp_player, FixedToString(lv_factionBonusAtkSpeedMulti, c_fixedPrecisionAny), c_upgradeOperationSet);
                        if ((TechTreeUpgradeCount(lp_player, "HHWidowMineDeathBlossom", c_techCountCompleteOnly) == 1)) {
                            libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, "HHWidowMineBurrowedAttack", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
                            libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "HHWidowMineAnimationController", "Duration", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
                        }

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

                        if ((TechTreeUpgradeCount(lp_player, "HHWidowMineDeathBlossom", c_techCountCompleteOnly) == 1)) {
                            libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, "HHWidowMineBurrowedAttack", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
                            libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "HHWidowMineAnimationController", "Duration", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
                        }
                        else {

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

        libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard = (lv_energyregenperroyalguardsupplylevel * libCOMI_gf_CM_Mengsk_SupplyLevel(libCOMI_gv_cM_Mengsk_VeteranUnits));
        lv_roundeddisplay = Round(libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard);
        libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenRoyalGuardDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay);
    }
    else {

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

        libCOMI_gv_cM_Mengsk_EnergyRegenTrooper = (lv_energyregenperpropagandaunit * UnitGroupCount(libCOMI_gv_cM_Mengsk_PropagandaUnits, c_unitCountAlive));
        lv_roundeddisplay = Round(libCOMI_gv_cM_Mengsk_EnergyRegenTrooper);
        libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenTrooperDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay);
    }
    else {

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

            for ( ; ( (auto063B4A4F_ai >= 0 && lv_itResourceType <= auto063B4A4F_ae) || (auto063B4A4F_ai < 0 && lv_itResourceType >= auto063B4A4F_ae) ) ; lv_itResourceType += auto063B4A4F_ai ) {
                lv_default = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", c_playerAny);
                libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", lp_player, CeilingI((lv_default*lv_changedFactor)));
            }
        }