# Set Production Cap For Player
Grammar — Limit player p to only be able to produce cap production in cat category
Flags —Native
|Action
Use -1 to remove the cap of the production.
# Arguments
int
— Playerstring
[ anygamelink ] — Productionint
[ preset::TechTreeCategory ] — Categoryint
— Cap
Returns — void
native void TechTreeSetProduceCap(
int p,
string production,
int cat,
int cap,
);
# Related
Category: Tech Tree / Individual Restrictions
- [F] —
bool
— Specific Requirements Are Enabled For Player — ( TechTreeSpecificRequirementEnabled ) - [F] —
void
— Enable/Disable SpecificTech Tree Requirements — ( TechTreeSpecificRequirementEnable ) - [F] —
void
— Allow/Disallow Behavior For Player — ( TechTreeBehaviorAllow ) - [F] —
void
— Allow/Disallow Ability For Player — ( TechTreeAbilityAllow ) - [F] —
void
— Allow/Disallow Unit For Player — ( TechTreeUnitAllow ) - [F] —
void
— Allow/Disallow Upgrade For Player — ( TechTreeUpgradeAllow ) - [F] —
bool
— Ability Is Allowed For Player — ( TechTreeAbilityIsAllowed ) - [F] —
bool
— Behavior Is Allowed For Player — ( TechTreeBehaviorIsAllowed ) - [F] —
bool
— Unit Is Allowed For Player — ( TechTreeUnitIsAllowed ) - [F] —
bool
— Upgrade Is Allowed For Player — ( TechTreeUpgradeIsAllowed ) - [F] —
void
— Add Upgrade Level For Player — ( TechTreeUpgradeAddLevel ) - [F] —
void
— Set Upgrade Level For Player — ( libNtve_gf_SetUpgradeLevelForPlayer ) - [F] —
void
— Set Production Cap For Player — ( TechTreeSetProduceCap ) - [F] —
int
— Production Cap For Player — ( TechTreeGetProduceCap )
# Examples
# mods/starcoop/starcoop.sc2mod
// L6106
TechTreeSetProduceCap(lp_player, "Alias_TychusUniqueUnit", c_techCatUnit, libCOMI_gv_cM_Tychus_MaxHeroCount)
// L6107
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1)
// L6108
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1)
// L6109
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1)
// L6110
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1)
// L6111
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1)
// L6112
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1)
// L6113
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1)
// L6114
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1)
// L6115
TechTreeSetProduceCap(lp_player, "TychusMedic", c_techCatUnit, 1)
# mods/warcoop/warclassic.sc2mod
// L1140
TechTreeSetProduceCap(lv_p, "uske", c_techCatUnit, libGAw3_gv_bj_MAX_SKELETONS)
# mods/warcoop/warclassicsystem.sc2mod
// L259
TechTreeSetProduceCap(lv_p, UserDataGetGameLink("MeleeSetting_HeroLimit", lv_itLimitInstance, "Hero", 1), c_techCatUnit, UserDataGetInt("MeleeSetting_HeroLimit", lv_itLimitInstance, "Limit", 1))
# mods/warcoop/warcoopdata.sc2mod
// L2073
TechTreeSetProduceCap(lp_player, "_CoopHero", c_techCatUnit, 1)
// L2074
TechTreeSetProduceCap(lp_player, "TALT", c_techCatUnit, 1)