# Catalog Field Value Set As Real

Grammar — Set value of catalog entry fieldPath for player player to value
FlagsAction

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

  • int [ preset::CatalogType ] — Catalog
  • string [ catalogentry ] — Entry
  • string [ catalogfieldpath ] — Field Path
  • int — Player
  • fixed — Value

Returns — bool

bool libNtve_gf_CatalogFieldValueSetAsReal(
	int lp_catalog,
	string lp_entry,
	string lp_fieldPath,
	int lp_player,
	fixed lp_value,
);

Category: Catalog / Support

# Examples

# mods/core.sc2mod

NativeLib.galaxy

// L1782
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value))
// L1785
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default - lp_value))
// L1788
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default * lp_value))
// L1791
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default / lp_value))
// L1794
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, lp_value)
// L1797
libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L4273
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "CommanderPrestigeRaynorAir", "Modification.RateMultiplierArray[" + IntToString(1) + "]", lp_raynorPlayer, (1 + (lv_supply / 100)))
// L4598
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "Radius", lp_dehakaPlayer, ((lv_dehakaCurrentLevel * 0.0625) + 0.5))
// L4605
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "TurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed)
// L4606
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "StationaryTurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed)
// L4609
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "DehakaDroneReviveTimerRefLink", "Amount", lp_dehakaPlayer, libCOMI_gv_cM_DehakaEatReviveTimerAdjustment)
// L5068
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, "HHWidowMineBurrowedAttack", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))))
// L5069
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "HHWidowMineAnimationController", "Duration", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))))
// L5538
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenRoyalGuardDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay)
// L5562
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenTrooperDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay)
// L5731
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", lp_player, CeilingI((lv_default*lv_changedFactor)))