# Catalog Field Value Set As Real
Grammar — Set value of catalog entry fieldPath for player player to value
Flags —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
int
[ preset::CatalogType ] — Catalogstring
[ catalogentry ] — Entrystring
[ catalogfieldpath ] — Field Pathint
— Playerfixed
— Value
Returns — bool
bool libNtve_gf_CatalogFieldValueSetAsReal(
int lp_catalog,
string lp_entry,
string lp_fieldPath,
int lp_player,
fixed lp_value,
);
# Related
Category: Catalog / Support
- [P] — Upgrade Operation
- [P] — No Game Link
- [P] — No Alert
- [P] — Cost Type
- [P] — Catalog Type
- [P] — Any Game Link
- [P] — Field Type Category
- [F] —
bool
— Catalog Field Value Set — ( CatalogFieldValueSet ) - [F] —
bool
— Catalog Field Value Set As Real — ( libNtve_gf_CatalogFieldValueSetAsReal ) - [F] —
bool
— Catalog Field Value Modify — ( CatalogFieldValueModify ) - [F] —
bool
— Catalog Field Value Modify (Based On Default Value) — ( libNtve_gf_CatalogFieldValueModifyBasedOnDefaultValue ) - [F] —
bool
— Catalog Reference Set — ( CatalogReferenceSet ) - [F] —
bool
— Catalog Reference Set As Real — ( libNtve_gf_CatalogReferenceSetAsReal ) - [F] —
bool
— Catalog Reference Modify — ( CatalogReferenceModify ) - [F] —
bool
— Catalog Reference Modify (Based On Default Value) — ( libNtve_gf_CatalogReferenceModifyBasedOnDefaultValue ) - [F] —
void
— Catalog Link Replace — ( CatalogLinkReplace ) - [F] —
string
— Catalog Link Replacement — ( CatalogLinkReplacement )
# Examples
# mods/core.sc2mod
// 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
// 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)))