# Catalog Field Value Get As Real

Grammar — Value of catalog entry fieldPath for player player as an real
FlagsFunction

Returns the value of a field for an entry as an real. Use catalog lookup functions to retrieve a data value or other information from the game data. To find the name of a field path, open the data editor and turn on View Raw Data. For example, if you wanted to get 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

Returns — fixed

fixed libNtve_gf_CatalogFieldValueGetAsReal(
	int lp_catalog,
	string lp_entry,
	string lp_fieldPath,
	int lp_player,
);

Category: Catalog / Lookup

# Examples

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


    // Variable Initialization
    lv_default = libNtve_gf_CatalogFieldValueGetAsReal(lp_catalog, lp_entry, lp_fieldPath, c_playerAny);

    // Implementation

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

    lv_dataPath = (libCOMI_gv_catalogAdditiveBonusPrefix + "_" + IntToString((lp_catalog)) + "_" + (lp_entry) + "_" + lp_label + "_" + (lp_fieldPath));
    lv_oldDelta = DataTableGetFixed(true, lv_dataPath);
    lv_defaultValue = libNtve_gf_CatalogFieldValueGetAsReal(lp_catalog, lp_entry, lp_fieldPath, c_playerAny);

    // Implementation

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

        if ((CatalogFieldValueGetAsInt(c_gameCatalogBehavior, lv_b, "BehaviorCategories[" + IntToString(c_unitBehaviorFlagFast) + "]", c_playerAny) == 1)) {
            lv_behaviorplayer = UnitBehaviorEffectPlayer(lp_parent, lv_b, c_effectPlayerOrigin, 0);
            lv_totaldmgmultiplier += (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.DamageDealtFraction[" + IntToString(0) + "]", lv_behaviorplayer) * lv_bstackcount);
            lv_totalattackratemultiplier *= Pow(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.AttackSpeedMultiplier", lv_behaviorplayer), lv_bstackcount);
        }

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

            lv_behaviorplayer = UnitBehaviorEffectPlayer(lp_parent, lv_b, c_effectPlayerOrigin, 0);
            lv_totaldmgmultiplier += (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.DamageDealtFraction[" + IntToString(0) + "]", lv_behaviorplayer) * lv_bstackcount);
            lv_totalattackratemultiplier *= Pow(libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, lv_b, "Modification.AttackSpeedMultiplier", lv_behaviorplayer), lv_bstackcount);
        }

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

    // Automatic Variable Declarations
    // Variable Initialization
    lv_moveSpeedHastePerStack = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "AvengingProtocolMoveSpeedDummy", "Amount", lp_player);
    lv_attackSpeedHastePerStack = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "AvengingProtocolAttackSpeedDummy", "Amount", lp_player);

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

    // Variable Initialization
    lv_moveSpeedHastePerStack = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "AvengingProtocolMoveSpeedDummy", "Amount", lp_player);
    lv_attackSpeedHastePerStack = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "AvengingProtocolAttackSpeedDummy", "Amount", lp_player);

    // Implementation

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

    // Variable Initialization
    lv_itWeapons = "";
    lv_bonusMulti = ((100+libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, libCOMI_gv_cM_HornerStatBonus, "Amount", lp_player))/100);

    // Implementation

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


    // Variable Initialization
    lv_smallestCooldown = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, "HHBomberPlatformAreaBombTopBarDummyTimer", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player);

    // Implementation

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

    lv_catalog = c_gameCatalogUnit;
    lv_kerriganplayer = libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("ZergKerrigan", libCOOC_gf_CommanderPlayers());
    lv_attackspeedmultiplier = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "KerriganMalignantCreepAttackSpeedDummy", "Amount", lv_kerriganplayer);
    lv_liferegenrate = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "KerriganMalignantCreepLifeRegenDummy", "Amount", lv_kerriganplayer);

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

    lv_kerriganplayer = libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("ZergKerrigan", libCOOC_gf_CommanderPlayers());
    lv_attackspeedmultiplier = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "KerriganMalignantCreepAttackSpeedDummy", "Amount", lv_kerriganplayer);
    lv_liferegenrate = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "KerriganMalignantCreepLifeRegenDummy", "Amount", lv_kerriganplayer);

    // Implementation

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


    // Variable Initialization
    lv_baseenergyregen = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogUnit, "CoopCasterMengsk", "EnergyRegenRate", c_playerAny);
    lv_bonusenergyregenfactor = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "TopbarMengskBonusRegenFactorDummy", "Amount", UnitGetOwner(lp_mengskGlobalCaster));
    lv_moralecappedremindercooldown = 120.0;

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

        }
        else if ((UnitTypeTestAttribute(UnitTypeFromString(lv_stringUnitID), c_unitAttributeStructure) == true)) {
            if ((libCOOC_gf_CC_UnitTypeIsTownHall((lv_stringUnitID)) == true) && (libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogUnit, (lv_stringUnitID), "Speed", c_playerAny) <= 0.0)) {
                lv_sightRange = libCOMI_gf_MinimumDifficultyValueCoopReal(9.0, 9.0, 7.0, 7.0, 7.0, 7.0);
            }

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

    }

    libCOOC_gv_cC_ScoreTychusHERCImpactDuration[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))] += libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogBehavior, "TychusHercGrappleImpactStun", "Duration", UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)));
    PlayerScoreValueSetFromInt(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), "TychusHERCImpactDuration", FixedToInt(libCOOC_gv_cC_ScoreTychusHERCImpactDuration[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))]));
    return true;

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

    }

    libCOOC_gv_cC_ScoreTychusMarauderHeal[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))] += (UnitGetPropertyFixed(EventPlayerEffectUsedUnit(c_effectUnitTarget), c_unitPropLifeMax, c_unitPropCurrent) * libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, EventPlayerEffectUsed(), "VitalArray[" + IntToString(0) + "].ChangeFraction", UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))));
    PlayerScoreValueSetFromInt(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), "TychusMarauderHeal", FixedToInt(libCOOC_gv_cC_ScoreTychusMarauderHeal[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))]));
    return true;

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

    }

    libCOOC_gv_cC_ScoreTychusMedicHeal[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))] += libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, EventPlayerEffectUsed(), "VitalArray[" + IntToString(0) + "].Change", UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)));
    PlayerScoreValueSetFromInt(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)), "TychusMedicHeal", FixedToInt(libCOOC_gv_cC_ScoreTychusMedicHeal[UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster))]));
    return true;

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicTactical.galaxy:100

    // Variable Initialization
    lv_index = MinI((CatalogFieldValueCount(c_gameCatalogAbil, lp_abil, "Range", lp_owner)-1), lp_level);
    lv_range = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lp_abil, "Range[" + IntToString(lv_index) + "]", lp_owner);

    // Implementation

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicTactical.galaxy:118

    // Variable Initialization
    lv_index = (CatalogFieldValueCount(c_gameCatalogEffect, ((lp_abil) + "@Search"), "AreaArray", lp_owner)-1);
    lv_radius = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, (((lp_abil) + "@Search")), "AreaArray[" + IntToString(lv_index) + "].Radius", lp_owner);

    // Implementation

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicTactical.galaxy:136

    // Variable Initialization
    lv_index = MinI((CatalogFieldValueCount(c_gameCatalogAbil, lp_abil, "Cost", lp_owner)-1), lp_level);
    lv_mana = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lp_abil, (("Cost[" + IntToString(lv_index) + "].Vital[Energy]")), lp_owner);

    // Implementation

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicTactical.galaxy:348

    }

    lv_radius = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, (((lp_abil) + "@Search")), "AreaArray[" + IntToString(0) + "].Radius", lp_owner);
    lv_radius += UnitGetPropertyFixed(lp_aIUnit, c_unitPropRadius, c_unitPropCurrent);
    AISetFilterRange(lv_rangeFilter, lp_aIUnit, lv_radius);