# Catalog Field Exists

Grammar — Does catalog field of scope exist?
FlagsNative | Function

Returns true if the specified field exists in the specified scope. Use catalog lookup functions to retrieve a data value or other information from the game data.

# Arguments

  • string<catalogscope> — Scope
  • string<catalogfieldname> — Field

Returns — bool

native bool CatalogFieldExists(string scope, string field);

Category: Catalog / Lookup

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5734

    // Implementation
    if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5735

    if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;
            }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5746

    }
    else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5747

    else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;
            }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3450

    // Implementation
    if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3451

    if (((lp_costType == "Minerals") || (lp_costType == "Gas"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;
            }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3462

    }
    else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3463

    else if (((lp_costType == "Energy") || (lp_costType == "Life") || (lp_costType == "Shields"))) {
        if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "Cost") == false)) {
            if ((CatalogFieldExists(CatalogEntryScope(c_gameCatalogAbil, lp_ability), "InfoArray") == false)) {
                return 0.0;
            }