• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Narrowed Down Desync

Level 5
Joined
Apr 22, 2022
Messages
55
Well I believe I have narrowed down the desync issue but I can't for the life of me figure out why any of the triggers in question would cause a desync. The desyncs seem to happen around 280 seconds ish. At 250 seconds, the Events Init trigger begins which turns on the EventsLoop trigger that runs every 63 seconds of game time.
1698609895117.png
>>
1698609911140.png
>>
1698609944304.png

Each Strike is very similar in that they spawn a hero and a couple units, ordering them to attack the player's base.
1698610020116.png

I'm really not sure what I'm missing that would cause a desync? I'm sure maybe there's a better way to optimize what I have but.. shouldn't desync right? Map attached if anyone would take a look. <3
 

Attachments

  • Northrend Assault Beta 4.4.w3m
    79.3 MB · Views: 5

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Some things to try:

Use (ignore conditions) when it makes sense. It only applies to the initial Conditions block so it'll still work with your triggers:
  • Trigger - Run Events <gen> (ignoring conditions)
Only turn on triggers that are actually off:
  • If Zombie Spawn Left <gen> is off Equal to True then Trigger - Turn on Zombie Spawn Left / Turn on Zombie Spawn Right
Disable the sound.

Look into triggers that could run in response to these triggers running, for example all of your "A unit enters map" Events will fire when you create the Skeletons/Dreadlord. You also run any Order events when issue an Attack-Move order.

Running a trigger that is off may cause problems.

A lot of these shouldn't be an issue but every new patch seems to break things even more so anything is possible.
 
Last edited:
Level 5
Joined
Apr 22, 2022
Messages
55
Some things to try:

Use (ignore conditions) when it makes sense. This only applies to the initial Conditions block:
  • Trigger - Run Events <gen> (ignoring conditions)
Only turn on triggers that are actually off:
  • If Zombie Spawn Left <gen> is off Equal to True then Trigger - Turn on Zombie Spawn Left / Turn on Zombie Spawn Right
Disable the sound.

Look into triggers that could run in response to these triggers running, for example all of your "A unit enters map" Events will fire when you create the Skeletons/Dreadlord. You also run any Order events when issue an Attack-Move order.

Running a trigger that is off may cause problems.

A lot of these shouldn't be an issue but every new patch seems to break things even more so anything is possible.
Hmm I'll give that a shot with the trigger conditions. I don't think I've seen the desync actually happen when the hero/units is spawned. Seems to happen before I think.
 
Level 5
Joined
Apr 22, 2022
Messages
55
Some things to try:

Use (ignore conditions) when it makes sense. It only applies to the initial Conditions block so it'll still work with your triggers:
  • Trigger - Run Events <gen> (ignoring conditions)
Only turn on triggers that are actually off:
  • If Zombie Spawn Left <gen> is off Equal to True then Trigger - Turn on Zombie Spawn Left / Turn on Zombie Spawn Right
Disable the sound.

Look into triggers that could run in response to these triggers running, for example all of your "A unit enters map" Events will fire when you create the Skeletons/Dreadlord. You also run any Order events when issue an Attack-Move order.

Running a trigger that is off may cause problems.

A lot of these shouldn't be an issue but every new patch seems to break things even more so anything is possible.
This may be it? But I'm not sure what would be causing desyncs about it..
1698952141381.png
 
