# Catalog Reference Get As Integer

Grammar — Value of reference for player player as an integer
FlagsNative | 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 ] — Reference
  • int — Player

Returns — int

native int CatalogReferenceGetAsInt(
	string reference,
	int player,
);

Category: Catalog / Lookup

# Examples

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L7981
CatalogReferenceGetAsInt("Abil,ButcherFreshMeatDummy,Cost.Charge.CountMax", c_playerAny)

# mods/heromods/chogall.stormmod

LibHCHO.galaxy

// 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

LibCOMI.galaxy

// 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")))