Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing raceswap bugs #242

Merged
merged 1 commit into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,6 @@ bool gt_FactionSwapInit_Func (bool testConds, bool runActions) {
else {
libABFE498B_gv_aP_Triggers_skipCutscenes = true;
lib15EF4C78_gf_RemoveUnusedStartingUnits(UnitGroupFromId(5), libABFE498B_gv_aP_Triggers_Option_overridePlayerRace);
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionEntireMap(), gv_p01_USER);
lib15EF4C78_gf_AP_Player_UtilTownHallAutoRally(gv_p01_USER);
if ((libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Zerg")) {
UnitSetPropertyFixed(UnitFromId(237324189), c_unitPropEnergyPercent, 100.0);
autoE89A680B_g = UnitGroup("AP_Lair", gv_p01_USER, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
Expand Down Expand Up @@ -1434,6 +1432,8 @@ bool gt_FactionSwapInit_Func (bool testConds, bool runActions) {
}

}
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionEntireMap(), gv_p01_USER);
lib15EF4C78_gf_AP_Player_UtilTownHallAutoRally(gv_p01_USER);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@
<Unit id="Food1000"/>
<Unit id="InfestableBiodome" Variations="1,2,3,4"/>
<Unit id="InfestedColonistShip" Variations="2,3"/>
<Unit id="AP_Zergling"/>
<Unit id="AP_InfestedAbomination"/>
<Unit id="AP_VikingAssault"/>
<Unit id="AP_VikingFighter"/>
<Unit id="AP_SupplyDepot"/>
Expand All @@ -201,8 +203,6 @@
<Unit id="AP_Factory"/>
<Unit id="AP_SCV"/>
<Unit id="AP_CommandCenter"/>
<Unit id="AP_InfestedAbomination"/>
<Unit id="AP_Zergling"/>
<Unit id="AP_CreepTumorBurrowed"/>
<Unit id="AP_Starport"/>
<Unit id="AP_Viper"/>
Expand Down
54 changes: 27 additions & 27 deletions Maps/ArchipelagoCampaign/WoL/ap_havens_fall.SC2Map/Triggers
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,9 @@
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000137"/>
<FunctionCall Type="FunctionCall" Id="84A62B4E"/>
<FunctionCall Type="FunctionCall" Id="4D04870E"/>
<FunctionCall Type="FunctionCall" Id="6B71613C"/>
<FunctionCall Type="FunctionCall" Id="CC1F2175"/>
<FunctionCall Type="FunctionCall" Id="75AC58BC"/>
<FunctionCall Type="FunctionCall" Id="6B71613C"/>
<FunctionCall Type="FunctionCall" Id="518A017B"/>
<FunctionCall Type="FunctionCall" Id="8272CB15"/>
</Element>
Expand Down Expand Up @@ -1816,32 +1816,6 @@
<ParameterDef Type="ParamDef" Library="15EF4C78" Id="64EC5B75"/>
<Variable Type="Variable" Library="ABFE498B" Id="97D80BC5"/>
</Element>
<Element Type="FunctionCall" Id="CC1F2175">
<FunctionDef Type="FunctionDef" Library="Lbty" Id="05E197DE"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000005"/>
<Parameter Type="Param" Id="83B66D8C"/>
<Parameter Type="Param" Id="36B2D379"/>
</Element>
<Element Type="Param" Id="83B66D8C">
<ParameterDef Type="ParamDef" Library="Lbty" Id="97BDB33A"/>
<FunctionCall Type="FunctionCall" Id="C10A1CA3"/>
</Element>
<Element Type="FunctionCall" Id="C10A1CA3">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000356"/>
</Element>
<Element Type="Param" Id="36B2D379">
<ParameterDef Type="ParamDef" Library="Lbty" Id="3F42FBCD"/>
<Variable Type="Variable" Id="2A54A03E"/>
</Element>
<Element Type="FunctionCall" Id="75AC58BC">
<FunctionDef Type="FunctionDef" Library="15EF4C78" Id="84565F53"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000005"/>
<Parameter Type="Param" Id="C7FCA900"/>
</Element>
<Element Type="Param" Id="C7FCA900">
<ParameterDef Type="ParamDef" Library="15EF4C78" Id="CF70F2A6"/>
<Variable Type="Variable" Id="2A54A03E"/>
</Element>
<Element Type="FunctionCall" Id="6B71613C">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000137"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000005"/>
Expand Down Expand Up @@ -2220,6 +2194,32 @@
<ValueType Type="gamelink"/>
<ValueGameType Type="Race"/>
</Element>
<Element Type="FunctionCall" Id="CC1F2175">
<FunctionDef Type="FunctionDef" Library="Lbty" Id="05E197DE"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000005"/>
<Parameter Type="Param" Id="83B66D8C"/>
<Parameter Type="Param" Id="36B2D379"/>
</Element>
<Element Type="Param" Id="83B66D8C">
<ParameterDef Type="ParamDef" Library="Lbty" Id="97BDB33A"/>
<FunctionCall Type="FunctionCall" Id="C10A1CA3"/>
</Element>
<Element Type="FunctionCall" Id="C10A1CA3">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000356"/>
</Element>
<Element Type="Param" Id="36B2D379">
<ParameterDef Type="ParamDef" Library="Lbty" Id="3F42FBCD"/>
<Variable Type="Variable" Id="2A54A03E"/>
</Element>
<Element Type="FunctionCall" Id="75AC58BC">
<FunctionDef Type="FunctionDef" Library="15EF4C78" Id="84565F53"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000005"/>
<Parameter Type="Param" Id="C7FCA900"/>
</Element>
<Element Type="Param" Id="C7FCA900">
<ParameterDef Type="ParamDef" Library="15EF4C78" Id="CF70F2A6"/>
<Variable Type="Variable" Id="2A54A03E"/>
</Element>
<Element Type="FunctionCall" Id="518A017B">
<FunctionDef Type="FunctionDef" Library="15EF4C78" Id="3E0709E3"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000004"/>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3752,6 +3752,7 @@
<FinalEffect value="AP_ZerglingRespawnControllerRebirth"/>
</CBehaviorBuff>
<CBehaviorBuff id="AP_ZerglingRespawnDeath">
<BehaviorCategories index="Permanent" value="1"/>
<InfoFlags index="Hidden" value="1"/>
<EditorCategories value="Race:Zerg,AbilityorEffectType:Units"/>
<Requirements value="AP_ZerglingRespawnEnabled"/>
Expand Down Expand Up @@ -5655,6 +5656,7 @@
<ExpireEffect value="AP_ZealotPurifierReviveApplyBehavior"/>
</CBehaviorBuff>
<CBehaviorBuff id="AP_ZealotRespawnDeath">
<BehaviorCategories index="Permanent" value="1"/>
<InfoFlags index="Hidden" value="1"/>
<EditorCategories value="Race:Protoss,AbilityorEffectType:Units"/>
<DamageResponse Fatal="1" Handled="AP_ZealotRespawnDeathSet">
Expand Down Expand Up @@ -7039,6 +7041,7 @@
</DamageResponse>
</CBehaviorBuff>
<CBehaviorBuff id="AP_AberrationBanelingIncubation">
<BehaviorCategories index="Permanent" value="1"/>
<InfoFlags index="Hidden" value="1"/>
<Modification>
<DeathResponse Chance="1" Effect="AP_AberrationBanelingIncubationCU"/>
Expand All @@ -7058,6 +7061,7 @@
</Modification>
</CBehaviorBuff>
<CBehaviorBuff id="AP_CorruptorScourgeIncubation">
<BehaviorCategories index="Permanent" value="1"/>
<InfoFlags index="Hidden" value="1"/>
<Modification>
<DeathResponse Chance="1" Effect="AP_CorruptorScourgeIncubationSwitch">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,7 @@ void lib15EF4C78_gf_RemoveUnusedStartingUnits (unitgroup lp_startingUnits, strin
}

if ((CatalogFieldValueGet(c_gameCatalogUnit, UnitGetType(autoA0E4A284_var), "Race", c_playerAny) != CatalogFieldValueGet(c_gameCatalogRace, lp_desiredFaction, "AttributeId", c_playerAny))) {
UnitBehaviorRemoveCategory(autoA0E4A284_var, c_unitBehaviorFlagPermanent);
UnitRemove(autoA0E4A284_var);
}

Expand Down
Binary file modified Mods/ArchipelagoPlayer.SC2Mod/DocumentHeader
Binary file not shown.
Binary file modified Mods/ArchipelagoPlayer.SC2Mod/GameData.version
Binary file not shown.
25 changes: 25 additions & 0 deletions Mods/ArchipelagoPlayer.SC2Mod/Triggers
Original file line number Diff line number Diff line change
Expand Up @@ -61141,10 +61141,35 @@
<Element Type="FunctionCall" Id="202CF0CD">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="00000137"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="9441B8B5"/>
<FunctionCall Type="Comment" Library="15EF4C78" Id="712683C2"/>
<FunctionCall Type="FunctionCall" Library="15EF4C78" Id="9623A6B9"/>
<FunctionCall Type="Comment" Library="15EF4C78" Id="347B357F"/>
<FunctionCall Type="FunctionCall" Library="15EF4C78" Id="D5E7B1D9"/>
<FunctionCall Type="FunctionCall" Library="15EF4C78" Id="65403F3A"/>
</Element>
<Element Type="Comment" Id="712683C2">
<Comment>
&quot;Permanent&quot; behaviors can include on-death effects which might inadvertently trigger on unit removal
</Comment>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000004"/>
</Element>
<Element Type="FunctionCall" Id="9623A6B9">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="47D6D6BB"/>
<SubFunctionType Type="SubFuncType" Library="Ntve" Id="00000004"/>
<Parameter Type="Param" Library="15EF4C78" Id="6F074D4B"/>
<Parameter Type="Param" Library="15EF4C78" Id="D67C0625"/>
</Element>
<Element Type="Param" Id="6F074D4B">
<ParameterDef Type="ParamDef" Library="Ntve" Id="1638EDC1"/>
<FunctionCall Type="FunctionCall" Library="15EF4C78" Id="0114487A"/>
</Element>
<Element Type="FunctionCall" Id="0114487A">
<FunctionDef Type="FunctionDef" Library="Ntve" Id="19CE733E"/>
</Element>
<Element Type="Param" Id="D67C0625">
<ParameterDef Type="ParamDef" Library="Ntve" Id="7F636C64"/>
<Preset Type="PresetValue" Library="Ntve" Id="C708B9C5"/>
</Element>
<Element Type="Comment" Id="347B357F">
<Comment>
If unit race != desired faction
Expand Down
Binary file modified Mods/ArchipelagoPlayer.SC2Mod/Triggers.version
Binary file not shown.