# Catalog Reference Set As Real

Grammar — Set value of reference 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

  • string<reference> — Reference
  • int — Player
  • fixed — Value

Returns — bool

bool libNtve_gf_CatalogReferenceSetAsReal(
	string lp_reference,
	int lp_player,
	fixed lp_value,
);

Category: Catalog / Support

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1822

    auto70738DD1_val = lp_operation;
    if (auto70738DD1_val == c_upgradeOperationAdd) {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, (lv_default + lp_value));
    }
    else if (auto70738DD1_val == c_upgradeOperationSubtract) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1825

    }
    else if (auto70738DD1_val == c_upgradeOperationSubtract) {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, (lv_default - lp_value));
    }
    else if (auto70738DD1_val == c_upgradeOperationMultiply) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1828

    }
    else if (auto70738DD1_val == c_upgradeOperationMultiply) {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, (lv_default * lp_value));
    }
    else if (auto70738DD1_val == c_upgradeOperationDivide) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1831

    }
    else if (auto70738DD1_val == c_upgradeOperationDivide) {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, (lv_default / lp_value));
    }
    else if (auto70738DD1_val == c_upgradeOperationSet) {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1834

    }
    else if (auto70738DD1_val == c_upgradeOperationSet) {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, lp_value);
    }
    else {

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1837

    }
    else {
        return libNtve_gf_CatalogReferenceSetAsReal(lp_reference, lp_player, (lv_default + lp_value));
    }
}