# Enable/Disable Tech Tree Restrictions

GrammarisEnabled|Enable/Disable tech tree restrictions for player p
FlagsNative | 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

Returns — void

native void TechTreeRestrictionsEnable(
	int player,
	bool enable,
);

Category: Tech Tree / Global Restrictions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// 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

CampaignLib.galaxy

// L6969
TechTreeRestrictionsEnable(lp_player, true)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L1122
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true)
// L1122
TechTreeRestrictionsEnable(gv_pLAYER_02_DOMINION2, true)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L7110
TechTreeRestrictionsEnable(lp_player, true)

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L5901
TechTreeRestrictionsEnable(lp_player, true)

# mods/missionpacks/campaigncommon.sc2mod

LibComC.galaxy

// L1821
TechTreeRestrictionsEnable(lp_player, true)

# mods/starcoop/starcoop.sc2mod

LibCOOC.galaxy

// L3871
TechTreeRestrictionsEnable(lp_player, true)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L5358
TechTreeRestrictionsEnable(lp_player, true)

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2075
TechTreeRestrictionsEnable(lp_player, true)