# Catalog Reference Modify

Grammar — Modifies value of reference for player player using operation and value
FlagsNative | Action

Modifies the value of a field for an entry. To find the name of a field path, open the data editor and turn on View Raw Data. For example, if you wanted to set 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
  • string — Value
  • int [ preset::UpgradeOperation ] — Operation

Returns — bool

native bool CatalogReferenceModify(
	string reference,
	int player,
	string value,
	int operation,
);

Category: Catalog / Support

# Examples

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L17255
CatalogReferenceModify("Abil,DehakaCoopReviveEat,MaxCargoCount", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet)
// L17256
CatalogReferenceModify("Abil,DehakaCoopReviveEat,TotalCargoSpace", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet)
// L20098
CatalogReferenceModify("Actor,StarportTechLab,HighlightTooltip", lv_player, "Unit/Name/TechLabMira", c_upgradeOperationSet)