Level 5
Joined
Apr 22, 2022
Messages
55
Try adding a variable for (Picked player). Also, note any triggers that might run when a research is increased (I don't think this is a thing?).

I would also try separating the trigger into two to split the Events.
It's so weird because it only happens the first time it runs too. I don't get anymore desyncs after.
 
Level 5
Joined
Apr 22, 2022
Messages
55
Try adding a variable for (Picked player). Also, note any triggers that might run when a research is increased (I don't think this is a thing?).

I would also try separating the trigger into two to split the Events.
I was able to resolve it I believe by just disabling the damage upgrade. Still not sure why it was causing a desync for certain players though.
 
Level 5
Joined
Apr 22, 2022
Messages
55
Alright I'm at the end of my rope, I cannot for the life of me figure this out. After several games testing, the armor upgrade also caused a desync. I don't get it. I can't be the only one triggering upgrades, what is it about my upgrades that are causing desyncs?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Alright I'm at the end of my rope, I cannot for the life of me figure this out. After several games testing, the armor upgrade also caused a desync. I don't get it. I can't be the only one triggering upgrades, what is it about my upgrades that are causing desyncs?
We know that upgrades work in ladder games and those have at most 3 Levels, so I think it's safe to assume that having a Level value <= 3 should be safe. If you haven't already, ensure that you've tested it with these low levels.

But there's always the chance that the upgrade level isn't even a factor and the issue is related to something the upgrade is doing like changing a tooltip or making another trigger run. Or it could be something completely different happening at that time which is the actual cause of the desync.

Anyway, here's an alternative to upgrades if it really comes to this:
  • AI Upgrades
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of AI Class for (Triggering unit)) Equal to 1
    • Actions
      • -------- Adjust max hp: --------
      • Set VariableSet AI_Unit = (Triggering unit)
      • Set VariableSet AI_Life_Multiplier = (0.10 x (Real(AI_Life_Upgrade[AI_Level])))
      • Set VariableSet AI_Life = ((Life of AI_Unit) x (1.00 + AI_Life_Multiplier))
      • Unit - Set Max HP of AI_Unit to (Integer(AI_Life))
      • Unit - Set life of AI_Unit to 100.00%
      • -------- Adjust attack damage bonus: --------
      • Ability - Set Ability: (Unit: AI_Unit's Ability with Ability Code: Attack Damage (Upgrade))'s Integer Level Field: Attack Bonus ('Iatt') of Level: 0 to (1 x AI_Attack_Upgrade[AI_Level])
      • Unit - Increase level of Attack Damage (Upgrade) for AI_Unit
      • Unit - Decrease level of Attack Damage (Upgrade) for AI_Unit
You can modify the stats of Units and Abilities directly using Actions. AI_Life_Upgrade and AI_Attack_Upgrade are Integer arrays. AI_Level is an Integer that represents the upgrade level, which you can modify as you see fit:
  • Set Variable AI_Level = (AI_Level + 1)
AI_Class is an ability based on Storm Hammers that you would give your AI units in the Object Editor. This is what I consider a pseudo-Classification, the ability is simply there as an efficient Condition for determining what is and isn't an AI unit. You could also use If Then Else statements and check different abilities (classifications) to apply different upgrades.

Finally, you'd want a trigger that Picks every AI unit and applies these upgrades to them as well - this way pre-existing units get the benefits and not just new units entering the map.


Here's an awesome system for making stat modification even easier:
This would make modifying the units a breeze once you have it implemented.
 
Last edited:
Level 5
Joined
Apr 22, 2022
Messages
55
We know that upgrades work in ladder games and those have at most 3 Levels, so I think it's safe to assume that having a Level value <= 3 should be safe. If you haven't already, ensure that you've tested it with these low levels.

But there's always the chance that the upgrade level isn't even a factor and the issue is related to something the upgrade is doing like changing a tooltip or making another trigger run. Or it could be something completely different happening at that time which is the actual cause of the desync.

Anyway, here's an alternative to upgrades if it really comes to this:
  • AI Upgrades
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Level of AI Class for (Triggering unit)) Equal to 1
    • Actions
      • -------- Adjust max hp: --------
      • Set VariableSet AI_Unit = (Triggering unit)
      • Set VariableSet AI_Life_Multiplier = (0.10 x (Real(AI_Life_Upgrade[AI_Level])))
      • Set VariableSet AI_Life = ((Life of AI_Unit) x (1.00 + AI_Life_Multiplier))
      • Unit - Set Max HP of AI_Unit to (Integer(AI_Life))
      • Unit - Set life of AI_Unit to 100.00%
      • -------- Adjust attack damage bonus: --------
      • Ability - Set Ability: (Unit: AI_Unit's Ability with Ability Code: Attack Damage (Upgrade))'s Integer Level Field: Attack Bonus ('Iatt') of Level: 0 to (1 x AI_Attack_Upgrade[AI_Level])
      • Unit - Increase level of Attack Damage (Upgrade) for AI_Unit
      • Unit - Decrease level of Attack Damage (Upgrade) for AI_Unit
You can modify the stats of Units and Abilities directly using Actions. AI_Life_Upgrade and AI_Attack_Upgrade are Integer arrays. AI_Level is an Integer that represents the upgrade level, which you can modify as you see fit:
  • Set Variable AI_Level = (AI_Level + 1)
AI_Class is an ability based on Storm Hammers that you would give your AI units in the Object Editor. This is what I consider a pseudo-Classification, the ability is simply there as an efficient Condition for determining what is an isn't an AI unit. You could also use If Then Else statements and check different abilities (classifications) to apply different upgrades.

Finally, you'd want a trigger that Picks every AI unit and applies these upgrades to them as well - this way pre-existing units get the benefits and not just new units entering the map.


Here's an awesome system for making stat modification even easier:
This would make modifying the units a breeze once you have it implemented.
Thanks a lot Uncle for your reply, I appreciate it. I'll take a look at implementing this tomorrow and see how it goes!
 
Level 5
Joined
Apr 22, 2022
Messages
55
After some testing, so far so good I think I found the culprit. I had Applies to All Units set as True. I've set it to false and so far no desyncs.
1699634708477.png
 
Top