Skip to content

Commit

Permalink
Add building construction speed filler item
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Dec 12, 2024
1 parent 4ee508b commit 3368a4b
Show file tree
Hide file tree
Showing 8 changed files with 472 additions and 4 deletions.
172 changes: 168 additions & 4 deletions Mods/ArchipelagoPlayer.SC2Mod/Base.SC2Data/GameData/UpgradeData.xml

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions Mods/ArchipelagoTriggers.SC2Mod/Base.SC2Data/LibABFE498B.galaxy
Original file line number Diff line number Diff line change
Expand Up @@ -9201,6 +9201,21 @@ void libABFE498B_gf_AP_Triggers_giveShieldRegeneration (int lp_player, int lp_st

}

void libABFE498B_gf_AP_Triggers_giveBuildingSpeed (int lp_player, int lp_level) {
// Variable Declarations
int lv__1stacks;
int lv__100stacks;

// Automatic Variable Declarations
// Variable Initialization
lv__1stacks = ModI(lp_level, 100);
lv__100stacks = (lp_level / 100);

// Implementation
libNtve_gf_SetUpgradeLevelForPlayer(lp_player, "AP_BuildingFastBuild", lv__1stacks);
libNtve_gf_SetUpgradeLevelForPlayer(lp_player, "AP_BuildingFastBuild100Stack", lv__100stacks);
}

