Cliff Visibility

Cetacean

New Member
Reaction score
2
Hi, I've noticed some major inconsistencies when looking uphill at structures that are resting on cliff edges. Essentially, you can you can only view the buildings from the ground when they rest on northerly or easterly cliff edges. The map I've provided illustrates this pretty clearly :). I suspect it may be somehow linked to the building facing constant, but I am by no means certain of this. Does anyone know if there might be a constant or unit property I've missed? I'd really love to achieve 360 degree visibility without workarounds, as they can be less than ideal, aesthetically.

edit: Oops, I forgot to attach the map before!
View attachment cliff test.w3x
 

Cetacean

New Member
Reaction score
2
Yes, that page has been a great reference :). Unfortunately, it doesn't really help here, as the issue likely cannot be fixed through unit properties alone (barring some sort of hidden bug/interaction). It was those more arcane uses that I was interested in when I mentioned object fields. Anyways, did you have a look at the map to observe the behavior in question?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i generally post on here from work so i didnt get a chance to, i can take a look at it tomorow night
 

Cetacean

New Member
Reaction score
2
Ok, I've experimented a bit more and it appears that buildings placed on northerly and easterly cliff edges are considered ground level, while those on southerly or westerly edges behave as if they are on high ground. This affects miss chance, vision, visibility, etc. My guess is that this is an engine quirk they either overlooked or simply deemed acceptable, as buildings aren't typically placed this way under normal circumstances.

View attachment cliff test 2.w3x

Workarounds for the sight issues aren't too tricky to manage, but the misses are going to be eminently more challenging. I would love to find an elegant solution that doesn't involve dummy attackers!
 

Cetacean

New Member
Reaction score
2
Comments/insights anyone?

Right now I'm working on a few systems and custom models for which this bug is quite relevant, so before moving ahead any further with them I'd really like to get a bit more information. If someone could run the map and take a look around, even if it's just to say "Hmm . . that's pretty strange, but I have no clue what's causing it!" that would at least confirm my findings. Any help would be greatly appreciated! :D
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
honestly i think its one of those qwerks about wc3 that never got fixxed, like how entering regions from the north doesnt work, locust cant be properly removed, etc. I think its something that you just have to deal with :(
 

merlinds

Member
Reaction score
15
the only way i can imagine to fix this is through visibility modifiers.
Like, every 0.5 sec pick all units of each playet and chek the clif height on the position of each unit, and deppending on the value of it, activate/deactivate the visibility modifiers.
Have in mind, that for each lvl of terrain the cliff height increase by 128 points.
The hard part is that you will have to create a visibility modifier for each building.
But i have no other idea, and i think no one else does have one :p

Edited:

i`am trying to implement my idea into a map, but i think it does not work :p. I have to go to bed so i left my map for if you want to see my idea:
http://www.epicwar.com/maps/download/188482/e937631ae1e2e01d7e88d4cf3fca797f9da5cd164eab6e2b/cliff%20test.w3x
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
the problem is it registers that it is on the same height, misses and all that dont have an effect, so that means the game is registering its on equal elevation
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
they are useless, he is worried about how the game recognizes the height of the unit, not just visibility, misses work incorrectly, all of that

EDIT:zomg zomg zomg i just found something perfect for you, you can combine merlind's idea with this:
Trigger:
  • Custom Script: set Integer_variable = GetLocationZ(location_variable)

essentially you can use this and check the height of the unit and the nearby areas, adjust the visibility, and trigger a miss chance
 

Cetacean

New Member
Reaction score
2
Hello again! I was away for nearly two weeks w/o internet, but now I've finally had a chance to take a look at your ideas. So before I get to the comments, let me say thanks very much for the input/help! :)

@GFreak45
Ok, this opens up some really cool possibilities! Since GetLocationZ takes into account hill height, it would be possible to do a system that allows units on hilltops to see into low-lying cliff regions and, conversely, to obscure vision to the the hilltop from the cliff region. I'm going to try and work on it a bit and see how computationally viable this might be, but in terms of flavor and tactics/strategy, even if it's limited to specific areas of a map, this could be an awesome feature. Oh yes, and before I forget, could you give me some more specifics on the bug that messes with entering regions from the north? I've not yet encountered it to my knowledge, but would certainly like to know how to avoid or work around it if possible.

@merlinds
I tinkered with your test map a bit, and I think the major reason it wasn't working for you, is that visibility modifiers are very sketchy when done by region, particularly if the regions are small. If you've ever tried to use regions for environmental effects, you've probably seen this lack of granularity. Fortunately, using circular vis modifiers works flawlessly. So your solution is quite solid, and incidentally pretty consistent with some concepts I was tossing around. Though I'm generally hesitant to implement computationally intensive periodic triggers unless strictly necessary, I think an efficiently coded vjass system on a ~1 sec. timer would be pretty reasonable in this case. Also, the cliff z value you mentioned is good info to have if I end up going for a GetLocationZ-based system. :)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
Oh yes, and before I forget, could you give me some more specifics on the bug that messes with entering regions from the north? I've not yet encountered it to my knowledge, but would certainly like to know how to avoid or work around it if possible.

its an error that is possible to encounter in gui where the event a unit enters regionX does not fire when the unit enters the region from the north, eventhough they are in the region now and you can check if they are the trigger would not fire, it only happens with some regions and im not sure exactly what instance of triggering/map size and other things like that that directly affect it
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top