# Upgrade Count For Player

GrammarupgradeType count for player player, counting countType
FlagsNative | Function

Returns the count of the specified upgrade for the specified player.

# Arguments

  • int — Player
  • string<gamelink::Upgrade> — Upgrade
  • int<preset::TechTreeCountType> — Count Type

Returns — int

native int TechTreeUpgradeCount(
	int player,
	string upgradeType,
	int countType,
);

Category: Tech Tree / Counts

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:5348

    libCamp_gf_TS_UpdateTechUpgrades(lp_player);
    libCamp_gf_TS_UpdateResearchUnitHelpPanel(lp_player);
    if ((TechTreeUpgradeCount(lp_player, "CellularReactors", c_techCountQueuedOrBetter) == 1)) {
        autoA2C3AE26_g = UnitGroup(null, lp_player, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
        autoA2C3AE26_u = UnitGroupCount(autoA2C3AE26_g, c_unitCountAll);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7016

    libCamp_gf_TS_ApplyMercenaryTech(lp_player);
    libCamp_gf_TS_ApplyMercUpgrades(lp_player);
    if ((TechTreeUpgradeCount(lp_player, "NeoSteelFrame", c_techCountCompleteOnly) > 0) && (TechTreeUpgradeCount(lp_player, "ShrikeTurret", c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetUpgradeLevelForPlayer(lp_player, "NeoSteelAndShrikeTurretIconUpgrade", 1);
    }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:7016

    libCamp_gf_TS_ApplyMercenaryTech(lp_player);
    libCamp_gf_TS_ApplyMercUpgrades(lp_player);
    if ((TechTreeUpgradeCount(lp_player, "NeoSteelFrame", c_techCountCompleteOnly) > 0) && (TechTreeUpgradeCount(lp_player, "ShrikeTurret", c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetUpgradeLevelForPlayer(lp_player, "NeoSteelAndShrikeTurretIconUpgrade", 1);
    }

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionswarmhost.sc2map/MapScript.galaxy:940

    if ((TriggerIsEnabled(gt_CarrionSwarmHostsBurrowed) == true)) {
        UISetButtonHighlighted(PlayerGroupSingle(gv_pLAYER_01_USER), AbilityCommand("MorphToSwarmHostSplitABurrowed", 0), true);
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "HotSBurrowSwarmHost", c_techCountCompleteOnly) == 1)) {
            lv_text = StringExternal("Param/Value/5269FFFF");
        }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionswarmhost.sc2mapMapScript.galaxy:940

    if ((TriggerIsEnabled(gt_CarrionSwarmHostsBurrowed) == true)) {
        UISetButtonHighlighted(PlayerGroupSingle(gv_pLAYER_01_USER), AbilityCommand("MorphToSwarmHostSplitABurrowed", 0), true);
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "HotSBurrowSwarmHost", c_techCountCompleteOnly) == 1)) {
            lv_text = StringExternal("Param/Value/5269FFFF");
        }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:4572

    }

    if ((TechTreeUpgradeCount(1, "K5AutoExtractor", c_techCountQueuedOrBetter) > 0)) {
        UnitGroupAddUnitGroup(lv_unitGroupHarvestMinerals, UnitGroup(null, 1, lp_regionGasWorker, UnitFilter((1 << c_targetFilterWorker), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7334


    HelpPanelShowTechTreeRace(PlayerGroupAll(), "Zerg", true);
    if (((libSwaC_gf_MissionStatusCheck("ZHybrid2", libSwaC_ge_MissionStatus_Completed) == true) || (TechTreeUpgradeCount(1, "HotSHaveUltralisk", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSTorrasque", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSNoxious", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), true);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7334


    HelpPanelShowTechTreeRace(PlayerGroupAll(), "Zerg", true);
    if (((libSwaC_gf_MissionStatusCheck("ZHybrid2", libSwaC_ge_MissionStatus_Completed) == true) || (TechTreeUpgradeCount(1, "HotSHaveUltralisk", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSTorrasque", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSNoxious", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), true);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7334


    HelpPanelShowTechTreeRace(PlayerGroupAll(), "Zerg", true);
    if (((libSwaC_gf_MissionStatusCheck("ZHybrid2", libSwaC_ge_MissionStatus_Completed) == true) || (TechTreeUpgradeCount(1, "HotSHaveUltralisk", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSTorrasque", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSNoxious", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), true);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7334


    HelpPanelShowTechTreeRace(PlayerGroupAll(), "Zerg", true);
    if (((libSwaC_gf_MissionStatusCheck("ZHybrid2", libSwaC_ge_MissionStatus_Completed) == true) || (TechTreeUpgradeCount(1, "HotSHaveUltralisk", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSTorrasque", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSNoxious", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), true);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7334


    HelpPanelShowTechTreeRace(PlayerGroupAll(), "Zerg", true);
    if (((libSwaC_gf_MissionStatusCheck("ZHybrid2", libSwaC_ge_MissionStatus_Completed) == true) || (TechTreeUpgradeCount(1, "HotSHaveUltralisk", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSTorrasque", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSNoxious", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), true);
    }

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7340

        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), false);
    }
    if (((TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToGreaterSpireViper", 0), true);
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToGreaterSpireBroodlord", 0), true);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7340

        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToHive", 0), false);
    }
    if (((TechTreeUpgradeCount(1, "HotSMutaliskViper", c_techCountQueuedOrBetter) == 1) || (TechTreeUpgradeCount(1, "HotSMutaliskBroodlord", c_techCountQueuedOrBetter) == 1))) {
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToGreaterSpireViper", 0), true);
        TechTreeAbilityAllow(1, AbilityCommand("UpgradeToGreaterSpireBroodlord", 0), true);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:17336

    }

    if ((libSwaC_gv_zS_PrimaryHatchery != null) && (TechTreeUpgradeCount(1, "K5ZerglingRespawn", c_techCountCompleteOnly) == 1)) {
        if ((UnitAbilityChargeInfo(libSwaC_gv_zS_PrimaryHatchery, AbilityCommand("ZerglingRespawnTrain", 0), c_unitAbilChargeCountLeft) > 0.0)) {
            libNtve_gf_SendActorMessageToUnit(libSwaC_gv_zS_PrimaryHatchery, "Signal ZerglingRespawn1On");

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:17382

    }

    if ((libSwaC_gv_zS_PrimaryHatchery != null) && (TechTreeUpgradeCount(1, "K5ZerglingRespawn", c_techCountCompleteOnly) == 1)) {
        libNtve_gf_SendActorMessageToUnit(libSwaC_gv_zS_PrimaryHatchery, "Signal ZerglingRespawn1Off");
        libNtve_gf_SendActorMessageToUnit(libSwaC_gv_zS_PrimaryHatchery, "Signal ZerglingRespawn2Off");

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur05.sc2map/MapScript.galaxy:1430

        auto1A80D95B_var = PlayerGroupNextPlayer(auto1A80D95B_g, auto1A80D95B_var);
        if (auto1A80D95B_var < 0) { break; }
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(auto1A80D95B_var, "SOASuperShield", 1);
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur06.sc2map/MapScript.galaxy:1348

        AISetAPM(autoF0CFB556_var, 3000);
        TechTreeUpgradeAddLevel(autoF0CFB556_var, "ExtendedThermalLance", 1);
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(autoF0CFB556_var, "SOASuperShield", 1);
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pmoebius01.sc2map/MapScript.galaxy:1714

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOAAutoAssimilator", c_techCountCompleteOnly) == 1)) {
        auto27D91F20_g = UnitGroup("AutomatedAssimilator", gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
        auto27D91F20_u = UnitGroupCount(auto27D91F20_g, c_unitCountAll);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/ppurifier02.sc2map/MapScript.galaxy:936


    }
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) == 1)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_07_MEGALITH, "SOASuperShield", 1);
    }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar03.sc2map/MapScript.galaxy:1322

        }

        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(autoCC51F44A_var, "SOASuperShield", 1);
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur05.sc2mapMapScript.galaxy:1430

        auto1A80D95B_var = PlayerGroupNextPlayer(auto1A80D95B_g, auto1A80D95B_var);
        if (auto1A80D95B_var < 0) { break; }
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(auto1A80D95B_var, "SOASuperShield", 1);
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur06.sc2mapMapScript.galaxy:1348

        AISetAPM(autoF0CFB556_var, 3000);
        TechTreeUpgradeAddLevel(autoF0CFB556_var, "ExtendedThermalLance", 1);
        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(autoF0CFB556_var, "SOASuperShield", 1);
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pmoebius01.sc2mapMapScript.galaxy:1714

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOAAutoAssimilator", c_techCountCompleteOnly) == 1)) {
        auto27D91F20_g = UnitGroup("AutomatedAssimilator", gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
        auto27D91F20_u = UnitGroupCount(auto27D91F20_g, c_unitCountAll);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ppurifier02.sc2mapMapScript.galaxy:936


    }
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) == 1)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_07_MEGALITH, "SOASuperShield", 1);
    }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar03.sc2mapMapScript.galaxy:1322

        }

        if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            TechTreeUpgradeAddLevel(autoCC51F44A_var, "SOASuperShield", 1);
        }

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

    }
    else {
        return (TechTreeUpgradeCount(1, UserDataGetUpgrade("CampaignPerk", lp_ability, "Upgrade", 1), c_techCountQueuedOrBetter) == 1);
    }
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:502

                auto27618A4A_var = PlayerGroupNextPlayer(auto27618A4A_g, auto27618A4A_var);
                if (auto27618A4A_var < 0) { break; }
                if ((TechTreeUpgradeCount(auto27618A4A_var, "SOAUIFreezePrevent", c_techCountCompleteOnly) < 8)) {
                    TechTreeUpgradeAddLevel(auto27618A4A_var, "SOAUIFreezePrevent", 1);
                }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:601

                    auto146275EF_var = PlayerGroupNextPlayer(auto146275EF_g, auto146275EF_var);
                    if (auto146275EF_var < 0) { break; }
                    if ((TechTreeUpgradeCount(auto146275EF_var, "SOAUIFreezePrevent", c_techCountCompleteOnly) > 0)) {
                        TechTreeUpgradeAddLevel(auto146275EF_var, "SOAUIFreezePrevent", -1);
                    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3846

    }

    if ((TechTreeUpgradeCount(1, "K5AutoExtractor", c_techCountQueuedOrBetter) > 0)) {
        UnitGroupAddUnitGroup(lv_unitGroupHarvestMinerals, UnitGroup(null, 1, lp_regionGasWorker, UnitFilter((1 << c_targetFilterWorker), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:5183

        autoD511EADB_var = PlayerGroupNextPlayer(autoD511EADB_g, autoD511EADB_var);
        if (autoD511EADB_var < 0) { break; }
        if ((TechTreeUpgradeCount(autoD511EADB_var, "SOASuperShield", c_techCountQueuedOrBetter) >= 1)) {
            auto7D86169B_g = UnitGroup(null, autoD511EADB_var, RegionEntireMap(), UnitFilter((1 << c_targetFilterVisible), 0, (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile) | (1 << c_targetFilterItem), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
            auto7D86169B_u = UnitGroupCount(auto7D86169B_g, c_unitCountAll);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2845

    auto9A8F3378_val = lp_upgrade;
    if (auto9A8F3378_val == "ShipStructureBuildUpgrade") {
        TextExpressionSetToken("Param/Expression/lib_VCUI_3BEC692E", "UPGRADE", IntToText((TechTreeUpgradeCount(0, UserDataGetUpgrade("SpearofAdunUpgrade", lp_upgrade, "Upgrade", 1), c_techCountQueuedOrBetter)*5)));
        return TextExpressionAssemble("Param/Expression/lib_VCUI_3BEC692E");
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2849

    }
    else if (auto9A8F3378_val == "ShipShieldUpgrades") {
        TextExpressionSetToken("Param/Expression/lib_VCUI_667BE8C1", "UPGRADE", IntToText((TechTreeUpgradeCount(0, UserDataGetUpgrade("SpearofAdunUpgrade", lp_upgrade, "Upgrade", 1), c_techCountQueuedOrBetter)*5)));
        return TextExpressionAssemble("Param/Expression/lib_VCUI_667BE8C1");
    }

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


    // Implementation
    lv_levelCurrent = TechTreeUpgradeCount(lp_p, lp_upgrade, c_techCountCompleteOnly);
    TechTreeUpgradeAddLevel(lp_p, lp_upgrade, (lp_levels - lv_levelCurrent));
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:3807


    // Implementation
    lv_levelCurrent = TechTreeUpgradeCount(lp_p, lp_upgrade, c_techCountCompleteOnly);
    TechTreeUpgradeAddLevel(lp_p, lp_upgrade, (lp_levels - lv_levelCurrent));
}

mods/heroesmapmods/battlegroundmapmods/warcraftdata.stormmodbase.stormdata/Lib7EB401DE.galaxy:119


    TriggerDebugOutput(1, StringExternal("Param/Value/lib_7EB401DE_590D7A36"), true);
    if ((TechTreeUpgradeCount(libCore_gv_cOMPUTER_TeamOrder, "IsAlliance", c_techCountCompleteOnly) > 0)) {
        TriggerDebugOutput(1, StringExternal("Param/Value/lib_7EB401DE_839A967E"), true);
        libNtve_gf_SetUpgradeLevelForPlayer(libCore_gv_cOMPUTER_TeamChaos, "IsHorde", 0);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:3956

    }

    if ((TechTreeUpgradeCount(1, "K5AutoExtractor", c_techCountQueuedOrBetter) > 0)) {
        UnitGroupAddUnitGroup(lv_unitGroupHarvestMinerals, UnitGroup(null, 1, lp_regionGasWorker, UnitFilter((1 << c_targetFilterWorker), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNovC.galaxy:1988

    lv_upgradeIndex = 1;
    for ( ; ( (auto118F1C02_ai >= 0 && lv_upgradeIndex <= auto118F1C02_ae) || (auto118F1C02_ai <= 0 && lv_upgradeIndex >= auto118F1C02_ae) ) ; lv_upgradeIndex += auto118F1C02_ai ) {
        if ((UserDataGetUpgrade("CampaignPerk", lp_perk, "Upgrade", lv_upgradeIndex) != null) && (TechTreeUpgradeCount(lp_player, UserDataGetUpgrade("CampaignPerk", lp_perk, "Upgrade", lv_upgradeIndex), c_techCountCompleteOnly) >= 1)) {
            return true;
        }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8378

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", 1);
    }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8378

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", 1);
    }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8382

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", 1);
    }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8382

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", 1);
    }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8386

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1)) {
        TriggerEnable(TriggerGetCurrent(), false);
    }

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova03.sc2map/MapScript.galaxy:8386

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1)) {
        TriggerEnable(TriggerGetCurrent(), false);
    }

mods/novastoryassets.sc2modbase2.sc2maps/maps/campaign/nova/nova04.sc2map/MapScript.galaxy:7023

    libNtve_gf_CreateUnitsWithDefaultFacing(1, "Factory", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(33)));
    libNtve_gf_CreateUnitsWithDefaultFacing(1, "Starport", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(25)));
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "InternalizedTechModuleBanshee", c_techCountQueuedOrBetter) >= 1)) {
        libNtve_gf_CreateUnitsWithDefaultFacing(1, "StarportReactor", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(43)));
    }

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova08.sc2map/MapScript.galaxy:706

    libNCMI_gf_EnableDisableHeroReviveSystem(true, gv_pLAYER_01_USER);
    libNCMI_gf_SetAllWorkerRallyPointsForPlayer(1);
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "InternalizedTechModuleSiegeTank", c_techCountQueuedOrBetter) > 0)) {
        lv_tempPoint = UnitGetPosition(UnitFromId(140));
        UnitRemove(UnitFromId(140));

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:1030

    // Implementation
    UnitGroupAddUnitGroup(lv_nearbyValidUnits, UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(lp_ghost), 15.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    if ((TechTreeUpgradeCount(lp_owner, "PersonalCloaking", c_techCountQueuedOrBetter) > 0) && (UnitGroupCount(lv_nearbyValidUnits, c_unitCountAlive) > 0) && (UnitGetPropertyFixed(lp_ghost, c_unitPropEnergy, c_unitPropCurrent) >= 50.0) && (UnitHasBehavior2(lp_ghost, "GhostCloak") == false)) {
        libNtve_gf_AICast(lp_ghost, Order(AbilityCommand("GhostCloak", 0)));
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8378

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", 1);
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8378

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", 1);
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8382

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", 1);
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8382

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 0)) {
        TechTreeUpgradeAddLevel(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", 1);
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8386

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1)) {
        TriggerEnable(TriggerGetCurrent(), false);
    }

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova03.sc2mapMapScript.galaxy:8386

    }

    if ((TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryArmorsLevel1", c_techCountCompleteOnly) == 1) && (TechTreeUpgradeCount(gv_pLAYER_02_NOVASUPPORT, "TerranInfantryWeaponsLevel1", c_techCountCompleteOnly) == 1)) {
        TriggerEnable(TriggerGetCurrent(), false);
    }

mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova04.sc2mapMapScript.galaxy:7023

    libNtve_gf_CreateUnitsWithDefaultFacing(1, "Factory", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(33)));
    libNtve_gf_CreateUnitsWithDefaultFacing(1, "Starport", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(25)));
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "InternalizedTechModuleBanshee", c_techCountQueuedOrBetter) >= 1)) {
        libNtve_gf_CreateUnitsWithDefaultFacing(1, "StarportReactor", 0, gv_pLAYER_02_REIGEL, RegionGetCenter(RegionFromId(43)));
    }

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2mapMapScript.galaxy:706

    libNCMI_gf_EnableDisableHeroReviveSystem(true, gv_pLAYER_01_USER);
    libNCMI_gf_SetAllWorkerRallyPointsForPlayer(1);
    if ((TechTreeUpgradeCount(gv_pLAYER_01_USER, "InternalizedTechModuleSiegeTank", c_techCountQueuedOrBetter) > 0)) {
        lv_tempPoint = UnitGetPosition(UnitFromId(140));
        UnitRemove(UnitFromId(140));

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2mapMapScript.galaxy:1030

    // Implementation
    UnitGroupAddUnitGroup(lv_nearbyValidUnits, UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(lp_ghost), 15.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    if ((TechTreeUpgradeCount(lp_owner, "PersonalCloaking", c_techCountQueuedOrBetter) > 0) && (UnitGroupCount(lv_nearbyValidUnits, c_unitCountAlive) > 0) && (UnitGetPropertyFixed(lp_ghost, c_unitPropEnergy, c_unitPropCurrent) >= 50.0) && (UnitHasBehavior2(lp_ghost, "GhostCloak") == false)) {
        libNtve_gf_AICast(lp_ghost, Order(AbilityCommand("GhostCloak", 0)));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3267

        lv_upgrade = libCOMI_gv_cM_CoopAI_CachedUpgradeData[lp_player].lv_upgrade[lv_upgradeIter];
        lv_time = libCOMI_gv_cM_CoopAI_CachedUpgradeData[lp_player].lv_time[lv_upgradeIter];
        if ((lv_time >= 0.0) && (lv_time < GameGetMissionTime()) && (TechTreeUpgradeCount(lp_player, lv_upgrade, c_techCountQueuedOrBetter) == 0)) {
            auto3A3C35EB_ae = UserDataFieldValueCount("CoopAIUpgrade", "ExclusiveToCommander");
            lv_exclusiveCommanderIter = 1;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3947


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryKerriganArmyGasCost", c_techCountCompleteOnly);
    libCOMI_gf_CM_MasteryKerriganArmyVespeneCostReduction("Overseer", lp_player, lv_upgradeCount);
    libCOMI_gf_CM_MasteryKerriganArmyVespeneCostReduction("OverseerSiegeMode", lp_player, lv_upgradeCount);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3992


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryMengskRoyalGuardCost", c_techCountCompleteOnly);
    libCOMI_gf_CM_MasteryMengskRoyalGuardCostReduction("MarauderMengsk", lp_player, lv_upgradeCount);
    libCOMI_gf_CM_MasteryMengskRoyalGuardCostReduction("GhostMengsk", lp_player, lv_upgradeCount);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4052


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryZagaraRoachDropDamageAndHealth", c_techCountCompleteOnly);
    lv_healthNew = (lv_healthStarting+(lv_upgradeCount*lv_healthPerPoint/10));
    CatalogFieldValueSet(c_gameCatalogUnit, "Roach", "LifeMax", lp_player, IntToString(FixedToInt(lv_healthNew)));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4074


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryKaraxUnitVital", c_techCountCompleteOnly);
    libCOMI_gf_CM_MasteryKaraxUnitVitalIncrease("ZealotPurifier", lp_player, lv_upgradeCount);
    libCOMI_gf_CM_MasteryKaraxUnitVitalIncrease("SentryPurifier", lp_player, lv_upgradeCount);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4123


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasterySwannImmortalityProtocol", c_techCountCompleteOnly);
    lv_unitVespeneCostOriginal = IntToFixed(CatalogFieldValueGetAsInt(c_gameCatalogUnit, "SiegeTank", "CostResource[" + IntToString(1) + "]", lp_player));
    lv_unitVespeneCostReduction = (IntToFixed(lv_upgradeCount) * lv_unitVespeneCostOriginal);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4140


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryKerriganMutatingCarapaceLifeDegradation", c_techCountCompleteOnly);
    lv_degradation = (((lv_upgradeCount / 30.0) * 5.0) - 5.0);
    CatalogFieldValueSet(c_gameCatalogUnit, "K5Kerrigan", "ShieldRegenRate", lp_player, FixedToString(lv_degradation, c_fixedPrecisionAny));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4155


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryKerriganResearchSpeedandCost", c_techCountCompleteOnly);
    lv_costReduction = ((175.0 * ((30.0 - lv_upgradeCount) + 20.0)) / 50.0);
    CatalogFieldValueSet(c_gameCatalogAbil, "evolutionchamberresearch", "InfoArray[" + IntToString(4) + "].Resource[" + IntToString(0) + "]", lp_player, IntToString(FixedToInt(lv_costReduction)));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4176


    // Implementation
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, "MasteryStetmannUpgradeResearchCost", c_techCountCompleteOnly);
    lv_costReduction = ((175 * (50 - lv_upgradeCount)) / 50);
    CatalogFieldValueSet(c_gameCatalogAbil, "EvolutionChamberStetmannResearch", "InfoArray[" + IntToString(7) + "].Resource[" + IntToString(0) + "]", lp_player, IntToString(FixedToInt(lv_costReduction)));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:4204


    // Variable Initialization
    lv_upgradeCount = TechTreeUpgradeCount(lp_player, lp_masteryUpgrade, c_techCountCompleteOnly);

    // Implementation

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


    // Implementation
    if ((lp_upgradeSupplemental != null) && (CatalogEntryIsValid(c_gameCatalogUpgrade, lv_upgrade) == true) && (CatalogEntryIsValid(c_gameCatalogUpgrade, lv_supplement) == true) && (TechTreeUpgradeCount(lp_player, lv_upgrade, c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetUpgradeLevelForPlayer(lp_player, lv_supplement, TechTreeUpgradeCount(lp_player, lv_upgrade, c_techCountCompleteOnly));
        lv_script = UserDataGetString("PlayerPrestigeUpgradeSupplements", lp_upgradeSupplemental, "PostScript", 1);

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

    // Implementation
    if ((lp_upgradeSupplemental != null) && (CatalogEntryIsValid(c_gameCatalogUpgrade, lv_upgrade) == true) && (CatalogEntryIsValid(c_gameCatalogUpgrade, lv_supplement) == true) && (TechTreeUpgradeCount(lp_player, lv_upgrade, c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetUpgradeLevelForPlayer(lp_player, lv_supplement, TechTreeUpgradeCount(lp_player, lv_upgrade, c_techCountCompleteOnly));
        lv_script = UserDataGetString("PlayerPrestigeUpgradeSupplements", lp_upgradeSupplemental, "PostScript", 1);
        if ((lv_script != "")) {

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

        libCOUI_gf_CU_GPShowHide(true, lp_player, c_transitionDurationDefault);
    }
    if ((TechTreeUpgradeCount(lp_player, "SuperiorCommand", c_techCountQueuedOrBetter) == 1)) {
        PlayerModifyPropertyInt(lp_player, c_playerPropSuppliesLimit, c_playerPropOperSetTo, 225);
    }

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

        lv_itPlayer = PlayerGroupNextPlayer(auto401F0935_g, lv_itPlayer);
        if (lv_itPlayer < 0) { break; }
        if ((TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly) >= 1)) {
            autoD8A6477E_g = libCOOC_gf_MutualAlliedCommandersofPlayerCoutInactiveAndSelf(lv_itPlayer);
            lv_itPlayerApplyTarget = -1;

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

                lv_itPlayerApplyTarget = PlayerGroupNextPlayer(autoD8A6477E_g, lv_itPlayerApplyTarget);
                if (lv_itPlayerApplyTarget < 0) { break; }
                if ((TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly) > TechTreeUpgradeCount(lv_itPlayerApplyTarget, lp_checkUpgrade, c_techCountCompleteOnly))) {
                    libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayerApplyTarget, lp_checkUpgrade, TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly));
                }

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

                lv_itPlayerApplyTarget = PlayerGroupNextPlayer(autoD8A6477E_g, lv_itPlayerApplyTarget);
                if (lv_itPlayerApplyTarget < 0) { break; }
                if ((TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly) > TechTreeUpgradeCount(lv_itPlayerApplyTarget, lp_checkUpgrade, c_techCountCompleteOnly))) {
                    libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayerApplyTarget, lp_checkUpgrade, TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly));
                }

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

                if (lv_itPlayerApplyTarget < 0) { break; }
                if ((TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly) > TechTreeUpgradeCount(lv_itPlayerApplyTarget, lp_checkUpgrade, c_techCountCompleteOnly))) {
                    libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayerApplyTarget, lp_checkUpgrade, TechTreeUpgradeCount(lv_itPlayer, lp_checkUpgrade, c_techCountCompleteOnly));
                }

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

    // Automatic Variable Declarations
    // Implementation
    if ((TechTreeUpgradeCount(lp_player, "MasteryKerriganArmyGasCost", c_techCountCompleteOnly) >= 1)) {
        libCOMI_gf_CM_MasteryKerriganArmyVespeneCostList(lp_player);
    }

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

    }

    if ((TechTreeUpgradeCount(lp_player, "MasterySwannImmortalityProtocol", c_techCountCompleteOnly) >= 1)) {
        libCOMI_gf_CM_MasterySwannSiegeTankImmortalityProtocolCostReduction(lp_player);
    }

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

    }

    if ((TechTreeUpgradeCount(lp_player, "MasteryKaraxUnitVital", c_techCountCompleteOnly) >= 1)) {
        libCOMI_gf_CM_MasteryKerriganArmyVespeneCostList3(lp_player);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:4612

    DialogControlSetVisible(libCOUI_gv_cU_GPPanel[lp_player], PlayerGroupAll(), false);
    DialogControlSetVisible(libCOUI_gv_cU_GPPanel[lp_player], PlayerGroupSingle(lp_player), true);
    if ((TechTreeUpgradeCount(lp_player, "MasteryMengskStartingImperialMandate", c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetDialogItemTooltip(libCOUI_gv_cU_GPMengskEnergyContainer[lp_player], (lv_tooltipHeaderOpen + StringExternal("UI/MengskTopBarEnergyName") + lv_styleClose + lv_tooltipOpen + StringExternal("UI/MengskTopBarEnergyDesc") + StringExternal("UI/MengskTopBarEnergyAddendum") + lv_styleClose), PlayerGroupAll());
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:4618

        libNtve_gf_SetDialogItemTooltip(libCOUI_gv_cU_GPMengskEnergyContainer[lp_player], (lv_tooltipHeaderOpen + StringExternal("UI/MengskTopBarEnergyName") + lv_styleClose + lv_tooltipOpen + StringExternal("UI/MengskTopBarEnergyDesc") + lv_styleClose), PlayerGroupAll());
    }
    if ((TechTreeUpgradeCount(lp_player, "MasteryMengskRoyalGuardImperialMandateRegeneration", c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetDialogItemTooltip(libCOUI_gv_cU_GPMengskEnergyRegenRoyalGuardContainer[lp_player], (lv_tooltipHeaderOpen + StringExternal("UI/MengskTopBarEnergyRegenRoyalGuardName") + lv_styleClose + lv_tooltipOpen + StringExternal("UI/MengskTopBarEnergyRegenRoyalGuardDesc") + StringExternal("UI/MengskTopBarEnergyRegenRoyalGuardAddendum") + lv_styleClose), PlayerGroupAll());
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:4624

        libNtve_gf_SetDialogItemTooltip(libCOUI_gv_cU_GPMengskEnergyRegenRoyalGuardContainer[lp_player], (lv_tooltipHeaderOpen + StringExternal("UI/MengskTopBarEnergyRegenRoyalGuardName") + lv_styleClose + lv_tooltipOpen + StringExternal("UI/MengskTopBarEnergyRegenRoyalGuardDesc") + lv_styleClose), PlayerGroupAll());
    }
    if ((TechTreeUpgradeCount(lp_player, "MasteryMengskTrooperImperialMandateRegeneration", c_techCountCompleteOnly) > 0)) {
        libNtve_gf_SetDialogItemTooltip(libCOUI_gv_cU_GPMengskEnergyRegenTrooperContainer[lp_player], (lv_tooltipHeaderOpen + StringExternal("UI/MengskTopBarEnergyRegenTrooperName") + lv_styleClose + lv_tooltipOpen + StringExternal("UI/MengskTopBarEnergyRegenTrooperDesc") + StringExternal("UI/MengskTopBarEnergyRegenTrooperAddendum") + lv_styleClose), PlayerGroupAll());
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:4769

    UnitGroupAdd(libCOUI_gv_cU_GPCasterGroup[lp_player], lp_casterUnit);
    libNtve_gf_SetDialogItemUnitGroup(libCOUI_gv_cU_GPCmdPanel[lp_player], libCOUI_gv_cU_GPCasterGroup[lp_player], PlayerGroupSingle(lp_player));
    if ((TechTreeUpgradeCount(lp_player, "FenixCommander", c_techCountCompleteOnly) == 1)) {
        libNtve_gf_SetDialogItemUnit(libCOUI_gv_cU_GPCmdPanelUnitStatus[lp_player], libCOUI_gv_cU_GPUnit[lp_player], PlayerGroupSingle(lp_player));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:5308


    // Implementation
    if ((TechTreeUpgradeCount(lv_tychusplayer, "TychusCoopFifthHeroUpgrade", c_techCountCompleteOnly) == 0)) {
        lv_numberofheroeswithheld = 1;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9477


    DialogControlSetAnimationState(libCOUI_gv_cU_ZeratulSelectionButtonContainers[libCOMI_gf_CM_ZeratulProphecyEventGetArtifactNumber()], PlayerGroupAll(), "ArtifactState", "Used");
    if ((libCOMI_gf_CM_ZeratulProphecyEventGetArtifactNumber() == 3) && (TechTreeUpgradeCount(libCOMI_gf_CM_ZeratulProphecyEventGetPlayer(), "ZeratulArtifactUpgradeTier3A", c_techCountCompleteOnly) > 0)) {
        DialogControlSetAnimationState(libCOUI_gv_cU_GPPanel[libCOMI_gf_CM_ZeratulProphecyEventGetPlayer()], PlayerGroupAll(), "AvatarState", "Form");
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:9480

        DialogControlSetAnimationState(libCOUI_gv_cU_GPPanel[libCOMI_gf_CM_ZeratulProphecyEventGetPlayer()], PlayerGroupAll(), "AvatarState", "Form");
    }
    else if ((libCOMI_gf_CM_ZeratulProphecyEventGetArtifactNumber() == 3) && (TechTreeUpgradeCount(libCOMI_gf_CM_ZeratulProphecyEventGetPlayer(), "ZeratulArtifactUpgradeTier3B", c_techCountCompleteOnly) > 0)) {
        DialogControlSetAnimationState(libCOUI_gv_cU_GPPanel[libCOMI_gf_CM_ZeratulProphecyEventGetPlayer()], PlayerGroupAll(), "AvatarState", "Essence");
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1577

	order ord; 
	//c_prioTransport ?
	if ((TechTreeUpgradeCount(player, c_ZR_RoachUnderground, c_techCountCompleteOnly) > 0)) {
		
		if (AIPathingCostUnit (aiUnit, AIWaveGoal(AIUnitGetWave(aiUnit)), true) < 0) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1602

	order ord; 
	
	if (TechTreeUpgradeCount(player, c_ZR_RoachUnderground, c_techCountCompleteOnly) > 0) {
		
		if (AIPathingCostUnit (aiUnit, AIWaveGoal(AIUnitGetWave(aiUnit)), true) < 0) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:3465

    }

    if ((TechTreeUpgradeCount(1, "K5AutoExtractor", c_techCountQueuedOrBetter) > 0)) {
        UnitGroupAddUnitGroup(lv_unitGroupHarvestMinerals, UnitGroup(null, 1, lp_regionGasWorker, UnitFilter((1 << c_targetFilterWorker), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    }

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:49

        }

        if (!((TechTreeUpgradeCount(lv_attackingowner, "ArtifactHeroAttackTeleport", c_techCountCompleteOnly) > 0))) {
            return false;
        }

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:101

        lv_player = PlayerGroupNextPlayer(autoABFD2902_g, lv_player);
        if (lv_player < 0) { break; }
        if ((TechTreeUpgradeCount(lv_player, "ArtifactShredders", c_techCountCompleteOnly) > 0)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(2, "UnbreakableShredder", 0, lv_player, PlayerStartLocation(lv_player));
        }

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:137

        lv_player = PlayerGroupNextPlayer(autoF2835DC1_g, lv_player);
        if (lv_player < 0) { break; }
        if ((TechTreeUpgradeCount(lv_player, "ArtifactGreaterStaffofTeleportation", c_techCountCompleteOnly) > 0)) {
            TriggerEnable(libPEqu_gt_ArtifactGreaterStaffOfTeleportation, true);
            return true;

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:170

    // Conditions
    if (testConds) {
        if (!((TechTreeUpgradeCount(lv_player, "ArtifactGreaterStaffofTeleportation", c_techCountCompleteOnly) > 0))) {
            return false;
        }

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:232

        lv_player = PlayerGroupNextPlayer(auto81B3F814_g, lv_player);
        if (lv_player < 0) { break; }
        if ((TechTreeUpgradeCount(lv_player, "ArtifactCaskofHolyWater", c_techCountCompleteOnly) > 0)) {
            auto39CE8D99_g = UnitGroup(null, lv_player, RegionEntireMap(), UnitFilter((1 << c_targetFilterStructure) | (1 << c_targetFilterPreventReveal), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
            auto39CE8D99_u = UnitGroupCount(auto39CE8D99_g, c_unitCountAll);

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:259

    // Conditions
    if (testConds) {
        if (!((TechTreeUpgradeCount(UnitGetOwner(EventUnitProgressUnit()), "ArtifactCaskofHolyWater", c_techCountCompleteOnly) > 0))) {
            return false;
        }

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:308

        lv_player = PlayerGroupNextPlayer(auto151892E8_g, lv_player);
        if (lv_player < 0) { break; }
        if ((TechTreeUpgradeCount(lv_player, "ArtifactShepherdsStaff", c_techCountCompleteOnly) > 0)) {
            auto2FF98D29_g = UnitGroup(null, lv_player, RegionEntireMap(), UnitFilter((1 << c_targetFilterStructure) | (1 << c_targetFilterPreventReveal), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
            auto2FF98D29_u = UnitGroupCount(auto2FF98D29_g, c_unitCountAll);

mods/warcoop/progression/equipments.sc2modbase.sc2data/LibPEqu.galaxy:335

    // Conditions
    if (testConds) {
        if (!((TechTreeUpgradeCount(UnitGetOwner(EventUnitProgressUnit()), "ArtifactShepherdsStaff", c_techCountCompleteOnly) > 0))) {
            return false;
        }

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:1132

        lv_p = PlayerGroupNextPlayer(autoA298C663_g, lv_p);
        if (lv_p < 0) { break; }
        if ((TechTreeUpgradeCount(lv_p, "Rhrt", c_techCountCompleteOnly) == 0)) {
            TechTreeUnitAllow(lv_p, "hrtt", false);
        }

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:1136

        }

        if ((TechTreeUpgradeCount(lv_p, "Robk", c_techCountCompleteOnly) == 0)) {
            TechTreeUnitAllow(lv_p, "otbk", false);
        }

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/Common_ai.galaxy:39

}
int GetUpgradeLevel(int player, string id){
    return TechTreeUpgradeCount(player, id, c_techCountCompleteOnly);
}
int GetFoodMade(string unitId){

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/Orc/Orc.galaxy:23

}
void GAw3_AIStockUpgradeEx(int player, int qty, string aliasType){
    int has=TechTreeUpgradeCount(player,aliasType,c_techCountQueuedOrBetter); 
    int count=qty-has;