# 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
- Specific Requirements Are Enabled For Player —
bool
— TechTreeSpecificRequirementEnabled - Enable/Disable SpecificTech Tree Requirements —
void
— TechTreeSpecificRequirementEnable - Allow/Disallow Behavior For Player —
void
— TechTreeBehaviorAllow - Allow/Disallow Ability For Player —
void
— TechTreeAbilityAllow - Allow/Disallow Unit For Player —
void
— TechTreeUnitAllow - Allow/Disallow Upgrade For Player —
void
— TechTreeUpgradeAllow - Ability Is Allowed For Player —
bool
— TechTreeAbilityIsAllowed - Behavior Is Allowed For Player —
bool
— TechTreeBehaviorIsAllowed - Unit Is Allowed For Player —
bool
— TechTreeUnitIsAllowed - Upgrade Is Allowed For Player —
bool
— TechTreeUpgradeIsAllowed - Add Upgrade Level For Player —
void
— TechTreeUpgradeAddLevel - Set Upgrade Level For Player —
void
— libNtve_gf_SetUpgradeLevelForPlayer - Set Production Cap For Player —
void
— TechTreeSetProduceCap - Production Cap For Player —
int
— TechTreeGetProduceCap
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6109
// Automatic Variable Declarations
// Implementation
TechTreeSetProduceCap(lp_player, "Alias_TychusUniqueUnit", c_techCatUnit, libCOMI_gv_cM_Tychus_MaxHeroCount);
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6110
// Implementation
TechTreeSetProduceCap(lp_player, "Alias_TychusUniqueUnit", c_techCatUnit, libCOMI_gv_cM_Tychus_MaxHeroCount);
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6111
TechTreeSetProduceCap(lp_player, "Alias_TychusUniqueUnit", c_techCatUnit, libCOMI_gv_cM_Tychus_MaxHeroCount);
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6112
TechTreeSetProduceCap(lp_player, "TychusCoop", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6113
TechTreeSetProduceCap(lp_player, "TychusReaper", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6114
TechTreeSetProduceCap(lp_player, "TychusWarhound", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6115
TechTreeSetProduceCap(lp_player, "TychusFirebat", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6116
TechTreeSetProduceCap(lp_player, "TychusHERC", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMedic", c_techCatUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6117
TechTreeSetProduceCap(lp_player, "TychusMarauder", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMedic", c_techCatUnit, 1);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6118
TechTreeSetProduceCap(lp_player, "TychusGhost", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusSpectre", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TychusMedic", c_techCatUnit, 1);
}
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:1140
}
TechTreeSetProduceCap(lv_p, "uske", c_techCatUnit, libGAw3_gv_bj_MAX_SKELETONS);
}
return true;
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:259
for ( ; autoACA08899_i <= UserDataInstanceCount(autoACA08899_userType) ; autoACA08899_i += 1 ) {
lv_itLimitInstance = UserDataInstance(autoACA08899_userType, autoACA08899_i);
TechTreeSetProduceCap(lv_p, UserDataGetGameLink("MeleeSetting_HeroLimit", lv_itLimitInstance, "Hero", 1), c_techCatUnit, UserDataGetInt("MeleeSetting_HeroLimit", lv_itLimitInstance, "Limit", 1));
}
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2073
PlayerSetCommander(lp_player, lv_commander);
TechTreeUpgradeAddLevel(lp_player, "WarcraftCommander", 1);
TechTreeSetProduceCap(lp_player, "_CoopHero", c_techCatUnit, 1);
TechTreeSetProduceCap(lp_player, "TALT", c_techCatUnit, 1);
TechTreeRestrictionsEnable(lp_player, true);
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2074
TechTreeUpgradeAddLevel(lp_player, "WarcraftCommander", 1);
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);