# Catalog Reference Get As Real

Grammar — Value of reference 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

  • string<reference> — Reference
  • int — Player

Returns — fixed

fixed libNtve_gf_CatalogReferenceGetAsReal(
	string lp_reference,
	int lp_player,
);

Category: Catalog / Lookup

# Examples

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

    // Variable Initialization
    lv_ref = lp_reference;
    lv_default = libNtve_gf_CatalogReferenceGetAsReal(lv_ref, c_playerAny);

    // Implementation

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

    lv_essenceCountStored = FixedToInt(UnitGetCustomValue(EventPlayerEffectUsedUnit(c_effectUnitCaster), 63));
    lv_player = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
    lv_heal = (lv_essenceCountStored*libNtve_gf_CatalogReferenceGetAsReal("Effect,DehakaHealAmountPerEssenceDummy,Amount", lv_player));
    lv_extraLife = (lv_essenceCountStored*libNtve_gf_CatalogReferenceGetAsReal("Effect,DehakaMaxLifeAmountPerEssenceDummy,Amount", lv_player));
    lv_collectorUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);

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

    lv_player = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
    lv_heal = (lv_essenceCountStored*libNtve_gf_CatalogReferenceGetAsReal("Effect,DehakaHealAmountPerEssenceDummy,Amount", lv_player));
    lv_extraLife = (lv_essenceCountStored*libNtve_gf_CatalogReferenceGetAsReal("Effect,DehakaMaxLifeAmountPerEssenceDummy,Amount", lv_player));
    lv_collectorUnit = EventPlayerEffectUsedUnit(c_effectUnitTarget);
    lv_collectorUnitType = UnitGetType(lv_collectorUnit);