# Catalog Reference Modify
Grammar — Modifies value of reference for player player using operation and value
Flags —Native
|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> — Referenceint
— Playerstring
— Valueint
<preset::UpgradeOperation> — Operation
Returns — bool
native bool CatalogReferenceModify(
string reference,
int player,
string value,
int operation,
);
# Related
Category: Catalog / Support
- Upgrade Operation — preset —
int
- No Game Link — preset —
gamelink
- No Alert — preset —
string
- Cost Type — preset —
string
- Catalog Type — preset —
int
- Any Game Link — preset —
gamelink
- Field Type Category — preset —
int
- Catalog Field Value Set —
bool
— CatalogFieldValueSet - Catalog Field Value Set As Real —
bool
— libNtve_gf_CatalogFieldValueSetAsReal - Catalog Field Value Modify —
bool
— CatalogFieldValueModify - Catalog Field Value Modify (Based On Default Value) —
bool
— libNtve_gf_CatalogFieldValueModifyBasedOnDefaultValue - Catalog Reference Set —
bool
— CatalogReferenceSet - Catalog Reference Set As Real —
bool
— libNtve_gf_CatalogReferenceSetAsReal - Catalog Reference Modify —
bool
— CatalogReferenceModify - Catalog Reference Modify (Based On Default Value) —
bool
— libNtve_gf_CatalogReferenceModifyBasedOnDefaultValue - Catalog Link Replace —
void
— CatalogLinkReplace - Catalog Link Replacement —
string
— CatalogLinkReplacement
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17291
if ((lv_needs > 0)) {
CatalogReferenceModify("Abil,DehakaCoopReviveEat,MaxCargoCount", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet);
CatalogReferenceModify("Abil,DehakaCoopReviveEat,TotalCargoSpace", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet);
UnitAbilityEnable(libCOMI_gv_cM_HeroReviver[EventPlayer()], "DehakaConcoonEatSearch", true);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:17292
if ((lv_needs > 0)) {
CatalogReferenceModify("Abil,DehakaCoopReviveEat,MaxCargoCount", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet);
CatalogReferenceModify("Abil,DehakaCoopReviveEat,TotalCargoSpace", EventPlayer(), IntToString(lv_needs), c_upgradeOperationSet);
UnitAbilityEnable(libCOMI_gv_cM_HeroReviver[EventPlayer()], "DehakaConcoonEatSearch", true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:20164
libNtve_gf_SendActorMessageToUnit(lv_starport, "Signal Entry");
CatalogReferenceModify("Actor,StarportTechLab,HighlightTooltip", lv_player, "Unit/Name/TechLabMira", c_upgradeOperationSet);
UnitBehaviorAddPlayer(lv_starport, "PermanentlyUncommandable", lv_player, 1);
UnitBehaviorAddPlayer(lv_starport, "PermanentlyInvulnerable", lv_player, 1);