# Catalog Reference Get
Grammar — Value of reference for player player
Flags —Native
|Function
Returns the value of a field for an entry. 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 — string
native string CatalogReferenceGet(
string reference,
int player,
);
# Related
Category: Catalog / Lookup
- [F] —
bool
— Catalog Entry Is Default — ( CatalogEntryIsDefault ) - [F] —
bool
— Catalog Entry Is Valid — ( CatalogEntryIsValid ) - [F] —
int
— Catalog Entry Class — ( CatalogEntryClass ) - [F] —
int
— Catalog Entry Count — ( CatalogEntryCount ) - [F] —
string
[ catalogentry ] — Catalog Entry Get — ( CatalogEntryGet ) - [F] —
string
[ catalogentry ] — Catalog Entry Parent — ( CatalogEntryParent ) - [F] —
string
[ catalogscope ] — Catalog Entry Scope — ( CatalogEntryScope ) - [F] —
int
— Catalog Field Count — ( CatalogFieldCount ) - [F] —
string
[ catalogfieldname ] — Catalog Field Get — ( CatalogFieldGet ) - [F] —
bool
— Catalog Field Exists — ( CatalogFieldExists ) - [F] —
bool
— Catalog Field Is Array — ( CatalogFieldIsArray ) - [F] —
bool
— Catalog Field Is Scope — ( CatalogFieldIsScope ) - [F] —
string
— Catalog Field Type — ( CatalogFieldType ) - [F] —
int
[ preset::FieldTypeCategory ] — Catalog Field Type Category — ( CatalogFieldTypeCategory ) - [F] —
string
— Catalog Field Value Get — ( CatalogFieldValueGet ) - [F] —
int
— Catalog Field Value Get As Integer — ( CatalogFieldValueGetAsInt ) - [F] —
int
— Catalog Field Value Get Flags As Integer — ( CatalogFieldValueGetFlagsAsInt ) - [F] —
fixed
— Catalog Field Value Get As Real — ( libNtve_gf_CatalogFieldValueGetAsReal ) - [F] —
int
— Catalog Field Value Count — ( CatalogFieldValueCount ) - [F] —
string
— Catalog Reference Get — ( CatalogReferenceGet ) - [F] —
int
— Catalog Reference Get As Integer — ( CatalogReferenceGetAsInt ) - [F] —
fixed
— Catalog Reference Get As Real — ( libNtve_gf_CatalogReferenceGetAsReal ) - [F] —
int
— Catalog Reference Count — ( CatalogReferenceCount ) - [F] —
int
[ preset::AbilityClass ] — Class Of Ability — ( AbilityClass ) - [F] —
fixed
— Cost Of Ability — ( libNtve_gf_CostOfAbility )
# Examples
# campaigns/swarmstory.sc2campaign
// L7398
CatalogReferenceGet("Character,EvolutionMaster,Name[0]", c_playerAny)
# campaigns/voidstory.sc2campaign
// L2853
CatalogReferenceGet("Unit,SoACaster,Food", 0)
# mods/core.sc2mod
// L1739
CatalogReferenceGet(lv_ref, lp_player)
# mods/heroesdata.stormmod
// L18534
CatalogReferenceGet("Abil,RehgarChainHeal,Cost[0].Cooldown.Link", UnitGetOwner(lv_rehgarUnit))
# mods/starcoop/starcoop.sc2mod
// L29591
CatalogReferenceGet("Behavior,SOASuperShield,Duration", c_playerAny)