# Enable/Disable Tech Tree Restrictions
Grammar — isEnabled|Enable/Disable tech tree restrictions for player p
Flags —Native
|Action
Enables or disables all tech restrictions for the specified player. When tech restrictions are enabled, then all ability commands that are flagged as Restricted or Suppressed will not show up on unit command cards in game. Use “Allow/Disallow Ability For Player”, “Allow/Disallow Behavior For Player”, “Allow/Disallow Unit For Player”, and “Allow/Disallow Upgrade For Player” to enable Restricted or Suppressed commands. If a command is Restricted, then the ability, behavior, unit, or upgrade that is tied to it must be directly allowed. If a command is Suppressed, however, then it may be enabled when something else is allowed. For example, if the train Banshee command is Restricted, and the build Factory and build Starport commands are Suppressed, allowing the Banshee will also allow the Factory and Starport, because you cannot train a Banshee without first constructing those buildings.
# Arguments
int
— Playerbool
<preset::Enable_Disable_Option> — Enabled
Returns — void
native void TechTreeRestrictionsEnable(
int player,
bool enable,
);
# Related
Category: Tech Tree / Global Restrictions
- Enable/Disable Tech Tree Requirements —
void
— TechTreeRequirementsEnable - Requirements Are Enabled For Player —
bool
— TechTreeRequirementsEnabled - Enable/Disable Tech Tree Restrictions —
void
— TechTreeRestrictionsEnable - Restrictions Are Enabled For Player —
bool
— TechTreeRestrictionsEnabled
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttutorial01.sc2map/MapScript.galaxy:1076
}
TechTreeRestrictionsEnable(gv_p01_USER, true);
TechTreeAbilityAllow(gv_p01_USER, AbilityCommand("TerranBuild", 12), false);
TechTreeAbilityAllow(gv_p01_USER, AbilityCommand("TerranBuild", 9), false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:816
TechTreeUpgradeAddLevel(gv_p07_ZERG_PINK, "Burrow", 1);
TechTreeUpgradeAddLevel(gv_p10_ZERG_WHITEHIVE, "Burrow", 1);
TechTreeRestrictionsEnable(gv_p03_DOMINION_RED, false);
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/advancedcommand.sc2map/MapScript.galaxy:212
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TemplarArchivesResearch", 4), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TwilightCouncilResearch", 1), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/economy.sc2map/MapScript.galaxy:231
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("ScannerSweep", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TerranBuild", 1), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/protosscombat.sc2map/MapScript.galaxy:533
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("ForceField", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TemporalRift", 0), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/protosspsionics.sc2map/MapScript.galaxy:298
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("Snipe", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("PsiStorm", 0), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/terrancombat.sc2map/MapScript.galaxy:494
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Stimpack", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("SiegeMode", 0), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/terrancovertops.sc2map/MapScript.galaxy:207
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("CommandCenterLiftOff", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("OrbitalLiftOff", 0), false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/zergcombat.sc2map/MapScript.galaxy:540
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("TemporalRift", 0), false);
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/zerginfestation.sc2map/MapScript.galaxy:207
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("ArchonWarp", 0), true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("PsiStorm", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttutorial01.sc2map — MapScript.galaxy:1076
}
TechTreeRestrictionsEnable(gv_p01_USER, true);
TechTreeAbilityAllow(gv_p01_USER, AbilityCommand("TerranBuild", 12), false);
TechTreeAbilityAllow(gv_p01_USER, AbilityCommand("TerranBuild", 9), false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:816
TechTreeUpgradeAddLevel(gv_p07_ZERG_PINK, "Burrow", 1);
TechTreeUpgradeAddLevel(gv_p10_ZERG_WHITEHIVE, "Burrow", 1);
TechTreeRestrictionsEnable(gv_p03_DOMINION_RED, false);
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/advancedcommand.sc2map — MapScript.galaxy:212
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TemplarArchivesResearch", 4), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TwilightCouncilResearch", 1), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/economy.sc2map — MapScript.galaxy:231
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("ScannerSweep", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TerranBuild", 1), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosscombat.sc2map — MapScript.galaxy:533
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("ForceField", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("TemporalRift", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosspsionics.sc2map — MapScript.galaxy:298
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("Snipe", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("PsiStorm", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/terrancombat.sc2map — MapScript.galaxy:494
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("Stimpack", 0), true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("SiegeMode", 0), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/terrancovertops.sc2map — MapScript.galaxy:207
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("CommandCenterLiftOff", 0), false);
TechTreeAbilityAllow(gv_pLAYER_USER, AbilityCommand("OrbitalLiftOff", 0), false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/zergcombat.sc2map — MapScript.galaxy:540
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("TemporalRift", 0), false);
TechTreeBehaviorAllow(gv_pLAYER_USER, "ZergBuildingDies6", false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/zerginfestation.sc2map — MapScript.galaxy:207
}
TechTreeRestrictionsEnable(gv_pLAYER_USER, true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("ArchonWarp", 0), true);
TechTreeAbilityAllow(gv_pLAYER_COMPUTER1, AbilityCommand("PsiStorm", 0), true);
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:6969
// Implementation
TechTreeRestrictionsEnable(lp_player, true);
libCamp_gf_TS_UpdateTechStates();
libCamp_gf_TS_ApplyCampaignTechLimitsUnlockUnits(lp_player);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:1122
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("ZergBuild", 4), false);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("ZergBuild", 2), false);
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("LarvaTrain", 2), false);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("LarvaTrain", 0), true);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2map — MapScript.galaxy:1122
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("ZergBuild", 4), false);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("ZergBuild", 2), false);
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("LarvaTrain", 2), false);
TechTreeAbilityAllow(gv_pLAYER_01_USER, AbilityCommand("LarvaTrain", 0), true);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7110
// Implementation
libSwaC_gv_zS_ApplyingCampaignTech = true;
TechTreeRestrictionsEnable(lp_player, true);
libSwaC_gf_ZS_ApplyArmyTech(lp_player);
libSwaC_gf_ZS_UpdateQueenAbilities(lp_player);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5901
// Implementation
libVoiC_gv_pC_ApplyingCampaignTech = true;
TechTreeRestrictionsEnable(lp_player, true);
libVoiC_gf_PC_ApplyArmyTech(lp_player);
libVoiC_gf_PC_ApplyPerkTech();
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:1821
// Implementation
libComC_gv_cC_ApplyingCampaignTech = true;
TechTreeRestrictionsEnable(lp_player, true);
libComC_gf_CC_ApplyArmyTech(lp_player);
libComC_gf_CC_ApplyPerkTech(lp_player);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3871
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_COOC_0105F2B8"), false);
libCOOC_gv_cC_ApplyingCampaignTech = true;
TechTreeRestrictionsEnable(lp_player, true);
libCOOC_gf_CC_UpdateTechStates(lp_player);
libCOOC_gf_CC_ApplyArmyTech(lp_player);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:5358
// Implementation
libA3DDD02B_gv_pP_ApplyingCampaignTech = true;
TechTreeRestrictionsEnable(lp_player, true);
libA3DDD02B_gv_pP_ApplyingCampaignTech = false;
if ((lp_player == 1)) {
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2075
TechTreeSetProduceCap(lp_player, "_CoopHero", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TALT", c_techCatUnit, 1);
TechTreeRestrictionsEnable(lp_player, true);
auto7F49E592_ae = (CatalogFieldValueCount(c_gameCatalogCommander, lv_commander, "DataCollectionAllowed", lp_player) - 1);
lv_itIndex = 0;