# Catalog Reference Get As Real
Grammar — Value of reference for player player as an real
Flags —Function
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> — Referenceint
— Player
Returns — fixed
fixed libNtve_gf_CatalogReferenceGetAsReal(
string lp_reference,
int lp_player,
);
# Related
Category: Catalog / Lookup
- Catalog Entry Is Default —
bool
— CatalogEntryIsDefault - Catalog Entry Is Valid —
bool
— CatalogEntryIsValid - Catalog Entry Class —
int
— CatalogEntryClass - Catalog Entry Count —
int
— CatalogEntryCount - Catalog Entry Get —
string
<catalogentry> — CatalogEntryGet - Catalog Entry Parent —
string
<catalogentry> — CatalogEntryParent - Catalog Entry Scope —
string
<catalogscope> — CatalogEntryScope - Catalog Field Count —
int
— CatalogFieldCount - Catalog Field Get —
string
<catalogfieldname> — CatalogFieldGet - Catalog Field Exists —
bool
— CatalogFieldExists - Catalog Field Is Array —
bool
— CatalogFieldIsArray - Catalog Field Is Scope —
bool
— CatalogFieldIsScope - Catalog Field Type —
string
— CatalogFieldType - Catalog Field Type Category —
int
<preset::FieldTypeCategory> — CatalogFieldTypeCategory - Catalog Field Value Get —
string
— CatalogFieldValueGet - Catalog Field Value Get As Integer —
int
— CatalogFieldValueGetAsInt - Catalog Field Value Get Flags As Integer —
int
— CatalogFieldValueGetFlagsAsInt - Catalog Field Value Get As Real —
fixed
— libNtve_gf_CatalogFieldValueGetAsReal - Catalog Field Value Count —
int
— CatalogFieldValueCount - Catalog Reference Get —
string
— CatalogReferenceGet - Catalog Reference Get As Integer —
int
— CatalogReferenceGetAsInt - Catalog Reference Get As Real —
fixed
— libNtve_gf_CatalogReferenceGetAsReal - Catalog Reference Count —
int
— CatalogReferenceCount - Class Of Ability —
int
<preset::AbilityClass> — AbilityClass - Cost Of Ability —
fixed
— libNtve_gf_CostOfAbility
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1817
// Variable Initialization
lv_ref = lp_reference;
lv_default = libNtve_gf_CatalogReferenceGetAsReal(lv_ref, c_playerAny);
// Implementation
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.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);