# 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
- [F] —
void
— Enable/Disable Tech Tree Requirements — ( TechTreeRequirementsEnable ) - [F] —
bool
— Requirements Are Enabled For Player — ( TechTreeRequirementsEnabled ) - [F] —
void
— Enable/Disable Tech Tree Restrictions — ( TechTreeRestrictionsEnable ) - [F] —
bool
— Restrictions Are Enabled For Player — ( TechTreeRestrictionsEnabled )
# Examples
# campaigns/liberty.sc2campaign
// L212
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L533
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L298
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L231
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L494
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L207
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L540
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L207
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L1076
TechTreeRestrictionsEnable(gv_p01_USER, true)
// L816
TechTreeRestrictionsEnable(gv_p03_DOMINION_RED, false)
// L1076
TechTreeRestrictionsEnable(gv_p01_USER, true)
// L816
TechTreeRestrictionsEnable(gv_p03_DOMINION_RED, false)
// L212
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L231
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L533
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L298
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L494
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L207
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L540
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
// L207
TechTreeRestrictionsEnable(gv_pLAYER_USER, true)
# campaigns/libertystory.sc2campaign
// L6969
TechTreeRestrictionsEnable(lp_player, true)
# campaigns/swarm.sc2campaign
// L1122
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true)
// L1122
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true)
# campaigns/swarmstory.sc2campaign
// L7110
TechTreeRestrictionsEnable(lp_player, true)
# campaigns/voidstory.sc2campaign
// L5901
TechTreeRestrictionsEnable(lp_player, true)
# mods/missionpacks/campaigncommon.sc2mod
// L1821
TechTreeRestrictionsEnable(lp_player, true)
# mods/starcoop/starcoop.sc2mod
// L3871
TechTreeRestrictionsEnable(lp_player, true)
# mods/voidprologue.sc2mod
// L5358
TechTreeRestrictionsEnable(lp_player, true)
# mods/warcoop/warcoopdata.sc2mod
// L2075
TechTreeRestrictionsEnable(lp_player, true)