Skip to content

Commit

Permalink
Allow tweaking factory production times for Classic
Browse files Browse the repository at this point in the history
To match 3.2+ production times if they want.

Also, fix naming capitalizations for classic tweaks options.
  • Loading branch information
KJeff01 committed Apr 20, 2024
1 parent d538340 commit 2568be6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions data/base/script/campaign/cam2-a.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ function cam2Setup()
camCompleteRequiredResearch(mis_alphaResearchNewClassic, CAM_HUMAN_PLAYER);
camCompleteRequiredResearch(mis_playerResBetaClassic, CAM_HUMAN_PLAYER);

if (tweakOptions.camclassic_Balance32)
if (tweakOptions.camClassic_balance32)
{
camClassicResearch(mis_betaStartingResearchClassic, CAM_HUMAN_PLAYER);
completeResearch("CAM2RESEARCH-UNDO", CAM_HUMAN_PLAYER);
//The Collective have no research in 3.2
}
else
{
completeResearch("CAM2RESEARCH-UNDO-Rockets", CAM_HUMAN_PLAYER);
completeResearch("CAM2RESEARCH-UNDO-Rockets", CAM_HUMAN_PLAYER);
camCompleteRequiredResearch(mis_betaStartingResearchClassic, CAM_HUMAN_PLAYER);
camCompleteRequiredResearch(mis_alphaResearchNewClassic, CAM_THE_COLLECTIVE);
camCompleteRequiredResearch(collectiveResClassic, CAM_THE_COLLECTIVE);
Expand Down
2 changes: 1 addition & 1 deletion data/base/script/campaign/cam3-a.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function cam3Setup()
camCompleteRequiredResearch(mis_playerResBetaClassic, CAM_HUMAN_PLAYER);
camCompleteRequiredResearch(mis_playerResGammaClassic, CAM_HUMAN_PLAYER);

if (tweakOptions.camclassic_Balance32)
if (tweakOptions.camClassic_balance32)
{
camClassicResearch(mis_gammaStartingResearchClassic, CAM_HUMAN_PLAYER);
completeResearch("CAM2RESEARCH-UNDO", CAM_HUMAN_PLAYER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function camUpgradeOnMapTemplates(template1, template2, playerId, excluded)
// Boosts the throttle on factories if classic balance is active.
function __camFactoryThrottleMultiplier()
{
return ((camClassicMode()) ? 2 : 1);
return ((camClassicMode() && tweakOptions.camClassic_slowProduction) ? 2 : 1);
}

function __camFactoryUpdateTactics(flabel)
Expand Down
2 changes: 1 addition & 1 deletion data/base/script/campaign/libcampaign_includes/research.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function camClassicResearch(researchIds, playerId)
{
return;
}
if (tweakOptions.camclassic_Balance32)
if (tweakOptions.camClassic_balance32)
{
camEnableRes(researchIds, playerId);
}
Expand Down
15 changes: 13 additions & 2 deletions data/mods/campaign/wz2100_camclassic/mod-info.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,25 @@
],
"customTweakOptions": [
{
"id": "camclassic_Balance32",
"id": "camClassic_balance32",
"type": "bool",
"default": false,
"displayName": {
"en": "3.2.x Balance"
},
"description": {
"en": "3.2.x series balance by emulating research bugs"
"en": "3.2.x series balance by emulating research bugs."
}
},
{
"id": "camClassic_slowProduction",
"type": "bool",
"default": true,
"displayName": {
"en": "Slow Factory Production"
},
"description": {
"en": "Slower AI factory production times."
}
}
]
Expand Down

0 comments on commit 2568be6

Please sign in to comment.