# 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
- 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/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1782
auto95ABF8B8_val = lp_operation;
if (auto95ABF8B8_val == c_upgradeOperationAdd) {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value));
}
else if (auto95ABF8B8_val == c_upgradeOperationSubtract) {
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1785
}
else if (auto95ABF8B8_val == c_upgradeOperationSubtract) {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default - lp_value));
}
else if (auto95ABF8B8_val == c_upgradeOperationMultiply) {
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1788
}
else if (auto95ABF8B8_val == c_upgradeOperationMultiply) {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default * lp_value));
}
else if (auto95ABF8B8_val == c_upgradeOperationDivide) {
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1791
}
else if (auto95ABF8B8_val == c_upgradeOperationDivide) {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default / lp_value));
}
else if (auto95ABF8B8_val == c_upgradeOperationSet) {
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1794
}
else if (auto95ABF8B8_val == c_upgradeOperationSet) {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, lp_value);
}
else {
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1797
}
else {
return libNtve_gf_CatalogFieldValueSetAsReal(lp_catalog, lp_entry, lp_fieldPath, lp_player, (lv_default + lp_value));
}
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4276
lv_supply += UnitGetPropertyFixed(lv_supplyunit, c_unitPropSuppliesUsed, c_unitPropCurrent);
}
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "CommanderPrestigeRaynorAir", "Modification.RateMultiplierArray[" + IntToString(1) + "]", lp_raynorPlayer, (1 + (lv_supply / 100)));
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4601
lv_dehakaScaleResult = ((lv_dehakaCurrentLevel * lv_dehakaScalePerLevel) + lv_dehakaBaseScale);
libNtve_gf_SendActorMessageToUnit(lp_dehakaUnit, libNtve_gf_SetScale(lv_dehakaScaleResult, lv_dehakaScaleResult, lv_dehakaScaleResult, 0.0));
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "Radius", lp_dehakaPlayer, ((lv_dehakaCurrentLevel * 0.0625) + 0.5));
lv_dehakaAttackDamageResult = (lv_dehakaAttackDamageBase + ((lv_dehakaCurrentLevel - 1) * lv_dehakaAttackDamagePerLevel));
lv_dehakaTurnSpeed = (800.0 - (lv_dehakaCurrentLevel * 40.0));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4608
}
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "TurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "StationaryTurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4609
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "TurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogUnit, lv_dehakaUnitType, "StationaryTurningRate", lp_dehakaPlayer, lv_dehakaTurnSpeed);
if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {
libCOMI_gv_cM_DehakaEatReviveTimerAdjustment = ((lv_dehakaCurrentLevel * 1) - 24);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:4612
if ((lp_dehakaUnit == libCOMI_gv_cM_HeroUnit[lp_dehakaPlayer])) {
libCOMI_gv_cM_DehakaEatReviveTimerAdjustment = ((lv_dehakaCurrentLevel * 1) - 24);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "DehakaDroneReviveTimerRefLink", "Amount", lp_dehakaPlayer, libCOMI_gv_cM_DehakaEatReviveTimerAdjustment);
if (((libCOMI_gf_DifficultyLevelForPlayerCoop(lp_dehakaPlayer) == 3) || (libCOMI_gf_DifficultyLevelForPlayerCoop(lp_dehakaPlayer) == 4)) && (lv_dehakaCurrentLevel >= 6) && (GameGetMissionTime() < 360.0)) {
AchievementAward(lp_dehakaPlayer, "CommanderDehakaLevelUp");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5071
CatalogFieldValueModify(c_gameCatalogEffect, "HornerMSOAttackSpeedDisplayDummy", "Amount", lp_player, FixedToString(lv_factionBonusAtkSpeedMulti, c_fixedPrecisionAny), c_upgradeOperationSet);
if ((TechTreeUpgradeCount(lp_player, "HHWidowMineDeathBlossom", c_techCountCompleteOnly) == 1)) {
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, "HHWidowMineBurrowedAttack", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "HHWidowMineAnimationController", "Duration", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5072
if ((TechTreeUpgradeCount(lp_player, "HHWidowMineDeathBlossom", c_techCountCompleteOnly) == 1)) {
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, "HHWidowMineBurrowedAttack", "Cost[" + IntToString(0) + "].Cooldown.TimeUse", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogBehavior, "HHWidowMineAnimationController", "Duration", lp_player, (20.0 * (1.0 - (0.01 * lv_factionBonusAtkSpeedMulti))));
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5541
libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard = (lv_energyregenperroyalguardsupplylevel * libCOMI_gf_CM_Mengsk_SupplyLevel(libCOMI_gv_cM_Mengsk_VeteranUnits));
lv_roundeddisplay = Round(libCOMI_gv_cM_Mengsk_EnergyRegenRoyalGuard);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenRoyalGuardDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5565
libCOMI_gv_cM_Mengsk_EnergyRegenTrooper = (lv_energyregenperpropagandaunit * UnitGroupCount(libCOMI_gv_cM_Mengsk_PropagandaUnits, c_unitCountAlive));
lv_roundeddisplay = Round(libCOMI_gv_cM_Mengsk_EnergyRegenTrooper);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogEffect, "MengskTopBarEnergyRegenTrooperDummy", "Amount", lp_mengskPlayer, lv_roundeddisplay);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5734
for ( ; ( (auto063B4A4F_ai >= 0 && lv_itResourceType <= auto063B4A4F_ae) || (auto063B4A4F_ai < 0 && lv_itResourceType >= auto063B4A4F_ae) ) ; lv_itResourceType += auto063B4A4F_ai ) {
lv_default = libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", c_playerAny);
libNtve_gf_CatalogFieldValueSetAsReal(c_gameCatalogAbil, lv_itResearch, "InfoArray[" + IntToString(lv_itResearchCmd) + "].Resource[" + IntToString(lv_itResourceType) + "]", lp_player, CeilingI((lv_default*lv_changedFactor)));
}
}