# 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
- 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
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7398
libSwaC_gf_StoryCreateCallout2(libSwaC_gv_zS_ArmyCustomEggCalloutAttachments, "Egg Room - Evolution Master");
libSwaC_gv_zS_ArmyEvoCalloutFlash = DialogControlLastCreated();
libSwaC_gf_ZS_ArmyEggRoomCalloutSetText(DialogControlLastCreated(), StringExternal(CatalogReferenceGet("Character,EvolutionMaster,Name[0]", c_playerAny)), StringExternal("Param/Value/lib_SwaC_44C095F6"));
DialogControlHookup(libSwaC_gv_zS_ArmyEvoCalloutFlash, c_triggerControlTypeLabel, "SubNameLabel");
libSwaC_gv_zS_ArmyEvoCalloutSubtitle = DialogControlLastCreated();
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2853
}
else if (auto9A8F3378_val == "ShipSupplyUpgrade") {
TextExpressionSetToken("Param/Expression/lib_VCUI_74345D94", "UPGRADE", StringToText(CatalogReferenceGet("Unit,SoACaster,Food", 0)));
return TextExpressionAssemble("Param/Expression/lib_VCUI_74345D94");
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1739
// Implementation
return StringToFixed(CatalogReferenceGet(lv_ref, lp_player));
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:18534
}
UnitModifyCooldown(lv_rehgarUnit, CatalogReferenceGet("Abil,RehgarChainHeal,Cost[0].Cooldown.Link", UnitGetOwner(lv_rehgarUnit)), -0.75, c_cooldownOperationAdd);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:29599
}
}
Wait(StringToFixed(CatalogReferenceGet("Behavior,SOASuperShield,Duration", c_playerAny)), c_timeGame);
return true;
}