void libABFE498B_gf_AP_Triggers_replaceUpgrade (int lp_player, string lp_oldUpgrade, string lp_newUpgrade) {
// Automatic Variable Declarations
// Implementation
Expand Down Expand Up @@ -9633,6 +9648,42 @@ void libABFE498B_gt_AP_Triggers_giveProtossTech_Init () {
TriggerAddEventChatMessage(libABFE498B_gt_AP_Triggers_giveProtossTech, c_playerAny, "?GiveProtossTech", false);
}

//--------------------------------------------------------------------------------------------------
// Trigger: AP_Triggers_giveMiscTech
//--------------------------------------------------------------------------------------------------
bool libABFE498B_gt_AP_Triggers_giveMiscTech_Func (bool testConds, bool runActions) {
// Variable Declarations
int lv_currentPlayer;
string lv_buildingSpeedValue;

// Automatic Variable Declarations
playergroup autoA7A687E2_g;

// Variable Initialization
lv_buildingSpeedValue = "";

// Actions
if (!runActions) {
return true;
}

lv_buildingSpeedValue = StringWord(EventChatMessage(false), 2);
autoA7A687E2_g = lib5BD4895D_gv_aP_Core_affectedPlayers;
lv_currentPlayer = -1;
while (true) {
lv_currentPlayer = PlayerGroupNextPlayer(autoA7A687E2_g, lv_currentPlayer);
if (lv_currentPlayer < 0) { break; }
libABFE498B_gf_AP_Triggers_giveBuildingSpeed(lv_currentPlayer, StringToInt(lv_buildingSpeedValue));
}
return true;
}

//--------------------------------------------------------------------------------------------------
void libABFE498B_gt_AP_Triggers_giveMiscTech_Init () {
libABFE498B_gt_AP_Triggers_giveMiscTech = TriggerCreate("libABFE498B_gt_AP_Triggers_giveMiscTech_Func");
TriggerAddEventChatMessage(libABFE498B_gt_AP_Triggers_giveMiscTech, c_playerAny, "?GiveMiscTech", false);
}

//--------------------------------------------------------------------------------------------------
// Trigger: AP_Triggers_techTreeInit
//--------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -9812,6 +9863,7 @@ void libABFE498B_InitTriggers () {
libABFE498B_gt_AP_Triggers_giveTerranTech_Init();
libABFE498B_gt_AP_Triggers_giveZergTech_Init();
libABFE498B_gt_AP_Triggers_giveProtossTech_Init();
libABFE498B_gt_AP_Triggers_giveMiscTech_Init();
libABFE498B_gt_AP_Triggers_techTreeInit_Init();
libABFE498B_gt_UpgradeProtossStructures_Init();
libABFE498B_gt_AP_Triggers_tradeNydusBuilt_Init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ void libABFE498B_gf_AP_Triggers_Protoss_unlockStargate (int lp_player);
void libABFE498B_gf_AP_Triggers_clearProtossTech (int lp_player);
void libABFE498B_gf_AP_Triggers_giveProtossDefaultTech (int lp_player);
void libABFE498B_gf_AP_Triggers_giveShieldRegeneration (int lp_player, int lp_stacks);
void libABFE498B_gf_AP_Triggers_giveBuildingSpeed (int lp_player, int lp_level);
void libABFE498B_gf_AP_Triggers_replaceUpgrade (int lp_player, string lp_oldUpgrade, string lp_newUpgrade);

// Trigger Declarations
Expand All @@ -956,6 +957,7 @@ trigger libABFE498B_gt_AP_Triggers_setOptions;
trigger libABFE498B_gt_AP_Triggers_giveTerranTech;
trigger libABFE498B_gt_AP_Triggers_giveZergTech;
trigger libABFE498B_gt_AP_Triggers_giveProtossTech;
trigger libABFE498B_gt_AP_Triggers_giveMiscTech;
trigger libABFE498B_gt_AP_Triggers_techTreeInit;
trigger libABFE498B_gt_UpgradeProtossStructures;
trigger libABFE498B_gt_AP_Triggers_tradeNydusBuilt;
Expand Down
Binary file modified Mods/ArchipelagoTriggers.SC2Mod/DocumentHeader
Binary file not shown.
Binary file modified Mods/ArchipelagoTriggers.SC2Mod/GameText.version
Binary file not shown.
241 changes: 241 additions & 0 deletions Mods/ArchipelagoTriggers.SC2Mod/Triggers
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,7 @@
<Item Type="Trigger" Library="ABFE498B" Id="C495BBBC"/>
<Item Type="Trigger" Library="ABFE498B" Id="CD39180C"/>
<Item Type="Trigger" Library="ABFE498B" Id="929D05B5"/>
<Item Type="Trigger" Library="ABFE498B" Id="6972EE17"/>
</Element>
<Element Type="Trigger" Id="D4C1FC66">
<Variable Type="Variable" Library="ABFE498B" Id="E6AD0ECA"/>
Expand Down Expand Up @@ -9712,11 +9713,128 @@
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000006"/>
<Variable Type="Variable" Library="ABFE498B" Id="EF9D5B96"/>
</Element>
<Element Type="Trigger" Id="6972EE17">
<Variable Type="Variable" Library="ABFE498B" Id="280FBED8"/>
<Variable Type="Variable" Library="ABFE498B" Id="0F0D283D"/>
<Event Type="FunctionCall" Library="ABFE498B" Id="B54F7352"/>
<Action Type="FunctionCall" Library="ABFE498B" Id="AF9E17F1"/>
<Action Type="FunctionCall" Library="ABFE498B" Id="A7A687E2"/>
</Element>
<Element Type="Variable" Id="280FBED8">
<VariableType>
<Type Value="int"/>
</VariableType>
<Value Type="Param" Library="ABFE498B" Id="CDF54740"/>
</Element>
<Element Type="Param" Id="CDF54740">
<Value>0</Value>
<ValueType Type="int"/>
</Element>
<Element Type="Variable" Id="0F0D283D">
<VariableType>
<Type Value="string"/>
</VariableType>
<Value Type="Param" Library="ABFE498B" Id="24CAB7CF"/>
</Element>
<Element Type="Param" Id="24CAB7CF">
<ValueType Type="string"/>
</Element>
<Element Type="FunctionCall" Id="B54F7352">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000121"/>
<Parameter Type="Param" Library="ABFE498B" Id="E2877FAC"/>
<Parameter Type="Param" Library="ABFE498B" Id="AABF0836"/>
<Parameter Type="Param" Library="ABFE498B" Id="CB462766"/>
</Element>
<Element Type="Param" Id="E2877FAC">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000191"/>
<Preset Type="PresetValue" Library="Ntve" Id="2999701E"/>
</Element>
<Element Type="Param" Id="AABF0836">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000193"/>
<Preset Type="PresetValue" Library="Ntve" Id="00000074"/>
</Element>
<Element Type="Param" Id="CB462766">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000192"/>
<Value>?GiveMiscTech</Value>
<ValueType Type="string"/>
</Element>
<Element Type="FunctionCall" Id="AF9E17F1">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000136"/>
<Parameter Type="Param" Library="ABFE498B" Id="4D2DC565"/>
<Parameter Type="Param" Library="ABFE498B" Id="B4131654"/>
</Element>
<Element Type="Param" Id="4D2DC565">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000219"/>
<Variable Type="Variable" Library="ABFE498B" Id="0F0D283D"/>
</Element>
<Element Type="Param" Id="B4131654">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000220"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="F904E2C3"/>
</Element>
<Element Type="FunctionCall" Id="F904E2C3">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="A078FB65"/>
<Parameter Type="Param" Library="ABFE498B" Id="151C0E82"/>
<Parameter Type="Param" Library="ABFE498B" Id="4F9A68A9"/>
</Element>
<Element Type="Param" Id="151C0E82">
<ParameterDef Type="ParamDef" Library="Ntve" Id="655C865B"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="2337286F"/>
</Element>
<Element Type="FunctionCall" Id="2337286F">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000122"/>
<Parameter Type="Param" Library="ABFE498B" Id="63AEC163"/>
</Element>
<Element Type="Param" Id="63AEC163">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000194"/>
<Preset Type="PresetValue" Library="Ntve" Id="00000076"/>
</Element>
<Element Type="Param" Id="4F9A68A9">
<ParameterDef Type="ParamDef" Library="Ntve" Id="13CABA7C"/>
<Value>2</Value>
<ValueType Type="int"/>
</Element>
<Element Type="FunctionCall" Id="A7A687E2">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="B525B112"/>
<Parameter Type="Param" Library="ABFE498B" Id="D62D59B2"/>
<Parameter Type="Param" Library="ABFE498B" Id="81F61BDD"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="BF959029"/>
</Element>
<Element Type="Param" Id="D62D59B2">
<ParameterDef Type="ParamDef" Library="Ntve" Id="A4B226A9"/>
<Variable Type="Variable" Library="5BD4895D" Id="9940F539"/>
</Element>
<Element Type="Param" Id="81F61BDD">
<ParameterDef Type="ParamDef" Library="Ntve" Id="857209C7"/>
<Variable Type="Variable" Library="ABFE498B" Id="280FBED8"/>
</Element>
<Element Type="FunctionCall" Id="BF959029">
<FunctionDef Type="FunctionDef" Library="ABFE498B" Id="A5D5531B"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="DF50D5F0"/>
<Parameter Type="Param" Library="ABFE498B" Id="2BE45CE6"/>
<Parameter Type="Param" Library="ABFE498B" Id="0A024F83"/>
</Element>
<Element Type="Param" Id="2BE45CE6">
<ParameterDef Type="ParamDef" Library="ABFE498B" Id="231AADD4"/>
<Variable Type="Variable" Library="ABFE498B" Id="280FBED8"/>
</Element>
<Element Type="Param" Id="0A024F83">
<ParameterDef Type="ParamDef" Library="ABFE498B" Id="053EE644"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="14A72ECC"/>
</Element>
<Element Type="FunctionCall" Id="14A72ECC">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000005"/>
<Parameter Type="Param" Library="ABFE498B" Id="2DE9C797"/>
</Element>
<Element Type="Param" Id="2DE9C797">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000006"/>
<Variable Type="Variable" Library="ABFE498B" Id="0F0D283D"/>
</Element>
<Element Type="Category" Id="D8190004">
<Item Type="Category" Library="ABFE498B" Id="88A46DD6"/>
<Item Type="Category" Library="ABFE498B" Id="E6AB8191"/>
<Item Type="Category" Library="ABFE498B" Id="995A2BA1"/>
<Item Type="Category" Library="ABFE498B" Id="CE8191DF"/>
<Item Type="Category" Library="ABFE498B" Id="B8893127"/>
<Item Type="Trigger" Library="ABFE498B" Id="251CB9EA"/>
</Element>
<Element Type="Category" Id="88A46DD6">
Expand Down Expand Up @@ -79114,6 +79232,129 @@
<Value>0</Value>
<ValueType Type="int"/>
</Element>
<Element Type="Category" Id="B8893127">
<Item Type="FunctionDef" Library="ABFE498B" Id="A5D5531B"/>
</Element>
<Element Type="FunctionDef" Id="A5D5531B">
<FlagAction/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="231AADD4"/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="053EE644"/>
<Variable Type="Variable" Library="ABFE498B" Id="5415E72B"/>
<Variable Type="Variable" Library="ABFE498B" Id="F2BE6168"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="4D60E9F1"/>
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="BE220CE3"/>
</Element>
<Element Type="ParamDef" Id="231AADD4">
<ParameterType>
<Type Value="int"/>
</ParameterType>
<Default Type="Param" Library="ABFE498B" Id="EE6BE71C"/>
</Element>
<Element Type="Param" Id="EE6BE71C">
<Value>0</Value>
<ValueType Type="int"/>
</Element>
<Element Type="ParamDef" Id="053EE644">
<ParameterType>
<Type Value="int"/>
</ParameterType>
<Default Type="Param" Library="ABFE498B" Id="FDD0B71D"/>
</Element>
<Element Type="Param" Id="FDD0B71D">
<Value>0</Value>
<ValueType Type="int"/>
</Element>
<Element Type="Variable" Id="5415E72B">
<VariableType>
<Type Value="int"/>
</VariableType>
<Value Type="Param" Library="ABFE498B" Id="DE9B8076"/>
</Element>
<Element Type="Param" Id="DE9B8076">
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="52FDEF4B"/>
</Element>
<Element Type="FunctionCall" Id="52FDEF4B">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="EEDB2448"/>
<Parameter Type="Param" Library="ABFE498B" Id="3CA2F597"/>
<Parameter Type="Param" Library="ABFE498B" Id="74A41FAE"/>
</Element>
<Element Type="Param" Id="3CA2F597">
<ParameterDef Type="ParamDef" Library="Ntve" Id="1F52348B"/>
<Value>100</Value>
<ValueType Type="int"/>
</Element>
<Element Type="Param" Id="74A41FAE">
<ParameterDef Type="ParamDef" Library="Ntve" Id="7438F000"/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="053EE644"/>
</Element>
<Element Type="Variable" Id="F2BE6168">
<VariableType>
<Type Value="int"/>
</VariableType>
<Value Type="Param" Library="ABFE498B" Id="EBED777D"/>
</Element>
<Element Type="Param" Id="EBED777D">
<FunctionCall Type="FunctionCall" Library="ABFE498B" Id="9FFADEB4"/>
</Element>
<Element Type="FunctionCall" Id="9FFADEB4">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000128"/>
<Parameter Type="Param" Library="ABFE498B" Id="FAB8BCE1"/>
<Parameter Type="Param" Library="ABFE498B" Id="23B22C81"/>
<Parameter Type="Param" Library="ABFE498B" Id="99003C84"/>
</Element>
<Element Type="Param" Id="FAB8BCE1">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000206"/>
<Preset Type="PresetValue" Library="Ntve" Id="00000088"/>
</Element>
<Element Type="Param" Id="23B22C81">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000207"/>
<Value>100</Value>
<ValueType Type="int"/>
</Element>
<Element Type="Param" Id="99003C84">
<ParameterDef Type="ParamDef" Library="Ntve" Id="00000205"/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="053EE644"/>
</Element>
<Element Type="FunctionCall" Id="4D60E9F1">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="9F8EF8FB"/>
<Parameter Type="Param" Library="ABFE498B" Id="1679B231"/>
<Parameter Type="Param" Library="ABFE498B" Id="BCBDE8E9"/>
<Parameter Type="Param" Library="ABFE498B" Id="2BF62930"/>
</Element>
<Element Type="Param" Id="1679B231">
<ParameterDef Type="ParamDef" Library="Ntve" Id="C7188352"/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="231AADD4"/>
</Element>
<Element Type="Param" Id="BCBDE8E9">
<ParameterDef Type="ParamDef" Library="Ntve" Id="3BFEECBB"/>
<Variable Type="Variable" Library="ABFE498B" Id="5415E72B"/>
</Element>
<Element Type="Param" Id="2BF62930">
<ParameterDef Type="ParamDef" Library="Ntve" Id="7E5035EE"/>
<Value>AP_BuildingFastBuild</Value>
<ValueType Type="gamelink"/>
<ValueGameType Type="Upgrade"/>
</Element>
<Element Type="FunctionCall" Id="BE220CE3">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="9F8EF8FB"/>
<Parameter Type="Param" Library="ABFE498B" Id="87995E6D"/>
<Parameter Type="Param" Library="ABFE498B" Id="A70F28DD"/>
<Parameter Type="Param" Library="ABFE498B" Id="A2435A01"/>
</Element>
<Element Type="Param" Id="87995E6D">
<ParameterDef Type="ParamDef" Library="Ntve" Id="C7188352"/>
<Parameter Type="ParamDef" Library="ABFE498B" Id="231AADD4"/>
</Element>
<Element Type="Param" Id="A70F28DD">
<ParameterDef Type="ParamDef" Library="Ntve" Id="3BFEECBB"/>
<Variable Type="Variable" Library="ABFE498B" Id="F2BE6168"/>
</Element>
<Element Type="Param" Id="A2435A01">
<ParameterDef Type="ParamDef" Library="Ntve" Id="7E5035EE"/>
<Value>AP_BuildingFastBuild100Stack</Value>
<ValueType Type="gamelink"/>
<ValueGameType Type="Upgrade"/>
</Element>
<Element Type="Trigger" Id="251CB9EA">
<Variable Type="Variable" Library="ABFE498B" Id="F05A9299"/>
<Action Type="FunctionCall" Library="ABFE498B" Id="469AFECB"/>
Expand Down
Binary file modified Mods/ArchipelagoTriggers.SC2Mod/Triggers.version
Binary file not shown.
Loading

0 comments on commit 3368a4b

Please sign in to comment.