• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Directional Vision Blockers/Blocking with Smooth Hills?

Level 3
Joined
Feb 2, 2024
Messages
11
This must have been discussed somewhere but I cannot find a related thread. I am trying to move away from using Blizzard's hill system but the vision blocking aspect of Blizzard's hills is something I am unsure how to replicate. There is a useful post that explains how vision blocking works and it appears using smooth hills has no impact on unit vision whatsoever regardless of how high they are.

What would the best method of implementing a similar vision system to smooth hills be? I am talking about an intuitive system where units on high ground can see units down below but those down below can't see those on the higher ground. Is using triggers the only way? If so is there already a system like this posted here? Considering how popular smooth cliffs are I was surprised to find no inquiries into this issue.
 
Level 3
Joined
Feb 2, 2024
Messages
11
The issue with using any kind of Blizzard's hills is that they will bring along their evasion mechanic with them. I appreciate the mechanic only when it applies to moving units but that is tied in to units standing on higher elevation levels as well.

After testing with elevators it appears to be the simplest method though. It is possible to remove the model art of the elevator and having it set to the height of 2 through triggers provides you the desired hill level seemingly without any side effects.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
The issue with using any kind of Blizzard's hills is that they will bring along their evasion mechanic with them. I appreciate the mechanic only when it applies to moving units but that is tied in to units standing on higher elevation levels as well.

After testing with elevators it appears to be the simplest method though. It is possible to remove the model art of the elevator and having it set to the height of 2 through triggers provides you the desired hill level seemingly without any side effects.
You can disable uphill misses in the Gameplay Constants:
1707268361835.png


A unit will always miss when their target moves out of their Attack buffer range (it ignores that constant):
1707268426523.png

You could adjust this Attack value as you see fit, a lower value would mean that a moving target is more likely to evade the attack.

You can also rely on Damage Events to trigger an even more elaborate system.
 
Last edited:
Level 3
Joined
Feb 2, 2024
Messages
11
I think I will have to sacrifice something and it will most likely be the dodging-while-moving part. I will have to try and re-create it using triggers.

I didn't know about the range motion buffer mechanic. Though from an RTS perspective it feels very clunky.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
I think I will have to sacrifice something and it will most likely be the dodging-while-moving part. I will have to try and re-create it using triggers.

I didn't know about the range motion buffer mechanic. Though from an RTS perspective it feels very clunky.
Range Motion Buffer IS the dodge-while-moving mechanic as far as I understand. That Gameplay Constant is only used for High Ground (uphill) misses. But maybe I'm wrong...

Assuming I'm correct, you can set the Constant to 0% so there are no uphill misses and you'll still have the "miss while moving" mechanic, which has always been 100% if the target runs too far away by the time attack damage should be dealt. The attacking unit's Damage Point (the amount of time it takes for your Footman's sword to make contact) works in conjunction with the Attack Range Motion Buffer to create a smooth experience.

Speaking of clunky, Range Motion Buffer is actually necessary for the game to NOT feel clunky. Think about it, two Footman with 90 attack range clash into one another at 90 range apart. They're literally at "max attack range" distance from one another. As one Footman begins it's attack animation (it takes roughly half a second for the sword to make contact and damage to be dealt) the second Footman moves 1 range away. The second Footman is now literally "out of attack range" and as far as the game knows this could mean it's 10000 range away (maybe it blinked or teleported) or 1 range away. The game doesn't want the attacking Footman to deal damage to a target that's "out of range" so it counts it as a miss and informs the Footman to either "chase the fleeing target" or "look for a new nearby target" or "stop/resume old order". That's where the buffer comes into play, allowing the unit some leeway so that it can actually land it's attacks on moving enemies. Also, this mechanic is extremely important for allowing you to deal damage when chasing a fleeing target, since without it the target would almost always be out of range. It's more of an issue for Melee units than Ranged for obvious reasons.
 
Last edited:
Level 3
Joined
Feb 2, 2024
Messages
11
You are correct. I assumed that because of the wording in the gameplay constants that the dodge is applied to units while they are moving. Since you put that to question I quickly tested it and it appears that it indeed does not do that. I was not aware of this up until now.

I was thinking more about ranged combat it terms of the clunky part of trying to manipulate Range Motion Buffer values. Though I read more about it now and it appears it doesn't affect ranged attacks at all. I was imagining a scenario where you'd need to time when a missile starts flying to manually order a unit to move in a different direction in order to dodge it. Though it's a mechanic that only functions with Normal and Instant attack types.

The Dawn of War games come to mind where this mechanic could have been useful. In DoW 1 when units move out of melee range the attackers have to simply restart their animation when they get back into range so kiting melee units became such an effective strategy that melee units could essentially only fight buildings or chase around enemies. In DoW 2, however, when a unit begins its melee animation it will always finish it and deal damage regardless if you teleport to the other side of the map. This patched the melee weakness but always leads to some weird situations where your teleporting or jumping units randomly die of "unlucky heart attacks".
 
Last edited:
Top