OvercastCommunity / CommunityMaps

Repository for community created maps for oc.tc
Creative Commons Attribution Share Alike 4.0 International
18 stars 42 forks source link

Fall of Babylon - Bug Fixes #955

Closed arcadeboss closed 2 weeks ago

arcadeboss commented 2 weeks ago

This fixes two bugs related to displaying too many messages to players for the "seal" and "spy" messages. (Used 3 accounts to verify during testing)

Also removed the player name replacement logic, since it doesn't work with match-level events.

Pablete1234 commented 2 weeks ago

Also removed the player name replacement logic, since it doesn't work with match-level events.

looking at your current usage in the xml, it should work. Match-scoped message actions can use a player replacement, the only thing you need is the variable used to be player-scoped and exclusive

Pablete1234 commented 2 weeks ago

Yeah i see the issue, those seal-broke triggers are player-scoped but they act on a match-scoped filter, meaning each player is going to trigger it for everyone. This is not reasonable behavior!!

arcadeboss commented 2 weeks ago

The trigger for the seal broken messages is player scoped, but the actual filter that sets it off has no relation to a specific player. That could be what is being referenced.

You could instead use block drops to apply a kit when webs are broken within the wool room region. The kit has the set x_seal_breaker action as part of it. That solves getting the correct player name. In that same action, switch scope to match conditionally if the x-seal-broke filter returns true.

It looks like by changing the team upgrade alerts and spy reports to team scope you wouldn't need the cooldowns (which is a bandaid rather than addressing the issue). Currently when <trigger filter="all(armor_upgrade_variable=1)" scope="player"> is triggered, then, for example, every single player on Blue triggers 1 spy report for Red (20 Blue -> 20 spy reports).

I had tried using the block drops to apply a kit to solve this same issue for Bed Rush, but I wasn't able to get the kit to work. This case is a bit different, and might work better though.

When you say "kit has the set x_seal_breaker action as part of it", how is that implemented? My thought previously was to give some exclusive item in the kit and then have another action that is watching for carrying that item. Is this roughly what you mean, or is there a more direct way to do it?

Pablete1234 commented 2 weeks ago

Is this roughly what you mean, or is there a more direct way to do it?

there's an action kit

<kit>
  <action>
    <set   ... />
  </action>
</kit>
arcadeboss commented 2 weeks ago

Is this roughly what you mean, or is there a more direct way to do it?

there's an action kit

<kit>
  <action>
    <set   ... />
  </action>
</kit>

Thank you, TIL.

arcadeboss commented 2 weeks ago

You could instead use block drops to apply a kit when webs are broken within the wool room region. The kit has the set x_seal_breaker action as part of it. That solves getting the correct player name. In that same action, switch scope to match conditionally if the x-seal-broke filter returns true.

It looks like by changing the team upgrade alerts and spy reports to team scope you wouldn't need the cooldowns (which is a bandaid rather than addressing the issue). Currently when <trigger filter="all(armor_upgrade_variable=1)" scope="player"> is triggered, then, for example, every single player on Blue triggers 1 spy report for Red (20 Blue -> 20 spy reports).

I have removed all the cool-down logic, and added the block-drop -> kit -> action logic to capture the seal breaking player, this allowed me to add the player name replacement logic back in. Also, the scope of filters reworked to avoid unneeded invocations.