# Catalog Reference Set

Grammar — Set value of reference for player player to value
FlagsNative | Action

Sets 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

Returns — bool

native bool CatalogReferenceSet(
	string reference,
	int player,
	string value,
);

Category: Catalog / Support

# Examples

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L2159
CatalogReferenceSet("Abil,ZergBuild,InfoArray[Build1].Time[0]", gv_pLAYER_01_USER, FixedToString(lv_hatcheryBuildTime, c_fixedPrecisionAny))
// L2159
CatalogReferenceSet("Abil,ZergBuild,InfoArray[Build1].Time[0]", gv_pLAYER_01_USER, FixedToString(lv_hatcheryBuildTime, c_fixedPrecisionAny))

# mods/core.sc2mod

NativeLib.galaxy

// L1804
CatalogReferenceSet(lp_reference, lp_player, FixedToString(lp_value, c_fixedPrecisionAny))
// L3499
CatalogReferenceSet("Loot,TriggerRandomItemGenerator,ClassArray[0]", lp_dropPlayer, (lp_class))

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L11639
CatalogReferenceSet("Effect,LiLiCloudSerpentBlessingsOfYulonTalentCreateHealer,FlatModifierArray[JadeSerpent].Modifier", lv_owningPlayer, CatalogFieldValueGet(c_gameCatalogEffect, "LiLiCloudSerpentCreateHealer", "RechargeVitalRate", lv_owningPlayer))

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L3234
CatalogReferenceSet("Effect,UnitLaunchToTargetPointLM,Movers[0].Link", lv_o, (lp_mover))

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L3368
CatalogReferenceSet("Effect,SOAMothershipv4BeamDamage,Amount", gv_pLAYER_05_TALDARIM, "9")
// L3368
CatalogReferenceSet("Effect,SOAMothershipv4BeamDamage,Amount", gv_pLAYER_05_TALDARIM, "9")

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L16012
CatalogReferenceSet("Effect,SoulAbsorptionMU,VitalArray[Life].Change", lv_p, FixedToString(lv_amout, c_fixedPrecisionAny))
// L16013
CatalogReferenceSet("Effect,SoulAbsorptionMU,VitalArray[Shields].Change", lv_p, FixedToString(lv_amout, c_fixedPrecisionAny))

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L7685
CatalogReferenceSet("Unit,MutatorTurking,LifeStart", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(2000.0, 2500.0, 4000.0, 6000.0, 6000.0, 6000.0), c_fixedPrecisionAny))
// L7686
CatalogReferenceSet("Unit,MutatorTurking,LifeStart", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(2000.0, 2500.0, 4000.0, 6000.0, 6000.0, 6000.0), c_fixedPrecisionAny))
// L7687
CatalogReferenceSet("Unit,MutatorTurking,LifeRegenRate", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(0.0, 2.0, 15.0, 30.0, 30.0, 30.0), c_fixedPrecisionAny))
// L7688
CatalogReferenceSet("Unit,MutatorInfestedTurkey,LifeStart", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(75.0, 100.0, 125.0, 150.0, 150.0, 150.0), c_fixedPrecisionAny))
// L7689
CatalogReferenceSet("Unit,MutatorInfestedTurkey,LifeMax", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(75.0, 100.0, 125.0, 150.0, 150.0, 150.0), c_fixedPrecisionAny))
// L8341
CatalogReferenceSet("Unit,MutatorPropagator,LifeStart", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(200.0, 300.0, 350.0, 450.0, 450.0, 450.0), c_fixedPrecisionAny))
// L8342
CatalogReferenceSet("Unit,MutatorPropagator,LifeMax", 3, FixedToString(libCOMI_gf_MinimumDifficultyValueCoopReal(200.0, 300.0, 350.0, 450.0, 450.0, 450.0), c_fixedPrecisionAny))

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2064
CatalogReferenceSet("Abil,CoopCommanderHeroSharedTrain,InfoArray[Train1].Flags[AutoCastOn]", lp_player, "0")
// L2065
CatalogReferenceSet("Abil,CoopCommanderHeroSharedTrain,InfoArray[Train1].Button.Flags[CreateDefaultButton]", lp_player, "0")
// L2066
CatalogReferenceSet("Abil,CoopCommanderHeroSharedTrain,InfoArray[Train1].Button.Flags[UseDefaultButton]", lp_player, "0")

# mods/warcoop/warmeleeai.sc2mod

LibW3AI.galaxy

// L67
CatalogReferenceSet("Abil,Rome,InfoArray[Research1].Button.Requirements", lv_p, "")
// L68
CatalogReferenceSet("Abil,Rora,InfoArray[Research1].Button.Requirements", lv_p, "")
// L69
CatalogReferenceSet("Abil,Roar,InfoArray[Research1].Button.Requirements", lv_p, "")
// L70
CatalogReferenceSet("Abil,Rost,InfoArray[Research1].Button.Requirements", lv_p, "")
// L71
CatalogReferenceSet("Abil,Rowd,InfoArray[Research1].Button.Requirements", lv_p, "")
// L72
CatalogReferenceSet("Abil,Rowt,InfoArray[Research1].Button.Requirements", lv_p, "")
// L73
CatalogReferenceSet("Abil,Rosp,InfoArray[Research1].Button.Requirements", lv_p, "")