# Catalog Reference Get As Integer
Grammar — Value of reference for player player as an integer
Flags —Native
|Function
Returns the value of a field for an entry as an integer. 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 — int
native int CatalogReferenceGetAsInt(
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
# mods/heroesdata.stormmod
// L7981
CatalogReferenceGetAsInt("Abil,ButcherFreshMeatDummy,Cost.Charge.CountMax", c_playerAny)
# mods/heromods/chogall.stormmod
// L200
CatalogReferenceGetAsInt("Mover,ChoRuneBombReturnMissile,MotionPhases[0].Speed", libGDHL_gv_chogallPairs[lv_choGallPairsTeamID].lv_choPlayer)
// L209
CatalogReferenceGetAsInt("Mover,ChoRuneBombReturnMissile,MotionPhases[0].Speed", libGDHL_gv_chogallPairs[lv_choGallPairsTeamID].lv_choPlayer)
# mods/starcoop/starcoop.sc2mod
// L25110
CatalogReferenceGetAsInt("Behavior,TychusHercCritPassive,DamageResponse.ModifyFraction", libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("TerranTychus", libCOOC_gf_CC_PlayersOfCommander("TerranTychus")))
// L25112
CatalogReferenceGetAsInt("Behavior,TychusHercRageDamageBuff,Modification.DamageDealtUnscaled[Melee]", libCOOC_gf_CC_PlayerOfCommanderInGroupFirst("TerranTychus", libCOOC_gf_CC_PlayersOfCommander("TerranTychus")))